Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update wisdem #115

Merged
merged 2 commits into from
Jun 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions WISDEM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The core modules draw upon some utility packages, which are typically compiled c
* _Airfoil Preppy_ is a tool to handle airfoil polar data
* _CCBlade_ is the BEM module of WISDEM
* _pyFrame3DD_ brings libraries to handle various coordinate transformations
* _pyMAP_ provides a python interface to MAP++, a quasi-static mooring line model
* _MoorPy_ is a quasi-static mooring line model
* [_pyOptSparse_](https://github.com/mdolab/pyoptsparse) provides some additional optimization algorithms to OpenMDAO


Expand All @@ -50,7 +50,7 @@ The installation instructions below use the environment name, "wisdem-env," but

2. In order to directly use the examples in the repository and peek at the code when necessary, we recommend all users install WISDEM in *developer* mode. This is done by first installing WISDEM as a conda package to easily satisfy all dependencies, but then removing the WISDEM conda package and reinstalling from the Github source code. Note the differences between Windows and Mac/Linux build systems:

conda install -y wisdem git jupyter
conda install -y wisdem git
conda remove --force wisdem
conda install compilers # (Mac / Linux only)
conda install m2w64-toolchain libpython # (Windows only)
Expand Down
2 changes: 1 addition & 1 deletion WISDEM/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
- jsonschema
- make
- matplotlib
- mpi4py
- nlopt
- numpy
- openmdao
Expand All @@ -36,4 +37,3 @@ dependencies:
# - libpython # [win]
# - compilers # [not win]
# - petsc4py # [not win]
# - mpi4py # [not win]
5 changes: 5 additions & 0 deletions WISDEM/examples/09_floating/modeling_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@ WISDEM:
FloatingSE:
flag: True
symmetric_moorings: True
gamma_f: 1.35 # Safety factor for fatigue loads
gamma_m: 1.3 # Safety factor for material properties
gamma_n: 1.0 # Safety factor for ...
gamma_b: 1.1 # Safety factor for ...
gamma_fatigue: 1.755 # Safety factor for fatigue loads
BOS:
flag: True
5 changes: 5 additions & 0 deletions WISDEM/examples/09_floating/modeling_options_noRNA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ WISDEM:
FloatingSE:
flag: True
symmetric_moorings: True
gamma_f: 1.35 # Safety factor for fatigue loads
gamma_m: 1.3 # Safety factor for material properties
gamma_n: 1.0 # Safety factor for ...
gamma_b: 1.1 # Safety factor for ...
gamma_fatigue: 1.755 # Safety factor for fatigue loads
BOS:
flag: False

Expand Down
2 changes: 1 addition & 1 deletion WISDEM/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# Top-level setup
setup(
name="WISDEM",
version="3.2.0",
version="3.3.0",
description="Wind-Plant Integrated System Design & Engineering Model",
long_description="""WISDEM is a Python package for conducting multidisciplinary analysis and
optimization of wind turbines and plants. It is built on top of NASA's OpenMDAO library.""",
Expand Down
20 changes: 8 additions & 12 deletions WISDEM/wisdem/commonse/utilization_dnvgl.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CylinderBuckling:

def __init__(
self,
z,
l,
d,
t,
ring_stiffeners=False,
Expand Down Expand Up @@ -59,7 +59,7 @@ def __init__(
Material factor.
"""

self.z = np.array(z)
self._l = np.array(l)
self._d = np.array(d)
self._t = np.array(t)
self.E = E
Expand All @@ -76,9 +76,9 @@ def __init__(
@property
def d(self):
"""Section diameters at midpoints (m)."""
if self._d.size == self.z.size:
if self._d.size == self._l.size + 1:
return 0.5 * (self._d[1:] + self._d[:-1])
elif self._d.size == self.z.size - 1:
elif self._d.size == self._l.size:
return self._d
else:
raise ValueError(f"Incompatible size for diameter. Expected: {self._t.size + 1} vs {self._d.size}")
Expand All @@ -92,9 +92,9 @@ def r(self):
@property
def t(self):
"""Section thicknesses at midpoints (m)."""
if self.z.size == self._t.size + 1:
if self._l.size == self._t.size:
return self._t
elif self.z.size == self._t.size:
elif self._l.size + 1 == self._t.size:
return 0.5 * (self._t[1:] + self._t[:-1])
else:
raise ValueError(f"Incompatible size for thickness. Expected: {self._d.size - 1} vs {self._t.size}")
Expand Down Expand Up @@ -126,11 +126,7 @@ def s(self):
@property
def l(self):
"""Section heights (m)."""

# if self._ring:
return np.diff(self.z)

# return np.repeat(max(self.L), len(self.L) - 1)
return self._l

@property
def v(self):
Expand Down Expand Up @@ -339,7 +335,7 @@ def utilization_global(self, _sigma_a, sigma_m, fak, gamma=1.45):

# Euler buckling strength
k = 2.0 # Fixed-free
L = self.z[-1] - self.z[0] - self.mod_length
L = self._l.sum() - self.mod_length

I = np.pi * self.r ** 3 * self.te
fE = (np.pi ** 2 * self.E * I) / ((k * L) ** 2 * self.Ac)
Expand Down
5 changes: 5 additions & 0 deletions WISDEM/wisdem/floatingse/floating.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def setup(self):
"section_rho",
"section_E",
"section_G",
"section_sigma_y",
"idx_cb",
"variable_ballast_capacity",
"variable_ballast_Vpts",
Expand All @@ -101,6 +102,10 @@ def setup(self):
"Iwater",
"added_mass",
"waterline_centroid",
"Px",
"Py",
"Pz",
"qdyn",
]
for k in range(n_member):
for var in mem_vars:
Expand Down
Loading