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

Unsteady Aero Driver: adding 3 degrees of freedom for the motion of a genralized airfoil section #1910

Merged
merged 36 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
dbec473
LD: starting lindyn
ebranlard Aug 25, 2023
def9964
UA: cleanup of IO and driver code
ebranlard Aug 26, 2023
5a0f935
LD: implemented state integration
ebranlard Aug 26, 2023
9413926
UADvr: hacked coupling between UA and LD
ebranlard Aug 26, 2023
dc64a15
UADvr: wrapping all data into dvr%
ebranlard Sep 29, 2023
510d3f3
UADvr: set inputs for UA and LD, more outputs
ebranlard Sep 30, 2023
b30ef18
UADvr: LD has lin, write outputs and active DOFs
ebranlard Oct 3, 2023
16c7922
UADvr: LD outputs to driver
ebranlard Oct 4, 2023
36832c6
UA: using p%UA_OUTS instead of precompiler flag
ebranlard Oct 4, 2023
5f8a195
UADvr: introducing basicaerolib in cmake for compilation of ua driver
ebranlard Oct 4, 2023
d60faa3
UA: adding d_34_to_ac input (constant for now)
ebranlard Oct 4, 2023
93e9ce6
NWTC: moving delimfile, line_count, interpTimeValue to NWTC library
ebranlard Oct 27, 2023
c1baa77
UA/LD: prescribed inflow and motion
ebranlard Oct 27, 2023
12bca4d
UA: using extrap interp for LD inputs
ebranlard Oct 27, 2023
ce97711
UA: new input file format
ebranlard Oct 27, 2023
096208b
UA: simplifying prescribed time series SimMod=2
ebranlard Oct 27, 2023
9a3642d
UA: redirecting outputs to main driver file, no more DUA_OUTS
ebranlard Oct 27, 2023
9b4117b
UA: output to binary file, removed .UA
ebranlard Oct 27, 2023
f8d5f4a
BasicAeroLib: making library static
ebranlard Oct 27, 2023
df7a73c
BasicAeroLib: added to MEX_LIBS
ebranlard Oct 27, 2023
4bbb466
UA: introducing UAMod=0, no unsteady, but alpha34 coeffs
ebranlard Oct 28, 2023
188bccd
UA driver: vs build
bjonkman Nov 14, 2023
6940962
LinDyn: states should be reals, not logicals
bjonkman Nov 14, 2023
abbfd59
fix typo in RoutineName parameter
bjonkman Nov 14, 2023
4cc616f
UA: minor updates
bjonkman Nov 16, 2023
defd8b7
Minor updates to UA driver (#22)
bjonkman Nov 30, 2023
9562e5d
UA: generalized scaling factors are now a 3x3 matrix
ebranlard Dec 1, 2023
39ea6c8
UA: update of r-tests (new input file format)
ebranlard Dec 12, 2023
2a6f086
Merge branch 'dev' into f/ua-elast-dev
ebranlard Dec 12, 2023
a869094
UA: adding documentation for ua driver
ebranlard Dec 12, 2023
d9edf8f
merge branch 'openfast/dev' into 'f/ua-elast-dev'
bjonkman Mar 7, 2024
ba95b23
UA driver: fix indices on alpha, U, and omega
bjonkman Mar 7, 2024
db02071
Merge remote-tracking branch 'ebranlard/f/ua-elast-dev' into f/ua-ela…
bjonkman Mar 7, 2024
efa74e1
Merge pull request #23 from bjonkman/f/ua-elast-dev
ebranlard Mar 9, 2024
1dd60b9
CMake: remove unnecessary openfastlib dependency on lindynlib
andrew-platt Mar 11, 2024
e1dacc3
Merge remote-tracking branch 'OpenFAST/dev' into f/ua-elast-dev
andrew-platt Mar 11, 2024
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
3 changes: 1 addition & 2 deletions .github/workflows/automated-dev-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ jobs:
### BUILD AND TEST JOBS

build-test-uadriver-debug:
# UA driver requires -DUA_OUTS, cannot be compiled with other
# UA driver used to require -DUA_OUTS
runs-on: ubuntu-22.04
steps:
- name: Checkout
Expand Down Expand Up @@ -374,7 +374,6 @@ jobs:
-DVARIABLE_TRACKING=OFF \
-DBUILD_TESTING:BOOL=ON \
-DCTEST_PLOT_ERRORS:BOOL=ON \
-DCMAKE_Fortran_FLAGS="-DUA_OUTS=ON" \
${GITHUB_WORKSPACE}
- name: Build all
working-directory: ${{runner.workspace}}/openfast/build
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ set(OPENFAST_MODULES
icefloe
wakedynamics
awae
lindyn
map
turbsim
supercontroller
Expand Down

This file was deleted.

28 changes: 0 additions & 28 deletions docs/source/user/aerodyn-dynamicStall/examples/UA-driver.dvr

This file was deleted.

8 changes: 8 additions & 0 deletions docs/source/user/aerodyn/bibliography.bib
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ @TECHREPORT{ad-AeroDyn:manualUnsteady
note = {NREL/TP-5000-66347}
}

@article{ad-UAElast:torquepaper,
title = {Aeroelastic stability of a generalized wind turbine cross-section including unsteady airfoil aerodynamic and dynamic inflow},
author = {E. Branlard and J.Jonkman and B. Jonkman and M. Singh and E. Mayda and K.Dixon and J H. Porter and G. Vijayakumar},
year = 2024,
journal = {Jounal of Physics: Conference Series},
}


@book{ad-Branlard:book,
author = {E. Branlard},
title = {Wind Turbine Aerodynamics and Vorticity-Based Methods: Fundamentals and Recent Applications},
Expand Down
202 changes: 198 additions & 4 deletions docs/source/user/aerodyn/theory_ua.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ speed increases, but stall is delayed.






.. _ua_theory:


Theory
------

Expand Down Expand Up @@ -489,6 +495,12 @@ where :math:`\alpha_{50}` is computed the same way as :math:`\alpha_{34}` (using







.. _UA_inputs:

Inputs
------

Expand All @@ -503,6 +515,10 @@ An example of profile data (containing some of the unsteady aerodynamic paramete
:download:`(here) <examples/ad_polar_example.dat>`.


The unsteady aerodynamic driver inputs are documented in :numref:`ua_driver`.



.. _UA_AFI_defaults:

Calculating Default Airfoil Coefficients
Expand Down Expand Up @@ -579,17 +595,195 @@ to set preprocessor variable ``UA_OUTS`` and recompile the program (OpenFAST, Ae
The outputs are written in output files with extension `*.UA.out`.
To activate these outputs with `cmake`, compile using ``-DCMAKE_Fortran_FLAGS="-DUA_OUTS=ON"``

When using the driver, there is no need to use this preprocessor variable.




.. _ua_aeroelasttheory:

Aeroelastic simulation of a 2D section
--------------------------------------

Aeroelastic simulations of an isolated 2D section are possible using the driver in order to use the unsteady aerodynamic model in a simplified context.
See :numref:`ua_driver`.
The theory and description for the aeroelastic simulation can be found in
:cite:`ad-UAElast:torquepaper`.




.. _ua_driver:

Driver
------

A driver is available to run simulations for a single airfoil, using sinusoidal variation of the angle of attack,
or user defined time series of angle of attack, relative wind speed and pitch rate.

A driver is available to run simulations for a single airfoil.

Different kind of simulations are possible:

- using sinusoidal variation of the angle of attack,
- user defined time series of angle of attack, relative wind speed and pitch rate.
- aero elastic simulations with 3 degrees of freedom for the elastic motion of the section in it's 2D plane (flap, edge and torsion), with possibility to prescribe time series of the wind speed, or prescribe the motion of the section.

The theory and description for the aeroelastic simulation can be found in :cite:`ad-UAElast:torquepaper`.





Compilation
~~~~~~~~~~~

Using `cmake`, the driver is compiled using `make unsteadyaero_driver`, resulting as an executable in the `aerodyn` folder.

An example of driver input file is available here: :download:`here <../aerodyn-dynamicStall/examples/UA-driver.dvr>`.
An example of time series input is available here: :download:`here <../aerodyn-dynamicStall/examples/UA-driver-timeseries.dat>`


Driver Inputs
~~~~~~~~~~~~~

An example of input file for the unsteady aerodynamic driver can be found in the `r-test repository <https://github.com/OpenFAST/r-test/blob/main/modules/unsteadyaero/ua_redfreq/UA2.dvr>`__.


The differente inputs are described below.



**Environmental conditions**


``FldDens``: Density of working fluid (kg/m^3)

``KinVisc``: Kinematic viscosity of working fluid (m^2/s)

``SpdSound``: Speed of sound of working fluid (m/s)


**Unsteady aerodynamics options**

``UAMod`` : Unsteady Aero Model Switch (switch) {2=B-L Gonzalez, 3=B-L Minnema/Pierce, 4=B-L HGM 4-states, 5=B-L 5 states, 6=Oye, 7=Boeing-Vertol} [used only when AFAeroMod=2]

``FLookup`` : Flag to indicate whether a lookup for f' will be calculated (TRUE) or whether best-fit exponential equations will be used (FALSE); if FALSE S1-S4 must be provided in airfoil input files (flag) [used only when AFAeroMod=2]


**Airfoil properties**

``AirFoil``: Airfoil table (Column 1: Angle of Attack (AoA), column 2: Lift coeff, column 3: Drag coeff).

``Chord`` : Chord length (m)

``Vec_AQ`` : Vector from reference point "A" to aerodynamic center (~quarter chord) "Q" in airfoil coordinates and in chord length. If "A" is at mid chord values are likely (0, -0.25) (-)

``Vec_AT`` : Vector from reference point "A" to three-quarter chord point "T" in airfoil coordinates and in chord length. If "A" is at mid chord values are likely (0, 0.25) (-)

``UseCm`` : Use Cm (moment coefficient) data in airfoil table {true/false}


**Simulation control**

``SimMod``: Simulation model {1=reduced frequency model, 2=prescribed-aero time series, 3=elastic cross section}


**Reduced-frequency simulation** (``SimMod=1``)

``InflowVel`` : Inflow velocity (m/s)

``NCycles`` : Number of angle-of-attack oscillations over the length of the simulation (-)

``StepsPerCycle`` : Number of timesteps per cycle (-)

``Frequency`` : Frequency for the airfoil oscillations (Hz)

``Amplitude`` : Amplitude of the angle of attack oscillations (deg)

``Mean`` : Cycle mean (deg)

``Phase`` : Initial phase (num steps).


**Prescribed aerodynamic simulation inputs** (``SimMod=2``)

``TMax_PA`` : Total run time (s)

``DT_PA`` : Recommended module time step (s)

``AeroTSFile``: Time series data in delimited input file (e.g. csv) with 1 header line, 4 columns: Time (s), angle-of-attack (deg), InflowVel (m/s), Pitch rate (rad/s)


**Aeroelastic simulation** (``SimMod=3``)

The theory for the aeroelastic simulation can be found in :numref:`ua_aeroelasttheory`.

``TMax`` : Total run time (s)

``DT`` : Time step (s).

``ActiveDOF`` : List of Degrees of freedom that are active (true or false)

``InitPos`` : List of initial positions for the elastic degrees of freedom (m, m and rad)

``InitVel`` : List of initial velocities for the elastic degrees of freedom (m/s, m/s, and rad/s)

``GFScalingL1`` : Generalized force scaling factors to convert from section loads to generalized loads (3x3). Three values per line.

``MassMatrixL1`` : Mass matrix (3x3). Three values per line.

``DampMatrixL1`` : Damping matrix (3x3). Three values per line.

``StifMatrixL1`` : Stiffness matrix (3x3). Three values per line.

``Twist`` : Fixed twist of the section when torsion degree of freedom is zero (deg)

``InflowMod`` : Model for the inflow velocity. {1: constant velocity, 2: time series}

``Inflow`` : Inflow velocity in x and y direction [used only when InflowMod=1]

``InflowTSFile`` : Input file for inflow velocity. Delimited file (e.g. csv) with one header line, three columns: Time (s), Ux (m/s), Uy (m/s). [used only when InflowMod=2]

``MotionMod`` : Model for the motion of the degrees of freedom {1: dynamic, 2: prescribed}

``MotionTSFile`` : Input file for prescribed motion. Delimited file (e.g. csv) with one header line, 10 columns: Time (s), x (m), y (m), th (rad), velocities, and accelerations. [used only when InflowMod=2]


**Output control**

``SumPrint`` : Write unsteady aerodynamics summary file (flag)

``WrAFITables`` : Write back the aerodynamic coefficients used internally (flag)


**Example CSV input files**

The unsteady aerodyn driver now relies on CSV files for it's input time series.
The time column does not need to be at a constant time step, but needs to be monotonously increasing.

Prescribed aero input (``SimMod=2``):

.. code:

Time_[s] , Alpha_[deg] , VRel_[m/s] , omega_[rad/s]
0.0 , 0 , 10 , 0
0.01 , 0 , 10 , 0


Inflow file input (``SimMod=3``, ``InflowMod=2``):

.. code:

Time_[s] , Ux_[m/s], Uy_[m/s]
0.0 , 1 , 10
1.0 , 2 , 10
5.0 , 2 , 8
10.0 , 1 , 12


Motion file input (``SimMod=3``, ``MotionMod=2``) (note in this dummy exmaple velocities and accelerations are not provided, but preferably they should be):

.. code:

Time_[s] , x_[m] , y_[m] , th_[rad] , xd_[m/s] , yd_[m/s] , thd_[rad/s] , xdd_[m/s^2] , ydd_[m/s^2] , thdd_[rad/s^2]
0.0 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0
1.0 , 2 , 2 , 2 , 0 , 0 , 0 , 0 , 0 , 0
5.0 , 2 , 2 , 2 , 0 , 0 , 0 , 0 , 0 , 0
10.0 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0
1 change: 1 addition & 0 deletions glue-codes/simulink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
set(MEX_LIBS
$<TARGET_FILE:openfast_prelib>
$<TARGET_FILE:aerodyn14lib>
$<TARGET_FILE:basicaerolib>
$<TARGET_FILE:aerodynlib>
$<TARGET_FILE:beamdynlib>
$<TARGET_FILE:elastodynlib>
Expand Down
26 changes: 15 additions & 11 deletions modules/aerodyn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ if (GENERATE_TYPES)
generate_f90_types(src/FVW_Registry.txt ${CMAKE_CURRENT_LIST_DIR}/src/FVW_Types.f90)
endif()

# BasicAero Library
add_library(basicaerolib STATIC
# UnsteadyAero lib
src/UnsteadyAero.f90
src/UnsteadyAero_Types.f90

# AirFoil Info lib
src/AirfoilInfo.f90
src/AirfoilInfo_Types.f90
)
target_link_libraries(basicaerolib ifwlib nwtclibs)

# AeroDyn Library
add_library(aerodynlib STATIC
src/AeroDyn.f90
Expand All @@ -46,14 +58,6 @@ add_library(aerodynlib STATIC
src/AeroAcoustics_IO.f90
src/AeroAcoustics_Types.f90

# UnsteadyAero lib
src/UnsteadyAero.f90
src/UnsteadyAero_Types.f90

# AirFoil Info lib
src/AirfoilInfo.f90
src/AirfoilInfo_Types.f90

# FVW lib
src/FVW.f90
src/FVW_IO.f90
Expand All @@ -68,7 +72,7 @@ add_library(aerodynlib STATIC
src/AeroDyn_Inflow.f90
src/AeroDyn_Inflow_Types.f90
)
target_link_libraries(aerodynlib ifwlib nwtclibs)
target_link_libraries(aerodynlib basicaerolib ifwlib nwtclibs)

# AeroDyn Driver Subs Library
add_library(aerodyn_driver_subs STATIC
Expand All @@ -88,7 +92,7 @@ add_executable(unsteadyaero_driver
src/UnsteadyAero_Driver.f90
src/UA_Dvr_Subs.f90
)
target_link_libraries(unsteadyaero_driver aerodyn_driver_subs)
target_link_libraries(unsteadyaero_driver basicaerolib lindynlib versioninfolib)

# AeroDyn-InflowWind c-bindings interface library
add_library(aerodyn_inflow_c_binding SHARED
Expand All @@ -99,7 +103,7 @@ if(APPLE OR UNIX)
target_compile_definitions(aerodyn_inflow_c_binding PRIVATE IMPLICIT_DLLEXPORT)
endif()

install(TARGETS aerodynlib aerodyn_driver_subs aerodyn_driver unsteadyaero_driver aerodyn_inflow_c_binding
install(TARGETS aerodynlib basicaerolib aerodyn_driver_subs aerodyn_driver unsteadyaero_driver aerodyn_inflow_c_binding
EXPORT "${CMAKE_PROJECT_NAME}Libraries"
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
Expand Down
Loading