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 #90

Merged
merged 10 commits into from
Mar 11, 2021
31 changes: 16 additions & 15 deletions WISDEM/docs/examples/blade/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
-----------------------------

This example walks through a blade optimization problem with increasing complexity.
All of the iterations use the same geometry input file, ``blade.yaml``, which describes a baseline design from the NREL-Sandia Big Adaptive Rotor (BAR) project.
This blade uses glass fiber-reinforced polymer inn the spar cap design. The same ``modeling_options.yaml`` file is also common to all iterations and shows that all modules are called, the airfoil polars are discretized at 200 angles of attack, etc.
All of the iterations use the same geometry input file, ``BAR0.yaml``, which describes a baseline design from the NREL-Sandia Big Adaptive Rotor (BAR) project.
This blade uses glass fiber-reinforced polymer in the spar cap design. The same ``modeling_options.yaml`` file is also common to all iterations and shows that all modules are called, the airfoil polars are discretized at 200 angles of attack, etc.
The example file runs four cases one after the other for testing purposes. To run the cases one by one, make sure to comment out all cases at lines 15-18 except the case that should run.


Baseline Design
Expand All @@ -15,7 +16,7 @@ Whenever conducting a design optimization, it is helpful to first run the starti

.. code-block:: bash

$ wisdem blade.yaml modeling_options.yaml analysis_options_no_opt.yaml
$ wisdem BAR0.yaml modeling_options.yaml analysis_options_no_opt.yaml


Simple Aerodynamic Optimization
Expand All @@ -28,7 +29,7 @@ The file, ``analysis_options_aero.yaml``, is used first to run a blade twist opt
:start-after: blade:
:end-before: structure:

We are also setting the number of spline control points at 8 and the twist bounds (in radians) at each evenly spaced control point along the blade span. We also need to set the objective function to be AEP with,
We are also setting the number of spline control points at 8 and the maximum decrease and increase that the optimizer can apply to the twist (in radians) at each evenly spaced control point along the blade span. We also need to set the objective function to be AEP with,

.. code-block:: yaml

Expand Down Expand Up @@ -62,9 +63,9 @@ Now to run the optimization we do,

.. code-block:: bash

$ wisdem blade.yaml modeling_options.yaml analysis_options_aero.yaml
$ wisdem BAR0.yaml modeling_options.yaml analysis_options_aero.yaml

or:
or we comment out lines 16, 17, and 18 in blade_driver.py and we do:

.. code-block:: bash

Expand All @@ -88,7 +89,7 @@ Once the optimization terminates, type in the terminal:

.. code-block:: bash

$ compare_designs outputs/blade.yaml outputs_aero/blade_out.yaml
$ compare_designs outputs/BAR0.yaml outputs_aero/blade_out.yaml

This script compares the initial and optimized designs.
Some screen output is generated, as well as plots (contained in the `outputs` folder), such as in :numref:`fig_opt1_induction` and :numref:`fig_opt1_twist`. The twist optimization had to cope with a wider
Expand Down Expand Up @@ -116,7 +117,7 @@ Simple Structural Optimization
Next, we shift from an aerodynamic optimization of the blade to a structural optimization. In this case, we make the following changes,

- The design variables as the thickness of the blade structural layers :code:`Spar_cap_ss` and :code:`Spar_cap_ps`
- The thickness is parameterized in 8 locations along span and can vary between 70 and 130% of the initial value (using the :code:`min_gain` and :code:`max_gain` options)
- The thickness is parameterized in 8 locations along span and can vary between 70 and 130% of the initial value (using the :code:`max_decrease` and :code:`max_increase` options)
- The merit figure is blade mass instead of AEP
- A max allowable strain of :math:`3500 \mu\epsilon` and the blade tip deflection constrain the problem, but the latter ratio is relaxed from a safety factor of 1.4175 to 1.134

Expand Down Expand Up @@ -144,13 +145,13 @@ To run the optimization, just be sure to pass in this new analysis options,

.. code-block:: bash

$ wisdem blade.yaml modeling_options.yaml analysis_options_struct.yaml
$ wisdem BAR0.yaml modeling_options.yaml analysis_options_struct.yaml

or, to use the Python driver, be sure to edit line 8 to be
or, to use the Python driver, be sure to comment out lines 15, 16, and 18 and only leave this uncommented

.. code-block:: python

fname_analysis_options = mydir + os.sep + 'analysis_options_struct.yaml'
wt_opt, modeling_options, analysis_options = run_wisdem(fname_wt_input, fname_modeling_options, fname_analysis_options_struct)

and then do,

Expand All @@ -164,7 +165,7 @@ Once the optimization terminates, the same ``compare_designs`` script can be use

.. code-block:: bash

$ compare_designs outputs/blade.yaml outputs_aero/blade_out.yaml outputs_struct/blade_out.yaml
$ compare_designs outputs/BAR0.yaml outputs_aero/blade_out.yaml outputs_struct/blade_out.yaml

The relaxed tip deflection constraint compared to when the baseline was created allows the spar cap thickness to come down and the overall blade mass drops from 60.3 metric tons to 54.5 metric tons. This is shown in :numref:`fig_opt2_spar` and :numref:`fig_opt2_mass`.

Expand Down Expand Up @@ -217,13 +218,13 @@ To run the optimization, just be sure to pass in this new analysis options

.. code-block:: bash

$ wisdem blade.yaml modeling_options.yaml analysis_options_aerostruct.yaml
$ wisdem BAR0.yaml modeling_options.yaml analysis_options_aerostruct.yaml

or, to use the Python driver, be sure to edit line 8 as above to be
or, to use the Python driver, be sure run line 18 as above to be

.. code-block:: python

fname_analysis_options = mydir + os.sep + 'analysis_options_aerostruct.yaml'
wt_opt, modeling_options, analysis_options = run_wisdem(fname_wt_input, fname_modeling_options, fname_analysis_options_aerostruct)

and then do,

Expand Down
117 changes: 59 additions & 58 deletions WISDEM/docs/inputs/analysis_schema.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,18 @@ Blade twist as a design variable by adding or subtracting radians from the initi

*Default* = [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]

:code:`lock_root` : Integer
Integer setting how many DVs along span are locked starting from blade root.
By default, the first two points are locked to prevent the optimizer to try to
:code:`index_start` : Integer
Integer setting the first DV of the :code:`n_opt` along span that is optimized.
It is recommended to set :code:`index_start` to 1
to lock the first DV and prevent the optimizer to try to
optimize the twist of the blade root cylinder.

*Default* = 2
*Default* = 0

:code:`lock_tip` : Integer
Integer setting how many DVs along span are locked starting from blade tip.
:code:`index_end` : Integer
Integer setting the last DV of the :code:`n_opt` along span that is optimized.

*Default* = 0
*Default* = 8


chord
Expand All @@ -149,35 +150,32 @@ Blade chord as a design variable by scaling (multiplying) the initial value at s

*Minimum* = 4

:code:`min_gain` : Float
Lower bound on scalar multiplier that will be applied to value at
control points
:code:`max_decrease` : Float
Maximum nondimensional decrease of the blade chord at each optimization location

*Default* = 0.5

:code:`max_gain` : Float
Upper bound on scalar multiplier that will be applied to value at
control points
:code:`max_increase` : Float
Maximum nondimensional increase of the blade chord at each optimization location

*Default* = 1.5

:code:`lock_root` : Integer
Integer setting how many DVs along span are locked starting from blade root.
By default, the first two points close to blade root are
locked. The first two points impact the diameter of the blade root
cylinder, and the models implemented in WISDEM do not have the
level of fidelity to appropriately size the blade root diameter.
:code:`index_start` : Integer
Integer setting the first DV of the :code:`n_opt` along span that is optimized.
Setting :code:`index_start` to 1 or 2 locks the blade root diameter.

*Default* = 2
*Default* = 0

:code:`lock_tip` : Integer
Integer setting how many DVs along span are locked starting from blade tip.

:code:`index_end` : Integer
Integer setting the last DV of the :code:`n_opt` along span that is optimized.
It is recommended to lock the last point close to blade tip, setting :code:`index_end` to :code:`n_opt` minus 1.
The last point controls the chord length at blade tip and due to
the imperfect tip loss models of CCBlade, it is usually a good
idea to taper the chord manually and do not let a numerical
optimizer control it. The default is therefore set to 1.
optimizer control it.

*Default* = 1
*Default* = 8


af_positions
Expand Down Expand Up @@ -229,35 +227,32 @@ Blade suction-side spar cap thickness as a design variable by scaling (multiplyi

*Minimum* = 4

:code:`min_gain` : Float
Lower bound on scalar multiplier that will be applied to value at
control points
:code:`max_decrease` : Float
Maximum nondimensional decrease of the spar cap thickness on the suction-side at each optimization location

*Default* = 0.5

:code:`max_gain` : Float
Upper bound on scalar multiplier that will be applied to value at
control points
:code:`max_increase` : Float
Maximum nondimensional increase of the spar cap thickness on the suction-side at each optimization location

*Default* = 1.5

:code:`lock_root` : Integer
Integer setting how many DVs along span are locked starting from blade root.
By default, the first point close to blade root is locked.
This is done to impose a pre-
:code:`index_start` : Integer
Integer setting the first DV of the :code:`n_opt` along span that is optimized.
It is recommended to set :code:`index_start` to 1
to lock the first DV and impose a pre-
defined taper to small thicknesses and mimic a blade
manufacturability constraint.

*Default* = 1
*Default* = 0

:code:`lock_tip` : Integer
Integer setting how many DVs along span are locked starting from blade tip.
By default, the last point close to blade tip is locked.
This is done to impose a pre-
defined taper to small thicknesses and mimic a blade
:code:`index_end` : Integer
Integer setting the last DV of the :code:`n_opt` along span that is optimized.
It is recommended to lock the last point close to blade tip, setting :code:`index_end` to :code:`n_opt` minus 1.
This imposes a predefined taper to small thicknesses and mimic a blade
manufacturability constraint.

*Default* = 1
*Default* = 8


spar_cap_ps
Expand All @@ -279,35 +274,32 @@ Blade pressure-side spar cap thickness as a design variable by scaling (multiply

*Minimum* = 4

:code:`min_gain` : Float
Lower bound on scalar multiplier that will be applied to value at
control points
:code:`max_decrease` : Float
Maximum nondimensional decrease of the spar cap thickness on the pressure-side at each optimization location

*Default* = 0.5

:code:`max_gain` : Float
Upper bound on scalar multiplier that will be applied to value at
control points
:code:`max_increase` : Float
Maximum nondimensional increase of the spar cap thickness on the pressure-side at each optimization location

*Default* = 1.5

:code:`lock_root` : Integer
Integer setting how many DVs along span are locked starting from blade root.
By default, the first point close to blade root is locked.
This is done to impose a pre-
:code:`index_start` : Integer
Integer setting the first DV of the :code:`n_opt` along span that is optimized.
It is recommended to set :code:`index_start` to 1
to lock the first DV and impose a pre-
defined taper to small thicknesses and mimic a blade
manufacturability constraint.

*Default* = 1
*Default* = 0

:code:`lock_tip` : Integer
Integer setting how many DVs along span are locked starting from blade tip.
By default, the last point close to blade tip is locked.
This is done to impose a pre-
defined taper to small thicknesses and mimic a blade
:code:`index_end` : Integer
Integer setting the last DV of the :code:`n_opt` along span that is optimized.
It is recommended to lock the last point close to blade tip, setting :code:`index_end` to :code:`n_opt` minus 1.
This imposes a predefined taper to small thicknesses and mimic a blade
manufacturability constraint.

*Default* = 1
*Default* = 8


te_ss
Expand Down Expand Up @@ -1315,7 +1307,16 @@ Enforcing max chord length limit at all points along blade span.
*Minimum* = 0.1 *Maximum* = 20.0


root_circle_diameter
========================================


Enforcing the minimum blade root circle diameter.

:code:`flag` : Boolean
Activates as a design variable or constraint

*Default* = False

frequency
========================================
Expand Down
14 changes: 14 additions & 0 deletions WISDEM/docs/inputs/modeling_schema.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,20 @@ RotorSE

*Minimum* = 1.0 *Maximum* = 5.0

:code:`gust_std` : Float
Number of standard deviations for strength of gust

*Default* = 3.0

*Minimum* = 0.0 *Maximum* = 5.0

:code:`root_fastener_s_f` : Float
Safety factor for the max stress of blade root fasteners

*Default* = 2.5

*Minimum* = 0.1 *Maximum* = 1.e+2


DriveSE
****************************************
Expand Down
24 changes: 12 additions & 12 deletions WISDEM/examples/02_reference_turbines/IEA-10-198-RWT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -715,23 +715,23 @@ control:
Vout: 25.0
maxTS: 90.
pitch:
PC_zeta: 1.0 # Pitch controller desired damping ratio [-]
PC_omega: 0.2 # 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.17444444444444443 # 10 deg/s
min_pitch: 0. # Minimum pitch angle [rad], {default = 0 degrees}
PC_zeta: 1.0
PC_omega: 0.2
ps_percent: 0.9
max_pitch: 1.57
max_pitch_rate: 0.17444444444444443
min_pitch: 0.
torque:
control_type: tsr_tracking
tsr: 9.0
VS_zeta: 1.0 # Torque controller desired damping ratio [-]
VS_omega: 0.2 # Torque controller desired natural frequency [rad/s]
VS_zeta: 1.0
VS_omega: 0.2
max_torque_rate: 1500000.
VS_minspd: 0.6283185307179586 # 6.000 rpm # Minimum rotor speed [rad/s], {default = 0 rad/s}
VS_maxspd: 0.9093863534591254 # 8.684 rpm # Minimum rotor speed [rad/s], {default = 0 rad/s}
VS_minspd: 0.6283185307179586
VS_maxspd: 0.9093863534591254
setpoint_smooth:
ss_vsgain: 1 # Torque controller setpoint smoother gain bias percentage [%, <= 1 ], {default = 100%}
ss_pcgain: .001 # Pitch controller setpoint smoother gain bias percentage [%, <= 1 ], {default = 0.1%}
ss_vsgain: 1
ss_pcgain: .001
shutdown:
limit_type: gen_speed
limit_value: 2.0
Expand Down
24 changes: 12 additions & 12 deletions WISDEM/examples/02_reference_turbines/IEA-15-240-RWT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -870,23 +870,23 @@ control:
Vout: 25.0
maxTS: 95.
pitch:
PC_zeta: 1.0 # Pitch controller desired damping ratio [-]
PC_omega: 0.2 # Pitch controller desired natural frequency [rad/s]
ps_percent: 0.8 # Percent peak shaving [%, <= 1 ], {default = 80%}
max_pitch: 1.57 # Maximum pitch angle [rad], {default = 90 degrees}
max_pitch_rate: 0.03490658503988659 # 2 deg/s
min_pitch: 0. # Minimum pitch angle [rad], {default = 0 degrees}
PC_zeta: 1.0
PC_omega: 0.2
ps_percent: 0.8
max_pitch: 1.57
max_pitch_rate: 0.03490658503988659
min_pitch: 0.
torque:
control_type: tsr_tracking
tsr: 9.0
VS_zeta: 1.0 # Torque controller desired damping ratio [-]
VS_omega: 0.2 # Torque controller desired natural frequency [rad/s]
VS_zeta: 1.0
VS_omega: 0.2
max_torque_rate: 1500000.
VS_minspd: 0.5235987755982988 # Minimum rotor speed [rad/s], {default = 0 rad/s}
VS_maxspd: 0.7916813487046278 # Minimum rotor speed [rad/s], {default = 0 rad/s}
VS_minspd: 0.5235987755982988
VS_maxspd: 0.7916813487046278
setpoint_smooth:
ss_vsgain: 1 # Torque controller setpoint smoother gain bias percentage [%, <= 1 ], {default = 100%}
ss_pcgain: .001 # Pitch controller setpoint smoother gain bias percentage [%, <= 1 ], {default = 0.1%}
ss_vsgain: 1
ss_pcgain: .001
shutdown:
limit_type: gen_speed
limit_value: 2.0
Expand Down
Loading