/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
13 double time;
18
24 [[nodiscard]] std::array<double, 3> Velocity(const std::array<double, 3>& position) const;
25};
26
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
77 static Inflow UniformWind(double vh, double z_ref, double alpha, double angle_h);
78
85 [[nodiscard]] std::array<double, 3> Velocity(double t, const std::array<double, 3>& position)
86 const;
87};
88
89} // namespace kynema::interfaces::components
Definition aerodynamics.cpp:5
InflowType
Type of inflow model.
Definition inflow.hpp:46
Wind inflow model for turbine simulations.
Definition inflow.hpp:53
static Inflow UniformWind(double vh, double z_ref, double alpha, double angle_h)
Creates a uniform wind inflow.
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:76
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:64
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:9
double height_reference
Reference height (m)
Definition inflow.hpp:15
double flow_angle_horizontal
Flow angle relative to x axis (radians)
Definition inflow.hpp:17
double shear_vertical
Vertical shear exponent.
Definition inflow.hpp:16
double velocity_horizontal
Horizontal inflow velocity (m/s)
Definition inflow.hpp:14
double time
Time (s)
Definition inflow.hpp:13
Uniform flow with time-dependent parameters.
Definition inflow.hpp:30
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:20