Installation — Windows¶
Prerequisites¶
| Dependency | Required | Notes |
|---|---|---|
| Visual Studio 2019+ | Yes | Install with the "Desktop development with C++" workload |
| C++17 compiler (MSVC ≥ 19) | Yes | Included with Visual Studio |
| CMake ≥ 3.14 | Yes | Included with Visual Studio or install separately |
| Armadillo | Yes | Linear algebra (header-only mode) |
| HDF5 with C++ bindings | Yes | I/O for hydrodynamic databases |
| BLAS / LAPACK | Yes | OpenBLAS or Intel MKL |
| SuperLU | Recommended | Sparse solvers for dynamic mooring lines |
| stl_reader | Optional | STL mesh import for body meshes |
| OpenFAST + FASTurbine wrapper | Optional | Wind turbine coupling |
Using vcpkg (Recommended)¶
1. Install vcpkg¶
2. Install dependencies¶
3. Configure the project¶
Copy the configuration template and set the vcpkg toolchain path:
Edit CMakeUserConfig.cmake and set at minimum:
See the template file for all available options (Armadillo paths, BLAS/LAPACK, SuperLU, OpenFAST, stl_reader, etc.).
4. Build¶
From a Developer Command Prompt for VS (or any shell with CMake and MSVC on PATH):
This configures CMake, compiles in Release mode, and copies the executable plus all required DLLs to bin/.
Alternatively, configure and build manually:
MinGW vs MSVC
If you have both MinGW and Visual Studio installed, CMake may pick MinGW by default. Force Visual Studio with:
Replace17 2022 with your version (16 2019, etc.). List available generators with cmake --help.
Build Options¶
These CMake options can be set in CMakeUserConfig.cmake or passed on the command line (-D...):
| Option | Default | Description |
|---|---|---|
OASIS_USE_OPENFAST |
OFF |
Enable OpenFAST wind turbine coupling |
OASIS_USE_SUPERLU |
ON |
Enable SuperLU sparse solver via Armadillo |
OASIS_USE_STL_READER |
ON |
Enable STL mesh reader for BodyMesh |
OpenFAST Setup (Optional)¶
These steps are only needed if you want wind turbine coupling (OASIS_USE_OPENFAST=ON). Build in this order — each component depends on the previous one.
1. Install Intel oneAPI HPC Toolkit¶
Download and install the Intel oneAPI HPC Toolkit. This provides the Intel Fortran compiler (ifx) and MKL, both required for OpenFAST on Windows.
2. Build OpenFAST 3.0.0¶
- Download OpenFAST v3.0.0 source (zip)
- Extract (e.g. to
D:\openfast-3.0.0) - Copy the build script:
- Build from a regular command prompt:
This installs OpenFAST into
D:\openfast-3.0.0\install\.
3. Build the FASTurbine wrapper¶
Edit compile.bat inside the cloned repository and set the OpenFAST path:
Then compile:
4. Configure OASIS for OpenFAST¶
Add to CMakeUserConfig.cmake:
set(OASIS_USE_OPENFAST ON)
set(OPENFAST_INCLUDE_DIR "D:/openfast-3.0.0/install/include")
set(FASTURBINE_INCLUDE_DIR "D:/FASTurbine_wrapper/install/include")
set(FASTURBINE_LIBRARY "D:/FASTurbine_wrapper/install/lib/fasturbwrapper.lib")
set(FASTURBINE_DLL "D:/FASTurbine_wrapper/install/lib/fasturbwrapper.dll")
Rebuild OASIS with compile.bat.