# opensource hull simulator

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

Tags:
1. Joined: Sep 2019
Posts: 63
Likes: 15, Points: 8
Location: taiwan

### zukoboJunior 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.

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. Joined: Sep 2019
Posts: 63
Likes: 15, Points: 8
Location: taiwan

### zukoboJunior Member

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

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:

Does this curve look right?

3. Joined: Sep 2019
Posts: 63
Likes: 15, Points: 8
Location: taiwan

### zukoboJunior Member

I guess I should clarify this is trying to calculate static stability - dynamic stability is not taken into consideration.

4. Joined: Sep 2019
Posts: 63
Likes: 15, Points: 8
Location: taiwan

### zukoboJunior Member

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

CG aligned with geometric center of cube:

CG offset vertically 50mm in negative Z direction

CG offset vertically 50mm in positive Z direction

5. Joined: Sep 2019
Posts: 63
Likes: 15, Points: 8
Location: taiwan

### zukoboJunior Member

4.8m microcruiser boat hull - displacement target 690kg:

CG aligned to geometric center of hull:

CG offset -5cm from geometric center (-5cm lower CG)

CG offset -10cm from geometric center (-10cm lower CG)

CG offset -15cm from geometric center (-15cm lower CG)

CG offset -30cm from geometric center (-30cm lower CG)

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" ?

6. Joined: Sep 2019
Posts: 63
Likes: 15, Points: 8
Location: taiwan

### zukoboJunior 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. Joined: May 2020
Posts: 30
Likes: 0, Points: 6
Location: Brazil

### RoniJunior 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. Joined: Sep 2019
Posts: 63
Likes: 15, Points: 8
Location: taiwan

### zukoboJunior 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. Joined: Mar 2018
Posts: 721
Likes: 138, Points: 43
Location: Europe

### DejaySenior Newbie

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.