GALE couples bodies that move in the wind to the Energy Research and Forecasting (ERF) atmospheric code. Its first bodies are wind turbines. ERF supplies the wind at the turbine's blade and tower points. A body solver computes the loads and the motion. GALE spreads the reaction force back onto the air, so the flow feels the turbine and forms its wake. Everything in ERF (anelastic dynamics, terrain-fitted meshes, mesh refinement, LES and RANS closures, the surface layer) is available to a GALE run.
This repository was the ERF-MovingBodies branch of hgopalan/ERF until
November 2026. It now holds only GALE's own files and takes ERF as a git
submodule (Submodules/ERF), so the atmospheric core, build system and
inputs are ERF's own.
The documentation is at https://erf-model.github.io/GALE/.
| OpenFAST (stub) | |
| OpenFAST (library) | |
| GPU (compile) | |
| Windows | |
| Style | |
| Documentation |
The moving-bodies examples are in Exec/CanonicalTests/MovingBodies. Each
case has its own folder with the input deck and the turbine file, ready to run
with the erf_exec of a build described under Building and running.
Folder in Exec/CanonicalTests/MovingBodies |
What it shows |
|---|---|
Actuator_UniformCtDisk, Actuator_CtDisk_TwoLevel |
A prescribed-thrust disk, on one level and on a refined patch. Needs no OpenFAST. |
Actuator_Sampling, OpenFAST_DriverOnly |
A turbine that samples the wind without forcing the flow. |
OpenFAST_ADM_* |
Actuator disks: uniform inflow, upstream sampling, terrain, wake lines, precursor and perturbation inflow, two turbines, two levels, restart. |
OpenFAST_ALM_* |
Actuator lines: uniform inflow, tower and nacelle, per-component kernel widths, the filtered lifting-line correction, restart. |
OpenFAST_ADM_Askervein, OpenFAST_ALM_Askervein |
The IEA 15 MW turbine on the Askervein hill, with the OpenFAST library. |
OpenFAST_IEA15_PowerCurve |
The IEA 15 MW turbine with its ROSCO controller on a flat domain with
refinement levels, as a disk and as a line, compared with OpenFAST
alone at five wind speeds. Needs the OpenFAST and ROSCO libraries
(Build/setup_rosco.sh or -DERF_BUILD_ROSCO=ON). CTest runs ten
steps of each deck; the full runs are made by hand. |
IEA15_land_model |
The OpenFAST model of the IEA 15 MW turbine used by the Askervein and power-curve cases. |
ScalingFarm |
Tools that write and time farms of 16 to more than 1024 turbines. |
Every case except the two Askervein cases and the power-curve case runs with
the bundled OpenFAST stub. The Askervein decks expect the IEA15_land_model
folder and the terrain file of Submodules/ERF/Exec/CanonicalTests/Real_Terrain/Askervein
next to them; CTest copies both.
The cases README lists each
case, its body and what it checks.
Body solvers. Each body named in erf.moving_bodies.bodies selects its
solver with erf.moving_bodies.<name>.type. Two are available:
openfast_turbine: a turbine whose aerodynamics, structure and controller run in OpenFAST, through its external-inflow C interface. OpenFAST 5.0.0 is the tested version; the interface is the same in 4.2. Each turbine has its own OpenFAST instance, owned by one MPI rank.ct_disk: a uniformly loaded disk with a prescribed thrust coefficient. It needs no external library and has a closed-form thrust, so it also serves as the test body.
Rotor representations (erf.moving_bodies.<name>.mode) for an OpenFAST
turbine:
adm, an actuator disk. The blade loads are spread over the swept disk. The free-stream speed can be sampled at the disk, upstream of it, or at the disk with a filtered-disk correction (the default).alm, an actuator line. Each blade is a rotating line of force points, with an optional filtered lifting-line correction (erf.moving_bodies.<name>.fllc;automaticsets its widths from the rotor diameter).none, which runs the turbine in ERF's wind without forcing the flow.
Tower and nacelle drag can be added, each with its own kernel width.
Meshes and levels. The bodies live on one refinement level, the anchor level, so a fine patch around a rotor gives an actuator line its few-metre cells without refining the whole domain. Every coarser level carries the bodies' force summed onto its faces. Bodies can stand on terrain-fitted meshes.
Farms. Any number of bodies can be listed. Each point goes only to the MPI
ranks whose boxes it touches. Exec/CanonicalTests/MovingBodies/ScalingFarm
holds the tools that write and time farms of 16 to more than 1024 turbines.
Inflow. Uniform or sheared inflow, turbulent inflow from precursor planes, and the cell perturbation method.
Output and restart. Per-body diagnostics files (loads, sampled flow, correction logs), wake lines with running averages, body statistics, plotfile variables, phase timers, and checkpoint and restart of the bodies' state.
Start-up checks. A run stops at start-up, naming the input to change, when a requirement below is not met or an input is out of range.
- The anelastic solver (
erf.compressibility_type = AnelasticorPseudoIncompressible) on every level, with a fixed time step. - The step on the anchor level is a whole multiple of every OpenFAST model's time step.
- No finer level may cover a body.
- With an
openfast_turbine, the AMReX floating-point traps are off, since OpenFAST raises exceptions of its own. Runs withct_diskbodies only may trap. - The OpenFAST model sets
CompInflow = 2(external inflow).
GALE's CMakeLists.txt sets GALE's options and adds ERF as a subproject;
every ERF build option works as in ERF. The ERF
Getting Started
page gives the system requirements. Clone with the submodules:
git clone --recursive https://github.com/erf-model/GALE.git GALE cd GALE
To try the coupling without OpenFAST, build against the bundled stub library:
cmake -S . -B cmake-build -DERF_ENABLE_MPI=ON -DERF_ENABLE_FFT=ON \
-DERF_ENABLE_OPENFAST=ON -DERF_OPENFAST_USE_STUB=ON
cmake --build cmake-build -j
For real turbines, install OpenFAST once and point the build at it:
Build/setup_openfast.sh --no-cpp-api # prints the OPENFAST_DIR to use
cmake -S . -B cmake-build -DERF_ENABLE_MPI=ON -DERF_ENABLE_FFT=ON \
-DERF_ENABLE_OPENFAST=ON -DOPENFAST_DIR=<install prefix>
cmake --build cmake-build -j
A turbine model with a controller also needs the controller library, which
OpenFAST loads at run time from the path in its ServoDyn file
(DLL_FileName). For ROSCO
(libdiscon) there are two ways to get it; GALE does not link against it:
a script that downloads, builds and installs ROSCO 2.10.1 once:
Build/setup_rosco.sh # prints the ROSCO_DIR to use cmake -S . -B cmake-build ... -DOPENFAST_DIR=<install prefix> -DROSCO_DIR=<ROSCO prefix>
or a CMake option that downloads and builds it inside the build folder:
cmake -S . -B cmake-build ... -DOPENFAST_DIR=<install prefix> -DERF_BUILD_ROSCO=ON cmake --build cmake-build -j # also builds cmake-build/rosco/lib/libdiscon
Both need git, a network connection and a Fortran compiler (the one
OpenFAST was built with).
With either option CTest also checks that the library loads and runs four
short tests of the power-curve case (label rosco).
The executable is cmake-build/ERF/Exec/erf_exec. GNU Make builds from
Exec/GNUmakefile; the Building
page has both builds and every option.
ERF_ENABLE_MOVING_BODIES (ON by default in GALE) alone builds the framework with the ct_disk
body and no OpenFAST. A deck turns the bodies on with erf.structures.model = gale
and lists them in erf.moving_bodies.bodies; every erf.moving_bodies.* key is in the inputs
documentation.
Exec/CanonicalTests/MovingBodies has one folder per case, with the input
deck, the turbine file and the gold logs, and a README that lists what each
case checks. With -DERF_ENABLE_TESTS=ON (and MPI, FFT and the OpenFAST stub, as in
the build page) they run under CTest
(ctest --test-dir cmake-build/Tests --no-tests=error); ERF's own regression
suite is not registered in a GALE build:
- label
moving-bodies: the stub andct_diskcases, their restart and box-parity twins, and one abort test per start-up check; - label
openfast-real: the IEA 15 MW turbine as a disk and as a line on the Askervein hill, against the OpenFAST library; - label
rosco: the IEA 15 MW turbine with the ROSCO controller on a flat domain, as a disk on one and two levels and as a line on two and three, for ten steps, andROSCO_Library, which checks that the controller library loads. They are registered when the build is givenROSCO_DIRorERF_BUILD_ROSCO=ON.
The unit tests of ERF's samplers and force spreading are in ERF
(Submodules/ERF/Tests/Unit/MovingBodies); those of the body exchange, the OpenFAST driver and
the rest of the turbine model are in Turbines/Tests/Unit, and the model's
regression tests are registered in Turbines/Tests/ERFTurbinesTests.cmake.
The real-OpenFAST cases use the OpenFAST model of the IEA Wind 15 MW reference
turbine, from the IEA Wind Task 37 repository
(https://github.com/IEAWindTask37/IEA-15-240-RWT, Apache License 2.0). We thank
the IEA Wind Task 37 authors for making it available. A land-based copy with
the changes needed for the coupling is redistributed in
Exec/CanonicalTests/MovingBodies/IEA15_land_model; its README lists the
source commit and every change, file by file.
We thank the OpenFAST developers for the external-inflow interface the coupling is built on.
The documentation is published at https://erf-model.github.io/GALE/ from
Docs/sphinx_doc on every merge into development: building, the OpenFAST
coupling, the erf.moving_bodies inputs, the regression tests and the
theory. ERF's own documentation is at https://erf.readthedocs.io/en/latest/.
Build GALE's pages locally with:
pip install -r Docs/sphinx_doc/requirements.txt sphinx-build -W -b html Docs/sphinx_doc cmake-build/docs
ERF holds a coupling interface for models of structures in the flow
(Source/MovingBodies/Coupling) and the shared sampling and force-spreading
tools (Source/MovingBodies/Core). A model outside ERF registers with that
interface by name, and adding one changes no file of ERF.
GALE's turbine module is such a model. It sits in Turbines/, registers as
structure model gale and is compiled in from there
(Turbines/ERFStructureModel.cmake for CMake, Turbines/Make.package for
GNU Make). The CMake build adds it whenever the moving-bodies framework is on;
Exec/GNUmakefile lists it in STRUCTURE_HOME. ERF is a submodule, so
GALE holds only its own files and builds against an unmodified ERF. The
planned next step is to put the body solvers behind one interface inside GALE,
so that OpenFAST becomes one engine among others that can be added the same
way.
Development happens on topic branches off development with pull requests
back into development. A new capability comes with a regression case and a
row in the cases README. Fixes to the shared atmospheric core are contributed
to upstream ERF and reach this repository when the Submodules/ERF commit
is moved forward. The ERF coding conventions in
CONTRIBUTING.md
apply here as well.
ERF, the Energy Research and Forecasting code (erf-model/ERF), solves the atmospheric equations in compressible or anelastic form on the AMReX block-structured adaptive mesh framework, from laptops to GPU systems. Its ERF documentation and Doxygen pages describe the atmosphere GALE runs in; its Python pre- and post-processing tools are in the erftools repository.
The development of ERF is funded by the U.S. Department of Energy (DOE). When using GALE, please cite the ERF publications listed at that DOI and the ERF model paper in JAMES (doi:10.1029/2024MS004884).
GALE is distributed under the ERF license; see LICENSE.md.