@@ -102,7 +102,7 @@ def __init__(self, design, nTurbines=1):
102102 else :
103103 raise Exception ("When using 'array_mooring', a MoorDyn-style input file must be provided as 'file'." )
104104
105- self .ms . moorMod = getFromDict (design ['array_mooring' ], 'moorMod' , default = 0 , dtype = int )
105+ self .moorMod = getFromDict (design ['array_mooring' ], 'moorMod' , default = 0 , dtype = int )
106106 else :
107107 self .ms = None
108108
@@ -211,9 +211,9 @@ def analyzeUnloaded(self, ballast=0, heave_tol = 1):
211211
212212 if self .ms :
213213 try :
214- if self .ms . moorMod == 0 or self . ms .moorMod == 2 :
214+ if self .moorMod == 0 or self .moorMod == 2 :
215215 C_moor = self .ms .getCoupledStiffness (lines_only = True )
216- elif self .ms . moorMod == 1 :
216+ elif self .moorMod == 1 :
217217 self .ms .updateLumpedMassSystem ()
218218 _ , _ , _ , C_moor = self .ms .getCoupledDynamicMatrices (lines_only = True )
219219
@@ -224,9 +224,9 @@ def analyzeUnloaded(self, ballast=0, heave_tol = 1):
224224
225225 if self .fowtList [0 ].ms :
226226 try :
227- if self .fowtList [0 ].ms . moorMod == 0 or self .fowtList [0 ]. ms .moorMod == 2 :
227+ if self .fowtList [0 ].moorMod == 0 or self .fowtList [0 ].moorMod == 2 :
228228 C_moor = self .fowtList [0 ].ms .getCoupledStiffness (lines_only = True )
229- elif self .fowtList [0 ].ms . moorMod == 1 :
229+ elif self .fowtList [0 ].moorMod == 1 :
230230 self .fowtList [0 ].ms .updateSystemDynamicMatrices ()
231231 _ , _ , _ , C_moor = self .fowtList [0 ].ms .getCoupledDynamicMatrices (lines_only = True )
232232
@@ -377,7 +377,7 @@ def analyzeCases(self, display=0, meshDir=os.path.join(os.getcwd(),'BEM'), RAO_p
377377 T_moor = self .ms .getTensions () # get line end mean tensions
378378
379379
380- if self .ms . moorMod == 0 :
380+ if self .moorMod == 0 :
381381 for ih in range (nWaves + 1 ):
382382 for iw in range (self .nw ):
383383 T_moor_amps [ih ,:,iw ] = np .matmul (J_moor , self .Xi [ih ,:,iw ]) # FFT of mooring tensions
@@ -461,9 +461,9 @@ def solveEigen(self, display=0):
461461
462462 # include array-level mooring stiffness
463463 if self .ms :
464- if self .ms . moorMod == 0 or self . ms .moorMod == 2 :
464+ if self .moorMod == 0 or self .moorMod == 2 :
465465 C_moor = self .ms .getCoupledStiffnessA (lines_only = True )
466- elif self .ms . moorMod == 1 :
466+ elif self .moorMod == 1 :
467467 self .ms .updateSystemDynamicMatrices ()
468468 _ , _ , _ , C_moor = self .ms .getCoupledDynamicMatrices (lines_only = True )
469469 C_tot += C_moor
@@ -732,9 +732,9 @@ def step_func_equil(X, args, Y, oths, Ytarget, err, tol_, iter, maxIter):
732732
733733 # add array mooring system stiffness (if applicable)
734734 if self .ms :
735- if self .ms . moorMod == 0 or self . ms .moorMod == 2 :
735+ if self .moorMod == 0 or self .moorMod == 2 :
736736 Kmoor = self .ms .getCoupledStiffnessA (lines_only = True )
737- elif self .ms . moorMod == 1 :
737+ elif self .moorMod == 1 :
738738 self .ms .updateSystemDynamicMatrices ()
739739 _ , _ , _ , Kmoor = self .ms .getCoupledDynamicMatrices (lines_only = True )
740740
@@ -752,9 +752,9 @@ def step_func_equil(X, args, Y, oths, Ytarget, err, tol_, iter, maxIter):
752752 if fowt .ms :
753753 if fowt .ms :
754754 fowt .ms .solveEquilibrium ()
755- if fowt .ms . moorMod == 0 or fowt . ms .moorMod == 2 :
755+ if fowt .moorMod == 0 or fowt .moorMod == 2 :
756756 Kmoor_fowt = fowt .ms .getCoupledStiffnessA (lines_only = True )
757- elif fowt .ms . moorMod == 1 :
757+ elif fowt .moorMod == 1 :
758758 fowt .ms .updateSystemDynamicMatrices ()
759759 _ , _ , _ , Kmoor_fowt = fowt .ms .getCoupledDynamicMatrices (lines_only = True )
760760 K6 += Kmoor_fowt
@@ -961,12 +961,12 @@ def solveDynamics(self, case, tol=0.01, conv_plot=0, RAO_plot=0, display=0):
961961 # We would need to pass the motions of the extremities of the mooring lines within getCoupledDynamicMatrices
962962 # I think this would be straightforward for lines connecting the fairlead to the anchor, but not sure about cases with buoys
963963 M_moor , A_moor , B_moor , C_moor = (np .zeros ([6 ,6 ]) for _ in range (4 ))
964- if not fowt .ms or fowt .ms . moorMod == 0 :
964+ if not fowt .ms or fowt .moorMod == 0 :
965965 C_moor = fowt .C_moor
966- elif fowt .ms . moorMod == 1 :
966+ elif fowt .moorMod == 1 :
967967 fowt .updateMooringDynamicMatrices (XiLast , fowt .S [0 ,:])
968968 M_moor , A_moor , B_moor , C_moor = fowt .ms .getCoupledDynamicMatrices (lines_only = True )
969- elif fowt .ms . moorMod == 2 :
969+ elif fowt .moorMod == 2 :
970970 C_moor = fowt .C_moor
971971 fowt .updateMooringDynamicMatrices (XiLast , fowt .S [0 ,:])
972972 M_moor , A_moor , B_moor , _ = fowt .ms .getCoupledDynamicMatrices (lines_only = True )
@@ -1007,7 +1007,7 @@ def solveDynamics(self, case, tol=0.01, conv_plot=0, RAO_plot=0, display=0):
10071007 # Recompute mooring damping matrix as it depends on body motions (linearization of drag lods). The other matrices are kept the same.
10081008 # Note: Is it worth recomputing the mooring damping matrix at each step? The impact of mooring damping on body dynamics is small, and the motion
10091009 # RAOs are probably not changing much. Perhaps compute this only once and keep it constant?
1010- if fowt .ms and (fowt .ms . moorMod == 1 or fowt . ms .moorMod == 2 ):
1010+ if fowt .ms and (fowt .moorMod == 1 or fowt .moorMod == 2 ):
10111011 fowt .updateMooringDynamicMatrices (XiLast , fowt .S [0 ,:])
10121012 _ , _ , B_moor , _ = fowt .ms .getCoupledDynamicMatrices (lines_only = True )
10131013
@@ -1112,12 +1112,12 @@ def solveDynamics(self, case, tol=0.01, conv_plot=0, RAO_plot=0, display=0):
11121112 # include array-level mooring stiffness
11131113 if self .ms :
11141114 M_moor , A_moor , B_moor , C_moor = (np .zeros ([Z_sys .shape [0 ], Z_sys .shape [1 ]]) for _ in range (4 ))
1115- if self .ms . moorMod == 0 :
1115+ if self .moorMod == 0 :
11161116 C_moor = self .ms .getCoupledStiffnessA (lines_only = True )
1117- elif self .ms . moorMod == 1 :
1117+ elif self .moorMod == 1 :
11181118 self .updateMooringDynamicMatrices (XiLast_all , self .fowtList [0 ].S [0 ,:])
11191119 M_moor , A_moor , B_moor , C_moor = self .ms .getCoupledDynamicMatrices (lines_only = True )
1120- elif self .ms . moorMod == 2 :
1120+ elif self .moorMod == 2 :
11211121 self .updateMooringDynamicMatrices (XiLast_all , self .fowtList [0 ].S [0 ,:])
11221122 C_moor = self .ms .getCoupledStiffnessA (lines_only = True )
11231123 M_moor , A_moor , B_moor , _ = self .ms .getCoupledDynamicMatrices (lines_only = True )
0 commit comments