opensource hull simulator

Discussion in 'Stability' started by zukobo, May 13, 2021.

  1. zukobo
    Joined: Sep 2019
    Posts: 57
    Likes: 12, Points: 8
    Location: taiwan

    zukobo Junior Member

    I've been working on a hull simulator called bpyhullsim that works as a blender extension.

    It accepts a watertight mesh hull object as the input and will submerge the object into a simulated body of water to determine water level based on a specific weight and also balance the roll and pitch of the hull until stabilized as an equilibrium to see how the object will rest in the water.

    Center of gravity and weight can be adjusted for different loading scenarios.

    You can perform hull stability analysis using RollTest feature which can simulate a hull rollover to determine righting moment for a range of roll angles.

    To summarize it creates a cube shaped body of water and slowly submerses the hull into the body of water while calculating the intersection of the hull and the water for each step of the simulation. The boolean intersection of the hull and the water determine the displaced water. The weight and center of gravity is calculated for this displaced water and compared with the center of gravity location on the hull object to determine the righting arm. The hull is submersed until the desired displacement weight is achieved.

    It's still under development and SEEMS to be accurate but I'm starting this thread here to post some of the results so some of the hydro-stability experts on this board who understand this stuff better than me might be able to point out any problems or things I'm calculating wrong.

    Looking for some feedback.
     
    Dejay likes this.
  2. zukobo
    Joined: Sep 2019
    Posts: 57
    Likes: 12, Points: 8
    Location: taiwan

    zukobo Junior Member

    The first example is a rotating wedge shaped object with a displacement target of 2000kg
    rollover_2021_05_13_wedge.gif

    As the wedge rotates point down it sinks further into the water... There is less flotation at the bottom of the wedge. The red line is added as a visual reference so you can see how it sinks around the 90 degree angle.

    The animated gif is only every 5 frames to keep the file size small (only 500kb).

    The stability curve looks like this:
    rollover_2021_05_13_wedge.png
    Does this curve look right?
     
  3. zukobo
    Joined: Sep 2019
    Posts: 57
    Likes: 12, Points: 8
    Location: taiwan

    zukobo Junior Member

    I guess I should clarify this is trying to calculate static stability - dynamic stability is not taken into consideration.
     
  4. zukobo
    Joined: Sep 2019
    Posts: 57
    Likes: 12, Points: 8
    Location: taiwan

    zukobo Junior Member

    This example is a rotating cube shaped object with a displacement target of 2000kg
    rolltest_cube_cg_0.gif

    CG aligned with geometric center of cube:

    rolltest_cube_cg_0.png
    CG offset vertically 50mm in negative Z direction
    rolltest_cube_cg_m5.png

    CG offset vertically 50mm in positive Z direction
    rolltest_cube_cg_p5.png
     
  5. zukobo
    Joined: Sep 2019
    Posts: 57
    Likes: 12, Points: 8
    Location: taiwan

    zukobo Junior Member

    4.8m microcruiser boat hull - displacement target 690kg:

    rolltest_cg_0.gif

    CG aligned to geometric center of hull:
    rolltest_cg_0.png
    CG offset -5cm from geometric center (-5cm lower CG)
    rolltest_cg_m5.png
    CG offset -10cm from geometric center (-10cm lower CG)
    rolltest_cg_m10.png

    CG offset -15cm from geometric center (-15cm lower CG)
    rolltest_cg_m15.png
    CG offset -30cm from geometric center (-30cm lower CG)
    rolltest_cg_m30.png
    In this example it shows a negative righting force for lower CG which is confusing - it's just function of the direction of rotation... the force is opposite of the arm of rotation. I should probably flip the axis so it's not confusing?

    If the red line doesn't cross the zero mark does it mean the boat is "self righting" ?

    You can learn more about this boat here
     
  6. zukobo
    Joined: Sep 2019
    Posts: 57
    Likes: 12, Points: 8
    Location: taiwan

    zukobo Junior Member

    If you want to upload an OBJ or STL file - I can run a simulation on your boat hull to see what it looks like...
     
  7. Roni
    Joined: May 2020
    Posts: 30
    Likes: 0, Points: 6
    Location: Brazil

    Roni Junior Member

    In your gifs displacement seems to be varying with roll. To be more precise shouldn't you re evaluate draft for each angle so your boats has the correct displacement?
     
  8. zukobo
    Joined: Sep 2019
    Posts: 57
    Likes: 12, Points: 8
    Location: taiwan

    zukobo Junior Member

    It varies by a band of about 5% - the solver could narrow this band for each roll step but it would require more simulation substeps...

    It would be more accurate to narrow this band to a tighter value...

    Thank you for that feedback it's good.
     

  9. Dejay
    Joined: Mar 2018
    Posts: 721
    Likes: 137, Points: 43
    Location: Europe

    Dejay Senior Newbie

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.