Skip to content

Commit fea61cd

Browse files
committed
Bug fix pass in lineProps to mooring, LineDesign: add lineProps pass to mooring init
1 parent fb63f3f commit fea61cd

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

famodel/design/LineDesign.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def __init__(self, depth, lineProps=None, **kwargs):
201201

202202
# the sizing function coefficients to use in the design
203203
self.lineProps = loadLineProps(lineProps)
204-
204+
205205
# Build alternating subcomponents list
206206
for i in range(self.nLines):
207207
# Connector at position 2*i (even indices: 0, 2, 4, ...)
@@ -210,7 +210,6 @@ def __init__(self, depth, lineProps=None, **kwargs):
210210

211211
# Initialize connector properties (will be populated below)
212212
dd['subcomponents'][connector_idx] = {'m': 0, 'v': 0, 'CdA': 0}
213-
214213
# Assign section properties
215214
dd['subcomponents'][section_idx]['type'] = getLineProps(Ds[i],
216215
material=lineTypeNames[i], name=i, lineProps=self.lineProps)
@@ -246,7 +245,7 @@ def __init__(self, depth, lineProps=None, **kwargs):
246245
# Call Mooring init function (parent class)
247246

248247

249-
Mooring.__init__(self, dd=dd, rho=rho, g=g, shared=shared)
248+
Mooring.__init__(self, dd=dd, rho=rho, g=g, shared=shared, lineProps=self.lineProps)
250249
# The above will also create Mooring self parameters like self.rad_anch
251250

252251
# Save a copy of the original anchoring radius to use with the

famodel/mooring/mooring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def __init__(self, dd=None, subsystem=None, anchor=None,
8080
self.dd = dd
8181

8282
# Load or save the mooring line property sizing function coefficients
83-
self.lineProps = loadLineProps(lineProps)
83+
self.lineProps = lineProps # loadLineProps(lineProps)
8484

8585
# MoorPy subsystem that corresponds to the mooring line
8686
self.ss = subsystem

famodel/project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1761,7 +1761,7 @@ def addMooring(self, id=None, endA=None, endB=None, heading=0, dd={},
17611761
'rad_fair':self.platformList[id_part[0]].rFair if id_part else 0,
17621762
'z_fair':self.platformList[id_part[0]].zFair if id_part else 0}
17631763

1764-
mooring = Mooring(dd=dd, id=id, subsystem=subsystem) # create mooring object
1764+
mooring = Mooring(dd=dd, id=id, subsystem=subsystem, lineProps=self.lineProps) # create mooring object
17651765

17661766
# update shared prop if needed
17671767
if len(id_part)==2 and shared<1:

0 commit comments

Comments
 (0)