Stability#
Classes for stability analysis and GZ curve calculations.
StabilityCalculator#
- class StabilityCalculator(vessel, water_density=1025.0)#
Calculator for stability analysis (GZ curves).
- Parameters:
vessel – The vessel to calculate stability for
water_density – Water density in kg/m³
- calculate_gz_curve(displacement_mass, cog, heels)#
Calculates the GZ curve for a given loading condition.
- Parameters:
displacement_mass – Base vessel displacement (excluding dynamic tanks) in kg
cog – Base center of gravity (LCG, TCG, VCG) excluding dynamic tanks
heels – List of heel angles in degrees
- Returns:
StabilityCurve object with corrected GZ values
- calculate_complete_stability(displacement_mass, cog, heels)#
Calculates complete stability analysis combining hydrostatics, GZ curve, and wind data.
- Parameters:
displacement_mass – Target displacement in kg
cog – Center of gravity (LCG, TCG, VCG) tuple
heels – List of heel angles for GZ curve in degrees
- Returns:
CompleteStabilityResult with hydrostatics, GZ curve, and wind data
CompleteStabilityResult#
- class CompleteStabilityResult#
Complete stability calculation result combining hydrostatics, GZ curve, and wind data.
- hydrostatics: HydrostaticState#
Hydrostatic state at equilibrium (draft, trim, GM0, etc.).
- gz_curve: StabilityCurve#
GZ stability curve for the loading condition.
- wind_data: WindHeelingData or None#
Wind heeling data (if silhouettes are defined).
- gm0: float or None#
Initial transverse metacentric height (GM0) with free surface correction.
- gm0_dry: float or None#
Initial transverse metacentric height without free surface correction.
- max_gz: float or None#
Maximum GZ value on the curve.
- heel_at_max_gz: float or None#
Heel angle at maximum GZ.
StabilityCurve#
- class StabilityCurve#
A complete GZ stability curve.
- points()#
Returns a list of StabilityPoint with (heel, draft, trim, gz, is_flooding, flooded_openings).
Each point has:
heel: Heel angle in degreesdraft: Draft at equilibrium (m)trim: Trim angle in degreesgz: GZ value (m)is_flooding: True if any opening is submergedflooded_openings: List of flooded opening names
WindHeelingData#
- class WindHeelingData#
Wind heeling data from silhouette calculations.
Used for wind heeling moment calculations per IMO 2008 IS Code (MSC.267).