Documentation

See the source code at GitHub.

The PlaningBoat class

class openplaning.PlaningBoat(speed, weight, beam, lcg, vcg, r_g, beta, epsilon, vT, lT, loa=None, H_sig=None, ahr=0.00015, LD_change=None, Lf=0, sigma=0, delta=0, l_air=0, h_air=0, b_air=0, C_shape=0, C_D=0.7, z_wl=0, tau=5, rho=1025.87, nu=1.19e-06, rho_air=1.225, g=9.8066, wetted_lengths_type=1, z_max_type=1, roughness_penalty_type=1, seaway_drag_type=1)[source]

Bases: object

Prismatic planing craft

speed

Speed (m/s). It is an input to PlaningBoat.

Type:

float

weight

Weight (N). It is an input to PlaningBoat.

Type:

float

beam

Beam (m). It is an input to PlaningBoat.

Type:

float

lcg

Longitudinal center of gravity, measured from the stern (m). It is an input to PlaningBoat.

Type:

float

vcg

Vertical center of gravity, measured from the keel (m). It is an input to PlaningBoat.

Type:

float

r_g

Radius of gyration (m). It is an input to PlaningBoat.

Type:

float

beta

Deadrise (deg). It is an input to PlaningBoat.

Type:

float

epsilon

Thrust angle w.r.t. keel, CCW with body-fixed origin at 9 o’clock (deg). It is an input to PlaningBoat.

Type:

float

vT

Thrust vertical distance, measured from keel, and positive up (m). It is an input to PlaningBoat.

Type:

float

lT

Thrust horizontal distance, measured from stern, and positive forward (m). It is an input to PlaningBoat.

Type:

float

loa

Vessel LOA for seaway behavior estimates (m). Defaults to None. It is an input to PlaningBoat.

Type:

float

H_sig

Significant wave heigth in an irregular sea state (m). Defaults to None. It is an input to PlaningBoat.

Type:

float

ahr

Average hull roughness (m). Defaults to 150*10**-6. It is an input to PlaningBoat.

Type:

float

LD_change

Roughness induced change of hull lift to change of hull drag ratio (dimensionless). Defaults to None, but ITTC ‘78 approximates a value of -1.1 for propellers. It is an input to PlaningBoat.

Type:

float

Lf

Flap chord (m). Defaults to 0. It is an input to PlaningBoat.

Type:

float

sigma

Flap span-beam ratio (dimensionless). Defaults to 0. It is an input to PlaningBoat.

Type:

float

delta

Flap deflection (deg). Defaults to 0. It is an input to PlaningBoat.

Type:

float

l_air

Distance from stern to center of air pressure (m). Defaults to 0. It is an input to PlaningBoat.

Type:

float

h_air

Height from keel to top of square which bounds the air-drag-inducing area (m). Defaults to 0. It is an input to PlaningBoat.

Type:

float

b_air

Transverse width of square which bounds the air-drag-inducing area (m). Defaults to 0. It is an input to PlaningBoat.

Type:

float

C_shape

Area coefficient for air-drag-inducing area (dimensionless). C_shape = 1 means the air drag reference area is h_air*b_air. Defaults to 0. It is an input to PlaningBoat.

Type:

float

C_D

Air drag coefficient (dimensionless). Defaults to 0.7. It is an input to PlaningBoat.

Type:

float

rho

Water density (kg/m^3). Defaults to 1025.87. It is an input to PlaningBoat.

Type:

float

nu

Water kinematic viscosity (m^2/s). Defaults to 1.19*10**-6. It is an input to PlaningBoat.

Type:

float

rho_air

Air density (kg/m^3). Defaults to 1.225. It is an input to PlaningBoat.

Type:

float

g

Gravitational acceleration (m/s^2). Defaults to 9.8066. It is an input to PlaningBoat.

Type:

float

z_wl

Vertical distance of center of gravity to the calm water line (m). Defaults to 0. It is an input to PlaningBoat, but modified when running get_steady_trim().

Type:

float

tau

Trim angle (deg). Defaults to 5. It is an input to PlaningBoat, but modified when running get_steady_trim().

Type:

float

eta_3

Additional heave (m). Initiates to 0.

Type:

float

eta_5

Additional trim (deg). Initiates to zero.

Type:

float

wetted_lengths_type

1 = Use Faltinsen 2005 wave rise approximation, 2 = Use Savitsky’s ‘64 approach, 3 = Use Savitsky’s ‘76 approach. Defaults to 1. It is an input to PlaningBoat.

Type:

int

z_max_type

1 = Uses 3rd order polynomial fit, 2 = Uses cubic interpolation from table. This is only used if wetted_lenghts_type == 1. Defaults to 1. It is an input to PlaningBoat.

Type:

int

L_K

Keel wetted length (m). It is updated when running get_geo_lengths().

Type:

float

L_C

Chine wetted length (m). It is updated when running get_geo_lengths().

Type:

float

L_C2

Side chine wetted length with reattached flow (m). It is updated when running get_geo_lengths().

Type:

float

wetted_bottom_area

Bottom wetted surface area (m^2). It is updated when running get_geo_lengths().

Type:

float

lambda_W

Mean wetted-length to beam ratio, (L_K+L_C)/(2*beam) (dimensionless). It is updated when running get_geo_lengths().

Type:

float

x_s

Distance from keel/water-line intersection to start of wetted chine (m). It is updated when running get_geo_lengths().

Type:

float

alpha

Angle between spray line and keel, projected to plan view (deg). It is updated when running get_geo_lengths().

Type:

float

z_max

Maximum pressure coordinate coefficient, z_max/Ut (dimensionless). It is updated when running get_geo_lengths().

Type:

float

T

Transom draft (m). It is updated when running get_geo_lengths().

Type:

float

lcp

Longitudinal center of pressure, measured from the stern (m). It is updated when running get_forces().

Type:

float

roughness_penalty_type

1 = Use Mosaad’s ‘86 regression, 2 = Use Townsin’s ‘84 regression. Defaults to 1. It is an input to PlaningBoat.

Type:

int

C_Lbeta

Lift coefficient with deadrise. It is updated when running get_forces().

Type:

float

deltaC_L

Change in hydrodynamic lift coefficient due to roughness, excluding lift change due to roughness. It is updated when running get_forces().

Type:

float

hydrodynamic_force

Hydrodynamic force (N, N, N*m). [F_x, F_z, M_cg] with x, y, rot directions in intertial coordinates. It is updated when running get_forces().

Type:

(3,) ndarray

bottom_fluid_speed

Mean bottom fluid speed (m/s). It is updated when running get_forces().

Type:

float

C_f

Friction coefficient, smooth case. It is updated when running get_forces().

Type:

float

deltaC_f

Change in friction coefficient due to roughness. It is updated when running get_forces().

Type:

float

skin_friction

Skin friction force (N, N, N*m). [F_x, F_z, M_cg]. It is updated when running get_forces().

Type:

(3,) ndarray

lift_change

Lift change due to roughness (N, N, N*m). [F_x, F_z, M_cg]. It is updated when running get_forces().

Type:

(3,) ndarray

air_resistance

Air resistance force (N, N, N*m). [F_x, F_z, M_cg]. It is updated when running get_forces().

Type:

(3,) ndarray

flap_force

Flap resultant force (N, N, N*m). [F_x, F_z, M_cg]. It is updated when running get_forces().

Type:

(3,) ndarray

thrust_force

Thrust resultant force (N, N, N*m). [F_x, F_z, M_cg]. It is updated when running get_forces().

Type:

(3,) ndarray

net_force

Net force (N, N, N*m). [F_x, F_z, M_cg]. It is updated when running get_forces().

Type:

(3,) ndarray

mass_matrix

Mass coefficients matrix. [[A_33 (kg), A_35 (kg*m/rad)], [A_53 (kg*m), A_55 (kg*m^2/rad)]]. It is updated when running get_eom_matrices().

Type:

(2, 2) ndarray

damping_matrix

Damping coefficients matrix. [[B_33 (kg/s), B_35 (kg*m/(s*rad))], [B_53 (kg*m/s), B_55 (kg*m**2/(s*rad))]]. It is updated when running get_eom_matrices().

Type:

(2, 2) ndarray

restoring_matrix

Restoring coefficients matrix. [[C_33 (N/m), C_35 (N/rad)], [C_53 (N), C_55 (N*m/rad)]]. It is updated when running get_eom_matrices().

Type:

(2, 2) ndarray

porpoising

[[eigenvalue result (bool), est. pitch settling time (s)], [Savitsky chart result (bool), critical trim angle (deg)]]. It is updated when running check_porpoising().

Type:

list

seaway_drag_type

1 = Use Savitsky’s ‘76 approximation, 2 = Use Fridsma’s ‘71 designs charts. Defaults to 1. It is an input to PlaningBoat.

Type:

int

avg_impact_acc

Average impact acceleration at center of gravity and bow (g’s). [n_cg, n_bow]. It is updated when running get_seaway_behavior().

Type:

(2,) ndarray

R_AW

Added resistance in waves (N). It is updated when running get_seaway_behavior().

Type:

float

check_porpoising(stepEstimateType=1)[source]

This function checks for porpoising.

Adds/updates the following parameters:

Parameters:

stepEstimateType (int, optional) – Pitch step response settling time estimate type, 1 = -3/np.real(eigVals[0])], 2 = Time-domain simulation estimate. Defaults to 1.

get_eom_matrices(runGeoLengths=True)[source]

This function returns the mass, damping, and stiffness matrices following Faltinsen 2005.

Adds/updates the following parameters:

Parameters:

runGeoLengths (boolean, optional) – Calculate the wetted lengths before calculating the EOM matrices. Defaults to True.

get_mass_matrix()

This function returns the added mass coefficients following Sec. 9.4.1 of Faltinsen 2005, including weight and moment of inertia.

get_damping_matrix()

This function returns the damping coefficients following Sec. 9.4.1 of Faltinsen 2005.

get_restoring_matrix(diffType=1, step=10**-6.6)

This function returns the restoring coefficients following the approach in Sec. 9.4.1 of Faltinsen 2005.

get_forces(runGeoLengths=True)[source]

This function calls all the force functions to update the respective object attributes.

Adds/updates the following attributes:

Parameters:

runGeoLengths (boolean, optional) – Calculate the wetted lengths before calculating the forces. Defaults to True.

get_hydrodynamic_force()

This function follows Savitsky 1964 and Faltinsen 2005 in calculating the vessel’s hydrodynamic forces and moment.

get_skin_friction()

This function outputs the frictional force of the vessel using ITTC 1957 and the Townsin 1985 roughness allowance.

get_lift_change()

This function estimates the lift change due to roughness wr.r.t. global coordinates.

get_air_resistance()

This function estimates the air drag. It assumes a square shape projected area with a shape coefficient.

get_flap_force()

This function outputs the flap forces w.r.t. global coordinates (Savitsky & Brown 1976). Horz: Positive Aft, Vert: Positive Up, Moment: Positive CCW.

sum_forces()

This function gets the sum of forces and moments, and consequently the required net thrust. The coordinates are positive aft, positive up, and positive counterclockwise.

get_geo_lengths()[source]

This function outputs the geometric lengths.

Adds/updates the following attributes:

get_seaway_behavior()[source]

This function calculates the seaway behavior as stated in Savitsky & Brown ‘76.

Adds/updates the following parameters:

get_steady_trim(x0=[0, 3], tauLims=[0.5, 35], tolF=1e-06, maxiter=50)[source]

This function finds and sets the equilibrium point when the vessel is steadily running in calm water.

Updates the following attributes:

Parameters:
  • x0 (list of float) – Initial guess for equilibirum point [z_wl (m), tau (deg)]. Defaults to [0, 3].

  • tauLims (list of float) – Limits for equilibrium trim search. Defaults to [0.5, 35].

  • tolF (float) – Tolerance for convergence to zero. Defaults to 10**-6.

  • maxiter (float) – Maximum iterations. Defaults to 50.

print_description(sigFigs=7, runAllFunctions=True)[source]

Returns a formatted description of the vessel.

Parameters:
  • sigFigs (int, optional) – Number of significant figures to display. Defaults to 7.

  • runAllFunctions (bool, optional) – Runs all functions with default values before printing results. Defaults to True.