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

int COMMON_BOOLEAN_ITERATIONS = 10
 
 DENS = Units.parseQuantity("1025 kg/m^3")
 

Function Documentation

◆ areas()

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.getUnderwaterSide(), and shipHydrostatics.Tools.placeShipShape().

◆ BMT()

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

◆ 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 referred to the original ship position.

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

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

◆ floatingArea()

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

◆ getUnderwaterSide()

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

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

◆ mainFrameCoeff()

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

◆ moment()

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

◆ placeShipShape()

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

◆ 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(), and shipHydrostatics.Tools.placeShipShape().

Variable Documentation

◆ COMMON_BOOLEAN_ITERATIONS

int shipHydrostatics.Tools.COMMON_BOOLEAN_ITERATIONS = 10

◆ DENS

shipHydrostatics.Tools.DENS = Units.parseQuantity("1025 kg/m^3")