/home/runner/work/kynema/kynema/kynema/src/interfaces/components/inflow.hpp Source File

Kynema API: /home/runner/work/kynema/kynema/kynema/src/interfaces/components/inflow.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
inflow.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <cstdint>
5#include <vector>
6
8
17
23 [[nodiscard]] std::array<double, 3> Velocity(const std::array<double, 3>& position) const;
24};
25
30 std::vector<double> time;
31 std::vector<UniformFlowParameters> data;
32
39 [[nodiscard]] std::array<double, 3> Velocity(double t, const std::array<double, 3>& position)
40 const;
41};
42
46enum class InflowType : std::uint8_t {
47 Uniform = 0,
48};
49
53struct Inflow {
56
58 Inflow(InflowType type_, UniformFlow uniform_flow_)
59 : type(type_), uniform_flow(std::move(uniform_flow_)) {}
60
68 static Inflow SteadyWind(double vh, double z_ref, double alpha, double angle_h);
69
76 [[nodiscard]] std::array<double, 3> Velocity(double t, const std::array<double, 3>& position)
77 const;
78};
79
80} // namespace kynema::interfaces::components
Definition aerodynamics.cpp:3
InflowType
Type of inflow model.
Definition inflow.hpp:46
Wind inflow model for turbine simulations.
Definition inflow.hpp:53
InflowType type
Type of inflow model.
Definition inflow.hpp:54
std::array< double, 3 > Velocity(double t, const std::array< double, 3 > &position) const
Calculates velocity vector at a given time and position.
Definition inflow.cpp:43
Inflow(InflowType type_, UniformFlow uniform_flow_)
Constructor with type and uniform flow parameters.
Definition inflow.hpp:58
static Inflow SteadyWind(double vh, double z_ref, double alpha, double angle_h)
Creates a steady wind inflow.
Definition inflow.cpp:31
UniformFlow uniform_flow
Uniform flow parameters.
Definition inflow.hpp:55
Parameters defining uniform flow characteristics.
Definition inflow.hpp:12
std::array< double, 3 > Velocity(const std::array< double, 3 > &position) const
Calculates velocity vector at a given position.
Definition inflow.cpp:8
double height_reference
Reference height (m)
Definition inflow.hpp:14
double flow_angle_horizontal
Flow angle relative to x axis (radians)
Definition inflow.hpp:16
double shear_vertical
Vertical shear exponent.
Definition inflow.hpp:15
double velocity_horizontal
Horizontal inflow velocity (m/s)
Definition inflow.hpp:13
Uniform flow with time-dependent parameters.
Definition inflow.hpp:29
std::vector< UniformFlowParameters > data
Definition inflow.hpp:31
std::array< double, 3 > Velocity(double t, const std::array< double, 3 > &position) const
Calculates velocity vector at a given time and position.
Definition inflow.cpp:19
std::vector< double > time
Time vector for uniform flow parameters.
Definition inflow.hpp:30