NavalToolbox Documentation#
NavalToolbox
High-performance naval architecture library for hydrostatics and stability calculations
NavalToolbox is a Rust library with Python bindings designed for naval architects, marine engineers, and researchers who need accurate and fast hydrostatic and stability calculations.
Key Features#
⚡ High Performance
Rust core with parallel processing (Rayon) delivers blazing-fast calculations. GZ curves computed in seconds.
🎯 Accurate
Validated against DTMB 5415 reference hull with <3.5cm GZ error. Wall-sided formula verification included.
🐍 Python API
Easy-to-use Python bindings via PyO3. Ideal for scripts, Jupyter notebooks, and rapid prototyping.
📐 Complete
Hull, Vessel, Tanks, Hydrostatics, Stability modules. Supports multi-hull configurations.
Quick Example#
from navaltoolbox import Hull, Vessel, StabilityCalculator
# Load hull geometry
hull = Hull("ship.stl")
vessel = Vessel(hull)
# Calculate GZ curve
stab = StabilityCalculator(vessel, water_density=1025.0)
curve = stab.calculate_gz_curve(
displacement_mass=8635000, # kg
cog=(71.67, 0.0, 7.555), # LCG, TCG, VCG
heels=[0, 10, 20, 30, 40, 50, 60]
)
for heel, gz in zip(curve.heels(), curve.values()):
print(f"Heel {heel:5.1f}°: GZ = {gz:.3f}m")