ErrorHandling Struct Reference

Kynema API: kynema::util::ErrorHandling Struct Reference
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches

Struct for error handling settings. More...

#include <aerodyn_inflow.hpp>

Public Types

enum class  ErrorLevel : uint8_t {
  kNone = 0 , kInfo = 1 , kWarning = 2 , kSevereError = 3 ,
  kFatalError = 4
}
 Error levels used in InflowWind. More...
 

Public Member Functions

void CheckError () const
 Checks for errors and throws an exception if found.
 

Public Attributes

int abort_error_level
 
int error_status {0}
 
std::array< char, kErrorMessagesLengtherror_message {}
 

Static Public Attributes

static constexpr size_t kErrorMessagesLength {1025U}
 

Detailed Description

Struct for error handling settings.

AeroDynInflowLibrary: C++ wrapper for the AeroDyn/InflowWind (ADI) shared library

Provides a modern C++ interface to AeroDyn x InflowWind functionality, encapsulating the C-bindings of the Fortran library.

Key Features:

  • AeroDyn: Blade element momentum (BEM) theory for aerodynamic force calculations (dynamic stall, unsteady aerodynamics, tower shadow, wind shear, tip/hub losses)
  • InflowWind: Simulates complex inflow conditions (turbulence, wind shear, gusts)

Usage:

  1. Instantiate AeroDynInflowLibrary with shared library path
  2. Initialize: PreInitialize() -> SetupRotor() -> Initialize()
  3. Simulate: SetupRotorMotion() -> UpdateStates() -> CalculateOutputChannels() -> GetRotorAerodynamicLoads()
  4. Finalize() and handle errors

See unit tests for detailed usage examples.

References:

Member Enumeration Documentation

◆ ErrorLevel

enum class kynema::util::ErrorHandling::ErrorLevel : uint8_t
strong

Error levels used in InflowWind.

Enumerator
kNone 
kInfo 
kWarning 
kSevereError 
kFatalError 

Member Function Documentation

◆ CheckError()

void kynema::util::ErrorHandling::CheckError ( ) const
inline

Checks for errors and throws an exception if found.

Member Data Documentation

◆ abort_error_level

int kynema::util::ErrorHandling::abort_error_level
Initial value:

◆ error_message

std::array<char, kErrorMessagesLength> kynema::util::ErrorHandling::error_message {}

◆ error_status

int kynema::util::ErrorHandling::error_status {0}

◆ kErrorMessagesLength

constexpr size_t kynema::util::ErrorHandling::kErrorMessagesLength {1025U}
staticconstexpr

The documentation for this struct was generated from the following file: