Skip to content

Commit

Permalink
Add Cd and Ca to moorpy yaml
Browse files Browse the repository at this point in the history
-- Added Cd and Ca information for each line type in the moorpy yaml file
-- Updated loadLineType and getLineType methods in helpers to add Ca and Cd to dictionary
-- Updated key words for Ca and Cd in unload function for MoorDyn V1 to use Cd and Ca keys from the dictionary
  • Loading branch information
lsirkis committed Mar 6, 2024
1 parent bc4f0c2 commit 696c9ef
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 8 deletions.
27 changes: 23 additions & 4 deletions moorpy/MoorProps_default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
# cost_mass : # cost per mass [$/kg]
# cost_EA : # cost per stiffness [$/m/N]
# cost_MBL : # cost per MBL [$/m/N]
#
# Cd : # drag coefficient based on DNV-OS-E301 adjusted for use with volumetric diameter
# Cd_ax : # axial drag coefficient based on DNV-OS-E301 adjusted for use with volumetric diameter
# Ca : # added mass coefficient based on Bureau Veritas 493-NR_2021-07
# Ca_ax : # axial added mass coefficient based on Bureau Veritas 493-NR_2021-07

# Chain Notes
# - The MBLs between studless and studlink chains are the same, for every grade
Expand All @@ -51,6 +56,10 @@ lineProps:
MBL_d : 9.11e2 # minimum breaking load per diameter [N/m]
dvol_dnom : 1.80 # volume-equivalent diameter per nominal diameter [-] (assumes 7,850 kg/m^3 material density)
cost_mass : 2.585 # cost per mass [$/kg]
Cd : 1.333 # drag coefficient based on DNV-OS-E301 adjusted for use with volumetric diameter
Cd_ax : 0.639 # axial drag coefficient based on DNV-OS-E301 adjusted for use with volumetric diameter
Ca : 1.0 # added mass coefficient based on Bureau Veritas 493-NR_2021-07
Ca_ax : 0.5 # axial added mass coefficient based on Bureau Veritas 493-NR_2021-07

chain_studlink : # R4 grade studlink chain
mass_d2 : 21.9e3 # linear mass density per diameter^2 [kg/m/m^2]
Expand All @@ -59,7 +68,11 @@ lineProps:
MBL_d2 : 1.21e9 # minimum breaking load per diameter^2 [N/m^2]
MBL_d : 9.11e2 # minimum breaking load per diameter [N/m]
dvol_dnom : 1.89 # volume-equivalent diameter per nominal diameter [-] (assumes 7,850 kg/m^3 material density)
cost_mass : 2.585 # cost per mass [$/kg]
cost_mass : 2.585 # cost per mass [$/kg]
Cd : 1.376 # drag coefficient based on DNV-OS-E301 adjusted for use with volumetric diameter
Cd_ax : 0.741 # axial drag coefficient based on DNV-OS-E301 adjusted for use with volumetric diameter
Ca : 1.0 # added mass coefficient based on Bureau Veritas 493-NR_2021-07
Ca_ax : 0.5 # axial added mass coefficient based on Bureau Veritas 493-NR_2021-07


polyester : # polyester synthetic rope
Expand All @@ -70,6 +83,9 @@ lineProps:
EAd_MBL_Lm : 40.0 # dynamic stiffness per MBL per fraction of mean load (not %) [N/N] (beta term to be multiplied with the absolute mean tension)
density : 1380 # density of the polyester material [kg/m^3] (taken from specific gravity of 1.38, relative to 1000 kg/m^3)
cost_MBL : 1.65e-05 # cost per MBL [$/m/N]
Cd : 2.021 # drag coefficient based on DNV-OS-E301 adjusted for use with volumetric diameter
Ca : 1.1 # added mass coefficient based on Bureau Veritas 493-NR_2021-07
Ca_ax : 0.15 # axial added mass coefficient based on Bureau Veritas 493-NR_2021-07

nylon : # nylon synthetic rope
mass_d2 : 585 # linear mass density per diameter^2 [kg/m/m^2]
Expand All @@ -80,6 +96,9 @@ lineProps:
EAd_MBL_Lm : 39.0 # dynamic stiffness per MBL per fraction of mean load (not %) [N/N] (beta term to be multiplied with the absolute mean tension)
density : 1140 # density of the nylon material [kg/m^3] (taken from specific gravity of 1.14, relative to 1000 kg/m^3)
cost_MBL : 4.29e-05 # cost per MBL [$/m/N]
Cd : 1.979 # drag coefficient based on DNV-OS-E301 adjusted for use with volumetric diameter
Ca : 1.1 # added mass coefficient based on Bureau Veritas 493-NR_2021-07
Ca_ax : 0.15 # axial added mass coefficient based on Bureau Veritas 493-NR_2021-07

hmpe : # high modulus polyethylene synthetic rope
mass_d2 : 496 # linear mass density per diameter^2 [kg/m/m^2]
Expand All @@ -89,9 +108,9 @@ lineProps:
EAd_MBL : 59 # dynamic stiffness per MBL [N/N]
EAd_MBL_Lm : 54.0 # dynamic stiffness per MBL per fraction of mean load (not %) [N/N] (beta term to be multiplied with the absolute mean tension)
density : 975 # density of the hmpe/dyneema material [kg/m^3] (taken from specific gravity of 0.975, relative to 1000 kg/m^3



Cd : 1.988 # drag coefficient based on DNV-OS-E301 adjusted for use with volumetric diameter
Ca : 1.1 # added mass coefficient based on Bureau Veritas 493-NR_2021-07
Ca_ax : 0.15 # axial added mass coefficient based on Bureau Veritas 493-NR_2021-07



Expand Down
25 changes: 23 additions & 2 deletions moorpy/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,24 @@ def getLineProps(dnommm, material, lineProps=None, source=None, name="", rho=102
EA = mat[ 'EA_0'] + mat[ 'EA_d']*d + mat[ 'EA_d2']*d**2 + mat[ 'EA_d3']*d**3 + mat['EA_MBL']*MBL
cost =(mat['cost_0'] + mat['cost_d']*d + mat['cost_d2']*d**2 + mat['cost_d3']*d**3
+ mat['cost_mass']*mass + mat['cost_EA']*EA + mat['cost_MBL']*MBL)

# add in drag and added mass coefficients if available, if not, use defaults
if 'Cd' in mat:
Cd = mat['Cd']
else:
Cd = 1.2
if 'Cd_ax' in mat:
CdAx = mat['Cd_ax']
else:
CdAx = 0.2
if 'Ca' in mat:
Ca = mat['Ca']
else:
Ca = 1.0
if 'Ca_ax' in mat:
CaAx = mat['Ca_ax']
else:
CaAx = 0.0

# internally calculate the volumetric diameter using a ratio
d_vol = mat['dvol_dnom']*d # [m]

Expand All @@ -697,7 +714,7 @@ def getLineProps(dnommm, material, lineProps=None, source=None, name="", rho=102

lineType = dict(name=typestring, d_vol=d_vol, m=mass, EA=EA, w=w,
MBL=MBL, EAd=EAd, EAd_Lm=EAd_Lm, input_d=d,
cost=cost, notes=notes, material=material)
cost=cost, notes=notes, material=material, Cdn=Cd, Cdt=CdAx,Can=Ca,Cat=CaAx)

lineType.update(kwargs) # add any custom arguments provided in the call to the lineType's dictionary

Expand Down Expand Up @@ -758,6 +775,10 @@ def loadLineProps(source):
output[mat]['EA_MBL' ] = getFromDict(props, 'EA_MBL' , default=0.0)
output[mat]['EAd_MBL' ] = getFromDict(props, 'EAd_MBL' , default=0.0)
output[mat]['EAd_MBL_Lm']= getFromDict(props, 'EAd_MBL_Lm',default=0.0)
output[mat]['Cd' ] = getFromDict(props, 'Cd' , default=0.0)
output[mat]['CdAx' ] = getFromDict(props, 'Cd_ax' , default=0.0)
output[mat]['Ca' ] = getFromDict(props, 'Ca' , default=0.0)
output[mat]['CaAx' ] = getFromDict(props, 'Ca_ax' , default=0.0)

output[mat]['MBL_0' ] = getFromDict(props, 'MBL_0' , default=0.0)
output[mat]['MBL_d' ] = getFromDict(props, 'MBL_d' , default=0.0)
Expand Down
4 changes: 2 additions & 2 deletions moorpy/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,8 +1060,8 @@ def unload(self, fileName, MDversion=2, line_dL=0, rod_dL=0, flag='p', outputLis
#L.append("{:<12} {:7.4f} {:8.2f} {:7.3e} {:7.3e} {:7.3e} {:<7.3f} {:<7.3f} {:<7.2f} {:<7.2f}".format(
#key, di['d_vol'], di['m'], di['EA'], di['cIntDamp'], di['EI'], di['Can'], di['Cat'], di['Cdn'], di['Cdt']))
L.append("{:<12} {:7.4f} {:8.2f} {:7.3e} {:7.3e} {:<7.3f} {:<7.3f} {:<7.2f} {:<7.2f}".format(
key, di['d_vol'], di['m'], di['EA'], di['BA'], di['Can'], di['Cat'], di['Cdn'], di['Cdt']))

# key, di['d_vol'], di['m'], di['EA'], di['BA'], di['Can'], di['Cat'], di['Cdn'], di['Cdt']))
key, di['d_vol'], di['m'], di['EA'], di['BA'], di['Ca'], di['CaAx'], di['Cd'], di['CdAx']))

#L.append("---------------------- POINTS ---------------------------------------------------------")
L.append("---------------------- NODE PROPERTIES ---------------------------------------------------------")
Expand Down

0 comments on commit 696c9ef

Please sign in to comment.