Skip to content

Commit 8fb1ad1

Browse files
committed
addCreep functionality added to project and mooring:
- defaults to 0.02 (2%). It updates all polyester sessions in all mooring lines within the project class.
1 parent dde66e5 commit 8fb1ad1

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

famodel/mooring/mooring.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,24 @@ def addCorrosion(self,corrosion_mm=10):
11201120
MBL_cor = sec['type']['MBL']
11211121
sec['type']['MBL'] = MBL_cor
11221122

1123+
def addCreep(self, creep_precent=0.02):
1124+
'''
1125+
Elongates the polyester lines (if exists) in the mooring by a certain creep percentage
1126+
1127+
Parameters
1128+
----------
1129+
creep_precent : float, optional
1130+
Percentage of creep elongation to add to polyester lines. The default is 0.02 (2%).
11231131
1132+
'''
1133+
if self.ss:
1134+
for i, line in enumerate(self.ss.lineList):
1135+
if line.type['material']=='polyester':
1136+
L_creep = line.L * (1 + creep_precent)
1137+
self.setSectionLength(L_creep, i)
1138+
else:
1139+
raise ValueError('Mooring subsystem must be created before adding creep.')
1140+
11241141
def getEnvelope(self,ang_spacing=45,SFs=True):
11251142
'''Computes the motion envelope of the Mooring based on the watch
11261143
circle(s) of what it's attached to. If those aren't already

famodel/project.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3534,7 +3534,23 @@ def getCorrosion(self,corr_th=10,lines='all'):
35343534
for ii,i in enumerate(idx):
35353535
self.mooringList[i].addCorrosion(corrosion_mm=corr_th)
35363536

3537-
3537+
def addCreep(self, creep_precent=0.02):
3538+
'''
3539+
Function to add creep to all mooring lines in the project
3540+
3541+
Parameters
3542+
----------
3543+
creep_precent : float, optional
3544+
Percentage of line length to add as creep. The default is 0.02 (2%).
3545+
3546+
Returns
3547+
-------
3548+
None.
3549+
3550+
'''
3551+
for moor in self.mooringList.values():
3552+
moor.addCreep(creep_precent=creep_precent)
3553+
35383554
def updateUniformArray(self,n_rows,pf_rows,spacingXY,grid_rotang=0,grid_skew_x=0,grid_skew_y=0,grid_trans_x=0,grid_trans_y=0,phis=[0,0],center=[0,0]):
35393555
'''
35403556
Function to update the array spacing, angles, platform locations and headings, etc for a uniform array

0 commit comments

Comments
 (0)