Hydrostatics#

Classes for hydrostatic calculations.

HydrostaticsCalculator#

class HydrostaticsCalculator(vessel, water_density=1025.0)#

Calculator for hydrostatic properties.

Parameters:
  • vessel – The vessel to calculate hydrostatics for

  • water_density – Water density in kg/m³ (default: 1025.0 for seawater)

calculate_at_draft(draft, trim=0.0, heel=0.0, vcg=None)#

Calculates hydrostatics at a given draft, trim, and heel.

Parameters:
  • draft – Draft at reference point (m)

  • trim – Trim angle (degrees)

  • heel – Heel angle (degrees)

  • vcg (float or None) – Vertical center of gravity for GM calculation (optional)

Returns:

HydrostaticState with all properties

calculate_at_displacement(displacement_mass, vcg=None, cog=None, trim=None, heel=None)#

Calculates hydrostatics for a given displacement, finding the required draft.

Parameters:
  • displacement_mass – Target displacement in kg

  • vcg – Vertical center of gravity (m) for GM calculation (optional)

  • cog – Full center of gravity (LCG, TCG, VCG) tuple (optional, overrides vcg)

  • trim – Fixed trim angle in degrees (optional, default 0.0)

  • heel – Fixed heel angle in degrees (optional, default 0.0)

Returns:

HydrostaticState with all properties

HydrostaticState#

class HydrostaticState#

Result of hydrostatic calculations.

Basic Properties

draft: float#

Draft at reference point (m).

volume: float#

Submerged volume (m³).

displacement: float#

Displacement mass (kg).

Centers

cob: tuple[float, float, float]#

Center of Buoyancy (LCB, TCB, VCB) vector.

cog: tuple[float, float, float] or None#

Center of Gravity (LCG, TCG, VCG) vector, if provided.

Waterplane Properties

waterplane_area: float#

Waterplane area (m²).

lcf: float#

Longitudinal Center of Flotation (m).

Metacentric Radii

bmt: float#

Transverse metacentric radius (m).

bml: float#

Longitudinal metacentric radius (m).

Metacentric Heights (Corrected for Free Surface)

gmt: float or None#

Transverse metacentric height (Wet/Corrected) (m).

gml: float or None#

Longitudinal metacentric height (Wet/Corrected) (m).

Metacentric Heights (Uncorrected)

gmt_dry: float or None#

Transverse metacentric height (Dry/Uncorrected) (m).

gml_dry: float or None#

Longitudinal metacentric height (Dry/Uncorrected) (m).

Dimensions

lwl: float#

Length at Waterline (m).

bwl: float#

Beam at Waterline (m).

los: float#

Length Overall Submerged (m).

wetted_surface_area: float#

Wetted Surface Area (m²).

midship_area: float#

Midship Section Area (m²).

Form Coefficients

cb: float#

Block Coefficient.

\[C_b = \frac{\nabla}{L_{wl} \cdot B_{wl} \cdot T}\]
cm: float#

Midship Section Coefficient.

\[C_m = \frac{A_m}{B_{wl} \cdot T}\]
cp: float#

Prismatic Coefficient.

\[C_p = \frac{\nabla}{A_m \cdot L_{wl}}\]

Free Surface Corrections

free_surface_correction_t: float#

Transverse Free Surface Correction (m).

free_surface_correction_l: float#

Longitudinal Free Surface Correction (m).

Stiffness Matrix

stiffness_matrix: list[float]#

6x6 Hydrostatic Stiffness Matrix (flattened row-major).