Skip to content

Commit

Permalink
Finishing touches on static-dynamic stiffness:
Browse files Browse the repository at this point in the history
- Cleaned up moorprops-default.yaml, removing extra EAs entry and
  cleaning up notes.
- Cleaned up associated functions in helpers, line, and system to
  match and to just give a warning message when the users calls
  activateDynamicStiffness but EAd value isn't provided (only if
  display > 0).
- Added documention of the new feature in the Usage page!!
  • Loading branch information
mattEhall committed Sep 19, 2023
1 parent 2270ade commit 7dfc7bb
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 42 deletions.
30 changes: 30 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,40 @@ MoorPy Usage
.. role:: stnd


Advanced Features
^^^^^^^^^^^^^^^^^


(A list of key functions to be added here)

Variable Rope Stiffness Behavior
--------------------------------

MoorPy supports separate static and dynamic stiffness coefficients,
to approximate the variable stiffness characterisics of synthetic
fiber ropes. For using this capability, the mooring line type
information must include a static stiffness value (EAs), and a
dynamic stiffness value (EAd). An additional factor on EAd that
scales with mean tension (EAd_Lm) can also be included. When using
a mooring line properties library (i.e., a yaml file), these values
should be specified by the EA_MBL, EAd_MBL, and EAd_MBL_Lm keywords,
respectively. See the (moorprops library section to be added) for
more information.

Two System methods control switching between static and
dynamic stiffness properties:

activateDynamicStiffness switches the mooring system model to dynamic
line stiffness values. It also adjusts the unstretched line lengths
to maintain the same tension at the current system state. If EAd has
not been set, it will not change anything (call it with display > 0
to display a warning when this occurs).

:func:`.system.activateDynamicStiffness`

revertToStaticStiffness resets the mooring lines to use the static
stiffness values and return to their original unstretched lenths.


Additional Parameters in MoorPy
-------------------------------
Expand Down
22 changes: 5 additions & 17 deletions moorpy/MoorProps_default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,10 @@
# 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_MBL or Kr # stiffness per MBL [N/N]
# EAs_MBL or Krs # quasi-static stiffness per MBL [N/N]
# EAd_MBL or Krd_alpha # dynamic stiffness per MBL [N/N]
# EAd_MBL_Lm or Krd_beta # dynamic stiffness per MBL per fraction of mean load (not %) [N/N]



NEW:
# Krs or EAs_MBL : # quasi-static stiffness per MBL [N/N]
# Krd_alpha or EAd_MBL : # dynamic stiffness per MBL [N/N]
# Krd_beta or EAd_MBL_PML : # dynamic stiffness per MBL per % mean load [N/N]
# (% mean load will be input later in the modeling code)



#
# 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)
#
# dvol_dnom : # volume-equivalent diameter per nominal diameter [-]
#
# cost_0 : # cost offset [$/m]
Expand Down Expand Up @@ -70,7 +58,7 @@ lineProps:
MBL_d2 : 170.5e6 # minimum breaking load per diameter^2 [N/m^2]
dvol_dnom : 0.86 # volume-equivalent diameter per nominal diameter [-]
cost_MBL : 1.65e-05 # cost per MBL [$/m/N]
EAs_MBL : 14 # quasi-static stiffness per MBL [N/N]
EA_MBL : 14 # quasi-static stiffness per MBL [N/N]
EAd_MBL : 14 # dynamic stiffness per MBL [N/N]
EAd_MBL_Lm : 0.34 # dynamic stiffness per MBL per fraction of mean load (not %) [N/N]

Expand Down
5 changes: 2 additions & 3 deletions moorpy/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,8 @@ def getLineProps(dnommm, material, lineProps=None, source=None, name="", rho=102
+ mat['cost_mass']*mass + mat['cost_EA']*EA + mat['cost_MBL']*MBL)
w = (mass - np.pi/4*d_vol**2 *rho)*g

# >>> expected inputs for viscoelastic approach <<< need to add some kind of mode switch to handle this throughout MoorPy <<<<
EAs = mat['EAs_MBL']*MBL # quasi-static stiffness: Krs x MBL [N]
# stiffness values for viscoelastic approach
EAs = mat['EA_MBL']*MBL # quasi-static stiffness: Krs x MBL [N]
EAd = mat['EAd_MBL']*MBL # dynamic stiffness constant: Krd alpha term x MBL [N]
EAd_Lm = mat['EAd_MBL_Lm'] # dynamic stiffness Lm slope: Krd beta term (to be multiplied by mean load) [-]

Expand Down Expand Up @@ -761,7 +761,6 @@ def loadLineProps(source):
output[mat]['EA_d2' ] = getFromDict(props, 'EA_d2' , default=0.0)
output[mat]['EA_d3' ] = getFromDict(props, 'EA_d3' , default=0.0)
output[mat]['EA_MBL' ] = getFromDict(props, 'EA_MBL' , default=0.0)
output[mat]['EAs_MBL' ] = getFromDict(props, 'EAs_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)

Expand Down
21 changes: 12 additions & 9 deletions moorpy/line.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,20 +1051,23 @@ def attachLine(self, lineID, endB):
pass


def activateDynamicStiffness(self):
def activateDynamicStiffness(self, display=0):
'''Switch mooring line model to dynamic line stiffness
value, including potential unstretched line length
adjustment. This only works when dynamic line properties
are used.'''

# switch to dynamic stiffness value
EA_old = self.type['EAs']
EA_new = self.type['EAd'] + self.type['EAd_Lm']*self.TA # this implements the sloped Krd = alpha + beta*Lm
self.EA = EA_new

# adjust line length to maintain current tension (approximate)
self.L = self.L0 * (1 + self.TB/EA_old)/(1+self.TB/EA_new)

if self.type['EAd'] > 0:
# switch to dynamic stiffness value
EA_old = self.type['EAs']
EA_new = self.type['EAd'] + self.type['EAd_Lm']*self.TA # this implements the sloped Krd = alpha + beta*Lm
self.EA = EA_new

# adjust line length to maintain current tension (approximate)
self.L = self.L0 * (1 + self.TB/EA_old)/(1+self.TB/EA_new)
else:
if display > 0:
print(f'Line {self.number} has zero dynamic stiffness coefficient so activateDynamicStiffness does nothing.')


def revertToStaticStiffness(self):
Expand Down
21 changes: 8 additions & 13 deletions moorpy/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -2906,29 +2906,24 @@ def checkTensions(self, N = None):
return(ratios)


def activateDynamicStiffness(self):
def activateDynamicStiffness(self, display=0):
'''Switch mooring system model to dynamic line stiffness
values, including potential unstretched line length
adjustment. This only works when dynamic line properties
values and adjust the unstretched line lengths to maintain the
same tensions. This only has an effect when dynamic line properties
are used.'''

for line in self.lineList:
line.activateDynamicStiffness()

#initialize?
line.activateDynamicStiffness(display=display)


def revertToStaticStiffness(self):
'''Switch mooring system model to dynamic line stiffness
values, including potential unstretched line length
adjustment. This only works when dynamic line properties
are used.'''
'''Revert mooring system model back to the static stiffness
values and the original unstretched lenths.'''

for line in self.lineList:
line.revertToStaticStiffness()

#initialize?



def getDepthFromBathymetry(self, x, y): #BathymetryGrid, BathGrid_Xs, BathGrid_Ys, LineX, LineY, depth, nvec)
''' interpolates local seabed depth and normal vector
Expand Down

0 comments on commit 7dfc7bb

Please sign in to comment.