hydrostatics.SplitHull#

class hydrostatics.SplitHull(hull, normal, waterline, rho=1.0)#

Split hull along a plane defined by normal.dot(x) = waterline.

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.

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.

x

Local x vector in waterplane.

y

Local y vector in waterplane.

__init__(hull, normal, waterline, rho=1.0)#

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