Skip to content

Commit 9df78c2

Browse files
committed
Merge remote-tracking branch 'upstream/DLC_RefactorCaseInputs' into of_400
2 parents 5032108 + 1eb9474 commit 9df78c2

File tree

107 files changed

+28552
-15524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+28552
-15524
lines changed

.github/workflows/CI_WEIS.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@ jobs:
3535
activate-environment: test
3636
auto-activate-base: false
3737

38-
- name: Add dependencies windows specific
39-
if: contains( matrix.os, 'windows')
40-
run: |
41-
conda install -y -c intel intel-openmp mkl
38+
#- name: Add dependencies windows specific
39+
# if: contains( matrix.os, 'windows')
40+
# run: |
41+
# conda install -y -c intel intel-openmp mkl
4242

4343
- name: Add dependencies ubuntu specific
4444
if: false == contains( matrix.os, 'windows')
4545
run: |
46-
conda install -y petsc4py mpi4py openmpi
46+
conda install -y petsc4py mpi4py openmpi pyoptsparse
4747
4848
- name: Add test packages
4949
run: |
50-
conda install -y pytest pytest-cov coveralls
50+
conda install -y pytest pytest-cov coveralls
5151
5252
- name: Show custom environment
5353
run: |

.github/workflows/run_exhaustive_examples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ jobs:
3939
- name: Add dependencies ubuntu specific
4040
if: false == contains( matrix.os, 'windows')
4141
run: |
42-
conda install -y petsc4py mpi4py openmpi
42+
conda install -y petsc4py mpi4py openmpi pyoptsparse
4343
4444
- name: Add test packages
4545
run: |
46-
conda install -y pytest pytest-cov coveralls treon
46+
conda install -y pytest pytest-cov coveralls treon
4747
4848
- name: Show custom environment
4949
run: |

.readthedocs.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ version: 2
99
build:
1010
os: ubuntu-22.04
1111
tools:
12-
python: "mambaforge-4.10"
12+
python: "mambaforge-22.9"
1313
jobs:
1414
# Read the docs needs a couple packages not in the environment file
1515
pre_install:
16-
- conda install cmake compilers
16+
- conda install -y cmake compilers sphinx sphinxcontrib-bibtex sphinx-jsonschema
17+
- conda install sphinx_rtd_theme>=1.3
1718

1819

1920
# Shouldn't need conda for building the docs, but it is an option

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The installation instructions below use the environment name, "weis-env," but an
6464

6565
module load comp-intel intel-mpi mkl
6666
module unload gcc
67-
pip install -e .
67+
pip install --no-deps -e . -v
6868

6969
**NOTE:** To use WEIS again after installation is complete, you will always need to activate the conda environment first with `conda activate weis-env` (or `source activate weis-env`). On Eagle, make sure to reload the necessary modules
7070

docs/_static/custom.css

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/* dl.class, dl.method, dl.attribute {
2+
display: inline-block;
3+
padding-top: 15px;
4+
padding-bottom: 15px;
5+
}
6+
7+
dl.class, dl.method, dl.attribute {
8+
border-top: groove;
9+
border-top-color: darkgrey;
10+
} */
11+
12+
dl.class::before {
13+
content: ' ';
14+
width: auto;
15+
display: block;
16+
border-top: 4px solid black;
17+
margin-top: 35px;
18+
margin-left: -30px;
19+
padding-bottom: 35px;
20+
}
21+
22+
dl.method::before {
23+
content: ' ';
24+
width: auto;
25+
display: block;
26+
border-top: 1px solid black;
27+
margin-top: 15px;
28+
margin-left: -30px;
29+
padding-bottom: 15px;
30+
}
31+
32+
dl.function::before {
33+
content: ' ';
34+
width: auto;
35+
display: block;
36+
border-top: 1px solid black;
37+
margin-top: 15px;
38+
margin-left: -30px;
39+
padding-bottom: 15px;
40+
}
41+
42+
dl.attribute::before {
43+
content: ' ';
44+
width: auto;
45+
display: block;
46+
border-top: 1px solid black;
47+
margin-top: 15px;
48+
margin-left: -30px;
49+
padding-bottom: 15px;
50+
}
51+
52+
53+
.wy-nav-content {
54+
max-width: 1100px !important;
55+
}
56+
57+
.wy-table-responsive td,
58+
.wy-table-responsive th {
59+
white-space: normal;
60+
}
61+
62+
.wy-table-responsive table.word-wrap td,
63+
.wy-table-responsive table.word-wrap th {
64+
white-space: inherit;
65+
}

docs/_static/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
$(document).ready( function () {
2+
$('table.datatable').DataTable();
3+
} );

docs/conf.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
'sphinxcontrib.bibtex',
4545
'sphinx.ext.intersphinx',
4646
'sphinx_rtd_theme',
47+
'sphinx-jsonschema',
4748
# 'autoapi.extension',
4849
# 'embed-n2',
4950
]
@@ -106,3 +107,22 @@
106107
'searchbox.html'
107108
]
108109
}
110+
111+
html_css_files = [
112+
'https://cdn.datatables.net/1.10.23/css/jquery.dataTables.min.css',
113+
"custom.css",
114+
]
115+
116+
html_js_files = [
117+
'https://cdn.datatables.net/1.10.23/js/jquery.dataTables.min.js',
118+
'main.js',
119+
]
120+
121+
# Bibtex configuration
122+
bibtex_bibfiles = ["references.bib"]
123+
124+
jsonschema_options = {
125+
'lift_title': True,
126+
'lift_description': True,
127+
'lift_definitions': True,
128+
}

docs/dlc_generator.rst

Lines changed: 200 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,202 @@
1-
DLC Generator
2-
-------------
1+
=========================
2+
Design Load Cases in WEIS
3+
=========================
34

5+
Design load cases (DLCs) specify the conditions that a turbine must operate in safely thorughout its lifetime.
6+
These load cases are defined in IEC standards.
7+
We supplement the standards with information from the DTU design load basis (cite).
48

5-
**Inputs to the DLC case generator explained**
9+
--------------------------
10+
How to Set Up DLCs in WEIS
11+
--------------------------
12+
13+
DLCs are configured in the modeling options (link).
14+
A full set of input information is contained within the modeling schema.
15+
An example (a subset of a modeling input) is shown next::
16+
17+
DLC_driver:
18+
metocean_conditions:
19+
wind_speed: [1.,3.,5.,7.,9.,11.,13.,15.,17.,19.,21.,23.,25.,27.,29.]
20+
wave_height_NSS: [0.84,0.84,0.87,0.99,1.15,1.34,1.58,1.82,2.08,2.34,2.66,2.98,3.28,3.77,3.94]
21+
wave_period_NSS: [8.3,8.3,8.3,7.7,7.1,6.3,6.1,6.2,6.2,6.7,7.1,7.1,7.7,7.7,7.7]
22+
wave_height_fatigue: [0.84,0.84,0.87,0.99,1.15,1.34,1.58,1.82,2.08,2.34,2.66,2.98,3.28,3.77,3.94]
23+
wave_period_fatigue: [8.3,8.3,8.3,7.7,7.1,6.3,6.1,6.2,6.2,6.7,7.1,7.1,7.7,7.7,7.7]
24+
wave_height_SSS: [9.7,9.7,9.7,9.7,9.7,9.7,9.7,9.7,9.7,9.7,9.7,9.7,9.7,9.7,9.7]
25+
wave_period_SSS: [13.6,13.6,13.6,13.6,13.6,13.6,13.6,13.6,13.6,13.6,13.6,13.6,13.6,13.6,13.6]
26+
wave_height1: 5.9
27+
wave_period1: 11.2
28+
wave_height50: 9.7
29+
wave_period50: 13.6
30+
DLCs: # Currently supported IEC 1.1, 1.3, 1.4, 1.5, 5.1, 6.1, 6.3, or define a Custom one
31+
- DLC: "1.1"
32+
ws_bin_size: 5
33+
n_seeds: 2
34+
# analysis_time: 5.
35+
# transient_time: 5.
36+
# wind_speed: [3., 5., 7., 9., 11., 13., 15., 17., 19., 21., 23., 25.]
37+
turbulent_wind:
38+
HubHt: 110
39+
GridHeight: 160
40+
GridWidth: 160
41+
42+
The ``metocean_conditions`` are defined using tables of ``wind_speed``, ``wave_height``, and ``wave_period`` for normal sea states (``NSS``) and severe sea states (``SSS``), and sea states representative of 1- and 50-year return periods.
43+
Individual DLCs use these conditions to determine specific sea conditions for each case, but they can also be overwritten in each case.
44+
45+
Users can specify the wind speed bin size (``ws_bin_size``) or the specific wind speeds (``wind_speed``).
46+
The number of seeds (``n_seed``) and specifics about the turbsim inputs (link?, ``turbulent_wind``) can also be specified.
47+
``transient_time`` is excluded from timeseries analysis; only ``analysis_time`` is used.
48+
A complete listing of the DLC options can be found here `DLC options`_ below.
49+
50+
-------------------
51+
Reviewing DLC Cases
52+
-------------------
53+
54+
The DLC Case Matrix
55+
-------------------
56+
57+
WEIS creates a case matrix for each DLC; this case matrix, is located in the same directory as the openfast runs in both yaml and txt format.
58+
The case matrix specifies which inputs are changed for each case.
59+
An example case matrix is shown next::
60+
61+
Case_ID AeroDyn15 AeroDyn15 ElastoDyn ElastoDyn ElastoDyn ElastoDyn ElastoDyn Fst Fst HydroDyn HydroDyn HydroDyn InflowWind TurbSim
62+
WakeMod tau1_const BlPitch1 BlPitch2 BlPitch3 NacYaw RotSpeed TMax TStart WaveHs WaveMod WaveTp HWindSpeed RandSeed1
63+
0 1 25.353075267567498 0.000535 0.000535 0.000535 0 5.6819 10.0 0.0 9.7 2 13.6 8.0 1501552846
64+
1 1 25.353075267567498 0.000535 0.000535 0.000535 0 5.6819 10.0 0.0 9.7 2 13.6 8.0 488200390
65+
2 1 9.536058651858337 9.189114 9.189114 9.189114 0 7.559987 10.0 0.0 9.7 2 13.6 15.0 1693606511
66+
3 1 9.536058651858337 9.189114 9.189114 9.189114 0 7.559987 10.0 0.0 9.7 2 13.6 15.0 680233354
67+
68+
This case matrix represents DLC 6.1 and shows the initial conditions (BlPitch*, RotSpeed) as well as the sea state (WaveHs, WaveTp) and wind condtions (HWindSpeed, RandSeed1) for each case.
69+
70+
Modeling Option Outputs
71+
-----------------------
72+
73+
Additionally, the DLC options are outputted in the modeling options of WEIS.
74+
These outputs can be used as inputs for future runs to exactly reproduce specific cases::
75+
76+
DLC_driver:
77+
DLCs:
78+
- DLC: '1.1'
79+
wind_speed: [3.0, 5.0, 7.0, 9.0, 11.0, 13.0, 15.0, 17.0, 19.0, 21.0, 23.0, 25.0]
80+
ws_bin_size: 2
81+
n_seeds: 1
82+
n_azimuth: 1
83+
wind_seed: [1501552846, 488200390, 1693606511, 680233354, 438466540, 1712329281, 1380152456, 1452245847, 2122694022, 839901364, 1802651553, 714712467]
84+
wave_seeds: [304524126, 1192975140, 1668389755, 489172031, 349375909, 208787680, 426140584, 37937012, 1601914564, 1619243266, 413287548, 918595805]
85+
wind_heading: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
86+
turbine_status: operating
87+
wave_period: [8.3, 8.3, 7.7, 7.1, 6.3, 6.1, 6.2, 6.2, 6.7, 7.1, 7.1, 7.7]
88+
wave_height: [0.84, 0.87, 0.99, 1.15, 1.34, 1.58, 1.82, 2.08, 2.34, 2.66, 2.98, 3.28]
89+
wave_heading: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
90+
wave_gamma: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
91+
probabilities: [0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333, 0.08333333333333333]
92+
IEC_WindType: NTM
93+
analysis_time: 600.0
94+
transient_time: 120.0
95+
shutdown_time: 9999
96+
turbulent_wind: {flag: false, Echo: false, RandSeed1: 1, RandSeed2: RANLUX, WrBHHTP: false, WrFHHTP: false, WrADHH: false, WrADFF: true, WrBLFF: false, WrADTWR: false, WrFMTFF: false, WrACT: false, Clockwise: false, ScaleIEC: 0, NumGrid_Z: 25, NumGrid_Y: 25, TimeStep: 0.05, UsableTime: ALL, HubHt: 0, GridHeight: 0, GridWidth: 0, VFlowAng: 0.0, HFlowAng: 0.0, TurbModel: IECKAI, UserFile: unused, IECstandard: 1-ED3, ETMc: default, WindProfileType: PL, ProfileFile: unused, RefHt: 0, URef: -1, IECturbc: -1, ZJetMax: default, PLExp: -1, Z0: default, Latitude: default, RICH_NO: 0.05, UStar: default, ZI: default, PC_UW: default, PC_UV: default, PC_VW: default, SCMod1: default, SCMod2: default, SCMod3: default, InCDec1: default, InCDec2: default, InCDec3: default, CohExp: default, CTEventPath: unused, CTEventFile: RANDOM, Randomize: true, DistScl: 1.0, CTLy: 0.5, CTLz: 0.5, CTStartTime: 30}
97+
wake_mod: 1
98+
wave_model: 2
99+
label: '1.1'
100+
sea_state: normal
101+
PSF: 1.35
102+
yaw_misalign: [0]
103+
total_time: 720.0
104+
pitch_initial: [2.426047, 0.377375, 0.000535, 0.000535, 1.170321, 6.052129, 9.189114, 11.824437, 14.19975, 16.42107, 18.525951, 20.553121]
105+
rot_speed_initial: [5.000012, 5.000012, 5.000012, 6.390847, 7.559987, 7.559987, 7.559987, 7.559987, 7.559987, 7.559987, 7.559987, 7.559987]
106+
tau1_const: [69.824578732105, 40.971862185516514, 29.12612763770409, 22.53606690450444, 16.17186559734712, 11.569392828413536, 9.536058651858337, 8.207963142590629, 7.2407552404030975, 6.493729028184553, 5.894677553483227, 5.401388775677793]
107+
108+
--------------------------------
109+
Expected DLC Outputs in OpenFAST
110+
--------------------------------
111+
112+
DLC 1.1
113+
-------
114+
For each:
115+
Short description.
116+
Defaults?
117+
Timeseries
118+
119+
DLC 1.2
120+
-------
121+
122+
DLC 1.3
123+
-------
124+
125+
DLC 1.4
126+
-------
127+
128+
DLC 1.5
129+
-------
130+
131+
DLC 1.6
132+
-------
133+
134+
DLC 5.1
135+
-------
136+
137+
DLC 6.1
138+
-------
139+
140+
DLC 6.3
141+
-------
142+
143+
DLC 6.4
144+
-------
145+
146+
147+
------------------------
148+
User-defined DLC Example
149+
------------------------
150+
151+
152+
------------------------------------
153+
Setting up New DLCs (for developers)
154+
------------------------------------
155+
156+
157+
158+
159+
160+
.. _DLC options:
161+
162+
------------------------
163+
DLC Option Input Listing
164+
------------------------
165+
166+
The following inputs are a subset of the options available in the ``modeling_options`` file.
167+
168+
.. jsonschema:: inputs/modeling_schema.json#/definitions/DLC_driver
169+
:hide_key_if_empty: /**/default
170+
171+
.. How WEIS works
172+
.. --------------
173+
174+
.. WEIS is a stack of software that can be used for floating wind turbine design and analysis. The turbine’s components (blade, tower, platform, mooring, and more) are parameterized in a geometry input. The system engineering tool `WISDEM <https://github.com/WISDEM/WISDEM>`_ determines component masses, costs, and engineering parameters that can be used to determine modeling inputs. A variety of pre-processing tools are used to convert these system engineering models into simulation models.
175+
176+
.. The modeling_options.yaml determines how the turbine is simulated. We currently support `OpenFAST <https://github.com/OpenFAST/openfast>`_ and `RAFT <https://github.com/WISDEM/RAFT>`_.
177+
178+
.. The analysis_options.yaml determine how to run simulations, either a single run for analysis, a sweep or design of experiments, or an optimization.
179+
180+
.. A full description of the inputs can be found `here <https://github.com/WISDEM/WEIS/tree/master/weis/inputs>`_ (will point to rst when available).
181+
182+
.. .. image:: images/WEIS_Stack.png
183+
.. :width: 500
184+
.. :alt: Stack of software tools contained in WEIS
185+
186+
.. WEIS is `"glued" <https://github.com/WISDEM/WEIS/blob/master/weis/glue_code/glue_code.py>`_ together using `openmdao <https://openmdao.org/>`_ components and groups.
187+
188+
.. WEIS works best by running `examples <https://github.com/WISDEM/WEIS/tree/master/examples>`_:
189+
.. * `01_aeroelasticse <https://github.com/WISDEM/WEIS/tree/master/examples/01_aeroelasticse>`_ can be used to set up batches of aeroelastic simulations in OpenFAST
190+
.. * `02_control_opt <https://github.com/WISDEM/WEIS/tree/master/examples/02_control_opt>`_ can be used to run WEIS from an existing OpenFAST model, and optimize control parameters only
191+
.. * `03_NREL5MW_OC3 <https://github.com/WISDEM/WEIS/tree/master/examples/03_NREL5MW_OC3_spar>`_ and `04_NREL5MW_OC4_semi <https://github.com/WISDEM/WEIS/tree/master/examples/04_NREL5MW_OC4_semi>`_ can be used to simulate the OC spar and semi, respectively, from WISDEM geometries.
192+
.. * `05_IEA-3.4-130-RWT <https://github.com/WISDEM/WEIS/tree/master/examples/05_IEA-3.4-130-RWT>`_ runs the design load cases (DLCs) for the fixed-bottom IEA-3.4 turbine
193+
.. * `06_IEA-15-240-RWT <https://github.com/WISDEM/WEIS/tree/master/examples/06_IEA-15-240-RWT>`_ contains several examples for running the IEA-15MW with the VolturnUS platform, including tower and structural controller optimization routines
194+
.. * `15_RAFT_Studies <https://github.com/WISDEM/WEIS/tree/master/examples/15_RAFT_Studies>`_ contains an example for optimizing a the IEA-15MW with the VolturnUS platform in RAFT
195+
196+
.. More documentation specific to these examples can be found there, with more to follow.
197+
198+
.. This documentation only covers a summary of WEIS's functionality. WEIS can be adapted to solve a wide variety of problems. If you have questions or would like to discuss WEIS's functionality further, please email dzalkind (at) nrel (dot) gov.
199+
200+
.. .. image:: images/WEIS_Flow.png
201+
.. :width: 1000
202+
.. :alt: Stack of software tools contained in WEIS

0 commit comments

Comments
 (0)