VPP Solver in Matlab

Discussion in 'Hydrodynamics and Aerodynamics' started by HarryS, Dec 26, 2012.

  1. HarryS
    Joined: Feb 2010
    Posts: 4
    Likes: 0, Points: 1, Legacy Rep: 10
    Location: Denmark

    HarryS New Member

    ...Again help needed.
    I have done some coding with matlab and now im starting to add up a VPP solver.

    I have done some research about the topic but im not quite how to do the coding. I found one quite good looking "template". http://pastebin.com/cRAVkHbF
    I have tried to understand the "template" but i just dont get it.

    My codes will already calculate these "moment and force residuals F and M" but beacause of lack of solver those aint 0.

    if someone could help me with this I would be more than happy rest of the year ! ;)

    The points which need some clarifying is the
    % Calculation of derivatives using the forward finite difference method
    [FdVS,~] = ?
    dFdVS = ?


    and the
    % Construct jacobian and calculate newton step
     
  2. CWTeebs
    Joined: Apr 2011
    Posts: 232
    Likes: 15, Points: 0, Legacy Rep: 171
    Location: Maine

    CWTeebs AnomalyGenerator

    Hmm...

    What's this for? What have you actually written so far? Are you having trouble with details, i.e., the numerical nuances of actually implementing the calculation of the derivatives and Jacobian, or are you unfamiliar with terms like 'forward difference' technique? What's your background?

    "...but because of lack of solver these aint 0."
    I don't fully understand what you mean. You're possibly referring to an iterative solver akin to Excel's 'Solver' or MatLab's 'ODE45,' Livermore's LSODA et al, and that because your code isn't incorporated into such a tool the residual forces and moments aren't resulting in equilibrium.
     
    Last edited: Dec 29, 2012
  3. tspeer
    Joined: Feb 2002
    Posts: 2,319
    Likes: 303, Points: 83, Legacy Rep: 1673
    Location: Port Gamble, Washington, USA

    tspeer Senior Member

    I don't think that template is very useful for you. Have you looked into gvpp?

    This isn't Matlab, but you can see how I solved a similar problem in Mathcad.

    I found it easiest to sum up the forces to get the excess force, Fex, (which should be zero at equilibrium) and then plot Fex vs apparent wind angle, beta. You are, of course, looking for the apparent wind angle where Fex=0. The smaller beta is, the faster the boat is going. I liked using beta better than speed because for high-performance boats, beta changes slowly from one point of sail to another. So when constructing a polar the apparent wind angle from the previous solution is likely to be close to the current solution. In addition, the excess force is a strong function of beta, so that makes the numerical calculations very stable near the solution.

    Can you give us some more information about how you've set up your force and moment calculations?
     
    1 person likes this.
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.