TurbineInterface Class Reference
Kynema API
A flexible multibody structural dynamics code for wind turbines
|
Interface for blade simulation that manages state, solver, and components. More...
#include <turbine_interface.hpp>
Public Types | |
using | DeviceType = Kokkos::Device< Kokkos::DefaultExecutionSpace, Kokkos::DefaultExecutionSpace::memory_space > |
Public Member Functions | |
TurbineInterface (const components::SolutionInput &solution_input, const components::TurbineInput &turbine_input, const components::AerodynamicsInput &aerodynamics_input={}, const components::ControllerInput &controller_input={}) | |
Constructs a TurbineInterface from solution and blade inputs. | |
components::Turbine & | Turbine () |
Returns a reference to the turbine model. | |
void | UpdateAerodynamicLoads (double fluid_density, const std::function< std::array< double, 3 >(const std::array< double, 3 > &)> &inflow_function) |
Updates the aerodynamic loads to be applied to the sturcture based on a provided function. | |
bool | Step () |
Steps forward in time. | |
void | SaveState () |
Saves the current state for potential restoration (in correction step) | |
void | RestoreState () |
Restores the previously saved state (in correction step) | |
Model & | GetModel () |
Return a reference of the model owned by this interface. | |
HostState< DeviceType > & | GetHostState () |
Return a reference to this interface's host state. | |
double | CalculateAzimuthAngle () const |
Calculates and normalizes azimuth angle from constraint output. | |
double | CalculateRotorSpeed () const |
Calculates rotor speed from constraint output. | |
Detailed Description
Interface for blade simulation that manages state, solver, and components.
This class represents the primary interface for simulating a WT blade, connecting the blade components with the solver and state management.
Member Typedef Documentation
◆ DeviceType
using kynema::interfaces::TurbineInterface::DeviceType = Kokkos::Device<Kokkos::DefaultExecutionSpace, Kokkos::DefaultExecutionSpace::memory_space> |
Constructor & Destructor Documentation
◆ TurbineInterface()
|
explicit |
Constructs a TurbineInterface from solution and blade inputs.
- Parameters
-
solution_input Configuration parameters for solver and solution turbine_input Configuration parameters for the turbine geometry aerodynamics_input Configuration parameters for the aerodynamic loads controller_input Configuration parameters for the controller
Member Function Documentation
◆ CalculateAzimuthAngle()
double kynema::interfaces::TurbineInterface::CalculateAzimuthAngle | ( | ) | const |
Calculates and normalizes azimuth angle from constraint output.
- Returns
- Azimuth angle in radians, normalized to [0, 2π)
◆ CalculateRotorSpeed()
double kynema::interfaces::TurbineInterface::CalculateRotorSpeed | ( | ) | const |
Calculates rotor speed from constraint output.
- Returns
- Rotor speed in rad/s
◆ GetHostState()
|
inline |
Return a reference to this interface's host state.
◆ GetModel()
|
inline |
Return a reference of the model owned by this interface.
◆ RestoreState()
void kynema::interfaces::TurbineInterface::RestoreState | ( | ) |
Restores the previously saved state (in correction step)
◆ SaveState()
void kynema::interfaces::TurbineInterface::SaveState | ( | ) |
Saves the current state for potential restoration (in correction step)
◆ Step()
bool kynema::interfaces::TurbineInterface::Step | ( | ) |
Steps forward in time.
- Returns
- true if solver converged, false otherwise
- Note
- This function updates the host state with current node loads, solves the dynamic system, and updates the node motion with the new state. If the solver does not converge, the motion is not updated.
◆ Turbine()
components::Turbine & kynema::interfaces::TurbineInterface::Turbine | ( | ) |
Returns a reference to the turbine model.
◆ UpdateAerodynamicLoads()
void kynema::interfaces::TurbineInterface::UpdateAerodynamicLoads | ( | double | fluid_density, |
const std::function< std::array< double, 3 >(const std::array< double, 3 > &)> & | inflow_function | ||
) |
Updates the aerodynamic loads to be applied to the sturcture based on a provided function.
- Parameters
-
fluid_density The density of the air (assumed constant) inflow_function A function that takes in a position and returns the velocity
The documentation for this class was generated from the following files:
- /home/runner/work/kynema/kynema/kynema/src/interfaces/turbine/turbine_interface.hpp
- /home/runner/work/kynema/kynema/kynema/src/interfaces/turbine/turbine_interface.cpp
Generated by