AeroDynInflowLibrary Class Reference
Kynema API
A flexible multibody structural dynamics code for wind turbines
|
Wrapper class for the AeroDynInflow (ADI) shared library. More...
#include <aerodyn_inflow.hpp>
Public Member Functions | |
AeroDynInflowLibrary (const std::string &shared_lib_path="aerodyn_inflow_c_binding.dll", ErrorHandling eh=ErrorHandling{}, FluidProperties fp=FluidProperties{}, EnvironmentalConditions ec=EnvironmentalConditions{}, SimulationControls sc=SimulationControls{}, VTKSettings vtk=VTKSettings{}) | |
Construct a new AeroDynInflowLibrary object. | |
const ErrorHandling & | GetErrorHandling () const |
Getter methods for the private member variables. | |
const EnvironmentalConditions & | GetEnvironmentalConditions () const |
const FluidProperties & | GetFluidProperties () const |
const SimulationControls & | GetSimulationControls () const |
const VTKSettings & | GetVTKSettings () const |
void | Initialize (std::span< const TurbineConfig > turbine_configs) |
Initialize the AeroDyn Inflow library. | |
void | PreInitialize (size_t n_turbines) |
Performs pre-initialization setup. | |
void | SetupRotors (std::span< const TurbineConfig > turbine_configs) |
Sets up rotor configurations for all turbines. | |
void | FinalizeInitialization () |
Finalizes the initialization process. | |
void | SetRotorMotion () |
Set up the rotor motion for the current simulation step. | |
void | CalculateOutput (double time) |
Calculates the output channels at a given time. | |
void | UpdateStates (double current_time, double next_time) |
Updates the states of the AeroDyn Inflow library. | |
void | Finalize () |
Ends the simulation and frees memory. | |
Public Attributes | |
std::vector< TurbineData > | turbines |
std::vector< std::string > | channel_names |
std::vector< std::string > | channel_units |
std::vector< float > | channel_values |
Detailed Description
Wrapper class for the AeroDynInflow (ADI) shared library.
This class provides a C++ interface for interacting with the AeroDynInflow (ADI) shared library, which offers C bindings for the AeroDyn x InflowWind modules of OpenFAST. It encapsulates key functions for AeroDyn/InflowWind simulation, including initialization, rotor setup, state updates, and load calculations.
Key functions:
- Initialize: Set up the simulation environment
- SetupRotorMotion: Update rotor motion for each timestep
- UpdateStates: Advance internal states
- CalculateOutputChannels: Compute output values
- GetRotorAerodynamicLoads: Retrieve aerodynamic forces and moments
- Finalize: Clean up and release resources
- Note
- This class manages the lifecycle of the ADI library, ensuring proper initialization and cleanup.
Constructor & Destructor Documentation
◆ AeroDynInflowLibrary()
|
inline |
Construct a new AeroDynInflowLibrary object.
- Parameters
-
shared_lib_path Path to the ADI shared library eh Error handling settings fp Fluid properties ec Environmental conditions sc Simulation control settings vtk VTK output settings
Member Function Documentation
◆ CalculateOutput()
|
inline |
Calculates the output channels at a given time.
This function calculates the output channels at a given time by passing the time and the output channel values to the Fortran routine. It also populates the turbine loads.
- Parameters
-
time Time at which to calculate the output channels
◆ Finalize()
|
inline |
Ends the simulation and frees memory.
This function ends the simulation and frees memory by passing the error status and error message buffer to the Fortran routine.
◆ FinalizeInitialization()
|
inline |
Finalizes the initialization process.
◆ GetEnvironmentalConditions()
|
inline |
◆ GetErrorHandling()
|
inline |
Getter methods for the private member variables.
◆ GetFluidProperties()
|
inline |
◆ GetSimulationControls()
|
inline |
◆ GetVTKSettings()
|
inline |
◆ Initialize()
|
inline |
Initialize the AeroDyn Inflow library.
Performs a complete initialization of the AeroDyn Inflow library through a three-step process:
- Pre-initialization (ADI_C_PreInit)
- Rotor setup (ADI_C_SetupRotor)
- Final initialization (ADI_C_Init)
- Parameters
-
turbine_configs Vector of TurbineConfig objects, each representing a single turbine
◆ PreInitialize()
|
inline |
Performs pre-initialization setup.
- Parameters
-
n_turbines Number of turbines in the simulation
◆ SetRotorMotion()
|
inline |
Set up the rotor motion for the current simulation step.
Sets up the motion data (position, orientation, velocity, acceleration) for the hub, nacelle, blade roots, and blade nodes of each turbine.
◆ SetupRotors()
|
inline |
Sets up rotor configurations for all turbines.
- Parameters
-
turbine_configs Vector of turbine configurations
◆ UpdateStates()
|
inline |
Updates the states of the AeroDyn Inflow library.
This function updates the states of the AeroDyn Inflow library by passing the current time and the next time to the Fortran routine.
- Parameters
-
current_time Current time next_time Next time
Member Data Documentation
◆ channel_names
std::vector<std::string> kynema::util::AeroDynInflowLibrary::channel_names |
◆ channel_units
std::vector<std::string> kynema::util::AeroDynInflowLibrary::channel_units |
◆ channel_values
std::vector<float> kynema::util::AeroDynInflowLibrary::channel_values |
◆ turbines
std::vector<TurbineData> kynema::util::AeroDynInflowLibrary::turbines |
The documentation for this class was generated from the following file:
- /home/runner/work/kynema/kynema/kynema/src/utilities/aerodynamics/aerodyn_inflow.hpp
Generated by