Beispiel #1
0
	#Allowable twist of 90-foot (27.432m) length of chain
	twist=61875/Dmm
	twist360=twist/360
	#Effective Elastic Modulus (EEM) [kN/sqm]
	# R3 chain
	EEMR3=(5.40-0.0040*Dmm)*10**7
	# R4 chain
	EEMR4=(5.45-0.0025*Dmm)*10**7
	# R5 chain
	EEMR5=(6.0-0.0033*Dmm)*10**7
	#locker volume in cum per m of chain
	locker=VL(Dmm)
	#writing results-studless chain
	fname="studless.txt"
	fn=open(fname, 'a')
	inout.write_file(fn, "Link Diameter of Studless Chain [mm]: ", Dmm)
	inout.write_file(fn, "Outer Diameter [mm]: ", ODmm)
	inout.write_file(fn, "Contact Diameter [mm]: ", CDmm)
	inout.write_file(fn, "Mass per unit length [t/m]: ", ML)
	inout.write_file(fn, "Submerged weight of chain [t/m]: ", SW)
	inout.write_file(fn, "Axial Stiffness [kN]: ", AS)
	inout.write_file(fn, "Bending Stiffness [kN*sqm]: ", BS)
	inout.write_file(fn, "Normal Drag Coefficient: ", NDC)
	inout.write_file(fn, "Normal Drag Diameter [mm]: ", NDD)
	inout.write_file(fn, "Axial Drag Coefficient: ",ADC)
	inout.write_file(fn, "Axial Drag Diameter [mm]: ", ADD)
	inout.write_file(fn, "Normal Added mass Coeff: ", NAMC)
	inout.write_file(fn, "Axial Added mass Coeff: ", AADMC)
	fn.write("\n")
	inout.write_file(fn, "Breaking Load - ORQ Chain [kN]: ", BLORQ)
	inout.write_file(fn, "Breaking Load - R3 Chain [kN]: ", BLR3)
#Breaking Load [kN] - MBL
#Nylon Ropes dry - MBLNd
MBLNd = 163950*D**2
#Nylon rope wet - MBLNw
MBLNw = 139357*D**2
#Polyester ropes - MBLP
MBLP = 170466*D**2
#Polypropylene rope - MBLPp
MBLPp = 105990*D**2
#Wire ropes with fibre core - MBLWf
MBLWf = 584175*D**2
MBLWw = 633358*D**2
#writing results
fname = "ropes.txt"
fn = open(fname, 'a')
inout.write_file(fn, "Diameter of rope [mm]: ", Dmm)
fn.write("\nNylon Rope Data")
inout.write_file(fn, "Outer Diameter [mm]: ", ODN)
inout.write_file(fn, "Rope weight in Air [kN/m]: ", WLN)
inout.write_file(fn, "Rope weight in Water [kN/m]: ", WLNw)
inout.write_file(fn, "Axial stiffness [kN]: ", ASN)
inout.write_file(fn, "Minimum Breaking Load of Dry Nylon Rope [kN]: ", MBLNd)
inout.write_file(fn, "Minimum Breaking Load of Wet Nylon Rope [kN]: ", MBLNw)
fn.write("\n")
fn.write("\nPolyester rope Data")
inout.write_file(fn, "Outer Diameter [mm]: ", ODP)
inout.write_file(fn, "Rope weight in Air [kN/m]: ", WLP)
inout.write_file(fn, "Rope weight in Water [kN/m]: ", WLPw)
inout.write_file(fn, "Axial stiffness [kN]: ", ASP)
inout.write_file(fn, "Minimum Breaking Load of Polyester Rope [kN]: ", MBLP)
fn.write("\n")
ThetA=math.atan(H/Va)
ThetB=math.atan(H/Vb)
ThetAd=ThetA*180/math.pi;
ThetBd=ThetB*180/math.pi;
# establishing A, B and P in coordinate system
# index "a" corresponding to point "A", "b" to "B"-point and "P" to lowest caten. point
zb=za-d
zp=za-ha
xa=La
xp=0
xb=-Lb

# writting results to file
fname='catenary_res.txt'
fn=open(fname, 'a')
write_file(fn, "Horizontal Distance between supports in meters: ", round(L,3))
write_file(fn, "Catenary length in meters: ", round(S,3))
write_file(fn, "Vertical Distance Between supports in meters: ", round(d,3))
write_file(fn, "Unit Weight of Catenary line in kg/m: ", round(w,3))
write_file(fn, "Elevation of higher support (A) from reference plane in meters: ", round(za,3))
write_file(fn, "\Catenary coef.: ", round(a,5))
write_file(fn, "Horizontal tension in kg (constant along line: ", round(H,3))
write_file(fn, "Vertical tension in A in kg: ", round(Va,3))
write_file(fn, "Total tension in A in kg: ", round(TA,3))
write_file(fn, "Total tension in B in kg: ", round(TB,3))
write_file(fn, "Inclination angle from vertical at A in radians: ", round(ThetA,3))
write_file(fn, "Inclination angle from vertical at B in radians: ", round(ThetB,3))
write_file(fn, "Inclination angle from vertical at A in degrees: ", round(ThetAd,3))
write_file(fn, "Inclination angle from vertical at B in degrees: ", round(ThetBd,3))
fn.close()
Tr=inout.get_float("Heating Period [h] - press '0' for 96 h: ", 96)
Sin=inout.get_float("Steam pressure on inlet [kg/sqm] - press '0' for 80000 kg/sqm or input: ", 80000) 
Sout=inout.get_float("Steam pressure on outlet [kg/sqm] - press '0' for 50000 kg/sqm or input: ", 50000) 
Eni=inout.get_float("Enthalpy of steam on inlet [kcal/kg] - press '0' for 660 kcal/kg or input: ", 660)
Eno=inout.get_float("Enthalpy of steam on outlet [kcal/kg] - press '0' for 150 kcal/kg or input: ", 150)
Spv=inout.get_float("Specific volume of Steam on inlet [cum/kg] - press '0' for 0.24 cum/kg: ", 0.24)
Idmm=inout.get_float("Pipe inner Diameter [mm] - press '0' for 54mm: ", 54)
Odmm=inout.get_float("Pipe outer Diameter [mm] - press '0' for 60mm: ", 60)
Id=float(Idmm/1000)    #in meters
Od=float(Odmm/1000)    #in meters
filename=pname+'.txt'
fn=open(filename, 'a')
fn.write(pname)
fn.write("\n\nInput Data:")
##writing input data
inout.write_file (fn, "Heat Transfer Coef of Heating Pipe [kcal/(sqm*degC)]: ", Ks)
inout.write_file (fn, "Average Steam Temperature [degC]: ", Ats)
inout.write_file (fn, "Temperature of Sea Water [degC]: ", Dw)
inout.write_file (fn, "Temperature of Outer air [degC]: ", Dai)
inout.write_file (fn, "Temperature of air in Ship [degC]: ", Ds)
inout.write_file (fn, "Temperature of Oil after heating [degC]: ", Da)
inout.write_file (fn, "Temperature of Oil before heating [degC]: ", Dh)
inout.write_file (fn, "Temperature of Oil before heating [degC]: ", Spwt)
inout.write_file (fn, "Specific Heat of Oil [kcal/(kg*degC)]: ", Sph)
inout.write_file (fn, "Heating Period [h]: ", Tr)
inout.write_file (fn, "Steam pressure on inlet [kg/sqm]: ", Sin)
inout.write_file (fn, "Steam pressure on outlet [kg/sqm]: ", Sout)
inout.write_file (fn, "Enthalpy of steam on inlet [kcal/kg]: ", Eni)
inout.write_file (fn, "Enthalpy of steam on outlet [kcal/kg]: ", Eno)
inout.write_file (fn, "Specific volume of Steam on inlet [cum/kg]: ", Spv)
inout.write_file (fn, "Pipe inner Diameter [mm]: ", Idmm)
 # calculating mass per meter
 HPmass = 0.73253 * ID  # high pressure hoses
 LPmass = 0.3642 * ID  # low pressure hoses
 FFmass = 0.1844 * ID  # fold-flat hoses
 # calculating Axial Stiffness
 HPas = ID * 2.8 * 10 ** 6  # high pressure hoses
 LPas = ID * 3.4 * 10 ** 6  # low pressure hoses
 FFas = ID * 6.56 * 10 ** 6  # fold-flat hoses
 # calculating Bending Stiffness
 HPbs = 30000 * ID ** 4  # high pressure hoses
 LPbs = 600 * ID ** 3  # low pressure hoses
 FFbs = 100 * ID ** 3  # fold-flat hoses
 # writing results to a file "hoses.txt"
 fname = "hoses.txt"
 fn = open(fname, "a")
 inout.write_file(fn, "Inner Diameter of Hose [mm] : ", IDmm)
 fn.write("\n")
 fn.write("\nHigh Pressure Hoses Properties:")
 inout.write_file(fn, "Outer Diameter [mm]: ", HPod)
 inout.write_file(fn, "Mass per meter [t/m]: ", HPmass)
 inout.write_file(fn, "Axial Stiffness [kN]: ", HPas)
 inout.write_file(fn, "Bending Stiffness [kN*sqm]: ", HPbs)
 fn.write("\n")
 fn.write("\nLow Pressure Hoses Properties:")
 inout.write_file(fn, "Outer Diameter [mm]: ", LPod)
 inout.write_file(fn, "Mass per meter [t/m]: ", LPmass)
 inout.write_file(fn, "Axial Stiffness [kN]: ", LPas)
 inout.write_file(fn, "Bending Stiffness [kN*sqm]: ", LPbs)
 fn.write("\n")
 fn.write("\nFold - Flat Hoses Properties:")
 inout.write_file(fn, "Outer Diameter [mm]: ", FFod)
def results(v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11):
	inout.write_file(fn, "Moment of inertia X-X axis[cm^4]: ", Ix)
	inout.write_file(fn, "Moment of inertia Y-Y axis[cm^4]: ", Iy)
	inout.write_file(fn, "Area of section[cm^2]: ", A)
	inout.write_file(fn, "Section modulus X-X axis [cm^3]: ", Sx)	
	inout.write_file(fn, "Section modulus Y-Y axis [cm^3]: ", Sy)
	inout.write_file(fn, "Radius of gyration X-X axis [cm]: ", rx)
	inout.write_file(fn, "Radius of gyration Y-Y axis [cm]: ", ry)
	inout.write_file(fn, "Ixy [cm]: ", Ixy)
	inout.write_file(fn, "Ip [cm]: ", Ip)
	inout.write_file(fn, "xc [cm]: ", xc)
	inout.write_file(fn, "yc [cm]: ", yc)	
	return