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

Fixed bottom #179

Merged
merged 10 commits into from
Jun 13, 2022
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 19 additions & 11 deletions WISDEM/.github/workflows/CI_WISDEM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on: [push, pull_request]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
name: Build (${{ matrix.os }})
name: Build (${{ matrix.os }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: False
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.8"]
os: [ubuntu-latest, windows-latest]
python-version: [3.8, 3.9]

steps:
- uses: actions/checkout@v2
Expand All @@ -22,17 +22,20 @@ jobs:
miniconda-version: "latest"
channels: conda-forge
auto-update-conda: true
python-version: 3.8
python-version: ${{ matrix.python-version }}
environment-file: environment.yml
activate-environment: "test"

# Install dependencies of WEIS specific to ubuntu
- name: Add dependencies ubuntu specific
if: false == contains( matrix.os, 'windows')
#shell: pwsh # putting in a shell command makes for compile linking problems later
# (if you use the shell here, cannot use 'compiler' package)
# if you use the shell here, cannot use 'compiler' package due to linker conflicts
shell: bash -l {0}
#shell: pwsh
run: |
conda install -y petsc4py mpi4py compilers pyoptsparse
conda install -y petsc4py mpi4py gfortran pyoptsparse
conda init bash
conda info -e

# Install dependencies of WISDEM specific to windows
- name: Add dependencies windows specific
Expand All @@ -46,28 +49,32 @@ jobs:

# Install WISDEM with setup
- name: Install WISDEM with setup
shell: pwsh
shell: bash -l {0}
#shell: pwsh
run: |
python setup.py develop

# Install WISDEM with pip
- name: Install WISDEM with pip for Unix
if: false == contains( matrix.os, 'windows')
shell: pwsh
shell: bash -l {0}
#shell: pwsh
run: |
pip install -vv --no-deps -e .

# Install WISDEM with pip
#- name: Install WISDEM with pip for Windows
# if: contains( matrix.os, 'windows')
# shell: bash -l {0}
# shell: pwsh
# run: |
# pip install -vv --no-deps --global-option --compiler=unix .

# Run all tests
- name: Run tests
if: contains( matrix.os, 'ubuntu')
shell: pwsh
shell: bash -l {0}
#shell: pwsh
run: |
pytest --cov-config=.coverageac --cov=wisdem

Expand All @@ -76,7 +83,8 @@ jobs:
if: contains( matrix.os, 'ubuntu')
# This also works, https://github.com/AndreMiras/coveralls-python-action
#uses: AndreMiras/coveralls-python-action@develop
shell: pwsh
shell: bash -l {0}
#shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down
8 changes: 4 additions & 4 deletions WISDEM/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
repos:
- repo: https://github.com/timothycrosley/isort
rev: 4.3.21
rev: 5.10.1
hooks:
- id: isort
name: isort
stages: [commit]

- repo: https://github.com/psf/black
rev: stable
rev: 22.3.0
hooks:
- id: black
name: black
stages: [commit]
language_version: python3.8
language_version: python3

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand Down
8 changes: 4 additions & 4 deletions WISDEM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ The core modules draw upon some utility packages, which are typically compiled c

Installation with [Anaconda](https://www.anaconda.com) is the recommended approach because of the ability to create self-contained environments suitable for testing and analysis. WISDEM® requires [Anaconda 64-bit](https://www.anaconda.com/distribution/).

The installation instructions below use the environment name, "wisdem-env," but any name is acceptable.
The installation instructions below use the environment name, "wisdem-env," but any name is acceptable. For those working behind company firewalls, you may have to change the conda authentication with `conda config --set ssl_verify no`. Proxy servers can also be set with `conda config --set proxy_servers.http http://id:pw@address:port` and `conda config --set proxy_servers.https https://id:pw@address:port`.

1. Setup and activate the Anaconda environment from a prompt (Anaconda3 Power Shell on Windows or Terminal.app on Mac)

conda config --add channels conda-forge
conda create -y --name wisdem-env python=3.8
conda create -y --name wisdem-env python=3.9
conda activate wisdem-env

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 and Mac)
conda install -y compilers # (Mac without Homebrew or Macports compilers)
conda install -y pyoptsparse # (Linux only)
conda install -y gfortran pyoptsparse # (Mac only 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
4 changes: 2 additions & 2 deletions WISDEM/docs/examples/tower_mono/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ The :code:`environment` section must also be updated with the offshore propertie
:start-after: air_speed_sound
:end-before: costs:

The ``modeling_options.yaml`` file already contains a section for the monopile, with entries identical to the tower section. The input :code:`loading` scenarios are also the same. The ``analysis_options.yaml`` file, however, is different and activates the design variables and constraints associated with the monopile. Note also that the objective function now says :code:`structural_mass`, to capture the combined mass of both the tower and monopile,
The ``modeling_options_monopile.yaml`` file already contains a section for the monopile, with entries identical to the tower section. The input :code:`loading` scenarios are also the same. The ``analysis_options.yaml`` file, however, is different and activates the design variables and constraints associated with the monopile. Note also that the objective function now says :code:`structural_mass`, to capture the combined mass of both the tower and monopile,

.. literalinclude:: ../../../examples/05_tower_monopile/analysis_options_monopile.yaml
:language: yaml
Expand All @@ -260,7 +260,7 @@ The yaml files can be called directly from the command line, or via a python scr

.. code-block:: bash

$ wisdem nrel5mw_monopile.yaml modeling_options.yaml analysis_options_monopile.yaml
$ wisdem nrel5mw_monopile.yaml modeling_options_monopile.yaml analysis_options_monopile.yaml

or

Expand Down
6 changes: 3 additions & 3 deletions WISDEM/docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Setup and activate the Anaconda environment from a prompt (Anaconda3 Power Shell
.. code-block:: bash

conda config --add channels conda-forge
conda create -y --name wisdem-env python=3.8
conda create -y --name wisdem-env python=3.9
conda activate wisdem-env

Note that any future occasion on which you wish to use WISDEM, you will only have to start with ``conda activate wisdem-env``.
Note that any future occasion on which you wish to use WISDEM, you will only have to start with ``conda activate wisdem-env``. For those working behind company firewalls, you may have to change the conda authentication with ``conda config --set ssl_verify no``. Proxy servers can also be set with ``conda config --set proxy_servers.http http://id:pw@address:port`` and ``conda config --set proxy_servers.https https://id:pw@address:port``.

Install WISDEM
^^^^^^^^^^^^^^
Expand All @@ -38,7 +38,7 @@ For Mac systems that *are not* using Homebrew or Macports compilers:

.. code-block:: bash

conda install compilers
conda install gfortran pyoptsparse

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>=3.4, <3.17
- openmdao>=3.18
- openpyxl
- pandas
- pip
Expand Down
4 changes: 2 additions & 2 deletions WISDEM/examples/02_reference_turbines/IEA-10-198-RWT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ components:
distance_tt_hub: 3.37
overhang: 10.039
drag_coefficient: 0.5
distance_hub2mb: 1.0
distance_mb2mb: 1.2
distance_hub_mb: 1.0
distance_mb_mb: 1.2
lss_diameter: [2.5, 2.5]
lss_wall_thickness: [0.1, 0.1]
nose_diameter: [1.5, 1.5]
Expand Down
4 changes: 2 additions & 2 deletions WISDEM/examples/02_reference_turbines/IEA-15-240-RWT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ components:
distance_tt_hub: 5.614
overhang: 12.0313
drag_coefficient: 0.5
distance_hub2mb: 1.0
distance_mb2mb: 1.2
distance_hub_mb: 1.0
distance_mb_mb: 1.2
lss_diameter: [3.0, 3.0]
lss_wall_thickness: [0.1, 0.1]
nose_diameter: [2.2, 2.2]
Expand Down
4 changes: 2 additions & 2 deletions WISDEM/examples/02_reference_turbines/IEA-3p4-130-RWT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ components:
diameter: 3.0
uptilt: 0.08726 # 5 deg
distance_tt_hub: 2.
distance_hub2mb: 1.912
distance_mb2mb: 0.368
distance_hub_mb: 1.912
distance_mb_mb: 0.368
overhang: 5.
lss_diameter: [0.577, 0.577]
lss_wall_thickness: [0.288, 0.288]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ WISDEM:
flag: True
TowerSE:
flag: True
frame3dd:
shear: True
geom: True
FixedBottomSE:
flag: True
soil_springs: True
soil_springs: False # Setting this True crashes the eigenvalue solver on Github actions
frame3dd:
shear: True
geom: True
BOS:
flag: True
4 changes: 2 additions & 2 deletions WISDEM/examples/02_reference_turbines/nrel5mw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ components:
diameter: 3.0
uptilt: 0.08726
distance_tt_hub: 2.3
distance_hub2mb: 1.912
distance_mb2mb: 0.368
distance_hub_mb: 1.912
distance_mb_mb: 0.368
overhang: 5.
lss_diameter: [0.577, 0.577]
lss_wall_thickness: [0.288, 0.288]
Expand Down
16 changes: 7 additions & 9 deletions WISDEM/examples/03_blade/BAR_USC.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ components:
diameter: 3.0
uptilt: 0.06981317007977318
distance_tt_hub: 3.0
distance_hub2mb: 1.912
distance_mb2mb: 0.368
distance_hub_mb: 1.912
distance_mb_mb: 0.368
overhang: 7.0
lss_diameter: [0.577, 0.577]
lss_wall_thickness: [0.288, 0.288]
Expand All @@ -441,8 +441,6 @@ components:
lss_material: steel
hss_material: steel
bedplate_material: steel
distance_hub_mb: 2.0
distance_mb_mb: 1.0
generator_mass_user: 0.0
generator_rpm_efficiency_user:
grid: [0.0, 1.0]
Expand Down Expand Up @@ -841,8 +839,8 @@ materials:
area_density_dry: 6.230769230769231
component_id: 4
- name: glass_biax
description: Vectorply E-LT-5500, Epikote MGS RIMR 135/Epicure MGS RIMH 1366 epoxy
source: Vectorply E-LT-5500, Hybrid Rule of Mixtures
description: (+-45)6 PPG-Devold DB810- E05—a fabric infused with Epikote MGS RIMR 135/Epicure RIMH 1366 epoxy resin
source: (+-45)6 PPG-Devold DB810- E05—a fabric infused with Epikote MGS RIMR 135/Epicure RIMH 1366 epoxy resin
orth: 1.0
rho: 1940.0
E: [11023100000.0, 11023100000.0, 16047700000.0]
Expand All @@ -865,8 +863,8 @@ materials:
component_id: 3
roll_mass: 181.4368
- name: glass_triax
description: Vectorply E-LT-5500, Epikote MGS RIMR 135/Epicure MGS RIMH 1366 epoxy
source: Vectorply E-LT-5500, Hybrid Rule of Mixtures
description: ((±45)(0)2)s Saertex U14EU920-00940-T1300 and Saertex VU-90079-00830-01270—fabrics infused with Vantico TDT 177-155.
source: ((+-45)(0)2)s Saertex U14EU920-00940-T1300 and Saertex VU-90079-00830-01270—fabrics infused with Vantico TDT 177-155.
orth: 1.0
rho: 1940.0
E: [28211400000.0, 16238800000.0, 15835500000.0]
Expand Down Expand Up @@ -900,4 +898,4 @@ control:
shutdown: {limit_type: gen_speed, limit_value: 2.0}
environment: {air_density: 1.225, air_dyn_viscosity: 1.81e-05, weib_shape_parameter: 2.0, air_speed_sound: 340.0, shear_exp: 0.2, water_density: 1025.0, water_dyn_viscosity: 0.0013351, soil_shear_modulus: 140000000.0, soil_poisson: 0.4, gravity: 9.80665, air_pressure: 103500.0, air_vapor_pressure: 1700.0, water_depth: 0.0, V_mean: 0.0}
bos: {plant_turbine_spacing: 7, plant_row_spacing: 7, commissioning_pct: 0.01, decommissioning_pct: 0.15, distance_to_substation: 50.0, distance_to_interconnection: 8.0, interconnect_voltage: 130, distance_to_landfall: 100, distance_to_site: 100, port_cost_per_month: 2000000.0, site_auction_price: 0.0, site_assessment_plan_cost: 0.0, site_assessment_cost: 0.0, construction_operations_plan_cost: 0.0, boem_review_cost: 0.0, design_install_plan_cost: 0.0}
costs: {wake_loss_factor: 0.15, fixed_charge_rate: 0.065, bos_per_kW: 446.0, opex_per_kW: 43.0, turbine_number: 120, labor_rate: 58.8, painting_rate: 30.0, blade_mass_cost_coeff: 14.6, hub_mass_cost_coeff: 3.9, pitch_system_mass_cost_coeff: 22.1, spinner_mass_cost_coeff: 11.1, lss_mass_cost_coeff: 11.9, bearing_mass_cost_coeff: 4.5, gearbox_mass_cost_coeff: 12.9, hss_mass_cost_coeff: 6.8, generator_mass_cost_coeff: 12.4, bedplate_mass_cost_coeff: 2.9, yaw_mass_cost_coeff: 8.3, converter_mass_cost_coeff: 18.8, transformer_mass_cost_coeff: 18.8, hvac_mass_cost_coeff: 124.0, cover_mass_cost_coeff: 5.7, elec_connec_machine_rating_cost_coeff: 41.85, platforms_mass_cost_coeff: 17.1, tower_mass_cost_coeff: 2.9, controls_machine_rating_cost_coeff: 21.15, crane_cost: 12000.0}
costs: {wake_loss_factor: 0.15, fixed_charge_rate: 0.0578, bos_per_kW: 441.0, opex_per_kW: 43.0, turbine_number: 120, labor_rate: 58.8, painting_rate: 30.0, blade_mass_cost_coeff: 14.6, hub_mass_cost_coeff: 3.9, pitch_system_mass_cost_coeff: 22.1, spinner_mass_cost_coeff: 11.1, lss_mass_cost_coeff: 11.9, bearing_mass_cost_coeff: 4.5, gearbox_mass_cost_coeff: 12.9, hss_mass_cost_coeff: 6.8, generator_mass_cost_coeff: 12.4, bedplate_mass_cost_coeff: 2.9, yaw_mass_cost_coeff: 8.3, converter_mass_cost_coeff: 18.8, transformer_mass_cost_coeff: 18.8, hvac_mass_cost_coeff: 124.0, cover_mass_cost_coeff: 5.7, elec_connec_machine_rating_cost_coeff: 41.85, platforms_mass_cost_coeff: 17.1, tower_mass_cost_coeff: 2.9, controls_machine_rating_cost_coeff: 21.15, crane_cost: 12000.0}
5 changes: 3 additions & 2 deletions WISDEM/examples/05_tower_monopile/tower_direct.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/usr/bin/env python3

import os

# Tower analysis
# Optimization by flag
# Two load cases
import os

import numpy as np
import openmdao.api as om

from wisdem.towerse.tower import TowerSE
from wisdem.commonse.fileIO import save_data

Expand Down
4 changes: 2 additions & 2 deletions WISDEM/examples/09_floating/IEA-15-240-RWT_VolturnUS-S.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ components:
distance_tt_hub: 5.614
overhang: 12.0313
drag_coefficient: 0.5
distance_hub2mb: 1.0
distance_mb2mb: 1.2
distance_hub_mb: 1.0
distance_mb_mb: 1.2
lss_diameter: [3.0, 3.0]
lss_wall_thickness: [0.1, 0.1]
nose_diameter: [2.2, 2.2]
Expand Down
4 changes: 2 additions & 2 deletions WISDEM/examples/09_floating/nrel5mw-semi_oc4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ components:
diameter: 3.0
uptilt: 0.08726
distance_tt_hub: 2.3
distance_hub2mb: 1.912
distance_mb2mb: 0.368
distance_hub_mb: 1.912
distance_mb_mb: 0.368
overhang: 5.
lss_diameter: [0.577, 0.577]
lss_wall_thickness: [0.288, 0.288]
Expand Down
4 changes: 2 additions & 2 deletions WISDEM/examples/09_floating/nrel5mw-spar_oc3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ components:
diameter: 3.0
uptilt: 0.08726
distance_tt_hub: 2.3
distance_hub2mb: 1.912
distance_mb2mb: 0.368
distance_hub_mb: 1.912
distance_mb_mb: 0.368
overhang: 5.
lss_diameter: [0.577, 0.577]
lss_wall_thickness: [0.288, 0.288]
Expand Down
12 changes: 9 additions & 3 deletions WISDEM/examples/17_jacket/analysis_options_jacket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ general:
design_variables:

jacket:
r_foot:
foot_head_ratio:
flag: True
lower_bound: 6.
upper_bound: 16.
lower_bound: 1.1
upper_bound: 5.0
r_head:
flag: True
lower_bound: 2.
Expand Down Expand Up @@ -39,6 +39,12 @@ constraints:
flag: False
shell_buckling:
flag: True
frequency_1:
flag: False #True
lower_bound: 0.13
upper_bound: 0.40
tower_diameter_coupling:
flag: True

driver:
optimization:
Expand Down
2 changes: 1 addition & 1 deletion WISDEM/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[tool.black]
line-length = 120
target-version = ['py38']
target-version = ['py39']
include = '\.pyi?$'
exclude = '''
/(
Expand Down
5 changes: 3 additions & 2 deletions WISDEM/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# Top-level setup
setup(
name="WISDEM",
version="3.5.1",
version="3.6",
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 All @@ -39,8 +39,9 @@
"jsonschema",
"marmot-agents>=0.2.5",
"numpy",
"openmdao>=3.4,<3.17",
"openmdao>=3.18",
"openpyxl",
"nlopt",
"pandas",
"pytest",
"python-benedict",
Expand Down
Loading