Skip to content

Commit

Permalink
Merge pull request #174 from WISDEM/update_wisdem_dev
Browse files Browse the repository at this point in the history
Update wisdem
  • Loading branch information
ptrbortolotti committed Apr 28, 2022
2 parents c7f4cb5 + 113c205 commit 727db61
Show file tree
Hide file tree
Showing 38 changed files with 2,831 additions and 1,752 deletions.
4 changes: 2 additions & 2 deletions WISDEM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ 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 / editable* mode using the instructions here. If you really just want to use WISDEM as a library and lean on the documentation, you can always do `conda install wisdem` and be done. Note the differences between Windows and Mac/Linux build systems. For Linux, we recommend using the native compilers (for example, gcc and gfortran in the default GNU suite).

conda install -y cython git jsonschema make matplotlib nlopt numpy openmdao openpyxl pandas pip pyside2 pytest python-benedict pyyaml ruamel_yaml scipy setuptools simpy sortedcontainers statsmodels swig
conda install -y pyoptsparse # (Linux only)
conda install -y compilers pyoptsparse # (Mac only)
conda install -y pyoptsparse # (Linux and Mac)
conda install -y compilers # (Mac without Homebrew or Macports compilers)
conda install -y m2w64-toolchain libpython # (Windows only)
pip install marmot-agents
git clone https://github.com/WISDEM/WISDEM.git
Expand Down
6 changes: 3 additions & 3 deletions WISDEM/docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ In order to directly use the examples in the repository and peek at the code whe
conda install -y cython git jsonschema make matplotlib nlopt numpy openmdao openpyxl pandas pip pyside2 pytest python-benedict pyyaml ruamel_yaml scipy setuptools simpy sortedcontainers swig
pip install marmot-agents
For Linux systems:
For Linux and Mac systems:

.. code-block:: bash
conda install pyoptsparse
For Mac systems:
For Mac systems that *are not* using Homebrew or Macports compilers:

.. code-block:: bash
conda install compilers pyoptsparse
conda install compilers
For Windows systems:

Expand Down
2 changes: 1 addition & 1 deletion WISDEM/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
- mpi4py
- nlopt
- numpy
- openmdao
- openmdao>=3.4, <3.17
- openpyxl
- pandas
- pip
Expand Down
792 changes: 0 additions & 792 deletions WISDEM/examples/03_blade/BAR0.yaml

This file was deleted.

903 changes: 903 additions & 0 deletions WISDEM/examples/03_blade/BAR_USC.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion WISDEM/examples/03_blade/blade_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from wisdem.postprocessing.compare_designs import run

mydir = os.path.dirname(os.path.realpath(__file__)) # get path to this file
fname_wt_input = mydir + os.sep + "BAR0.yaml"
fname_wt_input = mydir + os.sep + "BAR_USC.yaml"
fname_modeling_options = mydir + os.sep + "modeling_options.yaml"
fname_analysis_options_no_opt = mydir + os.sep + "analysis_options_no_opt.yaml"
fname_analysis_options_aero = mydir + os.sep + "analysis_options_aero.yaml"
Expand Down
4 changes: 2 additions & 2 deletions WISDEM/examples/03_blade/modeling_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ WISDEM:
flag: True
spar_cap_ss: Spar_cap_ss
spar_cap_ps: Spar_cap_ps
te_ss: TE_reinforcement_ss
te_ps: TE_reinforcement_ps
te_ss: TE_reinf_ss
te_ps: TE_reinf_ps
DriveSE:
flag: True
TowerSE: # Options of TowerSE module
Expand Down
35 changes: 16 additions & 19 deletions WISDEM/examples/17_jacket/analysis_options_jacket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,28 @@ design_variables:
jacket:
r_foot:
flag: True
lower_bound: 8.
lower_bound: 6.
upper_bound: 16.
d_l:
flag: True
lower_bound: 0.9
upper_bound: 5.
beta_b:
r_head:
flag: True
lower_bound: 0.5
upper_bound: 0.9
beta_t:
lower_bound: 2.
upper_bound: 6.
leg_thickness:
flag: True
lower_bound: 0.4
upper_bound: 0.9
gamma_b:
lower_bound: 0.05
upper_bound: 0.1
leg_diameter:
flag: True
lower_bound: 4.
lower_bound: 0.9
upper_bound: 5.
gamma_t:
brace_diameters:
flag: True
lower_bound: 6.
upper_bound: 20.
q:
lower_bound: 0.5
upper_bound: 2.
brace_thicknesses:
flag: True
lower_bound: 0.8
upper_bound: 0.9
lower_bound: 0.05
upper_bound: 0.5

merit_figure: jacket_mass

Expand All @@ -54,6 +50,7 @@ driver:
solver: SLSQP # Optimization solver. Other options are 'SLSQP' - 'CONMIN'
step_size: 1.e-6 # Step size for finite differencing
form: forward # Finite differencing mode, either forward or central
debug_print: False

recorder:
flag: False # Flag to activate OpenMDAO recorder
Expand Down
17 changes: 6 additions & 11 deletions WISDEM/examples/17_jacket/nrel5mw_jacket.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 5MW Tower only
name: 5MW Turbine

assembly:
turbine_class: I
Expand Down Expand Up @@ -48,16 +48,11 @@ components:
r_foot: 6.
r_head: 3.
height: 50.
q: 0.9
l_osg: 5.0
l_tp: 4.0
gamma_b: 4.0
gamma_t: 6.0
beta_b: 0.9
beta_t: 0.8
tau_b: 0.8
tau_t: 0.6
d_l: 2.
leg_thickness: 0.1
brace_diameters: [1.0, 1.0, 1.0, 1.0]
brace_thicknesses: [0.1, 0.1, 0.1, 0.1]
bay_spacing: [0.1, 0.3, 0.5, 0.7, 0.9]
leg_diameter: 2.
x_mb: False
materials:
- name: steel
Expand Down
3 changes: 1 addition & 2 deletions WISDEM/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import glob

from setuptools import find_packages

from numpy.distutils.core import Extension, setup

os.environ["NPY_DISTUTILS_APPEND_FLAGS"] = "1"
Expand Down Expand Up @@ -40,7 +39,7 @@
"jsonschema",
"marmot-agents>=0.2.5",
"numpy",
"openmdao>=3.4",
"openmdao>=3.4,<3.17",
"openpyxl",
"pandas",
"pytest",
Expand Down
4 changes: 0 additions & 4 deletions WISDEM/wisdem/commonse/cylinder_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,6 @@ def compute(self, inputs, outputs):
outputs["shell_I_base"] = util.unassembleI(I_base)

# Compute costs based on "Optimum Design of Steel Structures" by Farkas and Jarmai
# All dimensions for correlations based on mm, not meters.
R_ave = 0.5 * (Rb + Rt)
taper = np.minimum(Rb / Rt, Rt / Rb)
nsec = t_full.size
Expand Down Expand Up @@ -1211,7 +1210,6 @@ def add_main_sections(self, inputs, outputs):
outputs["shell_I_base"] = util.unassembleI(I_base)

# Compute costs based on "Optimum Design of Steel Structures" by Farkas and Jarmai
# All dimensions for correlations based on mm, not meters.
R_ave = 0.5 * (Rb + Rt)
taper = np.minimum(Rb / Rt, Rt / Rb)
nsec = t_full.size
Expand Down Expand Up @@ -1343,7 +1341,6 @@ def add_bulkhead_sections(self, inputs, outputs):
outputs["bulkhead_I_base"] = util.unassembleI(I_keel)

# Compute costs based on "Optimum Design of Steel Structures" by Farkas and Jarmai
# All dimensions for correlations based on mm, not meters.
k_m = util.sectionalInterp(s_bulk, s_full, inputs["unit_cost_full"])
k_f = inputs["labor_cost_rate"] # 1.0 # USD / min labor
k_p = inputs["painting_cost_rate"] # USD / m^2 painting
Expand Down Expand Up @@ -1496,7 +1493,6 @@ def add_ring_stiffener_sections(self, inputs, outputs):
outputs["stiffener_I_base"] = util.unassembleI(I_keel)

# Compute costs based on "Optimum Design of Steel Structures" by Farkas and Jarmai
# All dimensions for correlations based on mm, not meters.
k_m = util.sectionalInterp(s_stiff, s_full, inputs["unit_cost_full"])
k_f = inputs["labor_cost_rate"] # 1.0 # USD / min labor
k_p = inputs["painting_cost_rate"] # USD / m^2 painting
Expand Down
4 changes: 3 additions & 1 deletion WISDEM/wisdem/commonse/manufacturing.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import numpy as np

from wisdem.commonse import eps

# Compute costs based on "Optimum Design of Steel Structures" by Farkas and Jarmai
# All correlations are based in mm and all inputs are assumed to be in m and then converted within the functions


def steel_cutting_plasma_time(length, thickness):
# Length input as meters, thickness in mm
Expand Down
4 changes: 1 addition & 3 deletions WISDEM/wisdem/commonse/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@

import copy

from scipy.linalg import solve_banded

import numpy as np
from scipy.linalg import solve_banded

# from scipy.optimize import curve_fit

Expand Down Expand Up @@ -205,7 +204,6 @@ def record_used_freqs(polyidx, i, used_freq_idx):
mshapes_z[i, :] = zpolys[freqs > 1e-1, :][z_polyidx, :]
freq_z[i] = freqs_dyn[z_polyidx]
used_freq_idx = record_used_freqs(z_polyidx, i, used_freq_idx)

return freq_x, freq_y, freq_z, mshapes_x, mshapes_y, mshapes_z


Expand Down
Loading

0 comments on commit 727db61

Please sign in to comment.