Sie sind auf Seite 1von 4

##

## Homework #4
## Aucoin
## last update: Nov 7
##

import numpy as np
import math
import matplotlib.pyplot as plt

## Main Program Starts

if __name__ == "__main__": # '__' two underscores, '==' logical statement

## Ship data (Principal Dimensions given)

G = 9.807 # (m/s^2) : gravity


DEN = 1026.0210 # (kg/m^3): Water density at 15 Celsius
viscosity = 1.1892e-6 # (m^2/s) : Kinematc viscosity of water 15 Celsius
LPP = 197.1 # (m) : Length between perpundicular
Lfore = 4.2 # (m) : Length of bulb forward of FP
Laft = 3.92 # (m) : Length of waterline aft of AP
B = 32.2 # (m) : Beam
T = 11.0 # (m) : Drafts
DISP = 41189.6 # (m^3) : Displacement
S = 7356.81 # (m^2) : Wetted surface area
AM = 341.803 # (m^2) : Midship cross section area
ABT = 28.0 # (m^2) : Bulbous bow cross section area at FP
AT = 6.5 # (m^2) : Immersed transom area
CB = 0.59 # (-) : Block coefficient (based on LPP)
CWP = 0.7726 # (-) : Waterplane area coefficient
LCB = LPP/2 + (0.005*LPP) # (m) : Longitudinal center of buoyancy !!!!
seems wrong
D = 7.2 # (m) : Propeller diameter
P = 0.986*D # (-) : Pitch-diameter ratio
EAR = 0.711 # (-) : "Expanded area ratio-EAR" ---- zero,
not alphabetical
Z = 5. # (-) : Number of propeller blades
v1 = 22.3 # (knots) : Ship service speed "WILL CONVERT IN
PRIMARY CALCULATIONS into m/s"
v2 = 15. # (knots) : First ship speed to consider "WILL
CONVERT IN PRIMARY CALCULATIONS into m/s"
v3 = 24. # (knots) : Second ship speed to consider "WILL
CONVERT IN PRIMARY CALCULATIONS into m/s"
TF = 11. # (m) : Forward draught
hB = 6.6 # (m) : Position of center of area ABT above
base
LWL = LPP + Laft # (m) : Length of the waterline
d = -0.9
Cstern = 0
lcb = -0.005 # fwd midship 0.5%

## End ship data (Principal Dimensions)

########## FRICTIONAL RESISTANCE ##########


LOS = LPP + Lfore + Laft # Length over wetted surface

Re = v1*LOS/viscosity # Reynolds number

CF = 0.075/((math.log10(Re)-2.)**2) # ITTC-57 skin friction line

RF = 0.5*CF*DEN*S*v1**2 #ITTC-57 Frictional Resistance

########## FORM FACTOR (1+k1) ##########

CP = DISP/(LPP*AM) # Prismatic Coefficient based on waterline length

C14 = 1+0.011*Cstern # Accounts for stern shape

LR = (LPP*(1-CP+0.06*CP*LCB))/(4*CP-1) # Parameter reflecting the length of the


run

FF =
0.93+0.487118*C14*((B/LPP)**1.06806)*((T/LPP)**0.46106)*((LPP/LR)**0.121563)*(((LPP
**3)/DISP)**0.36486)*((1-CP)**-0.604247)
# Form factor (1+k1) describing the viscous resistance of the hull form in
relation to RF
########## APPENDAGE RESISTANCE ##########

########## WAVE RESISTANCE ##########

Fn = v1/np.sqrt(G*LWL) # Froude Number

#finding lambd

if LWL/B < 12.:


lambd = 1.446*CP-0.03*(LWL/B)
else: # LWL/B > 12
lambd = 1.446*CP-0.36
#lambd found

#finding C15
if (LWL**3)/DISP < 512.:
C15 = -1.69385 # less than 512
elif 512. < (LWL**3)/DISP < 1726.91: # Between 512 and 1726.91
C15 = -1.69385 + ((LWL/(DISP)**1/3)-8)/2.36
else: # Between 1726.91 to INFINITY
C15 = 0
#found C15

m4 = C15*0.4*np.exp(-0.034*(Fn**-3.29))

#finding C16

if CP < 0.8:
C16 = 8.07981*CP-13.8673*(CP**2)+6.984388*(CP**3) # CP < 0.8
else: # CP > 0.8
C16 = 1.73014-0.7067*CP

#found C16

m1 = 0.0140407*(LWL/T)-1.75254*((DISP**1/3)/LWL)-4.79323*(B/LWL)-C16

CM = AM/(B*T) #Midship Section Coefficient

C5 = 1.-0.8*AT/(B*T*CM)

C3 = 0.56*(ABT**1.5)/(B*T*(0.31*np.sqrt(ABT)+TF-hB))

C2 = np.exp(-1.89*np.sqrt(C3))

iE = 1.+89.*np.e**((-(LWL/B)**0.80856)*((1.-CWP)**0.30484)*((1.-CP-
0.0225*lcb)**0.6367)*((LR/B)**0.34574)*(100.*(DISP/LWL**3.)**0.16302))
#iE- Angle of the waterline at the bow in degrees with reference to the center
plane

#findind C7

if B/LWL < 0.11:


C7 = (0.229577*(B/LWL)**0.33333)
elif B/LWL > 0.25:
C7 = 0.5-0.0625*(LWL/B)
else: # Between 0.11 and 0.25
C7 = B/LWL
#found C7

C1 = 2223105.*(C7**3.78613)*((T/B)**1.07961)*((90.-iE)**-1.37565)

C17 = 6919.3*((CM)**-1.3346)*((DISP/(LWL**3))**2.00977)*(((LWL/B)-2)**1.40692)

m3 = -7.2035*((B/LWL)**0.326869)*((T/B)**0.605375)

#finding RW

if Fn > 0.55:
RW = C17*C2*C5*DISP*DEN*G*np.exp(m3*(Fn**d)+m4*np.cos(lambd*(Fn**-2)))
elif Fn < 0.4:
RW = C1*C2*C5*DISP*DEN*G*np.exp(m1*(Fn**d)+m4*np.cos(lambd*(Fn**-2)))
else: # Between 0.4 and 0.55
RW = (C17*C2*C5*DISP*DEN*G*np.exp(m3*(Fn**d)+m4*np.cos(lambd*(Fn**-
2))))+(C1*C2*C5*DISP*DEN*G*np.exp(m1*(Fn**d)+m4*np.cos(lambd*(Fn**-2))))

#RW found

########## BULBOUS BOW PRESSURE RESISTANCE ##########

Fni = v1/np.sqrt(G*(TF-hB-0.25*np.sqrt(ABT))+0.15*(DISP**2)) # Froude number based


on immersion

PB = 0.56*np.sqrt(ABT)/(TF - 1.5*hB) # Measure for the immersion of the bow

RB = 0.11*np.exp(-3*(PB**-2))*(Fni**3)*(ABT**1.5)*DEN*G/(1+(Fni**2)) # additional
resistance due to the presence of a bulbous bow near the surface of the water
########## TRANSOM IMMERSION PRESSURE RESISTANCE ##########

FnT = v1*np.sqrt((2*G*AT)/(B+B*CWP))# Froude number based on the immersion of the


transom

if FnT >= 5:
c6 = 0
else: # FnT < 5
c6 = 0.2*(1-0.2*FnT)

RTR = 0.5*DEN*(v1**2)*AT*c6 # additional pressure due to the immersed transom

########## MODEL SHIP CORRELATION RESISTANCE ##########

if TF/LWL <= 0.04:


c4 = TF/LWL
else: # TF/LWL > 0.04
c4 = 0.04

CA = 0.006*((LWL+100)**-0.16)-0.00205+0.003*np.sqrt(LWL/7.5)*(CB**4)*C2*(0.04-c4)#
correlation allowance coefficient

RA = 0.5*DEN*(v1**2)*S*CA # describe effect of hull roughness and still-air


resistance

######################## RESULTS ###########################

print (' Frictional Resistance RF = {:8.5f}'.format(RF))


print (' Wave Resistance RW = {:8.5f}'.format(RW))
print (' Pressure Resistance due to Bulbous Bow RB = {:8.5f}'.format(RB))
print (' Pressure Resistance due to Transom RTR = {:8.5f}'.format(RTR))
print (' Model-Ship Correlation Resistance RA = {:8.5f}'.format(RA))

Das könnte Ihnen auch gefallen