Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into ctopt
Browse files Browse the repository at this point in the history
  • Loading branch information
dzalkind committed May 9, 2024
2 parents fb283fa + 527f7fa commit 85bd133
Show file tree
Hide file tree
Showing 41 changed files with 2,731 additions and 435 deletions.
Empty file.
2 changes: 1 addition & 1 deletion examples/05_tower_monopile/monopile_direct.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
# print results from the analysis or optimization
z = 0.5 * (prob["z_full"][:-1] + prob["z_full"][1:])
print("zs =", prob["z_full"])
print("ds =", prob["d_full"])
print("ds =", prob["outer_diameter_full"])
print("ts =", prob["t_full"])
print("mass (kg) =", prob["monopile_mass"])
print("cg (m) =", prob["monopile_z_cg"])
Expand Down
2 changes: 1 addition & 1 deletion examples/05_tower_monopile/monopile_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# print results from the analysis or optimization
z = 0.5 * (wt_opt["fixedse.z_full"][:-1] + wt_opt["fixedse.z_full"][1:])
print("zs =", wt_opt["fixedse.z_full"])
print("ds =", wt_opt["fixedse.d_full"])
print("ds =", wt_opt["fixedse.outer_diameter_full"])
print("ts =", wt_opt["fixedse.t_full"])
print("mass (kg) =", wt_opt["fixedse.monopile_mass"])
print("cg (m) =", wt_opt["fixedse.monopile_z_cg"])
Expand Down
2 changes: 1 addition & 1 deletion examples/05_tower_monopile/tower_direct.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
# print results from the analysis or optimization
z = 0.5 * (prob["z_full"][:-1] + prob["z_full"][1:])
print("zs =", prob["z_full"])
print("ds =", prob["d_full"])
print("ds =", prob["outer_diameter_full"])
print("ts =", prob["t_full"])
print("mass (kg) =", prob["tower_mass"])
print("cg (m) =", prob["tower_center_of_mass"])
Expand Down
2 changes: 1 addition & 1 deletion examples/05_tower_monopile/tower_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# print results from the analysis or optimization
z = 0.5 * (wt_opt["towerse.z_full"][:-1] + wt_opt["towerse.z_full"][1:])
print("zs =", wt_opt["towerse.z_full"])
print("ds =", wt_opt["towerse.d_full"])
print("ds =", wt_opt["towerse.outer_diameter_full"])
print("ts =", wt_opt["towerse.t_full"])
print("mass (kg) =", wt_opt["towerse.tower_mass"])
print("cg (m) =", wt_opt["towerse.tower_center_of_mass"])
Expand Down
40 changes: 20 additions & 20 deletions examples/09_floating/IEA-15-240-RWT_VolturnUS-S.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,8 @@ components:
- name: main_column
joint1: main_keel
joint2: main_freeboard
Ca: 1.0
Cd: 0.8
# Ca: 1.0
# Cd: 0.8
outer_shape:
shape: circular
outer_diameter:
Expand Down Expand Up @@ -660,8 +660,8 @@ components:
- name: column1
joint1: col1_keel
joint2: col1_freeboard
Ca: 1.0
Cd: 0.8
# Ca: 1.0
# Cd: 0.8
outer_shape: &col_out
shape: circular
outer_diameter:
Expand Down Expand Up @@ -699,8 +699,8 @@ components:
- name: column2
joint1: col2_keel
joint2: col2_freeboard
Ca: 1.0
Cd: 0.8
# Ca: 1.0
# Cd: 0.8
outer_shape: *col_out
internal_structure: *col_int
axial_joints:
Expand All @@ -716,8 +716,8 @@ components:
- name: column3
joint1: col3_keel
joint2: col3_freeboard
Ca: 1.0
Cd: 0.8
# Ca: 1.0
# Cd: 0.8
outer_shape: *col_out
internal_structure: *col_int
axial_joints:
Expand All @@ -734,8 +734,8 @@ components:
- name: Y_pontoon_upper1
joint1: main_upper_pontoon
joint2: col1_upper_pontoon
Ca: 1.0
Cd: 0.8
# Ca: 1.0
# Cd: 0.8
outer_shape: &pontup_out
shape: circular
outer_diameter:
Expand All @@ -752,24 +752,24 @@ components:
- name: Y_pontoon_upper2
joint1: main_upper_pontoon
joint2: col2_upper_pontoon
Ca: 1.0
Cd: 0.8
# Ca: 1.0
# Cd: 0.8
outer_shape: *pontup_out
internal_structure: *pontup_int

- name: Y_pontoon_upper3
joint1: main_upper_pontoon
joint2: col3_upper_pontoon
Ca: 1.0
Cd: 0.8
# Ca: 1.0
# Cd: 0.8
outer_shape: *pontup_out
internal_structure: *pontup_int

- name: Y_pontoon_lower1
joint1: main_lower_pontoon
joint2: col1_lower_pontoon
Ca: 1.0
Cd: 0.8
# Ca: 1.0
# Cd: 0.8
outer_shape: &pontlow_out
shape: circular
outer_diameter:
Expand All @@ -796,16 +796,16 @@ components:
joint2: col2_lower_pontoon
outer_shape: *pontlow_out
internal_structure: *pontlow_int
Ca: 1.0
Cd: 0.8
# Ca: 1.0
# Cd: 0.8

- name: Y_pontoon_lower3
joint1: main_lower_pontoon
joint2: col3_lower_pontoon
outer_shape: *pontlow_out
internal_structure: *pontlow_int
Ca: 1.0
Cd: 0.8
# Ca: 1.0
# Cd: 0.8
mooring:
nodes:
- name: line1_anchor
Expand Down
3 changes: 2 additions & 1 deletion examples/09_floating/tlp_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
opt["floating"]["members"]["n_layers"] = [1, 1, 1, 1]
opt["floating"]["members"]["n_ballasts"] = [2, 0, 0, 0]
opt["floating"]["members"]["n_axial_joints"] = [0, 0, 0, 0]
opt["floating"]["members"]["outer_shape"] = 4 * ["circular"]
opt["WISDEM"] = {}
opt["WISDEM"]["n_dlc"] = 1
opt["WISDEM"]["TowerSE"] = {}
Expand Down Expand Up @@ -135,7 +136,7 @@
prob["Hsig_wave"] = 10.8 # Significant wave height [m]
prob["Tsig_wave"] = 9.8 # Wave period [s]
prob["shearExp"] = 0.11 # Shear exponent in wind power law
prob["cm"] = 2.0 # Added mass coefficient
prob["ca_usr"] = 2.0 # Added mass coefficient
prob["Uc"] = 0.0 # Mean current speed
prob["beta_wind"] = prob["beta_wave"] = 0.0
prob["cd_usr"] = -1.0 # Compute drag coefficient
Expand Down
128 changes: 83 additions & 45 deletions wisdem/commonse/cross_sections.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,74 +240,112 @@ def S(self): # Bending modulus for tubular cross-section


class Rectangle(CrossSectionBase):
"""Rectangle section property calculation
reference: frame3DD documentation, note that the coordinate system is different from the online doc
Args:
CrossSectionBase (parent class)
Definition:
a
|---------------------|
| |
b | |-------------| | ^ y
| | | | |
| | | | ---> x
| |-------------| |
| | t |
|---------------------|
"""
def __init__(self, a, b, t, L=np.nan):
"""Initialize rectangle
Args:
a (float): side_length parallel to y
b (float): side_length_b parallel to z
t (float): thickness of rectangular tube
L (float), optional): length of the section. Defaults to np.nan.
"""
self.a = a
self.b = b
self.t = t
self.L = L * np.ones(np.size(a))

assert (np.minimum(self.a, self.b)>=2*self.t).any(), "Thickness exceeds the edge lengths."

@property
def Area(self): # Cross sectional area of tube
def Area(self): # Cross sectional area of rectangle
return self.a * self.b - (self.a - 2 * self.t) * (self.b - 2 * self.t)

@property
def Ixx(self): # 2nd area moment of inertia w.r.t. x-x axis running parallel to flange through CG
return (self.a * self.b**3 - (self.a - 2 * self.t) * (self.b - 2 * self.t) * 3) / 12.0
def Ixx(self): # 2nd area moment of inertia w.r.t. x-x axis
return (self.a * self.b**3 - (self.a - 2 * self.t) * (self.b - 2 * self.t)**3) / 12.0

@property
def Iyy(self): # 2nd area moment of inertia w.r.t. z-z running through center of web
return (self.b * self.a**3 - (self.b - 2 * self.t) * (self.a - 2 * self.t) * 3) / 12.0
def Iyy(self): # 2nd area moment of inertia w.r.t. z-z
return (self.b * self.a**3 - (self.b - 2 * self.t) * (self.a - 2 * self.t)**3) / 12.0

@property
def J0(self): # polar moment of inertia w.r.t. z-z axis (torsional)
return 2 * self.t * (self.a - self.t) ** 2 * (self.b - self.t) ** 2 / (self.a + self.b - 2 * self.t)

@property
def Asx(self): # Shear Area for tubular cross-section
if self.a > self.b:
return self.Area / (
0.93498
- 1.28084 * (self.t / self.b)
+ 1.36441 * (self.b / self.a)
+ 0.00295 * (self.a / self.b) ** 2
+ 0.25797 * (self.t * self.a / self.b**2)
)
return self.Ixx + self.Iyy

@property
def Asx(self): # Shear Area for rectangle cross-section
if np.minimum(self.a, self.b)>2*self.t:
if self.a > self.b:
return self.Area / (
0.93498
- 1.28084 * (self.t / self.b)
+ 1.36441 * (self.b / self.a)
+ 0.00295 * (self.a / self.b) ** 2
+ 0.25797 * (self.t * self.a / self.b**2)
)
else:
return self.Area / (
1.63544
- 8.34935 * (self.t / self.a)
+ 0.60125 * (self.b / self.a)
+ 0.41403 * (self.b / self.a) ** 2
+ 4.95373 * (self.t * self.b / self.a**2)
)
else:
return self.Area / (
1.63544
- 8.34935 * (self.t / self.a)
+ 0.60125 * (self.b / self.a)
+ 0.41403 * (self.b / self.a) ** 2
+ 4.95373 * (self.t * self.b / self.a**2)
)

@property
def Asy(self): # Shear Area for tubular cross-section
if self.a > self.b:
return self.Area / (
1.63544
- 8.34935 * (self.t / self.b)
+ 0.60125 * (self.a / self.b)
+ 0.41403 * (self.a / self.b) ** 2
+ 4.95373 * (self.t * self.a / self.b**2)
)
# Asx = Asy = Ax (5+5v)/(6+5v), v is poisson ratio
# This assumes an poisson ratio of 0.3, be careful of using this
return self.Area*(5+5*0.3)/(6+5*0.3)

@property
def Asy(self): # Shear Area for rectangular cross-section
if np.minimum(self.a, self.b)>2*self.t:
if self.a > self.b:
return self.Area / (
1.63544
- 8.34935 * (self.t / self.b)
+ 0.60125 * (self.a / self.b)
+ 0.41403 * (self.a / self.b) ** 2
+ 4.95373 * (self.t * self.a / self.b**2)
)
else:
return self.Area / (
0.93498
- 1.28084 * (self.t / self.a)
+ 1.36441 * (self.a / self.b)
+ 0.00295 * (self.b / self.a) ** 2
+ 0.25797 * (self.t * self.b / self.a**2)
)
else:
return self.Area / (
0.93498
- 1.28084 * (self.t / self.a)
+ 1.36441 * (self.a / self.b)
+ 0.00295 * (self.b / self.a) ** 2
+ 0.25797 * (self.t * self.b / self.a**2)
)
return self.Asx

@property
def BdgMxx(self): # Bending modulus for tubular cross-section
def BdgMxx(self): # Bending modulus for rectangular cross-section
return 2 * self.Ixx / self.b

@property
def BdgMyy(self): # Bending modulus for tubular cross-section =BdgMxx
def BdgMyy(self): # Bending modulus for rectangular cross-section =BdgMxx
return 2 * self.Iyy / self.a

@property
def TorsConst(self): # Torsion shear constant for tubular cross-section
def TorsConst(self): # Torsion shear constant for rectangular cross-section
return 2 * self.t * (self.a - self.t) * (self.b - self.t)
Loading

0 comments on commit 85bd133

Please sign in to comment.