RAFT: Response Amplitudes of Floating Turbines
Project description
RAFT - Response Amplitudes of Floating Turbines
RAFT is a Python code for frequency-domain analysis of floating wind turbines. It constitutes the "Level 1" of modeling fidelity in the WEIS toolset for floating wind turbine controls co-design. RAFT provides frequency-domain modeling of full floating wind turbine systems including turbine aerodynamics, controls, rigid-body platform hydrodynamics, and mooring response. The rotor aerodynamics are provided by CCBlade and the mooring system is represented by NREL's new quasi-static mooring system model, MoorPy. Potential-flow hydrodynamics can optionally be used via pyHAMS, a Python wrapper of the HAMS (Hydrodynamic Analysis of Marine Structures) tool for boundary-element-method solution of the potential flow problem developed by Yingyi Liu.
RAFT v1.0.0 includes the capabilities described above, and further development is planned to expand these capabilities. Documentation and verification efforts are ongoing. Please see RAFT's documentation for more information.
Part of the WETO Stack
RAFT is primarily developed with the support of the U.S. Department of Energy and is part of the WETO Software Stack. For more information and other integrated modeling software, see:
Best Practices for Using conda
Installation with Anaconda is the recommended approach because of the ability to create self-contained environments suitable for testing and analysis. RAFT requires Anaconda 64-bit. However, the conda command has begun to show its age and we now recommend the one-for-one replacement with the Miniforge3 distribution, which is much more lightweight and more easily solves for the RAFT package dependencies.
Using RAFT as a Library
If you would like to use RAFT as a library, without direct interaction with the source code, then you can install it directly via conda install raft (preferred) or pip install raft.
Getting Started
New users of RAFT as a standalone model are recommended to begin by looking at the input file and script provided in the examples folder, and seeking further information from the RAFT documentation. For use as part of the WEIS toolset, information will be provided once this capability is completed in the WEIS documentation. For now, the following will help get started with running RAFT as a standalone model.
RAFT uses a number of prerequisites, or other python package dependencies, to run its calculations. All of the prerequisites can be installed through the conda package manager, but power users may wish to install all of the NREL packages from source for customization and debugging. Notable dependencies are:
* CCBlade is a module of WISDEM, but can be used separately. RAFT only requires CCBlade (and some additional related functions) out of the larger WISDEM code. Power users installing from source can install either CCBlade or WISDEM, but for highest efficiency, we recommend installing CCBlade, without the entire WISDEM installation.
Note that conda is required for the following installations.
Installing All Dependencies with conda
To install all required python packages to run RAFT using conda, follow the steps below.
-
Navigate to a directory of your choosing on your local machine and clone this RAFT repository to that new directory (if you don't have the
gitcommand, start withconda install gitin your "base" environment).(base) YOUR_PATH> git clone https://github.com/WISDEM/RAFT.git (base) YOUR_PATH> cd RAFTThis will create new folder called "RAFT" that is a copy from the GitHub repository, located in your "YOUR_PATH" directory
-
Create a new python virtual environment based on the "environment.yml" file, which lists all the packages needed to run RAFT
(base) YOUR_PATH/RAFT> conda env create --name raft-env -f environment.ymlThis will create a new python virtual environment called "raft-env"
-
Activate the new virtual environment
(base) ANY_PATH> conda activate raft-envThis will activate the newly created virtual environment, in which we will install the remaining dependencies. After install is complete, when opening a new conda terminal that starts in the "base" environment, you can start with this "raft-env" activation command.
-
Install the RAFT package into the virtual environment
(raft-env) YOUR_PATH/RAFT> pip install -e .This installs RAFT and all of its modules directly from your working directory in "editable" mode, meaning, if you save a change to your source code in the files in "YOUR_PATH/RAFT", future calls to RAFT modules will include those changes.
-
Test the installation
(raft-env) YOUR_PATH/RAFT> pytestRunning pytest should ensure everything was installed correctly
Installing NREL Dependencies from Source
To install all external python packages using conda and NREL packages from source, follow the steps below. Since the NREL dependencies are also under development, this may also help resolve issues if one code gets out-of-sync with the others.
-
Navigate to a directory of your choosing on your local machine and clone this RAFT repository to that new directory (if you don't have the
gitcommand, start withconda install gitin your "base" environment.(base) YOUR_PATH> git clone https://github.com/WISDEM/RAFT.git (base) YOUR_PATH> cd RAFTThis will create new folder called "RAFT" that is a copy from the GitHub repository, located in your "YOUR_PATH" directory
-
Create a new python virtual environment based on the "environment-source.yml" file, which lists all the packages needed to run RAFT
(base) YOUR_PATH/RAFT> conda env create --name raft-env -f environment-source.ymlThis will create a new python virtual environment called "raft-env"
-
Activate the new virtual environment
(base) ANY_PATH> conda activate raft-envThis will activate the newly created virtual environment, in which we will install the remaining dependencies. After install is complete, when opening a new conda terminal that starts in the "base" environment, you can start with this "raft-env" activation command.
-
Install the necessary compilers and build tools for your system
(raft-env) YOUR_PATH/RAFT> cd .. (raft-env) YOUR_PATH> pip install meson-python meson ninja cmake (raft-env) YOUR_PATH> conda install gfortran (Mac / Linux) (raft-env) YOUR_PATH> conda install m2w64-toolchain libpython (Windows) -
Install the NREL packages from source one at a time.
(raft-env) YOUR_PATH> git clone https://github.com/WISDEM/CCBlade.git (raft-env) YOUR_PATH> git clone https://github.com/NREL/MoorPy.git (raft-env) YOUR_PATH> git clone https://github.com/WISDEM/pyHAMS.git (raft-env) YOUR_PATH> cd MoorPy (raft-env) YOUR_PATH/MoorPy> pip install -e . (raft-env) YOUR_PATH/MoorPy> cd .. (raft-env) YOUR_PATH> cd CCBlade (raft-env) YOUR_PATH/CCBlade> pip install -e . (raft-env) YOUR_PATH/CCBlade> cd .. (raft-env) YOUR_PATH> cd pyHAMS (raft-env) YOUR_PATH/pyHAMS> pip install --no-build-isolation -e . (raft-env) YOUR_PATH/pyHAMS> cd ..This installs MoorPy, CCBlade, and pyHAMS in "editable" mode, meaning, if you save a change to your source code in the files, future calls to RAFT modules will include those changes.
-
Install the RAFT package into the virtual environment
(raft-env) YOUR_PATH> cd RAFT (raft-env) YOUR_PATH/RAFT> pip install -e .This installs RAFT and all of its modules directly from your working directory in "editable" mode, meaning, if you save a change to your source code in the files in "YOUR_PATH/RAFT", future calls to RAFT modules will include those changes.
This new "raft-env" should now be compatible to run RAFT standalone.
-
Test the installation
(raft-env) YOUR_PATH/RAFT> pip install pytest (raft-env) YOUR_PATH/RAFT> cd tests (raft-env) YOUR_PATH/RAFT/tests> pytest test_fowt.py test_helpers.py test_member.py test_model.py test_rotor.pyRunning these specific test files should prove that the installation was successful. Other tests that include 'omdao' are only used for installations with WISDEM.
If you need to remove any virtual environment for any reason, you can run
conda env remove -n "name-of-the-virtual-environment"
Documentation and Issues
Please see https://weis.readthedocs.io/en/latest/ for documentation.
Questions and issues can be posted at https://github.com/WISDEM/RAFT/issues.
License
RAFT is licensed under the Apache License, Version 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openraft-2.0.3.tar.gz.
File metadata
- Download URL: openraft-2.0.3.tar.gz
- Upload date:
- Size: 250.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5e0582493a58dce0489e993217de1e4f32a587d56ccc42747be6d792448683c
|
|
| MD5 |
2c43adba4dcac1c5a0731bdb2e237042
|
|
| BLAKE2b-256 |
e8b53097d34b033c0d7ac36b9f2563f8c97b3993e631a18424f2f34dc2996a80
|
Provenance
The following attestation bundles were made for openraft-2.0.3.tar.gz:
Publisher:
Publish_RAFT.yml on WISDEM/RAFT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openraft-2.0.3.tar.gz -
Subject digest:
c5e0582493a58dce0489e993217de1e4f32a587d56ccc42747be6d792448683c - Sigstore transparency entry: 798892052
- Sigstore integration time:
-
Permalink:
WISDEM/RAFT@f2a708db1273263ad206075a35f3165cdc1955f0 -
Branch / Tag:
refs/tags/v2.0.3 - Owner: https://github.com/WISDEM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
Publish_RAFT.yml@f2a708db1273263ad206075a35f3165cdc1955f0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file openraft-2.0.3-py3-none-any.whl.
File metadata
- Download URL: openraft-2.0.3-py3-none-any.whl
- Upload date:
- Size: 192.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25bc5850ef9963ef6598fe46688ca0c8b04c092583340ee5b8b68be33e18eeb8
|
|
| MD5 |
591c3900c28afafc519f1441d44cd163
|
|
| BLAKE2b-256 |
ed1807d8b2432edf3d9c70aef85c6a91c4bb0ea4e0b5bd269be1d69c5d4d8ac7
|
Provenance
The following attestation bundles were made for openraft-2.0.3-py3-none-any.whl:
Publisher:
Publish_RAFT.yml on WISDEM/RAFT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openraft-2.0.3-py3-none-any.whl -
Subject digest:
25bc5850ef9963ef6598fe46688ca0c8b04c092583340ee5b8b68be33e18eeb8 - Sigstore transparency entry: 798892053
- Sigstore integration time:
-
Permalink:
WISDEM/RAFT@f2a708db1273263ad206075a35f3165cdc1955f0 -
Branch / Tag:
refs/tags/v2.0.3 - Owner: https://github.com/WISDEM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
Publish_RAFT.yml@f2a708db1273263ad206075a35f3165cdc1955f0 -
Trigger Event:
release
-
Statement type: