Hydrostatics#
TankOptions#
- class TankOptions(include_mass=False, include_fsm=True)#
Options for tank handling in hydrostatic calculations.
- Parameters:
include_mass – Include tank fluid mass in displacement (default: False)
include_fsm – Apply Free Surface Moment correction to GM (default: True)
- static none()#
Create options with no tank effects (mass=False, fsm=False).
- static all()#
Create options with all tank effects (mass=True, fsm=True).
- static mass_only()#
Create options with only mass included (mass=True, fsm=False).
- static fsm_only()#
Create options with only FSM correction (mass=False, fsm=True).
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)
- from_draft(draft, trim=0.0, heel=0.0, vcg=None, num_stations=None, tank_options=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)
num_stations – Number of stations (optional)
tank_options – TankOptions object (optional)
- Returns:
HydrostaticState with all properties
- from_drafts(draft_ap, draft_fp, heel=0.0, vcg=None, tank_options=None)#
Calculates hydrostatics from drafts at Aft and Forward Perpendiculars.
- Parameters:
draft_ap – Draft at Aft Perpendicular (m)
draft_fp – Draft at Forward Perpendicular (m)
heel – Heel angle (degrees)
vcg (float or None) – Vertical center of gravity for GM calculation (optional)
tank_options – TankOptions object (optional)
- Returns:
HydrostaticState with all properties
- from_displacement(displacement_mass, vcg=None, cog=None, trim=None, heel=None, tank_options=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)
tank_options – TankOptions object (optional)
- Returns:
HydrostaticState with all properties
Note
When
tank_optionsis provided withinclude_mass=True,displacement_massis interpreted as the mass of the vessel excluding the fluid in the tanks. The total displacement used for calculation will bedisplacement_mass + tank_fluid_mass.
HydrostaticState#
- class HydrostaticState#
Result of hydrostatic calculations.
Basic Properties
- displacement: float#
Total displacement mass in kg (Volume * Water Density). Represents the total weight of the floating system (Vessel + Tanks).
- vessel_displacement: float#
Vessel displacement mass in kg (Total - Tank Mass). Represents the input displacement (Lightship + Deadweight excluding tanks).
- tank_displacement: float#
Tank fluid mass in kg (sum of all tank fluid masses). 0.0 if
include_massis False.
Centers
- cog: tuple[float, float, float] or None#
Center of Gravity (LCG, TCG, VCG) vector, if provided. Matches
displacement.
- vessel_cog: tuple[float, float, float] or None#
Vessel Center of Gravity (LCG, TCG, VCG) vector (Ship-only). Matches
vessel_displacement.
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
Advanced Properties
- freeboard: float or None#
Minimum freeboard in meters, or None if no deck edges defined.