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

InflowWind Updates #578

Merged
merged 21 commits into from
Dec 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e3d6fe2
InflowWind synchronization
bjonkman Apr 22, 2020
95c684a
Merge remote-tracking branch 'NREL/dev' into f/InflowWind_FF
bjonkman Sep 2, 2020
6a022de
Add InflowWind driver files for Visual Studio build
bjonkman Sep 2, 2020
04a09d0
fix visual studio issue in last commit
bjonkman Sep 2, 2020
ab20d7e
updated documentation for new InflowWind features
bjonkman Sep 3, 2020
c6e66c7
IfW: add VFlowAngle to input file
bjonkman Sep 16, 2020
7f2ce22
vs build: fix merge issue + make consistent debug compile opts
bjonkman Sep 22, 2020
357253e
Make channel length consistent between C and Fortran sides of interface
bjonkman Sep 29, 2020
848c303
Merge remote-tracking branch 'NREL/dev' into f/InflowWind_FF
bjonkman Oct 26, 2020
881421b
InflowWind updates
bjonkman Oct 26, 2020
20b3cfb
Update InflowWind documentation
bjonkman Oct 26, 2020
4152926
Merge branch 'dev' into f/InflowWind_FF
andrew-platt Nov 20, 2020
f9f3ae6
BugFix in InitFileInfo routine
andrew-platt Nov 23, 2020
f013c1b
IfW: Update unit tests and fix uniform wind file passing
andrew-platt Nov 23, 2020
62b95f2
nwtclib: InitFileInfo skips empty or comment lines
andrew-platt Nov 23, 2020
2b476a8
IfW: simplify the uniform wind file reading
andrew-platt Nov 23, 2020
9bfa548
Merge pull request #19 from andrew-platt/f/InflowWind_FF
bjonkman Nov 30, 2020
128d7e6
IfW: fix missing line from previous merge
bjonkman Nov 30, 2020
7cc8dc1
Merge remote-tracking branch 'NREL/dev' into f/InflowWind_FF
bjonkman Nov 30, 2020
b103723
docs: updated list of existing Visual Studio solutions in the repo
bjonkman Dec 1, 2020
8de4af9
Update OpenFAST TLP baselines
rafmudaf Dec 9, 2020
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
Binary file modified docs/OtherSupporting/OutListParameters.xlsx
Binary file not shown.
8 changes: 6 additions & 2 deletions docs/source/user/api_change.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The changes are tabulated according to the module input file, line number, and f
The line number corresponds to the resulting line number after all changes are implemented.
Thus, be sure to implement each in order so that subsequent line numbers are correct.

OpenFAST v2.3.0 to OpenFAST `dev`
OpenFAST v2.4.0 to OpenFAST `dev`
---------------------------------

============== ==== ================== =============================================================================================================================================================================
Expand All @@ -30,9 +30,13 @@ AeroDyn 14 AA_InputFile "unused" AA_InputFile
AeroDyn 35 [separator line] ====== OLAF cOnvecting LAgrangian Filaments (Free Vortex Wake) Theory Options ================== [used only when WakeMod=3]
AeroDyn 36 OLAFInputFileName "Elliptic_OLAF.dat" OLAFInputFileName - Input file for OLAF [used only when WakeMod=3]
AirFoilTables 4\* BL_file "unused" BL_file - The file name including the boundary layer characteristics of the profile. Ignored if the aeroacoustic module is not called.
IfW driver 6 [separator line] ===================== File Conversion Options =================================
IfW driver 7 WrHAWC false WrHAWC - Convert all data to HAWC2 format? (flag)
IfW driver 8 WrBladed false WrBladed - Convert all data to Bladed format? (flag)
IfW driver 9 WrVTK false WrVTK - Convert all data to VTK format? (flag)
InflowWind 7 VFlowAng 0 VFlowAng - Upflow angle (degrees) (not used for native Bladed format WindType=7)
============== ==== ================== =============================================================================================================================================================================

============== ==== ================== =============================================================================================================================================================================
Modified in OpenFAST `dev`
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Module Line Flag Name Example Value
Expand Down
1 change: 1 addition & 0 deletions docs/source/user/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Details on the transition from FAST v8 to OpenFAST may be found in :numref:`fast
aerodyn-aeroacoustics/index.rst
beamdyn/index.rst
elastodyn/index.rst
inflowwind/index.rst
fast_to_openfast.rst
cppapi/index.rst

44 changes: 44 additions & 0 deletions docs/source/user/inflowwind/appendix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
.. _ifw_appendix:

Appendix
========

.. _ifw_input_files:

InflowWind Input Files
----------------------

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

1) InflowWind Driver Input File
:download:`(driver input file example) <examples/inflowwind_driver_example.inp>`:

The driver input file is needed only for the standalone version of InflowWind. It contains inputs regarding the InflowWind file, interpolation parameters, and the desired output files.
The InflowWind driver can also be run without this file by using command-line arguments instead.

2) InflowWind Primary Input File
:download:`(primary input file example) <examples/inflowwind_example.dat>`:

The primary InflowWind input file defines the inflow that is generated or read from other files. The InflowWind file contains sections for each type of wind-file format.

3) Native Bladed Scaling File
:download:`(primary input file example) <examples/inflowwind_bladedscaling_example.dat>`:

This file includes lines that determine how to scale the non-dimensional full-field
turbulence files from Bladed.

4) Uniform Wind Data File
:download:`(uniform wind input file example) <examples/inflowwind_uniform_example.dat>`:

This file includes lines that define uniform (deterministic) wind data files.


.. _ifw_output_channels:

InflowWind List of Output Channels
----------------------------------

This is a list of all possible output parameters for the InflowWind module.
See the InflowWind tab of the
:download:`(OutListParameters.xlsx file) <../../../OtherSupporting/OutListParameters.xlsx>`:

115 changes: 115 additions & 0 deletions docs/source/user/inflowwind/driver.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
InflowWind Driver
=================
Example input files are
included in :numref:`ifw_appendix`.

Command-line syntax for InflowWind driver:

::

InlowWind_Driver <filename> [options]

where: <filename> -- Name of driver input file to use
options: /ifw -- treat <filename> as name of InflowWind input file (no driver input file)

The following options will override values in the driver input file:
/DT[#] -- timestep
/TStart[#] -- start time
/TSteps[#] -- number of timesteps
/xrange[#:#] -- range of x (#'s are reals)
/yrange[#:#] -- range of y
/zrange[#:#] -- range in z (ground = 0.0)
/Dx[#] -- spacing in x
/Dy[#] -- spacing in y
/Dz[#] -- spacing in z
/points[FILE] -- calculates at x,y,z coordinates specified in a white space delimited FILE
/v -- verbose output
/vv -- very verbose output
/hawc -- convert wind file specified in InflowWind to HAWC format
/bladed -- convert wind file specified in InflowWind to Bladed format
/vtk -- convert wind file specified in InflowWind to VTK format
/help -- print this help menu and exit

::

Notes:
- Unspecified ranges and resolutions default to what is in the file.
- If no XRange is specified, assumed to be only at X=0
- Options are not case sensitive.

The `InflowWind Manual <https://wind.nrel.gov/nwtc/docs/InflowWind_Manual.pdf>`__
contains a description of file formats that it can read.

Specifying the InflowWind Input File
------------------------------------

The InflowWind driver input file requires that an InflowWind input file
be specified within it. See an example InflowWind input
file in :numref:`ifw_appendix`.

Within the InflowWind input file, if the wind file being specified is
Bladed native format (``WindType = 7``), please also see
:numref:`ifw_native_bladed`.

Wind-file output formats
------------------------

The InflowWind driver is capable of writing the wind data read from the
input wind file into wind files of various formats.

HAWC2
~~~~~

This format generates the following files:

- three binary files, one for each component:
``<RootName>-HAWC.u``, ``<RootName>-HAWC.v``, and ``<RootName>-HAWC.w``

- a text summary file in the style of HAWC2 input files:
``<RootName>-HAWC.sum``

In the conversion script, the u component will have the (approximate)
mean removed at each height. The mean value that was removed is
displayed as comments in the text summary file. The turbulence is not
scaled, so it will have the same scaling as the original file.

Bladed
~~~~~~

This format generates a packed binary file and a text summary file.

This output format is in the Bladed-style format that TurbSim generates. That
means that **the shear is included** in the file.

VTK
~~~

This format creates files in a subdirectory called ``vtk``. There is one
vtk file for each time in the full-field data structure, and the entire
Y-Z grid is printed in each file. This format can be used to visualize
the wind field using a viewer such as ParaView.

Converting uniform wind to full-field wind format
-------------------------------------------------

When converting from a uniform wind file to a full-field wind format,
the following assumptions are used: - The advection speed is the
time-averaged horizontal wind speed in the uniform wind file (it does
not include the gust speed). - The constant time-step used in the output
file is the smallest difference between any two entries in the
hub-height file. - The maximum time in the uniform wind file will be
used as the maximum time in the FF binary file. - The grid is generated
with 5-m resolution in the lateral (Y) and horizontal (Z) directions. -
The size of the grid is based on the ``RefLength`` parameter in the
InflowWind input file. The converter adds approximately 10% to the grid
width, with the exact size determined by achieving the desired grid
resolution. The grid is centered in the lateral direction; it extends
vertically above ``RefHt`` by the same distance as the grid width, and
extends below ``RefHt`` to the ground (or within one grid point of the
ground).

Note that there is a potential time shift between the uniform and
full-field wind files, equal to the time it takes to travel the distance
of half the grid width. When using the resulting full-field files, care
must be taken that the aeroelastic code does not treat it as periodic.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
UBAR 12
REFHT 90
TI 0.033333
TI_V 0.026667
TI_W 0.016667
WDIR 0
FLINC .139626222222222
WINDF "../tw06_80hh_s200.wnd"
WSHEAR .2
XOFFSET 0
24 changes: 24 additions & 0 deletions docs/source/user/inflowwind/examples/inflowwind_driver_example.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Example file
InflowWind driver input file.
t echo -- whether this input file should be echoed to a file (flag)
===============================================================================
"inflowwind_example.dat" IfWFileName -- Name of InflowWind input file (-)
===================== File Conversion Options =================================
false WrHAWC -- Convert all data to HAWC2 format? (flag)
false WrBladed -- Convert all data to Bladed format? (flag)
false WrVTK -- Convert all data to VTK format? (flag)
===================== Tests of Interpolation Options =========================
DEFAULT NumTSteps -- number of timesteps to run (DEFAULT for all) (-)
0.0 TStart -- Start time (s)
DEFAULT DT -- timestep size for driver to take (s, or DEFAULT for what the file contains)
t Summary -- Summarize the data extents in the windfile (flag)
t SummaryFile -- Write summary to file (.dvr.sum) (flag)
---- Points file input (output given as POINTSFILENAME.Velocity.dat) --------
f PointsFile -- read in a list of output points from a file (flag)
"Test005.txt" PointsFileName -- name of points file (-) (comma separated x,y,z coordinates, # symbol for comments)
---- Output grid (Points below ground will simply be ignored) ---------------
t WindGrid -- report wind data at set of X,Y,Z coordinat (flag)
6,0,15 GridCtrCoord -- coordinate of center of grid (m)
1,1,0 GridDx,GridDY,GridDZ -- Step size of grid (m)
1,1,0 GridNx,GridNY,GridNZ -- number of grid points in X, Y and Z directions (-)
END of driver input file
57 changes: 57 additions & 0 deletions docs/source/user/inflowwind/examples/inflowwind_example.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
------- InflowWind INPUT FILE -------------------------------------------------------------------------
Example of InflowWind input file for OpenFAST
---------------------------------------------------------------------------------------------------------------
False Echo - Echo input data to <RootName>.ech (flag)
3 WindType - switch for wind file type (1=steady; 2=uniform; 3=binary TurbSim FF; 4=binary Bladed-style FF; 5=HAWC format; 6=User defined; 7=native Bladed FF)
0 PropagationDir - Direction of wind propagation (meteorological rotation from aligned with X (positive rotates towards -Y) -- degrees) (not used for native Bladed format WindType=7)
0 VFlowAng - Upflow angle (degrees) (not used for native Bladed format WindType=7)
1 NWindVel - Number of points to output the wind velocity (0 to 9)
0 WindVxiList - List of coordinates in the inertial X direction (m)
0 WindVyiList - List of coordinates in the inertial Y direction (m)
90 WindVziList - List of coordinates in the inertial Z direction (m)
================== Parameters for Steady Wind Conditions [used only for WindType = 1] =========================
0 HWindSpeed - Horizontal wind speed (m/s)
90 RefHt - Reference height for horizontal wind speed (m)
0.2 PLexp - Power law exponent (-)
================== Parameters for Uniform wind file [used only for WindType = 2] ============================
"Wind/90m_12mps_twr.hh" Filename - Filename of time series data for uniform wind field. (-)
90 RefHt - Reference height for horizontal wind speed (m)
125.88 RefLength - Reference length for linear horizontal and vertical sheer (-)
================== Parameters for Binary TurbSim Full-Field files [used only for WindType = 3] ==============
"Wind/90m_12mps_twr.bts" Filename - Name of the Full field wind file to use (.bts)
================== Parameters for Binary Bladed-style Full-Field files [used only for WindType = 4 or WindType = 7] =========
"Wind/90m_12mps_twr" FilenameRoot - WindType=4: Rootname of the full-field wind file to use (.wnd, .sum); WindType=7: name of the intermediate file with wind scaling values
False TowerFile - Have tower file (.twr) (flag) ignored when WindType = 7
================== Parameters for HAWC-format binary files [Only used with WindType = 5] =====================
"wasp\Output\basic_5u.bin" FileName_u - name of the file containing the u-component fluctuating wind (.bin)
"wasp\Output\basic_5v.bin" FileName_v - name of the file containing the v-component fluctuating wind (.bin)
"wasp\Output\basic_5w.bin" FileName_w - name of the file containing the w-component fluctuating wind (.bin)
64 nx - number of grids in the x direction (in the 3 files above) (-)
32 ny - number of grids in the y direction (in the 3 files above) (-)
32 nz - number of grids in the z direction (in the 3 files above) (-)
16 dx - distance (in meters) between points in the x direction (m)
3 dy - distance (in meters) between points in the y direction (m)
3 dz - distance (in meters) between points in the z direction (m)
90 RefHt - reference height; the height (in meters) of the vertical center of the grid (m)
------------- Scaling parameters for turbulence ---------------------------------------------------------
2 ScaleMethod - Turbulence scaling method [0 = none, 1 = direct scaling, 2 = calculate scaling factor based on a desired standard deviation]
1 SFx - Turbulence scaling factor for the x direction (-) [ScaleMethod=1]
1 SFy - Turbulence scaling factor for the y direction (-) [ScaleMethod=1]
1 SFz - Turbulence scaling factor for the z direction (-) [ScaleMethod=1]
1.2 SigmaFx - Turbulence standard deviation to calculate scaling from in x direction (m/s) [ScaleMethod=2]
.8 SigmaFy - Turbulence standard deviation to calculate scaling from in y direction (m/s) [ScaleMethod=2]
.2 SigmaFz - Turbulence standard deviation to calculate scaling from in z direction (m/s) [ScaleMethod=2]
------------- Mean wind profile parameters (added to HAWC-format files) ---------------------------------
12 URef - Mean u-component wind speed at the reference height (m/s)
2 WindProfile - Wind profile type (0=constant;1=logarithmic,2=power law)
0.2 PLExp - Power law exponent (-) (used for PL wind profile type only)
0.03 Z0 - Surface roughness length (m) (used for LG wind profile type only)
0 InitPosition(x) - Initial offset in +x direction (shift of wind box)
====================== OUTPUT ==================================================
False SumPrint - Print summary data to <RootName>.IfW.sum (flag)
OutList - The next line(s) contains a list of output parameters. See OutListParameters.xlsx for a listing of available output channels, (-)
"Wind1VelX" X-direction wind velocity at point WindList(1)
"Wind1VelY" Y-direction wind velocity at point WindList(1)
"Wind1VelZ" Z-direction wind velocity at point WindList(1)
END of input file (the word "END" must appear in the first 3 columns of this last OutList line)
---------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
! OpenFAST Deterministic Wind File
#
# Comment lines begin with "!" or "#" or "%", then the data lines must contain the following columns:
#
# If there are only 8 columns, upflow is assumed to be 0.
#
# Parameters are interpolated linearly between time steps; using nearest neighbor before the first time
# listed in this file and after the last time listed in the file.
#
! Time Wind Wind Vertical Horiz. Pwr.Law Lin.Vert. Gust Upflow
! Speed Dir Speed Shear Vert.Shr Shear Speed Angle
! (sec) (m/s) (Deg) (m/s) (m/s) (deg)
0.000000 10 0.000000 0 0.000000 0.300000 0.000000 0.000000 8
10.000000 12 0.000000 0 0.000000 0.300000 0.000000 0.000000 8
22 changes: 22 additions & 0 deletions docs/source/user/inflowwind/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
InflowWind Users Guide and Theory Manual
========================================

.. only:: html

This document offers a quick reference guide for the InflowWind software.
It is intended to be used by the general user in combination
with other OpenFAST manuals. The manual will be updated as new releases are
issued and as needed to provide further information on advancements or
modifications to the software.

The information here is incomplete. Please see the
`InflowWind Manual <https://wind.nrel.gov/nwtc/docs/InflowWind_Manual.pdf>`__
until it has been converted to OpenFAST's documentation style.


.. toctree::
:maxdepth: 2

driver.rst
input.rst
appendix.rst
Loading