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={}, const components::OutputsConfig &outputs_config={}) | |
| Constructs a TurbineInterface from solution and blade inputs. | |
| TurbineInterface (TurbineInterface &other)=delete | |
| TurbineInterface (TurbineInterface &&other)=delete | |
| TurbineInterface & | operator= (const TurbineInterface &)=delete |
| TurbineInterface & | operator= (TurbineInterface &&)=delete |
| ~TurbineInterface ()=default | |
| components::Turbine & | Turbine () |
| Returns a reference to the turbine model. | |
| components::Aerodynamics & | Aerodynamics () |
| Returns a reference to the aerodynamics 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 structure based on a provided function. | |
| std::array< double, 3 > | GetHubNodePosition () const |
| void | SetHubInflow (const std::array< double, 3 > &inflow) |
| void | ApplyController (double t) |
| Update controller inputs from current system state. | |
| 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. | |
| void | WriteOutput () |
| void | OpenOutputFile () |
| void | CloseOutputFile () |
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() [1/3]
|
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 outputs_config Configuration parameters for the outputs
◆ TurbineInterface() [2/3]
|
delete |
◆ TurbineInterface() [3/3]
|
delete |
◆ ~TurbineInterface()
|
default |
Member Function Documentation
◆ Aerodynamics()
|
inline |
Returns a reference to the aerodynamics model.
◆ ApplyController()
| void kynema::interfaces::TurbineInterface::ApplyController | ( | double | t | ) |
Update controller inputs from current system state.
◆ 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
◆ CloseOutputFile()
| void kynema::interfaces::TurbineInterface::CloseOutputFile | ( | ) |
◆ GetHostState()
|
inline |
Return a reference to this interface's host state.
◆ GetHubNodePosition()
| std::array< double, 3 > kynema::interfaces::TurbineInterface::GetHubNodePosition | ( | ) | const |
◆ GetModel()
|
inline |
Return a reference of the model owned by this interface.
◆ OpenOutputFile()
| void kynema::interfaces::TurbineInterface::OpenOutputFile | ( | ) |
◆ operator=() [1/2]
|
delete |
◆ operator=() [2/2]
|
delete |
◆ 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)
◆ SetHubInflow()
| void kynema::interfaces::TurbineInterface::SetHubInflow | ( | const std::array< double, 3 > & | inflow | ) |
◆ 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()
|
inline |
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 structure 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
◆ WriteOutput()
| void kynema::interfaces::TurbineInterface::WriteOutput | ( | ) |
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