A fast, modular, and extensible Python solver for wind farm flows using the Curled Wake Model (CWM), based on the method introduced by Martínez-Tossas et al. (2021). This tool enables rapid simulation and analysis of wind turbine wake interactions in atmospheric boundary layer (ABL) flows.
The curled wake model was first introduced in:
Martínez-Tossas, L. A., Annoni, J., Fleming, P. A., and Churchfield, M. J. (2019).
The aerodynamics of the curled wake: a simplified model in view of flow control.
Wind Energy Science, 2019.
https://doi.org/10.5194/wes-4-127-2019
This latest implementation follows the methodology in:
Martínez-Tossas, L. A., King, J., Quon, E., Bay, C. J., Mudafort, R., Hamilton, N., Howland, M. F., and Fleming, P. A. (2021).
The curled wake model: a three-dimensional and extremely fast steady-state wake solver for wind plant flows.
Wind Energy Science, 2021.
https://doi.org/10.5194/wes-6-555-2021
- ✅ Steady-state and unsteady wake solvers using Runge-Kutta integration
- ✅ Support for yawed turbines and multiple wake interaction models
- ✅ Modular turbulence model options (
standard,kl, etc.) - ✅ Flexible boundary layer initialization (power-law, log-law, TI-derived)
- ✅ Wake veer and dynamic inflow support
- ✅ Time-resolved output for comparison with SCADA or LES
- ✅ Plotting tools and error analysis against SCADA data
curled_wake_model/
├── wind_farm.py # Main driver and solver orchestrator
├── wind_farm_plot.py # Visualization methods (attached as mixins)
├── wind_farm_solvers/
│ ├── solver_steady.py # Steady-state RK solver
│ ├── solver_time.py # Full unsteady RK solver
│ └── solver_quasisteady.py # Quasi-steady solver (run multiple steady-state solves)
├── turbine_model.py # Turbine class including actuator and wake properties
├── examples/ # Example wind farm layouts and runs
├── requirements.txt # Dependencies
└── README.md
Install dependencies via conda and pip:
# 1. Create a conda environment with Python >= 3.12
conda create -n cwm_env python=3.12
# 2. Activate the environment
conda activate cwm_env
# 3. Clone the rk4_solvers branch of the repository
git clone https://github.com/tonyinme/curled_wake_model.git
cd curled_wake_model
# 4. Install dependencies
pip install -r requirements.txt
# 5. Install the package in development mode
pip install -e .If using Windows this can be done using Powershell
:: 1. Make sure Python 3.12 or newer is installed
:: You can check with:
python --version
:: 2. (Optional) Create a virtual environment
python -m venv cwm_env
:: 3. Activate the virtual environment
cwm_env\Scripts\activate
:: 4. Clone the repository
git clone https://github.com/tonyinme/curled_wake_model.git
cd curled_wake_model
:: 5. Install dependencies
pip install -r requirements.txt
:: 6. Install the package in development mode
pip install -e .You may also want to install:
matplotlibscipypandasnumbaffmpeg(optional, for animation exports)
cd examples
python example_1_turbulence_models.py
- Wake field components:
U,V,W, and deficitsuw,vw,ww - Time-resolved wake snapshots:
wf.u_time,wf.time_video - Turbine-specific diagnostics: power, Ct, Cp, time series
This project is licensed under the GNU General Public License v2.0.
See the LICENSE file for details.
© 2025 Luis A. Martínez Tossas
This model is based on the Curled Wake Model developed at the National Renewable Energy Laboratory.
See the original papers: