/home/runner/work/kynema/kynema/kynema/src/utilities/aerodynamics/aerodyn_inflow.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
|
Loading...
Searching...
No Matches
aerodyn_inflow.hpp
Go to the documentation of this file.
Wrapper class for the AeroDynInflow (ADI) shared library.
Definition aerodyn_inflow.hpp:662
void Finalize()
Ends the simulation and frees memory.
Definition aerodyn_inflow.hpp:1004
const VTKSettings & GetVTKSettings() const
Definition aerodyn_inflow.hpp:694
void CalculateOutput(double time)
Calculates the output channels at a given time.
Definition aerodyn_inflow.hpp:940
std::vector< std::string > channel_names
Definition aerodyn_inflow.hpp:1017
void Initialize(std::span< const TurbineConfig > turbine_configs)
Initialize the AeroDyn Inflow library.
Definition aerodyn_inflow.hpp:707
void FinalizeInitialization()
Finalizes the initialization process.
Definition aerodyn_inflow.hpp:799
void SetupRotors(std::span< const TurbineConfig > turbine_configs)
Sets up rotor configurations for all turbines.
Definition aerodyn_inflow.hpp:746
const FluidProperties & GetFluidProperties() const
Definition aerodyn_inflow.hpp:692
void SetRotorMotion()
Set up the rotor motion for the current simulation step.
Definition aerodyn_inflow.hpp:891
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.
Definition aerodyn_inflow.hpp:674
const SimulationControls & GetSimulationControls() const
Definition aerodyn_inflow.hpp:693
std::vector< std::string > channel_units
Definition aerodyn_inflow.hpp:1018
std::vector< float > channel_values
Definition aerodyn_inflow.hpp:1019
const ErrorHandling & GetErrorHandling() const
Getter methods for the private member variables.
Definition aerodyn_inflow.hpp:688
const EnvironmentalConditions & GetEnvironmentalConditions() const
Definition aerodyn_inflow.hpp:689
void UpdateStates(double current_time, double next_time)
Updates the states of the AeroDyn Inflow library.
Definition aerodyn_inflow.hpp:984
std::vector< TurbineData > turbines
Definition aerodyn_inflow.hpp:1016
void PreInitialize(size_t n_turbines)
Performs pre-initialization setup.
Definition aerodyn_inflow.hpp:719
Definition dylib.hpp:62
T * get_function(const char *symbol_name) const
Definition dylib.hpp:246
C++ cross-platform wrapper around dynamic loading of shared libraries.
KOKKOS_INLINE_FUNCTION void QuaternionCompose(const Quaternion1 &q1, const Quaternion2 &q2, QuaternionN &qn)
Composes (i.e. multiplies) two quaternions and stores the result in a third quaternion.
Definition quaternion_operations.hpp:204
KOKKOS_INLINE_FUNCTION void RotationVectorToQuaternion(const Vector &phi, const Quaternion &quaternion)
Returns a 4-D quaternion from provided 3-D rotation vector, i.e. the exponential map.
Definition quaternion_operations.hpp:231
KOKKOS_INLINE_FUNCTION void QuaternionToRotationMatrix(const Quaternion &q, const RotationMatrix &R)
Converts a 4x1 quaternion to a 3x3 rotation matrix and returns the result.
Definition quaternion_operations.hpp:20
Definition aerodyn_inflow.hpp:15
void SetPositionAndOrientation(std::span< const double, 7 > data, std::span< float, 3 > position, std::array< std::array< double, 3 >, 3 > &orientation)
Converts a 7-element array of position and quaternion to separate position and orientation arrays.
Definition aerodyn_inflow.hpp:165
Struct to hold the environmental conditions.
Definition aerodyn_inflow.hpp:85
float atm_pressure
Definition aerodyn_inflow.hpp:87
void CheckError() const
Checks for errors and throws an exception if found.
Definition aerodyn_inflow.hpp:69
std::array< char, kErrorMessagesLength > error_message
Definition aerodyn_inflow.hpp:66
ErrorLevel
Error levels used in InflowWind.
Definition aerodyn_inflow.hpp:53
@ kFatalError
@ kSevereError
static constexpr size_t kErrorMessagesLength
Definition aerodyn_inflow.hpp:61
Struct to hold the properties of the working fluid (air)
Definition aerodyn_inflow.hpp:77
float kinematic_viscosity
Definition aerodyn_inflow.hpp:79
Struct to hold the motion + loads data of any structural mesh component in AeroDyn/InflowWind compati...
Definition aerodyn_inflow.hpp:186
MeshData(size_t n_nodes)
Constructor to initialize all mesh data to zero based on provided number of nodes.
Definition aerodyn_inflow.hpp:197
std::vector< std::array< float, 6 > > velocity
Definition aerodyn_inflow.hpp:191
std::vector< std::array< std::array< double, 3 >, 3 > > orientation
Definition aerodyn_inflow.hpp:190
size_t NumberOfMeshPoints() const
Returns the number of mesh points as size_t.
Definition aerodyn_inflow.hpp:254
MeshData(size_t n_mesh_pts, std::span< const std::array< double, 7 > > pos, std::span< const std::array< float, 6 > > vel, std::span< const std::array< float, 6 > > acc, std::span< const std::array< float, 6 > > ld)
Constructor to initialize all mesh data based on provided inputs.
Definition aerodyn_inflow.hpp:209
std::vector< std::array< float, 6 > > load
Definition aerodyn_inflow.hpp:194
std::vector< std::array< float, 3 > > position
Definition aerodyn_inflow.hpp:188
void SetValues(size_t point_number, std::span< const double, 7 > pos, std::span< const double, 6 > vel, std::span< const double, 6 > acc)
Definition aerodyn_inflow.hpp:257
std::vector< std::array< float, 6 > > acceleration
Definition aerodyn_inflow.hpp:193
Struct to hold the settings for simulation controls.
Definition aerodyn_inflow.hpp:567
std::string aerodyn_input
Definition aerodyn_inflow.hpp:588
std::string inflowwind_input
Definition aerodyn_inflow.hpp:589
int interpolation_order
Definition aerodyn_inflow.hpp:592
double total_elapsed_time
Definition aerodyn_inflow.hpp:597
std::string output_root_name
Definition aerodyn_inflow.hpp:607
bool point_load_output
Definition aerodyn_inflow.hpp:602
static constexpr size_t kDefaultStringLength
Definition aerodyn_inflow.hpp:585
OutputFormat
Write output format.
Definition aerodyn_inflow.hpp:578
DebugLevel debug_level
Definition aerodyn_inflow.hpp:603
double output_time_step
Definition aerodyn_inflow.hpp:608
DebugLevel
Debug levels used in AeroDyn-Inflow C bindings.
Definition aerodyn_inflow.hpp:569
OutputFormat output_format
Definition aerodyn_inflow.hpp:606
Initial state for a single blade of a turbine.
Definition aerodyn_inflow.hpp:106
std::vector< std::array< double, 7 > > node_initial_positions
Definition aerodyn_inflow.hpp:110
std::array< double, 7 > root_initial_position
Definition aerodyn_inflow.hpp:107
BladeInitialState(std::span< double, 7 > root, std::span< const std::array< double, 7 > > nodes)
Definition aerodyn_inflow.hpp:112
Configuration for the initial state of a turbine.
Definition aerodyn_inflow.hpp:99
std::array< double, 7 > nacelle_initial_position
Definition aerodyn_inflow.hpp:121
TurbineConfig(bool is_hawt, std::span< const float, 3 > ref_pos, std::span< const double, 7 > hub_pos, std::span< const double, 7 > nacelle_pos, std::span< const BladeInitialState > blade_states)
Definition aerodyn_inflow.hpp:125
std::array< float, 3 > reference_position
Definition aerodyn_inflow.hpp:119
std::array< double, 7 > hub_initial_position
Definition aerodyn_inflow.hpp:120
bool is_horizontal_axis
Definition aerodyn_inflow.hpp:118
std::vector< BladeInitialState > blade_initial_states
Definition aerodyn_inflow.hpp:123
size_t NumberOfBlades() const
Returns the number of blades in the turbine.
Definition aerodyn_inflow.hpp:155
Struct to hold and manage turbine-specific data.
Definition aerodyn_inflow.hpp:279
void SetBladeNodeMotion(size_t blade_number, size_t node_number, const std::array< double, 7 > &position, const std::array< double, 6 > &velocity, const std::array< double, 6 > &acceleration)
Sets the blade node values based on blade number and node number.
Definition aerodyn_inflow.hpp:386
void SetNacelleMotion(const std::array< double, 7 > &position, const std::array< double, 6 > &velocity, const std::array< double, 6 > &acceleration)
Sets the nacelle motion values.
Definition aerodyn_inflow.hpp:476
std::array< double, 6 > GetBladeNodeLoad(size_t blade_number, size_t node_number) const
Gets the blade node loads based on blade number and node number.
Definition aerodyn_inflow.hpp:492
void SetBladeRootMotion(size_t blade_number, const std::array< double, 7 > &position, const std::array< double, 6 > &velocity, const std::array< double, 6 > &acceleration)
Sets the blade root values based on blade number.
Definition aerodyn_inflow.hpp:425
std::vector< int32_t > blade_nodes_to_blade_num_mapping
Mapping of blade nodes to blade numbers (1D array)
Definition aerodyn_inflow.hpp:294
TurbineData(const TurbineConfig &tc)
Constructor for TurbineData based on a TurbineConfig object.
Definition aerodyn_inflow.hpp:314
std::vector< std::vector< size_t > > node_indices_by_blade
Unique indices of nodes for each blade (2D array)
Definition aerodyn_inflow.hpp:304
size_t NumberOfBlades() const
Returns the number of blades as size_t.
Definition aerodyn_inflow.hpp:370
void SetHubMotion(const std::array< double, 7 > &position, const std::array< double, 6 > &velocity, const std::array< double, 6 > &acceleration)
Sets the hub motion values.
Definition aerodyn_inflow.hpp:459
Struct to hold the settings for VTK output.
Definition aerodyn_inflow.hpp:618
std::string output_dir_name
Definition aerodyn_inflow.hpp:633
std::array< float, 6 > vtk_nacelle_dimensions
Definition aerodyn_inflow.hpp:637
@ kAnimation
@ kSurface_Line
Generated by