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
Centers
- cog: tuple[float, float, float] or None#
Center of Gravity (LCG, TCG, VCG) vector, if provided.
Waterplane Properties
Metacentric Radii
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
Form Coefficients
Free Surface Corrections
Stiffness Matrix