shipHydrostatics.Tools Namespace Reference

Classes

class  Point
 

Functions

def areas (ship, n, draft=None, roll=Units.parseQuantity("0 deg"), trim=Units.parseQuantity("0 deg"))
 
def BMT (ship, draft=None, trim=Units.parseQuantity("0 deg"))
 
def displacement (ship, draft=None, roll=Units.parseQuantity("0 deg"), trim=Units.parseQuantity("0 deg"))
 
def floatingArea (ship, draft=None, roll=Units.parseQuantity("0 deg"), trim=Units.parseQuantity("0 deg"))
 
def getUnderwaterSide (shape, force=True)
 
def mainFrameCoeff (ship, draft=None)
 
def moment (ship, draft=None, roll=Units.parseQuantity("0 deg"), trim=Units.parseQuantity("0 deg"))
 
def placeShipShape (shape, draft, roll, trim)
 
def wettedArea (shape, draft, roll=Units.parseQuantity("0 deg"), trim=Units.parseQuantity("0 deg"))
 

Variables

 COMMON_BOOLEAN_ITERATIONS
 
 DENS
 

Function Documentation

def shipHydrostatics.Tools.areas (   ship,
  n,
  draft = None,
  roll = Units.parseQuantity("0 deg"),
  trim = Units.parseQuantity("0 deg") 
)
Compute the ship transversal areas

Position arguments:
ship -- Ship object (see createShip)
n -- Number of points to compute

Keyword arguments:
draft -- Ship draft (Design ship draft by default)
roll -- Roll angle (0 degrees by default)
trim -- Trim angle (0 degrees by default)

Returned value:
List of sections, each section contains 2 values, the x longitudinal
coordinate, and the transversal area. If n < 2, an empty list will be
returned.

References shipHydrostatics.Tools.displacement(), shipHydrostatics.Tools.getUnderwaterSide(), and shipHydrostatics.Tools.placeShipShape().

Referenced by shipHydrostatics.Tools.getUnderwaterSide().

def shipHydrostatics.Tools.BMT (   ship,
  draft = None,
  trim = Units.parseQuantity("0 deg") 
)
Calculate "ship Bouyance center" - "transversal metacenter" radius

Position arguments:
ship -- Ship object (see createShip)

Keyword arguments:
draft -- Ship draft (Design ship draft by default)
trim -- Trim angle (0 degrees by default)

Returned value:
BMT radius

References shipHydrostatics.Tools.displacement().

def shipHydrostatics.Tools.displacement (   ship,
  draft = None,
  roll = Units.parseQuantity("0 deg"),
  trim = Units.parseQuantity("0 deg") 
)
Compute the ship displacement

Position arguments:
ship -- Ship object (see createShip)

Keyword arguments:
draft -- Ship draft (Design ship draft by default)
roll -- Roll angle (0 degrees by default)
trim -- Trim angle (0 degrees by default)

Returned values:
disp -- The ship displacement (a density of the water of 1025 kg/m^3 is
assumed)
B -- Bouyance application point, i.e. Center of mass of the underwater side
Cb -- Block coefficient

The Bouyance center is refered to the original ship position.

References shipHydrostatics.Tools.getUnderwaterSide(), shipHydrostatics.Tools.placeShipShape(), and shipHydrostatics.Tools.wettedArea().

Referenced by shipHydrostatics.Tools.areas(), shipHydrostatics.Tools.BMT(), and shipHydrostatics.Tools.moment().

def shipHydrostatics.Tools.floatingArea (   ship,
  draft = None,
  roll = Units.parseQuantity("0 deg"),
  trim = Units.parseQuantity("0 deg") 
)
Compute the ship floating area

Position arguments:
ship -- Ship object (see createShip)

Keyword arguments:
draft -- Ship draft (Design ship draft by default)
roll -- Roll angle (0 degrees by default)
trim -- Trim angle (0 degrees by default)

Returned values:
area -- Ship floating area
cf -- Floating area coefficient

References shipHydrostatics.Tools.placeShipShape().

Referenced by shipHydrostatics.Tools.moment().

def shipHydrostatics.Tools.getUnderwaterSide (   shape,
  force = True 
)
Get the underwater shape, simply cropping the provided shape by the z=0
free surface plane.

Position arguments:
shape -- Solid shape to be cropped

Keyword arguments:
force -- True if in case the common boolean operation fails, i.e. returns
no solids, the tool should retry it slightly moving the free surface. False
otherwise. (True by default)

Returned value:
Cropped shape. It is not modifying the input shape

References shipHydrostatics.Tools.areas().

Referenced by shipHydrostatics.Tools.areas(), shipHydrostatics.Tools.displacement(), shipHydrostatics.Tools.mainFrameCoeff(), and shipHydrostatics.Tools.wettedArea().

def shipHydrostatics.Tools.mainFrameCoeff (   ship,
  draft = None 
)
Compute the main frame coefficient

Position arguments:
ship -- Ship object (see createShip)

Keyword arguments:
draft -- Ship draft (Design ship draft by default)

Returned value:
Ship main frame area coefficient

References shipHydrostatics.Tools.getUnderwaterSide(), and shipHydrostatics.Tools.placeShipShape().

def shipHydrostatics.Tools.moment (   ship,
  draft = None,
  roll = Units.parseQuantity("0 deg"),
  trim = Units.parseQuantity("0 deg") 
)
Compute the moment required to trim the ship 1cm

Position arguments:
ship -- Ship object (see createShip)

Keyword arguments:
draft -- Ship draft (Design ship draft by default)
roll -- Roll angle (0 degrees by default)
trim -- Trim angle (0 degrees by default)

Returned value:
Moment required to trim the ship 1cm. Such moment is positive if it cause a
positive trim angle. The moment is expressed as a mass by a distance, not as
a force by a distance

References shipHydrostatics.Tools.displacement(), and shipHydrostatics.Tools.floatingArea().

Referenced by shipHydrostatics.Tools.wettedArea().

def shipHydrostatics.Tools.placeShipShape (   shape,
  draft,
  roll,
  trim 
)
Move the ship shape such that the free surface matches with the plane
z=0. The transformation will be applied on the input shape, so copy it
before calling this method if it should be preserved.

Position arguments:
shape -- Ship shape
draft -- Ship draft
roll -- Roll angle
trim -- Trim angle

Returned values:
shape -- The same transformed input shape. Just for debugging purposes, you
can discard it.
base_z -- The new base z coordinate (after applying the roll angle). Useful
if you want to revert back the transformation

Referenced by shipHydrostatics.Tools.areas(), shipHydrostatics.Tools.displacement(), shipHydrostatics.Tools.floatingArea(), shipHydrostatics.Tools.mainFrameCoeff(), and shipHydrostatics.Tools.wettedArea().

def shipHydrostatics.Tools.wettedArea (   shape,
  draft,
  roll = Units.parseQuantity("0 deg"),
  trim = Units.parseQuantity("0 deg") 
)
Compute the ship wetted area

Position arguments:
shape -- External faces of the ship hull
draft -- Ship draft

Keyword arguments:
roll -- Roll angle (0 degrees by default)
trim -- Trim angle (0 degrees by default)

Returned value:
The wetted area, i.e. The underwater side area

References shipHydrostatics.Tools.getUnderwaterSide(), shipHydrostatics.Tools.moment(), and shipHydrostatics.Tools.placeShipShape().

Referenced by shipHydrostatics.Tools.displacement().

Variable Documentation

shipHydrostatics.Tools.COMMON_BOOLEAN_ITERATIONS
shipHydrostatics.Tools.DENS