hydrostatics.SolvedHull#
- class hydrostatics.SolvedHull(hull, normal, waterline, rho, success, message)#
Result object for
Hull.solverepresenting region of hull below waterplane. In addition to methods fromSplitHull, also includes information about termination ofHull.solve. SeeSplitHullfor more details.- Parameters:
- hullHull
Base hull to split.
- normalarray_like, shape (3,)
Normal vector to plane. Will be normalized.
- waterlinefloat
Constant term in plane equation.
- rhofloat
Density of water in appropriate units. Default is 1., in which case displacements and moments are essentially in units of rho.
- successbool
Whether the solver terminated successfully
- messagestr
Details of solver termination.
- Attributes:
hullBase hull to split.
normalNormal vector to plane.
waterlineConstant term in plane equation.
volumeVolume of region below waterplane.
center_of_buoyancyCenter of buoyancy (center of volume) of region below waterplane.
messageDetails of solver termination.
successWhether the solver terminated successfully.
- __init__(hull, normal, waterline, rho, success, message)#
Methods
plot()Plot 3D mesh and submerged view in Gmsh.
Righting moment of region below waterline.
- property center_of_buoyancy#
Center of buoyancy (center of volume) of region below waterplane.
- Returns:
- cobfloat
Center of buoyancy below waterplane.
- property displacement#
Displacement of region below waterplane. If
rho = 1.0, same asvolume.- Returns:
- displacementfloat
displacement of region below waterplane.
- static finalize()#
- property hull#
Base hull to split.
- Returns:
- hullHull
Base hull to split.
- property message#
Details of solver termination.
- Returns:
- messagestr
Details of solver termination.
- property normal#
Normal vector to plane. Is normalized.
- Returns:
- normalndarray, shape (3,)
Normal vector to plane. Is normalized.
- plot()#
Plot 3D mesh and submerged view in Gmsh.
- righting_moment()#
Righting moment of region below waterline.
- Returns:
- momentndarray, shape (3,)
Righting moment of region below waterline.
- property success#
Whether the solver terminated successfully.
- Returns:
- successbool
Whether the solver terminated successfully.
- property volume#
Volume of region below waterplane.
- Returns:
- volumefloat
Volume below waterplane.
- property waterline#
Constant term in plane equation.
- Returns:
- waterlinefloat
Constant term in plane equation.
- property x#
Local x vector in waterplane. Default is projection of global x vector
(1,0,0)onto the waterplane. Can be set.- Returns:
- xndarray, shape (3,)
Local x vector in waterplane.
- property y#
Local y vector in waterplane. Default is vector perpendicular to both
xandnormal. Can be set.- Returns:
- yndarray, shape (3,)
Local y vector in waterplane.