Skip to content

Commit

Permalink
Updates to getPointProps and assoicated helpers. Adds valid curve lim…
Browse files Browse the repository at this point in the history
…it check to getLineProps if provided.
  • Loading branch information
RyanDavies19 committed Jan 17, 2025
1 parent 2d65c30 commit 7cce75c
Show file tree
Hide file tree
Showing 5 changed files with 330 additions and 111 deletions.
64 changes: 61 additions & 3 deletions moorpy/MoorProps.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,19 @@ def getAnchorMass( uhc_mode = True, fx=0, fz=0, mass_int=0, anchor="drag-embedme
info["Mass"] = mass #[kg]
#info["Length"] = L

elif anchor == "gravity":

capacity_x = 1.6*fx #[N]
#capacity_x = fx
capacity_z = 2.0*fz #[N]
uhc = np.linalg.norm([capacity_x, capacity_z])

mass = max(capacity_x / gravity, capacity_z / gravity) # 2x safety factor for vertial 1.6x for horizontal per API standards. Use the larger value. Max load in kg * FOS = mass
# Alteratively use 4x the horizontal load per WEC mooring advice from UW APL.

info["UHC"] = uhc #[N]
info["Mass"] = mass #[kg]



#-----IN PROGRESS -----------------------------------

elif anchor == "SEPLA":
Expand Down Expand Up @@ -462,7 +472,7 @@ def getAnchorMass( uhc_mode = True, fx=0, fz=0, mass_int=0, anchor="drag-embedme
#return info


def getAnchorCost(fx, fz, type="drag-embedment",soil_type='medium clay', method = 'static'):
def getAnchorCostOld(fx, fz, type="drag-embedment",soil_type='medium clay', method = 'static'):
''' applies factors to material cost '''


Expand Down Expand Up @@ -505,6 +515,54 @@ def getAnchorCost(fx, fz, type="drag-embedment",soil_type='medium clay', method

return anchorMatCost, anchorInstCost, anchorDecomCost, info # [USD]

def getAnchorCost(fx, fz, type="drag-embedment", mass = None, soil_type='medium clay', method = 'static'):
''' Anchor costs based on the WEC Mooring Cost Modeling Work. updated 1-15-2025 using 2024$'''

if mass == None:
uhc, mass, info = getAnchorMass( uhc_mode = False, fx=fx, fz=fz, anchor= type, soil_type=soil_type, method = method)
else:
info = dict(UHC = "", Mass = mass)

if type == "drag-embedment":


anchorMatCost = 4.1513*mass # $ per kg mass
anchorInstCost = 0 # installation cost
anchorDecomCost = 0 # decommissioning cost

elif type == "gravity":

anchorMatCost = 0.57611*mass # $ per kg mass
anchorInstCost = 0 #TODO # installation cost
anchorDecomCost = 0 #TODO # decommissioning cost

elif type == "suction":
raise ValueError('Suction pile material costs are not yet supported')
anchorMatCost = 0*mass # $ per kg mass
anchorInstCost = 0 # installation cost
anchorDecomCost = 0 # decommissioning cost


elif type == "micropile":

raise ValueError('Micropile material costs are not yet supported')
#anchorMatCost = 0.48 * mass # $ per kg mass
anchorInstCost = 0 # installation cost
anchorDecomCost = 0 # decommissioning cost

elif type == "plate": # cross between suction and plate

raise ValueError('Plate material costs are not yet supported')
#anchorMatCost = 0.45 * mass# $ per kg mass
anchorInstCost = 0 # installation cost
anchorDecomCost = 0 # decommissioning cost

else:
raise ValueError(f'getAnchorProps received an unsupported anchor type ({type})')

return anchorMatCost, anchorInstCost, anchorDecomCost, info # [USD]



def getAnchorProps(fx, fz, type="drag-embedment", display=0):
''' ****OLD VERSION**** Calculates anchor required capacity and cost based on specified loadings and anchor type'''
Expand Down
4 changes: 4 additions & 0 deletions moorpy/MoorProps_default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@
# MBL_d : # minimum breaking load per diameter [N/m]
# MBL_d2 : # minimum breaking load per diameter^2 [N/m^2]
# MBL_d3 : # minimum breaking load per diameter^3 [N/m^3]
# MBL_dmin : # minimum valid diameter for the MBL curve (values < 0 ignored) [m]
# MBL_dmax : # maximum valid diameter for the MBL curve (values < 0 ignored) [m]
#
# EA_0 : # stiffness offset [N]
# EA_d : # stiffness per diameter [N/m]
# EA_d2 : # stiffness per diameter^2 [N/m^2]
# EA_d3 : # stiffness per diameter^3 [N/m^3]
# EA_dmin : # minimum valid diameter for the EA curve (values < 0 ignored) [m]
# EA_dmax : # maximum valid diameter for the EA curve (values < 0 ignored) [m]
# EA_MBL : # (quasi-static) stiffness per MBL [N/N] (aka Kr, Krs)
# EAd_MBL : # dynamic stiffness per MBL [N/N] (aka Krd or Krd_alpha)
# EAd_MBL_Lm: # dynamic stiffness per MBL per fraction of mean load (not %) [N/N] (aka or Krd_beta)
Expand Down
6 changes: 6 additions & 0 deletions moorpy/MoorProps_newCosts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@
# MBL_d : # minimum breaking load per diameter [N/m]
# MBL_d2 : # minimum breaking load per diameter^2 [N/m^2]
# MBL_d3 : # minimum breaking load per diameter^3 [N/m^3]
# MBL_dmin : # minimum valid diameter for the MBL curve (values < 0 ignored)
# MBL_dmax : # maximum valid diameter for the MBL curve (values < 0 ignored)
#
# EA_0 : # stiffness offset [N]
# EA_d : # stiffness per diameter [N/m]
# EA_d2 : # stiffness per diameter^2 [N/m^2]
# EA_d3 : # stiffness per diameter^3 [N/m^3]
# EA_dmin : # minimum valid diameter for the EA curve (values < 0 ignored)
# EA_dmax : # maximum valid diameter for the EA curve (values < 0 ignored)
# EA_MBL : # (quasi-static) stiffness per MBL [N/N] (aka Kr, Krs)
# EAd_MBL : # dynamic stiffness per MBL [N/N] (aka Krd or Krd_alpha)
# EAd_MBL_Lm: # dynamic stiffness per MBL per fraction of mean load (not %) [N/N] (aka or Krd_beta)
Expand Down Expand Up @@ -117,6 +121,8 @@ lineProps:
mass_d2 : 496 # linear mass density per diameter^2 [kg/m/m^2]
MBL_d3 : 651e6 # minimum breaking load per diameter^3 [N/m^2]
MBL_d2 : 580e6 # minimum breaking load per diameter^2 [N/m^2]
MBL_dmin : 0.05 # minimum valid diameter for the MBL curve (values < 0 ignored)
MBL_dmax : 0.175 # maximum valid diameter for the MBL curve (values < 0 ignored)
EA_MBL : 56 # quasi-static stiffness per MBL [N/N]
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)
Expand Down
102 changes: 73 additions & 29 deletions moorpy/PointProps_default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,80 @@
# Default point properties with cost curves based on work presented in OMAE2025-156384
# The following is YAML syntax and follows a heirarchy of

# PointProps -> [point type name] -> [number and size of components]
# PointProps -> [point type name] -> [number and size of components]
# AnchorProps -> [anchor type name] -> [component coefficients] NOT SUPPORTED - potential approach
# BuoyProps -> [buoy type name] -> [component coefficients]
# ConnectProps -> [connection component name] -> [component coefficients]

# All possible AnchorProps coefficients are as follows: NOT SUPPORTED - potential approach
# soilType : # soilType [one of 'soft clay', 'medium clay', 'hard clay', or 'sand']
# a_softclay : # a coefficient in getAnchorMass for softclay
# b_softclay : # b coefficient in getAnchorMass for softclay
# c_softclay : # c coefficient in getAnchorMass for softclay
# d_softclay : # d coefficient in getAnchorMass for softclay
# a_medclay : # a coefficient in getAnchorMass for medclay
# b_medclay : # b coefficient in getAnchorMass for medclay
# c_medclay : # c coefficient in getAnchorMass for medclay
# d_medclay : # d coefficient in getAnchorMass for medclay
# a_hardclay : # a coefficient in getAnchorMass for hardclay
# b_hardclay : # b coefficient in getAnchorMass for hardclay
# c_hardclay : # c coefficient in getAnchorMass for hardclay
# d_hardclay : # d coefficient in getAnchorMass for hardclay
# a_sand : # a coefficient in getAnchorMass for sand
# b_sand : # b coefficient in getAnchorMass for sand
# c_sand : # c coefficient in getAnchorMass for sand
# d_sand : # d coefficient in getAnchorMass for sand
# t2_m_ratio : # thickness to mass ratio [-]
# t2_a_ratio : # thickness to area ratio [-]
# mass : # mass [kg]
# area : # area [m^2]
# cost_m : # cost per mass [$/kN]
# cost_m2 : # cost per mass^2 [$/kN^2]
# cost_m3 : # cost per mass^3 [$/kN^3]

# All possible Buoy coefficients are as follows:
# buoyancy : # the buoyancy [kN]
# mass : # mass offset [kg]
# mass_b : # mass as a function of buoyancy [kg/kN]
# vol : # volume offset [m^3]
# v_b : # volume as a function of buoyancy [m^3/kN]
# cost_b : # cost per buoyancy [$/kN]
# cost_b2 : # cost per buoyancy^2 [$/kN^2]
# cost_b3 : # cost per buoyancy^3 [$/kN^3]

# All possible ConnectProps coefficients are as follows:
# mass : # mass offset [kg]
# mass_d : # mass as a function of nominal size (bar diameter) [kg/m] NOT YET FULLY SUPPORTED
# vol : # volume offset [m^3]
# v_d : # volume as a function of nominal size [m^3/m] NOT YET FULLY SUPPORTED
# MBL : # MBL offset [kN] NOT YET FULLY SUPPORTED
# MBL_m : # minimum breaking load per mass [kN/kg] NOT YET FULLY SUPPORTED
# FOS : # the factor of safety between WLL and MBL
# cost_MBL : # cost per MBL [$/kN]
# cost_MBL2 : # cost per MBL^2 [$/kN^2]
# cost_MBL3 : # cost per MBL^3 [$/kN^3]
# cost_b : # cost per buoyancy [$/kN]
# cost_b2 : # cost per buoyancy^2 [$/kN^2]
# cost_b3 : # cost per buoyancy^3 [$/kN^3]
# cost : # baseline cost offset [$]

# All possible PointProps coefficients are as follows:
# num_<connect name>: # number of this connection type where <connect name> matches the name of a ConnectProps entry (case sensistive). If no value is give num of component is assumed zero
# con_mbl : # nominal size of component (a number) or automatically size based on attached line size (-1 flag)
# buoyancy : # the size of any buoys in this connection type [kN]
# cost : # cost to overwrite the calculated cost [$]
# mass : # mass to overwrite the calculated mass [kg]
# volume : # volume to overwrite the calculated volume [m^3]
# mbl : # mbl to overwrite the calculated volume [kN]
# All possible PointProps coefficients are as follows:
# num_a_<anchor name> : # number of this anchor type where <anchor name> matches the name of a AnchorProps entry (case sensistive). If no value is give num of component is assumed zero NOT SUPPORTED - potential approach
# num_b_<buoy name> : # number of this buoy type where <buoy name> matches the name of a BuoyProps entry (case sensistive). If no value is give num of component is assumed zero
# num_c_<connect name>: # number of this connection type where <connect name> matches the name of a ConnectProps entry (case sensistive). If no value is give num of component is assumed zero
# design_load : # nominal size of component (a number) or automatically size based on attached line size (-1 flag)
# cost : # cost to overwrite the calculated cost [$]
# mass : # mass to overwrite the calculated mass [kg]
# volume : # volume to overwrite the calculated volume [m^3]
# mbl : # mbl to overwrite the calculated mbl [kN]

BuoyProps:

general : # general buoy based on input from industry
# mass : # mass offset [kg]
# mass_b : # mass as a function of buoyancy [kg/kN]
# vol : # volume offset [m^3]
# v_b : # volume as a function of buoyancy [m^3/kN]
cost_b : 5.2761e2 # cost per buoyancy [$/kN]
cost_b2 : -1.1863 # cost per buoyancy^2 [$/kN^2]
cost_b3 : 0 # cost per buoyancy^3 [$/kN^3]

ConnectProps:
# TODO: mass, v, and MBL relationships from the tables on pg 132 in the Vryhof Manual. Size to MBL relationships can also be derived from the data I gathered.
Expand All @@ -41,6 +88,7 @@ ConnectProps:
# v_d : # volume as a function of nominal size [m^3/m]
# MBL : # MBL offset [kN]
# MBL_m : # minimum breaking load per mass [kN/kg]
FOS : 6 # the factor of safety between WLL and MBL
cost_MBL : 9.0499e-2 # cost per MBL [$/kN]
cost_MBL2 : -1.1632e-5 # cost per MBL^2 [$/kN^2]
cost_MBL3 : 3.6484e-9 # cost per MBL^3 [$/kN^3]
Expand All @@ -52,6 +100,7 @@ ConnectProps:
# v_d : # volume as a function of nominal size [m^3/m]
# MBL : # MBL offset [kN]
# MBL_m : # minimum breaking load per mass [kN/kg]
FOS : 6 # the factor of safety between WLL and MBL. NEED TO DOUBLE CHECK
cost_MBL : 1.3492 # cost per MBL [$/kN]
cost_MBL2 : -1.1512e-4 # cost per MBL^2 [$/kN^2]
cost_MBL3 : 3.3701e-9 # cost per MBL^3 [$/kN^3]
Expand All @@ -63,6 +112,7 @@ ConnectProps:
# v_d : # volume as a function of nominal size [m^3/m]
# MBL : # MBL offset [kN]
# MBL_m : # minimum breaking load per mass [kN/kg]
FOS : 5 # the factor of safety between WLL and MBL. NEED TO DOUBLE CHECK
cost_MBL : 2.2756 # cost per MBL [$/kN]
cost_MBL2 : 0 # cost per MBL^2 [$/kN^2]
cost_MBL3 : 0 # cost per MBL^3 [$/kN^3]
Expand All @@ -74,6 +124,7 @@ ConnectProps:
# v_d : # volume as a function of nominal size [m^3/m]
# MBL : # MBL offset [kN]
# MBL_m : # minimum breaking load per mass [kN/kg]
FOS : 5 # the factor of safety between WLL and MBL
cost_MBL : 4.0647e-1 # cost per MBL [$/kN]
cost_MBL2 : 0 # cost per MBL^2 [$/kN^2]
cost_MBL3 : 0 # cost per MBL^3 [$/kN^3]
Expand All @@ -85,27 +136,19 @@ ConnectProps:
# v_d : # volume as a function of nominal size [m^3/m]
# MBL : # MBL offset [kN]
# MBL_m : # minimum breaking load per mass [kN/kg]
FOS : 6 # the factor of safety between WLL and MBL
cost_MBL : 6.9072e-1 # cost per MBL [$/kN]
cost_MBL2 : -4.4545e-5 # cost per MBL^2 [$/kN^2]
cost_MBL3 : 1.5231e-9 # cost per MBL^3 [$/kN^3]

buoy :
# mass : # mass offset [kg]
# mass_b : # mass as a function of buoyancy [kg/kN]
# vol : # volume offset [m^3]
# v_n : # volume as a function of buoyancy [m^3/kN]
cost_b : 5.2761e2 # cost per buoyancy [$/kN]
cost_b2 : -1.1863 # cost per buoyancy^2 [$/kN^2]
cost_b3 : 0 # cost per buoyancy^3 [$/kN^3]

PointProps:
PointProps: # These are data structures that hold information of what is in a point. Any point can have any number of Acnhor, Buoy, and Connection types as described in the respective props section.

General : # TODO: This is a place holder, it should be replaced by more detailed designs. VA-02 design from pg 132 of Vryhof Manual in here for now.
num_shackle : 1 # number of shackles in this connection type
num_connector : 2 # number of pear or C connectors in this connection type
num_swivel : 1 # number of swivels in this connection type
num_misc : 3 # number of other hardware components in this connection type (typically chain links)
con_mbl : -1 # nominal mbl of component (kN) or automatically size based on attached line size (-1 flag)
general : # TODO: This is a place holder, it should be replaced by more detailed designs. VA-02 design from pg 132 of Vryhof Manual in here for now.
num_c_shackle : 1 # number of shackles in this connection type
num_c_connector : 2 # number of pear or C connectors in this connection type
num_c_swivel : 1 # number of swivels in this connection type
num_c_misc : 3 # number of other hardware components in this connection type (typically chain links)
con_mbl : -1 # nominal mbl of component (kN) or automatically size based on attached line size (-1 flag)

# Chain2Chain :
# num_shackle : # number of shackles in this connection type
Expand Down Expand Up @@ -143,4 +186,5 @@ PointProps:
# num_buoy : # number of buoys in this connection type
# con_mbl : 'auto' # nominal mbl of component (kN) or automatically size based on attached line size (-1 flag)

# # etc.
# # etc.
# TODO: Anchor options in here
Loading

0 comments on commit 7cce75c

Please sign in to comment.