hydrostatics.SolvedHull#

class hydrostatics.SolvedHull(hull, normal, waterline, rho, success, message)#

Result object for Hull.solve representing region of hull below waterplane. In addition to methods from SplitHull, also includes information about termination of Hull.solve. See SplitHull for 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:
hull

Base hull to split.

normal

Normal vector to plane.

waterline

Constant term in plane equation.

volume

Volume of region below waterplane.

center_of_buoyancy

Center of buoyancy (center of volume) of region below waterplane.

message

Details of solver termination.

success

Whether the solver terminated successfully.

__init__(hull, normal, waterline, rho, success, message)#

Methods

plot()

Plot 3D mesh and submerged view in Gmsh.

righting_moment()

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 as volume.

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 x and normal. Can be set.

Returns:
yndarray, shape (3,)

Local y vector in waterplane.