diff --git a/raft/raft_fowt.py b/raft/raft_fowt.py index 9192814..69ee9db 100644 --- a/raft/raft_fowt.py +++ b/raft/raft_fowt.py @@ -282,7 +282,7 @@ def calcStatics(self): self.mballast = np.zeros(len(self.pb)) # make an empty mballast list with len=len(pb) for i in range(len(self.pb)): # for each ballast density for j in range(len(mballast)): # loop through each ballast mass - if np.float(pballast[j]) == np.float(self.pb[i]): # but only if the index of the ballast mass (density) matches the value of pb + if float(pballast[j]) == float(self.pb[i]): # but only if the index of the ballast mass (density) matches the value of pb self.mballast[i] += mballast[j] # add that ballast mass to the correct index of mballast diff --git a/raft/raft_rotor.py b/raft/raft_rotor.py index bfe7c82..7305613 100644 --- a/raft/raft_rotor.py +++ b/raft/raft_rotor.py @@ -5,8 +5,6 @@ import numpy as np import matplotlib.pyplot as plt -import pandas as pd - from raft.pyIECWind import pyIECWind_extreme @@ -16,19 +14,17 @@ from raft.helpers import rotationMatrix, getFromDict -from wisdem.ccblade.ccblade import CCBlade, CCAirfoil +try: + from ccblade.ccblade import CCBlade, CCAirfoil +except: + from wisdem.ccblade.ccblade import CCBlade, CCAirfoil + import pickle if False: thrust_psd = pickle.load( open( "/Users/dzalkind/Tools/RAFT/designs/rotors/thrust_psd.p", "rb" ) ) -''' -try: - import ccblade as CCBlade, CCAirfoil # for cloned ccblade -except: - import wisdem.ccblade as CCblade, CCAirfoil # for conda install wisdem -''' # global constants raft_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))