Skip to content

Commit

Permalink
Merge pull request #117 from WISDEM/update_wisdem
Browse files Browse the repository at this point in the history
Update wisdem
  • Loading branch information
gbarter authored Jun 19, 2021
2 parents 9db01f6 + e219254 commit 0ebaf03
Show file tree
Hide file tree
Showing 35 changed files with 934 additions and 303 deletions.
2 changes: 1 addition & 1 deletion WISDEM/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WISDEM®

[![Build Status](https://travis-ci.com/WISDEM/WISDEM.svg?branch=develop)](https://travis-ci.com/WISDEM/WISDEM)
[![Actions Status](https://github.com/WISDEM/WISDEM/workflows/CI_WISDEM/badge.svg?branch=develop)](https://github.com/WISDEM/WISDEM/actions)
[![Coverage Status](https://coveralls.io/repos/github/WISDEM/WISDEM/badge.svg?branch=develop)](https://coveralls.io/github/WISDEM/WISDEM?branch=develop)
[![Documentation Status](https://readthedocs.org/projects/wisdem/badge/?version=master)](https://wisdem.readthedocs.io/en/master/?badge=master)

Expand Down
12 changes: 3 additions & 9 deletions WISDEM/examples/09_floating/IEA-15-240-RWT_VolturnUS-S.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -729,21 +729,15 @@ components:
line_types:
- name: main
diameter: 0.185
mass_density: 685.0
stiffness: 3270e6
breaking_load: 1e8
cost: 100.0
type: chain
transverse_added_mass: 1.0
tangential_added_mass: 0.0
transverse_drag: 1.6
tangential_drag: 0.1

anchor_types:
- name: drag_embedment
mass: 1e3
cost: 1e4
max_vertical_load: 0.0
max_lateral_load: 1e5
type: drag_embedment

airfoils:
- name: circular
Expand Down Expand Up @@ -1135,7 +1129,7 @@ environment:
water_dyn_viscosity: 1.3351e-3
soil_shear_modulus: 140e6
soil_poisson: 0.4
water_depth: 30.0
water_depth: 200.0
significant_wave_height: 4.52
significant_wave_period: 9.45

Expand Down
10 changes: 2 additions & 8 deletions WISDEM/examples/09_floating/nrel5mw-semi_oc4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -634,21 +634,15 @@ components:
line_types:
- name: main
diameter: 0.0766
mass_density: 113.35
stiffness: 7.536e8
breaking_load: 1e8
cost: 100.0
type: chain
transverse_added_mass: 0.8
tangential_added_mass: 0.25
transverse_drag: 2.0
tangential_drag: 0.4

anchor_types:
- name: drag_embedment
mass: 1e3
cost: 1e4
max_vertical_load: 0.0
max_lateral_load: 1e5
type: drag_embedment

airfoils:
- aerodynamic_center: 0.275
Expand Down
21 changes: 9 additions & 12 deletions WISDEM/examples/09_floating/nrel5mw-spar_oc3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -405,21 +405,15 @@ components:
line_types:
- name: main
diameter: 0.09
mass_density: 77.7066
stiffness: 384.243e6
breaking_load: 1e8
cost: 100.0
type: chain
transverse_added_mass: 1.0
tangential_added_mass: 0.0
transverse_drag: 1.6
tangential_drag: 0.1

anchor_types:
- name: drag_embedment
mass: 1e3
cost: 1e4
max_vertical_load: 0.0
max_lateral_load: 1e5
type: drag_embedment

airfoils:
- aerodynamic_center: 0.275
Expand Down Expand Up @@ -709,11 +703,14 @@ control:
maxOmega: 1.26711
pitch:
PC_zeta: 0.7 # Pitch controller desired damping ratio [-]
PC_omega: 0.5 # Pitch controller desired natural frequency [rad/s]
ps_percent: 0.8 # Percent peak shaving [%, <= 1 ], {default = 80%}
PC_omega: 0.35 # Pitch controller desired natural frequency [rad/s]
ps_percent: 0.9 # Percent peak shaving [%, <= 1 ], {default = 80%}
max_pitch: 1.57 # Maximum pitch angle [rad], {default = 90 degrees}
max_pitch_rate: 0.1745
min_pitch: 0 # Minimum pitch angle [rad], {default = 0 degrees}
fl_feedback:
twr_freq: 100 # Frequency of notch in floating feedback (F_NotchCornerFreq)
ptfm_freq: .2 # Frequency of LPF in floating feedback (F_FlCornerFreq)
torque:
control_type: tsr_tracking
tsr: 7.01754386
Expand All @@ -738,8 +735,8 @@ environment:
water_density: 1025.0
water_dyn_viscosity: 1.3351e-3
water_depth: 320.0
significant_wave_height: 9.14
significant_wave_period: 13.6
significant_wave_height: 6.0
significant_wave_period: 10.0
soil_shear_modulus: 140.e+6
soil_poisson: 0.4

Expand Down
2 changes: 2 additions & 0 deletions WISDEM/examples/09_floating/tlp_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
opt["mooring"] = {}
opt["mooring"]["n_attach"] = 3
opt["mooring"]["n_anchors"] = 3
opt["mooring"]["line_anchor"] = ["custom"] * 3
opt["mooring"]["line_material"] = ["custom"] * 3
opt["materials"] = {}
opt["materials"]["n_mat"] = 2

Expand Down
58 changes: 33 additions & 25 deletions WISDEM/wisdem/commonse/frustum.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def frustum(Db, Dt, H):
return vol, cm


def frustumVol(rb, rt, h, diamFlag=False):
def frustumVol(rb_0, rt_0, h, diamFlag=False):
"""This function returns a frustum's volume with radii or diameter inputs.
INPUTS:
Expand All @@ -51,12 +51,13 @@ def frustumVol(rb, rt, h, diamFlag=False):
"""
if diamFlag:
# Convert diameters to radii
rb *= 0.5
rt *= 0.5
rb, rt = 0.5 * rb_0, 0.5 * rt_0
else:
rb, rt = rb_0, rt_0
return np.pi * (h / 3.0) * (rb * rb + rt * rt + rb * rt)


def frustumCG(rb, rt, h, diamFlag=False):
def frustumCG(rb_0, rt_0, h, diamFlag=False):
"""This function returns a frustum's center of mass/gravity (centroid) with radii or diameter inputs.
NOTE: This is for a SOLID frustum, not a shell
Expand All @@ -74,12 +75,13 @@ def frustumCG(rb, rt, h, diamFlag=False):
"""
if diamFlag:
# Convert diameters to radii
rb *= 0.5
rt *= 0.5
rb, rt = 0.5 * rb_0, 0.5 * rt_0
else:
rb, rt = rb_0, rt_0
return 0.25 * h * (rb ** 2 + 2.0 * rb * rt + 3.0 * rt ** 2) / (rb ** 2 + rb * rt + rt ** 2)


def frustumIzz(rb, rt, h, diamFlag=False):
def frustumIzz(rb_0, rt_0, h, diamFlag=False):
"""This function returns a frustum's mass-moment of inertia (divided by density) about the
central (axial) z-axis with radii or diameter inputs.
NOTE: This is for a SOLID frustum, not a shell
Expand All @@ -98,15 +100,16 @@ def frustumIzz(rb, rt, h, diamFlag=False):
"""
if diamFlag:
# Convert diameters to radii
rb *= 0.5
rt *= 0.5
rb, rt = 0.5 * rb_0, 0.5 * rt_0
else:
rb, rt = rb_0, rt_0
# Integrate 2*pi*r*r^2 dr dz from r=0 to r(z), z=0 to h
# Also equals 0.3*Vol * (rt**5.0 - rb**5.0) / (rt**3.0 - rb**3.0)
# Also equals (0.1*np.pi*h * (rt**5.0 - rb**5.0) / (rt - rb) )
return 0.1 * np.pi * h * (rt ** 4.0 + rb * rt ** 3 + rb ** 2 * rt ** 2 + rb ** 3 * rt + rb ** 4.0)


def frustumIxx(rb, rt, h, diamFlag=False):
def frustumIxx(rb_0, rt_0, h, diamFlag=False):
"""This function returns a frustum's mass-moment of inertia (divided by density) about the
transverse x/y-axis passing through the center of mass with radii or diameter inputs.
NOTE: This is for a SOLID frustum, not a shell
Expand All @@ -125,10 +128,11 @@ def frustumIxx(rb, rt, h, diamFlag=False):
"""
if diamFlag:
# Convert diameters to radii
rb *= 0.5
rt *= 0.5
rb, rt = 0.5 * rb_0, 0.5 * rt_0
else:
rb, rt = rb_0, rt_0
# Integrate pi*r(z)^4/4 + pi*r(z)^2*(z-z_cg)^2 dz from z=0 to h
A = 0.5 * frustumIzz(rb, rt, h)
A = 0.5 * frustumIzz(rb_0, rt_0, h)
B = (
np.pi
* h ** 3
Expand All @@ -141,7 +145,7 @@ def frustumIxx(rb, rt, h, diamFlag=False):
return A + B


def frustumShellVol(rb, rt, t, h, diamFlag=False):
def frustumShellVol(rb_0, rt_0, t, h, diamFlag=False):
"""This function returns a frustum shell's volume (for computing mass with density) with radii or diameter inputs.
NOTE: This is for a frustum SHELL, not a solid
Expand All @@ -160,8 +164,9 @@ def frustumShellVol(rb, rt, t, h, diamFlag=False):
"""
if diamFlag:
# Convert diameters to radii
rb *= 0.5
rt *= 0.5
rb, rt = 0.5 * rb_0, 0.5 * rt_0
else:
rb, rt = rb_0, rt_0
# Integrate 2*pi*r*dr*dz from r=ri(z) to ro(z), z=0 to h
rb_o = rb
rb_i = rb - t
Expand All @@ -171,7 +176,7 @@ def frustumShellVol(rb, rt, t, h, diamFlag=False):
return frustumVol(rb_o, rt_o, h) - frustumVol(rb_i, rt_i, h)


def frustumShellCG(rb, rt, t, h, diamFlag=False):
def frustumShellCG(rb_0, rt_0, t, h, diamFlag=False):
"""This function returns a frustum's center of mass/gravity (centroid) with radii or diameter inputs.
NOTE: This is for a frustum SHELL, not a solid
Expand All @@ -190,8 +195,9 @@ def frustumShellCG(rb, rt, t, h, diamFlag=False):
"""
if diamFlag:
# Convert diameters to radii
rb *= 0.5
rt *= 0.5
rb, rt = 0.5 * rb_0, 0.5 * rt_0
else:
rb, rt = rb_0, rt_0
# Integrate 2*pi*r*z*dr*dz/V from r=ri(z) to ro(z), z=0 to h
rb_o = rb
rb_i = rb - t
Expand All @@ -202,7 +208,7 @@ def frustumShellCG(rb, rt, t, h, diamFlag=False):
return h * A / 4.0 / B


def frustumShellIzz(rb, rt, t, h, diamFlag=False):
def frustumShellIzz(rb_0, rt_0, t, h, diamFlag=False):
"""This function returns a frustum's mass-moment of inertia (divided by density) about the
central (axial) z-axis with radii or diameter inputs.
NOTE: This is for a frustum SHELL, not a solid
Expand All @@ -222,8 +228,9 @@ def frustumShellIzz(rb, rt, t, h, diamFlag=False):
"""
if diamFlag:
# Convert diameters to radii
rb *= 0.5
rt *= 0.5
rb, rt = 0.5 * rb_0, 0.5 * rt_0
else:
rb, rt = rb_0, rt_0
# Integrate 2*pi*r*dr*dz from r=ri(z) to ro(z), z=0 to h
rb_o = rb
rb_i = rb - t
Expand All @@ -232,7 +239,7 @@ def frustumShellIzz(rb, rt, t, h, diamFlag=False):
return frustumIzz(rb_o, rt_o, h) - frustumIzz(rb_i, rt_i, h)


def frustumShellIxx(rb, rt, t, h, diamFlag=False):
def frustumShellIxx(rb_0, rt_0, t, h, diamFlag=False):
"""This function returns a frustum's mass-moment of inertia (divided by density) about the
transverse x/y-axis passing through the center of mass with radii or diameter inputs.
NOTE: This is for a frustum SHELL, not a solid
Expand All @@ -252,8 +259,9 @@ def frustumShellIxx(rb, rt, t, h, diamFlag=False):
"""
if diamFlag:
# Convert diameters to radii
rb *= 0.5
rt *= 0.5
rb, rt = 0.5 * rb_0, 0.5 * rt_0
else:
rb, rt = rb_0, rt_0
# Integrate 2*pi*r*dr*dz from r=ri(z) to ro(z), z=0 to h
rb_o = rb
rb_i = rb - t
Expand Down
8 changes: 5 additions & 3 deletions WISDEM/wisdem/commonse/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ def get_modal_coefficients(x, y, deg=[2, 3, 4, 5, 6]):
# p6 = np.zeros((5, y.shape[1]))
# for k in range(y.shape[1]):
# p6[:, k], _ = curve_fit(mode_fit, xn, y[:, k])
normval = np.maximum(p6.sum(axis=0), 1e-6)
# The normalization shouldn't be less than 1e-5 otherwise OpenFAST has trouble in single prec
normval = np.maximum(np.sum(p6, axis=0), 1e-5)
p6 /= normval[np.newaxis, :]
else:
p6 = p6[2:]
# p6, _ = curve_fit(mode_fit, xn, y)
p6 /= p6.sum()
# The normalization shouldn't be less than 1e-5 otherwise OpenFAST has trouble in single prec
normval = np.maximum(p6.sum(), 1e-5)
p6 /= normval

return p6

Expand Down
5 changes: 0 additions & 5 deletions WISDEM/wisdem/floatingse/floating.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,3 @@ def setup(self):
for k in range(n_member):
for var in mem_vars:
self.connect(f"member{k}." + var, f"member{k}:" + var)

"""
self.connect("max_offset_restoring_force", "mooring_surge_restoring_force")
self.connect("operational_heel_restoring_force", "mooring_pitch_restoring_force")
"""
Loading

0 comments on commit 0ebaf03

Please sign in to comment.