diff --git a/raft/raft_fowt.py b/raft/raft_fowt.py index 76c8ad6..50f3401 100644 --- a/raft/raft_fowt.py +++ b/raft/raft_fowt.py @@ -962,10 +962,12 @@ def calcHydroExcitation(self, case, memberList=[], dgamma=0): # make wave spectrum for each heading self.S = np.zeros([self.nWaves,self.nw]) for ih in range(self.nWaves): - if case['wave_spectrum'][ih] == 'constant': + if case['wave_spectrum'][ih] == 'unit': + self.S[ih,:] = np.tile(1, self.nw) + self.zeta[ih,:] = np.sqrt(2*self.S[ih,:]*self.dw) # wave elevation amplitudes (these are easiest to use) + elif case['wave_spectrum'][ih] == 'constant': self.S[ih,:] = case['wave_height'][ih] self.zeta[ih,:] = np.sqrt(2*self.S*self.dw) - # self.zeta[ih,:] = np.tile(case['wave_height'][ih], self.nw) elif case['wave_spectrum'][ih] == 'JONSWAP': self.S[ih,:] = JONSWAP(self.w, case['wave_height'][ih], case['wave_period'][ih], Gamma=case['wave_gamma'][ih]) self.zeta[ih,:] = np.sqrt(2*self.S[ih,:]*self.dw) # wave elevation amplitudes (these are easiest to use) diff --git a/tests/test_data/VolturnUS-S.yaml b/tests/test_data/VolturnUS-S.yaml index 916ed66..2528584 100644 --- a/tests/test_data/VolturnUS-S.yaml +++ b/tests/test_data/VolturnUS-S.yaml @@ -1084,8 +1084,7 @@ platform: rB : [ 0, 0, 15] # [m] and B coordinates shape : circ # [-] circular or rectangular gamma : 0.0 # [deg] twist angle about the member's z-axis - potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory - MCF : True # [bool] Whether to correct the inertia coefficient using the MacCamy and Fuchs correction + potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory # --- outer shell including hydro--- stations : [0, 1] # [-] location of stations along axis. Will be normalized such that start value maps to rA and end value to rB d : 9.85 # [m] diameters if circular or side lengths if rectangular (can be pairs) @@ -1109,7 +1108,6 @@ platform: shape : circ # [-] circular or rectangular gamma : 0.0 # [deg] twist angle about the member's z-axis potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory - MCF : True # [bool] Whether to correct the inertia coefficient using the MacCamy and Fuchs correction # --- outer shell including hydro--- stations : [0, 35] # [-] location of stations along axis. Will be normalized such that start value maps to rA and end value to rB d : 12.23 # [m] diameters if circular or side lengths if rectangular (can be pairs) @@ -1136,7 +1134,6 @@ platform: shape : rect # [-] circular or rectangular gamma : 0.0 # [deg] twist angle about the member's z-axis potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory - MCF : False # [bool] Whether to correct the inertia coefficient using the MacCamy and Fuchs correction # --- outer shell including hydro--- stations : [0, 40.5] # [-] location of stations along axis. Will be normalized such that start value maps to rA and end value to rB d : [12.4, 7.0] # [m] diameters if circular or side lengths if rectangular (can be pairs) @@ -1158,7 +1155,6 @@ platform: shape : circ # [-] circular or rectangular gamma : 0.0 # [deg] twist angle about the member's z-axis potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory - MCF : False # [bool] Whether to correct the inertia coefficient using the MacCamy and Fuchs correction # --- outer shell including hydro--- stations : [0, 1] # [-] location of stations along axis. Will be normalized such that start value maps to rA and end value to rB d : 0.91 # [m] diameters if circular or side lengths if rectangular (can be pairs) diff --git a/tests/test_fowt.py b/tests/test_fowt.py index 71aa22a..5031572 100644 --- a/tests/test_fowt.py +++ b/tests/test_fowt.py @@ -278,7 +278,7 @@ def test_hydroLinearization(index_and_fowt): fowt = create_fowt(list_files[index]) # test_statics((index,fowt)) - # test_hydroConstants((index,fowt)) - # test_hydroExcitation((index,fowt)) - test_hydroLinearization((index,fowt)) + # # test_hydroConstants((index,fowt)) + test_hydroExcitation((index,fowt)) + # test_hydroLinearization((index,fowt))