Savitsky Matlab Script: Verification needed

Discussion in 'Hydrodynamics and Aerodynamics' started by HSRStudent, Apr 14, 2012.

  1. HSRStudent
    Joined: Apr 2012
    Posts: 7
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Switzerland

    HSRStudent Junior Member

    Hi all,

    me and my colleague are currently at our bachelor thesis in electrical engineering.
    In our project we need to calculate the resistance at various speeds.
    We wrote a Matlab script according to the paper from yades here on the forum (thanks!) and other avaiable literature on Savitsky resistance prediction for this but aren't sure if we got everything right.

    We would be grateful if someone more experienced in this field could verify our script and/or give some feedback (point out the errors).

    Please feel free to use the script in your own calculations, I think the function should also run smoothly in Orcad (free).

    Greetings from Switzerland
     

    Attached Files:

  2. ldigas
    Joined: Feb 2011
    Posts: 187
    Likes: 4, Points: 18, Legacy Rep: 60
    Location: Zagreb, Croatia

    ldigas Senior Member

    Interesting topic for an electrical engineering batchelor thesis :)

    It would be good if you stated what literature you were following (the original Savitsky article from '64? The one with a simplified and a general case of forces?). If I recall, it had a numeric example at the end. Does your script give similar results?
     
  3. HSRStudent
    Joined: Apr 2012
    Posts: 7
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Switzerland

    HSRStudent Junior Member

    Hello Idigias,

    we draw from different sources to come up with the algorithm.
    I think the most important were Savitsky '64, 76', Yades' "Power and propeller Requirements for hard chine planing crafts" (the step numbers are congruent with our algorithm), Savitsky 2007 (Inclusion of whisker spray), Blount&Fox (for app. resistances), Principles of yacht design for another step-by-step guide.

    We used only the generic case, because our "product" shall be applicable to any kind of planing craft in the end.

    You wer're absolutely right with the numerical example at the end of Savitsky '64 (page 89). So I converted all the units in to the metric system and compared his numbers with ours (I also commented app. resistances and "corrected lambda" out) , this is what I got:

    Savitsky/Our algorithm at
    V=67.5ft/s / 20.4676m/s
    tau=2° (did 3° for tan0 and D),
    everything else according to "given":

    lambda=3.85/3.836
    Cl0=0.085/0.084
    Re=3.61x10^8/3.3503x10^8
    Cf=0.00174/0.0018
    Df=7340pd/7219pd(32113N)
    Cp=0.59/0.58
    c=-2.6/-2.282(-0.6957m)
    a=1.39ft/1.38ft(0.4215m)
    tan0=2.3°/2.286°
    D=9095lb/8953lb

    So we get roughly the same result, but not exactly.
    I think I'll look in to it now and maybe I'll find an error, but it may also just be rounding errors and some inaccuracy with the conversion to metric.

    Edit:
    Compared the two results. I'm pretty sure that the differences are only due to rounding errors and inaccuracy on Savitsky's site (in 64 there weren't as many computers around).
    So I'm now pretty confident in our algorithm, I noticed that Yade's algorithm branches of from Savitsky's at about Savitsky step number 16.
    But it still would be great if an expert could take a look at it. :)
     
  4. HSRStudent
    Joined: Apr 2012
    Posts: 7
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Switzerland

    HSRStudent Junior Member

    New question

    I came up with a new question for you all:

    my Savitsky-Prediction only works up to approx. 11.5m/s for our boat,
    further analysis revealed that lambda is bigger than 4 at higher speed and we didn't allow for that, because in Savitsky 64 it is written (on page 75) that lambda shall be smaller than 4, Yades did also write this in his PlaninHullMaster document.

    But I routinely see resistance estimation with Savitsky at high speeds.
    So, is this only because they have bigger boats (ours is only 7m long and 1000kg heavy), or shall I remove this border in the script because it's wrong?
     
  5. quequen
    Joined: Jul 2009
    Posts: 369
    Likes: 15, Points: 28, Legacy Rep: 199
    Location: argentina

    quequen Senior Member

    Have you compared your results against Dingo Tweedie spreadsheet?
     
  6. HSRStudent
    Joined: Apr 2012
    Posts: 7
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Switzerland

    HSRStudent Junior Member

    I tried that one, but it seemed like I wasn't able to get it right (see attached image of my inputs), it didn't show anything at all in "Savitsky Grafiek".:?:
     

    Attached Files:

  7. quequen
    Joined: Jul 2009
    Posts: 369
    Likes: 15, Points: 28, Legacy Rep: 199
    Location: argentina

    quequen Senior Member

  8. HSRStudent
    Joined: Apr 2012
    Posts: 7
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Switzerland

    HSRStudent Junior Member

    I took the new one (thanks quequen) and pasted my data (and found some errors while doing it) - it now shows something, but I'm not quite sure if this is really correct.

    On another note: Dingo doesn't seem to care if lambda>4

    Added some attachments to illustrate, screenshot4 is my algorithm: Savitsky power is the red line (y-axis:kW)
    Screenshot5 is savitsky resistance (y-axis: Newton)

    x axis is speed in m/s


    I think I'm going to disable the lambda>4 break in my code. I think there's still some error, but I'm running out of time to search for it (have to submit the paper by end of next week and there's still somethings to do).

    Thanks to all of you,

    HSRStudent
     

    Attached Files:

  9. quequen
    Joined: Jul 2009
    Posts: 369
    Likes: 15, Points: 28, Legacy Rep: 199
    Location: argentina

    quequen Senior Member

    HSR, the spreadsheet don't remarks all bad inputs, be carefull with that. There are some (IMO) extrange input data in your example, some of them could be out of range:
    Beta=30º
    Disp=12 ton (for a 5 m LOA ?)
    f=0

    perhaps the device you are checking can't be analyzed by savitsky metod:confused:

    Also, check this one (if you have not already):
    http://illustrations.marin.ntnu.no/hydrodynamics/resistance/planing/index.html

    Edit: Daiquiri posted this manual of HullSpeed, listing boundary conditions for many resistance metods including savitsky:
    http://www.boatdesign.net/forums/hy...prediction-methods-help-43017.html#post552852
     
  10. HSRStudent
    Joined: Apr 2012
    Posts: 7
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Switzerland

    HSRStudent Junior Member

    Just so you know what we're talking about:
    The boat is a correct craft ski nautique.

    beta=30: we got this out of optimizing the parameters through least squares to fit the deaccelerating power (prop not moving): meaning P=m*a*v=Df*v where we knew v, m and a so Df is known.
    But you're right, the ski nautique has approx. 20-25deg at the middle and 5 deg at transom (spreadsheet doesn't run with those entries).

    f=0: The boat is refitted to an electrical drive and the shaft goes directly in to the middle of the motor and we reasoned that the lcg and vcg would approximately be where the motor is - as the batteries are evenly distributed around the ship and there's still a good amount of material (mass) above the motor (including the persons sitting there).

    Disp=12tons:There seems to be some ambiguity in the spreadsheet, I'm not really shure if this is an error: mass=1240kg, but I thought displacement (delta) = m*g=approx 12400N.
    Volume would be m^3...
    I'm a bit confused here, as in principles of yacht design:
    Clbeta=m*g/(0.5*rho*v^2*b^2)
    but in planing hull master:
    "delta"/(0.5*rho*v^2*b^2)
    and "delta" is described as: displacement mass or vertical load on water (gross weight - i.e. static condition) in kg

    I looked at the boundary conditions as described in the hullspeed manual and 3.07<L/V^1/3<12.4 would not be inside the boundaries - but I couldn't find this restriction in original Savitsky or planing hull master...

    edit: if I interpret delta as only m the script has some weird behaviour after 18m/s...
     
  11. quequen
    Joined: Jul 2009
    Posts: 369
    Likes: 15, Points: 28, Legacy Rep: 199
    Location: argentina

    quequen Senior Member

    5/1.2^1/3=4.7
    This boat should be into the savitsky limits, but remember savistky will cover speeds according to wetted area, so over a certain speed results are inaccurate (check lambda). Follow the unit system for wich the formulas are made in each case, they match the preferences for each country, can't see the problem with that. So use 1200kg (1.2 ton) not 12000.
    Regarding f, you should make a balance analysis to make shure where LCG and VCG are. There are some good spreadsheets at the bd software section to do this. What cares is the action line through the push center, (that is, the propeller center, or the turbine mouth) not necesarily concident with the main shaft.
     

    Attached Files:


  12. HSRStudent
    Joined: Apr 2012
    Posts: 7
    Likes: 0, Points: 0, Legacy Rep: 10
    Location: Switzerland

    HSRStudent Junior Member

    I reviewed my leastsquares optimizing code and found that it didn't incorporate the last changes in resistance calculating.
    I know get: lcg=1.592m, beta=16.9463deg
    I also did a run in which f is also optimized, I got:
    lcg=1.7465m, beta=17.5616deg, f=1m (boundary)
    As it was the boundary I changed it manually to 0m - there were only minimal differences in the resulting power. So it seems that the algorithm isn't sensitive to changes in this magnitude (and it's pretty shurely in the +-1m range).
    lcg and beta seem in a very probable range now.
    I'm really sorry for overlooking this error in the optimizing part - thank you for helping me find it!:)

    We deduced earlier that lcg and beta have the most influences on the outcome, that's why we're tuning those parameters (I understand if this seems esoteric but the theory works on cars and seems to give good results on boats so far).
     
Loading...
Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
When making potentially dangerous or financial decisions, always employ and consult appropriate professionals. Your circumstances or experience may be different.