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

Add environmental variables to driver input files #707

Merged
merged 31 commits into from
Oct 27, 2021
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9a66e86
Add MHK turbine type switch and validation checks
hkross Apr 6, 2021
dc375b7
Add environmental variables to driver input files
hkross Mar 23, 2021
90647f1
Add error message to ensure MHK switch is set to zero
hkross Apr 6, 2021
4ebb306
Update regression tests
hkross Apr 13, 2021
f8d72fc
Update additional regression test files
hkross Apr 13, 2021
1cb6f8b
Fix HydroDyn regression test files
hkross Apr 14, 2021
8aa13e4
Fix typo in speed of sound label
hkross May 4, 2021
1d84d90
Update regression test files to fix typo in speed of sound label
hkross May 5, 2021
7322d5b
Temporarily allow a cavitation check with MHK = 0
hkross May 5, 2021
f2f46b6
Merge remote branch ebranlard:f/driver into feature/Environmental_Var…
hkross May 5, 2021
ced38de
Regenerate types files
hkross May 5, 2021
e8d8763
Update regression tests
hkross May 5, 2021
c022ed5
Remove old AeroDyn driver input section and fix typos
hkross May 6, 2021
cbcfad1
Update documentation to reflect environmental variables input changes
hkross May 6, 2021
0f4c81c
Update FAST.Farm regression test input files
hkross May 10, 2021
89c31f9
Move environment vars for HD init into InitInpType
andrew-platt May 13, 2021
478bec0
Merge pull request #1 from andrew-platt/feature/Environmental_Variables
hkross May 18, 2021
f7f4efe
Move environment vars for AD init into InitInpType
hkross May 18, 2021
404b494
Add uniform wind speed equation back into AeroDyn driver documentation
hkross May 19, 2021
1e7f6db
Clarify blade pitch definition in AeroDyn driver documentation
hkross Jun 30, 2021
46d9f18
Merge remote tracking branch upstream/dev into feature/Environmental_…
hkross Sep 17, 2021
8547407
Update regression tests
hkross Sep 20, 2021
79330df
Update HydroDyn documentation to reflect environmental variables inpu…
hkross Sep 20, 2021
0bcbbcf
Merge remote tracking branch upstream/dev into feature/Environmental_…
hkross Sep 25, 2021
7940d4c
Change HydroDyn WtrDens variable type back to SiKi
hkross Sep 30, 2021
d2e8574
Merge remote tracking branch upstream/dev into feature/Environmental_…
hkross Sep 30, 2021
eaa3856
Update regression tests
hkross Oct 4, 2021
25f017a
Merge remote tracking branch upstream/dev into feature/Environmental_…
hkross Oct 25, 2021
3f1dc15
Update regression tests
hkross Oct 25, 2021
61b673e
Update documentation with list of input file changes
hkross Oct 27, 2021
9044b91
Fix typo in list of input file changes
hkross Oct 27, 2021
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
2 changes: 1 addition & 1 deletion docs/source/user/aerodyn/appendix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ AeroDyn Input Files

In this appendix we describe the AeroDyn input-file structure and provide examples.

1) Baseline AeroDyn Driver Input Files:
1) Baseline AeroDyn Driver Input File:
:download:`(driver input file example) <examples/ad_driver_example.dvr>`:
The driver input file is only needed for the standalone version of AeroDyn and contains inputs normally generated by OpenFAST, and necessary to control the aerodynamic simulation for uncoupled models.

Expand Down
66 changes: 43 additions & 23 deletions docs/source/user/aerodyn/driver.rst

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions docs/source/user/aerodyn/examples/ad_driver_example.dvr
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@
Three bladed wind turbine, using basic geometry input
----- Input Configuration ---------------------------------------------------------------
False Echo - Echo input parameters to "<rootname>.ech"?
0 MHK - MHK turbine type (switch) {0: not an MHK turbine, 1: fixed MHK turbine, 2: floating MHK turbine}
3 AnalysisType - {1: multiple turbines, one simulation, 2: one turbine, one time-dependent simulation, 3: one turbine, combined cases}
11.0 TMax - Total run time [used only when AnalysisType/=3] (s)
0.5 DT - Simulation time step [used only when AnalysisType/=3] (s)
"./AD.dat" AeroFile - Name of the primary AeroDyn input file
----- Environmental Conditions ----------------------------------------------------------
1025 FldDens - Density of working fluid (kg/m^3)
1.4639E-05 KinVisc - Kinematic viscosity of working fluid (m^2/s)
333.3 SpdSound - Speed of sound in working fluid (m/s)
101325 Patm - Atmospheric pressure (Pa) [used only for an MHK turbine cavitation check]
2000 Pvap - Vapour pressure of working fluid (Pa) [used only for an MHK turbine cavitation check]
150 WtrDpth - Water depth (m)
----- Inflow Data -----------------------------------------------------------------------
0 CompInflow - Compute inflow wind velocities (switch) {0=Steady Wind; 1=InflowWind}
"unused" InflowFile - Name of the InflowWind input file [used only when CompInflow=1]
Expand Down
8 changes: 8 additions & 0 deletions docs/source/user/aerodyn/examples/ad_driver_multiple.dvr
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@
Multiple HAWT
----- Input Configuration ---------------------------------------------------------------
False Echo - Echo input parameters to "<rootname>.ech"?
0 MHK - MHK turbine type (switch) {0: not an MHK turbine, 1: fixed MHK turbine, 2: floating MHK turbine}
1 AnalysisType - {1: multiple turbines, one simulation, 2: one turbine, one time-dependent simulation, 3: one turbine, combined cases}
0.3 TMax - Total run time [used only when AnalysisType/=3] (s)
0.1 DT - Simulation time step [used only when AnalysisType/=3] (s)
"./OpenFAST_BAR_00_AeroDyn15_2WT.dat" AeroFile - Name of the primary AeroDyn input file
----- Environmental Conditions ----------------------------------------------------------
1025 FldDens - Density of working fluid (kg/m^3)
1.4639E-05 KinVisc - Kinematic viscosity of working fluid (m^2/s)
333.3 SpdSound - Speed of sound in working fluid (m/s)
101325 Patm - Atmospheric pressure (Pa) [used only for an MHK turbine cavitation check]
2000 Pvap - Vapour pressure of working fluid (Pa) [used only for an MHK turbine cavitation check]
150 WtrDpth - Water depth (m)
----- Inflow Data -----------------------------------------------------------------------
1 CompInflow - Compute inflow wind velocities (switch) {0=Steady Wind; 1=InflowWind}
"./OpenFAST_BAR_00_InflowFile.dat" InflowFile - Name of the InflowWind input file [used only when CompInflow=1]
Expand Down
11 changes: 5 additions & 6 deletions docs/source/user/aerodyn/examples/ad_primary_example.dat
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ False CavitCheck - Perform cavitation check? (flag) [AFAeroMod m
False CompAA - Flag to compute AeroAcoustics calculation [only used when WakeMod=1 or 2]
"unused" AA_InputFile - Aeroacoustics input file
====== Environmental Conditions ===================================================================
1.246 AirDens - Air density (kg/m^3)
1.4639E-05 KinVisc - Kinematic air viscosity (m^2/s)
333.3 SpdSound - Speed of sound (m/s)
101325 Patm - Atmospheric pressure (Pa) [used only when CavitCheck=True]
2000 Pvap - Vapour pressure of fluid (Pa) [used only when CavitCheck=True]
0.6 FluidDepth - Water depth above mid-hub height (m) [used only when CavitCheck=True]
"default" AirDens - Air density (kg/m^3)
"default" KinVisc - Kinematic viscosity of working fluid (m^2/s)
"default" SpdSound - Speed of sound in working fluid (m/s)
"default" Patm - Atmospheric pressure (Pa) [used only when CavitCheck=True]
"default" Pvap - Vapour pressure of working fluid (Pa) [used only when CavitCheck=True]
====== Blade-Element/Momentum Theory Options ====================================================== [unused when WakeMod=0 or 3]
1 SkewMod - Type of skewed-wake correction model (switch) {1=uncoupled, 2=Pitt/Peters, 3=coupled} [unused when WakeMod=0 or 3]
"default" SkewModFactor - Constant used in Pitt/Peters skewed wake model {or "default" is 15/32*pi} (-) [used only when SkewMod=2; unused when WakeMod=0 or 3]
Expand Down
125 changes: 13 additions & 112 deletions docs/source/user/aerodyn/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Input Files
The user configures the aerodynamic model parameters via a primary
AeroDyn input file, as well as separate input files for airfoil and
blade data. When used in standalone mode, an additional driver input
file is required. This driver file specifies initialization inputs
file is required. The AeroDyn driver and driver input file are detailed in
:numref:`ad_driver`. The driver file specifies initialization inputs
normally provided to AeroDyn by OpenFAST, as well as the per-time-step
inputs to AeroDyn.

Expand All @@ -26,109 +27,6 @@ Units
AeroDyn uses the SI system (kg, m, s, N). Angles are assumed to be in
radians unless otherwise specified.

AeroDyn Driver Input File
-------------------------

The driver input file is only needed for the standalone version of
AeroDyn and contains inputs normally generated by OpenFAST, and necessary to
control the aerodynamic simulation for uncoupled models. A sample
AeroDyn driver input file is given in
:numref:`ad_appendix`.

Set the ``Echo`` flag in this file to TRUE if you wish to have the
``AeroDyn_Driver`` executable echo the contents of the driver input file (useful
for debugging errors in the driver file). The echo file has the naming
convention of *OutFileRoot.ech*, where ``OutFileRoot`` is
specified in the I/O SETTINGS section of the driver input file below.
``AD_InputFile`` is the filename of the primary AeroDyn input file.
This name should be in quotations and can contain an absolute path or a
relative path.

The TURBINE DATA section defines the AeroDyn-required turbine geometry
for a rigid turbine, see :numref:`ad_driver_geom`. ``NumBlades`` specifies the number
of blades; only one-, two-, or three-bladed rotors are permitted.
``HubRad`` specifies the radius to the blade root from the
center-of-rotation along the (possibly preconed) blade-pitch axis;
``HubRad`` must be greater than zero. ``HubHt`` specifies the
elevation of the hub center above the ground (or above the mean sea
level (MSL) for offshore wind turbines or above the seabed for MHK
turbines). ``Overhang`` specifies the distance along the (possibly
tilted) rotor shaft between the tower centerline and hub center;
``Overhang`` is positive downwind, so use a negative number for upwind
rotors. ``ShftTilt`` is the angle (in degrees) between the rotor shaft
and the horizontal plane. Positive ``ShftTilt`` means that the
downwind end of the shaft is the highest; upwind turbines have negative
``ShftTilt`` for improved tower clearance. ``Precone`` is the angle
(in degrees) between a flat rotor disk and the cone swept by the blades,
positive downwind; upwind turbines have negative ``Precone`` for
improved tower clearance.

The I/O SETTINGS section controls the creation of the results file. If
``OutFileRoot`` is specified, the results file will have the filename
*OutFileRoot.out*. If an empty string is provided for
``OutFileRoot``, then the driver file’s root name will be used
instead. If ``TabDel`` is ``TRUE``, a TAB character is used between
columns in the output file; if FALSE, fixed-width is used otherwise.
``OutFmt`` is any valid Fortran numeric format string, which is used
for text output, excluding the time channel. The resulting field should
be 10 characters, but AeroDyn does not check ``OutFmt`` for validity.
If you want a sound generated on program exit, set ``Beep`` to true.

.. _ad_driver_geom:

.. figure:: figs/ad_driver_geom.png
:width: 60%
:align: center
:alt: ad_driver_geom.png

AeroDyn Driver Turbine Geometry

The COMBINED-CASE ANALYSIS section allows you to execute ``NumCases``
number of simulations for the given TURBINE DATA with a single driver
input file. There will be one row in the subsequent table for each of
the ``NumCases`` specified (plus two table header lines). The
information within each row of the table fully specifies each
simulation. Each row contains the following columns: ``WndSpeed``,
``ShearExp``, ``RotSpd``, ``Pitch``, ``Yaw``, ``dT``, and
``Tmax``. The local undisturbed wind speed for any given blade or
tower node is determined using,

.. math::
:label: windspeed

U(Z) = \mathrm{WndSpeed} \times \left( \frac{Z}{\mathrm{HubHt}} \right)^\mathrm{ShearExp}

where :math:`\mathrm{WndSpeed}` is the steady wind speed (fluid flow speed in the
case of an MHK turbine) located at elevation :math:`\mathrm{HubHt}`, :math:`Z` is the
instantaneous elevation of the blade or tower node above the ground (or
above the MSL for offshore wind turbines or above the seabed for MHK
turbines), and :math:`\mathrm{ShearExp}` is the power-law shear exponent. The fixed
rotor speed (in rpm) is given by ``RotSpd`` (positive clockwise
looking downwind), the fixed blade-pitch angle (in degrees) is given by
``Pitch`` (positive to feather, leading edge upwind), and the fixed
nacelle-yaw angle (in degrees) is given by ``Yaw`` (positive rotation
of the nacelle about the vertical tower axis, counterclockwise when
looking downward). While the flow speed and direction in the AeroDyn
driver is uniform and fixed (depending only on elevation above ground),
``Yaw`` and ``ShftTilt`` (from the TURBINE DATA section above) can
introduce skewed flow. ``dT`` is the simulation time step, which must
match the time step for the aerodynamic calculations (``DTAero``) as
specified in the primary AeroDyn input file, and ``Tmax`` is the total
simulation time.

Note that ``dT`` should be the same for each of the cases listed in the
COMBINED-CASE ANALYSIS section. All of the cases will be output to the same
file, with a ``Case`` column listed next to the ``Time`` output column
for help with data processing.

For further debugging capability, the AeroDyn driver now also has the
ability to read the combined case input data as a time-history file.
In place of a row in the COMBINED-CASE ANALYSIS table, a separate input file
can be listed instead. The name of the file should be preceded with the ``@``
character, to indicate the data is a time-history file in a separate text
input file. An example is provided in
:numref:`ad_appendix`

AeroDyn Primary Input File
--------------------------

Expand Down Expand Up @@ -217,21 +115,24 @@ feature.
Environmental Conditions
~~~~~~~~~~~~~~~~~~~~~~~~

``AirDens`` specifies the fluid density and must be a value greater
than zero; a typical value is around 1.225 kg/m\ :sup:`3` for air (wind
Environmental conditions are now specified in driver input files but are left in
the AeroDyn primary input file for legacy compatibility. Use the keyword
``DEFAULT`` to pass in values specified by the driver input file. Otherwise,
values given in the AeroDyn primary input file will overwrite those given in the
driver input file. ``AirDens`` specifies the fluid density and must be a value
greater than zero; a typical value is around 1.225 kg/m\ :sup:`3` for air (wind
turbines) and 1025 kg/m\ :sup:`3` for seawater (MHK turbines).
``KinVisc`` specifies the kinematic viscosity of the air (used in the
``KinVisc`` specifies the kinematic viscosity of the fluid (used in the
Reynolds number calculation); a typical value is around 1.460E-5
m\ :sup:`2`/s for air (wind turbines) and 1.004E-6 m\ :sup:`2`/s for
seawater (MHK turbines). ``SpdSound`` is the speed of sound in air
seawater (MHK turbines). ``SpdSound`` is the speed of sound in the fluid
(used to calculate the Mach number within the unsteady airfoil
aerodynamics calculations); a typical value is around 340.3 m/s. The
last three parameters in this section are only used when
aerodynamics calculations); a typical value is around 340.3 m/s for air. The
last two parameters in this section are only used when
``CavitCheck = TRUE`` for MHK turbines. ``Patm`` is the atmospheric
pressure above the free surface; typically around 101,325 Pa. ``Pvap``
is the vapor pressure of the fluid; for seawater this is typically
around 2,000 Pa. ``FluidDepth`` is the distance from the hub center to
the free surface.
around 2,000 Pa.

Blade-Element/Momentum Theory Options
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
5 changes: 0 additions & 5 deletions docs/source/user/elastodyn/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ coupled simulation.

**dT**

Environmental Condition
~~~~~~~~~~~~~~~~~~~~~~~

**gravity**

Degrees of Freedom
~~~~~~~~~~~~~~~~~~

Expand Down
9 changes: 6 additions & 3 deletions docs/source/user/hydrodyn/appendix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ structure::
NREL 5.0 MW offshore baseline floating platform HydroDyn input properties for the OC4 Semi-submersible.
False Echo - Echo the input file data (flag)
---------------------- ENVIRONMENTAL CONDITIONS --------------------------------
1025 WtrDens - Water density (kg/m^3)
200 WtrDpth - Water depth (meters)
0 MSL2SWL - Offset between still-water level and mean sea level (meters) [positive upward; unused when WaveMod = 6; must be zero if PotMod=1 or 2]
"DEFAULT" WtrDens - Water density (kg/m^3)
"DEFAULT" WtrDpth - Water depth (meters)
"DEFAULT" MSL2SWL - Offset between still-water level and mean sea level (meters) [positive upward; unused when WaveMod = 6; must be zero if PotMod=1 or 2]
---------------------- WAVES ---------------------------------------------------
3 WaveMod - Incident wave kinematics model {0: none=still water, 1: regular (periodic), 1P#: regular with user-specified phase, 2: JONSWAP/Pierson-Moskowitz spectrum (irregular), 3: White noise spectrum (irregular), 4: user-defined spectrum from routine UserWaveSpctrm (irregular), 5: Externally generated wave-elevation time series, 6: Externally generated full wave-kinematics time series [option 6 is invalid for PotMod/=0]} (switch)
0 WaveStMod - Model for stretching incident wave kinematics to instantaneous free surface {0: none=no stretching, 1: vertical stretching, 2: extrapolation stretching, 3: Wheeler stretching} (switch) [unused when WaveMod=0 or when PotMod/=0]
Expand Down Expand Up @@ -260,6 +260,9 @@ structure::
TRUE Echo - Echo the input file data (flag)
---------------------- ENVIRONMENTAL CONDITIONS -------------------------------
9.80665 Gravity - Gravity (m/s^2)
1025 WtrDens - Water density (kg/m^3)
200 WtrDpth - Water depth (meters)
0 MSL2SWL - Offset between still-water level and mean sea level (meters) [positive upward; unused when WaveMod = 6; must be zero if PotMod=1 or 2]
---------------------- HYDRODYN -----------------------------------------------
"./OC4Semi.dat" HDInputFile - Primary HydroDyn input file name (quoted string)
"./OC4Semi" OutRootName - The name which prefixes all HydroDyn generated files (quoted string)
Expand Down
18 changes: 17 additions & 1 deletion docs/source/user/hydrodyn/input_files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ convention of ``OutRootName.dvr.ech``. **OutRootName** is specified
in the HYDRODYN section of the driver input file. Set the gravity
constant using the **Gravity** parameter. HydroDyn expects a magnitude,
so in SI units this would be set to 9.80665 :math:`\frac{m}{s^{2}}`.
**WtrDens** specifies the water density and must be a value greater than
or equal to zero; a typical value of seawater is around 1025
kg/m\ :sup:`3`. **WtrDpth** specifies the water depth (depth of the flat
seabed), based on the reference MSL, and must be a value greater than
zero. **MSL2SWL** is the offset between the MSL and SWL, positive
upward. This parameter is useful when simulating the effect of tides or
storm-surge sea-level variations without having to alter the
substructure geometry information. This parameter is unused with
**WaveMod** = 6 and must be set to zero if you are using a
potential-flow model (**PotMod** = 1 or 2). **WaveMod** and **PotMod** are
specified in the HydroDyn primary input file.

**HDInputFile** is the filename of the primary HydroDyn input file. This
name should be in quotations and can contain an absolute path or a
relative path. All HydroDyn-generated output files will be prefixed with
Expand Down Expand Up @@ -133,7 +145,11 @@ running a coupled simulation.

Environmental Conditions
------------------------
**WtrDens** specifies the water density and must be a value greater than
Environmental conditions are now specified in the driver input file but are left in
the primary input file for legacy compatibility. Use the keyword
DEFAULT to pass in values specified by the driver input file. Otherwise,
values given in the primary input file will overwrite those given in the
driver input file. **WtrDens** specifies the water density and must be a value greater than
or equal to zero; a typical value of seawater is around 1025
kg/m\ :sup:`3`. **WtrDpth** specifies the water depth (depth of the flat
seabed), based on the reference MSL, and must be a value greater than
Expand Down
Loading