A Python-based automation script for running sequential OpenFAST Design Load Case (DLC) simulations by updating input files, executing OpenFAST, and organizing simulation outputs.
This tool was developed for project-specific DLC studies where a large number of wind seeds and wind speeds must be simulated without manual intervention.
Running multiple OpenFAST simulations for a single DLC often requires repetitive manual steps such as updating wind files, modifying HydroDyn inputs, executing OpenFAST, and organizing output files.
OpenFAST-DLC-Runner automates this workflow by iterating over a set of wind files, updating the corresponding OpenFAST input files, launching simulations via a batch file, and systematically renaming and storing outputs for post-processing.
The script is designed as a project-level automation utility, not as a general-purpose OpenFAST framework.
- Iterates over multiple
.btswind files - Extracts wind speed and seed information from filenames
- Automatically updates:
- Inflow wind file references (
InflowFile.dat) - HydroDyn input files based on wind speed
- HydroDyn references in the
.fstfile
- Inflow wind file references (
- Executes OpenFAST simulations via a Windows batch file
- Automatically handles command prompt interaction
- Organizes and renames output files by wind speed and seed
- Reduces the need for manual supervision during long DLC runs
- Running many wind seeds for a single DLC
- Automating repetitive OpenFAST input updates
- Overnight or long-duration simulation campaigns
- Academic and research-based DLC studies
- Windows operating system
- Python 3.x
- OpenFAST installed and accessible via batch file
Install required packages: pyautogui
pip install pyautogui-
pyautogui
-
os, shutil, subprocess (standard library)
-
Place all wind files (.bts) in the Wind directory
-
Place HydroDyn input files in the Wave directory
-
Ensure wind file names follow a consistent naming convention (used to extract wind speed and seed)
Edit the following paths in the script:
wind_directory = "../Wind"
hydrodyn_directory = "../Wave"
main_directory = "path/to/DLC_directory"Ensure that:
-
InflowFile.dat
-
.fst file
-
start_OpenFAST_v3-41.bat
exist in the main directory.
Execute the script from a terminal or IDE (VS Code recommended):
python project.pyVS Code is recommended for better scrollback and monitoring of long runs.
Simulation outputs are automatically:
-
Moved to the
Outputs/<DLC>directory corresponding to the DLC being run -
Renamed using the format that is needed
Example:
OPT-MP-V{WindSpeed}_S{Seed}.out
OPT-MP-V{WindSpeed}_S{Seed}.outbThis structure simplifies post-processing and traceability.
📂 OpenFast-DLC-Runner ├── 📁 DLC12 # Main Directory │ └── 📂 Outputs # Outputs are generated here │ └── 📂 DLC12 # Organized simulation results │ └── OpenFast-DLC-Runner.py # Main script for automation │ └── start_OpenFAST_v3-41.bat │ └── openfast related files and directories ├── 📁 Wind # Contains .bts wind files ├── 📁 Wave # Contains HydroDyn input files
⚠️ Note: The exact file names and folder arrangement may vary depending on your project setup.
Ensure that `OpenFast-DLC-Runner.py`, OpenFAST input files, and the batch file are located in the same DLC folder when running the script.-
Designed for a specific turbine and directory structure
-
File names and paths are project-specific
-
Uses Windows batch execution and pyautogui
-
Runs simulations sequentially (not parallel)
-
Requires manual adaptation for other turbines or DLCs
This tool is part of a broader OpenFAST automation workflow:
-
OpenFAST-DLC-Runner Automates generation and execution of individual DLC cases https://github.com/Araz-m/OpenFAST-DLC-Runner
-
OpenFAST-Output-Monitor Real-time and post-processing visualization of OpenFAST outputs https://github.com/Araz-m/OpenFAST-Output-Monitor
A detailed PDF manual (Download the PDF manual ) is included for step-by-step instructions, particularly useful for users who are new to OpenFAST or Python scripting.
This project is licensed under the MIT License. See the LICENSE file for details.
Developed by Araz Hamayeli Mehrabani
Flensburg University of Applied Sciences