/home/runner/work/amr-wind/amr-wind/amr-wind/wind_energy/ABLWallFunction.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/wind_energy/ABLWallFunction.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
ABLWallFunction.H
Go to the documentation of this file.
1#ifndef ABLWALLFUNCTION_H
2#define ABLWALLFUNCTION_H
3
4#include "amr-wind/CFDSim.H"
9
10namespace amr_wind {
11
20{
21public:
22 explicit ABLWallFunction(const CFDSim& sim);
23
24 ~ABLWallFunction() = default;
25
26 MOData& mo() { return m_mo; }
27 const MOData& mo() const { return m_mo; }
28
31 amrex::Real utau() const { return m_mo.utau; }
32
35
37 void update_umean(
38 const VelPlaneAveragingFine& vpa, const FieldPlaneAveragingFine& tpa);
39
40 void update_tflux(const amrex::Real tflux);
41
42private:
43 const CFDSim& m_sim;
44
45 const amrex::AmrCore& m_mesh;
46
49
50 int m_direction{2};
51 bool m_use_fch{true};
52
53 amrex::Vector<amrex::Real> m_gravity{0.0, 0.0, -9.81};
54
55 bool m_tempflux{true};
56 amrex::Real m_surf_temp_rate{0.0};
57 amrex::Real m_surf_temp_rate_tstart{0.0};
58 amrex::Real m_surf_temp_init{300.0};
59
60 bool m_inflow_outflow{false};
61 amrex::Real m_wf_vmag{0.0};
62 amrex::Array<amrex::Real, 2> m_wf_vel{0.0, 0.0};
63 amrex::Real m_wf_theta{300.0};
64};
65
72{
73public:
74 ABLVelWallFunc(Field& velocity, const ABLWallFunction& wall_func);
75
76 void operator()(Field& velocity, const FieldState rho_state) override;
77
78 template <typename ShearStress>
79 void wall_model(
80 Field& velocity, const FieldState rho_state, const ShearStress& tau);
81
82private:
84 std::string m_wall_shear_stress_type{"moeng"};
85};
86
88{
89public:
90 ABLTempWallFunc(Field& temperature, const ABLWallFunction& wall_fuc);
91
92 void operator()(Field& temperature, const FieldState rho_state) override;
93
94 template <typename HeatFlux>
95 void wall_model(
96 Field& temperature, const FieldState rho_state, const HeatFlux& tau);
97
98private:
100 std::string m_wall_shear_stress_type{"moeng"};
101};
102
103} // namespace amr_wind
104
105#endif /* ABLWALLFUNCTION_H */
Definition ABLWallFunction.H:88
ABLTempWallFunc(Field &temperature, const ABLWallFunction &wall_fuc)
Definition ABLWallFunction.cpp:269
const ABLWallFunction & m_wall_func
Definition ABLWallFunction.H:99
std::string m_wall_shear_stress_type
Definition ABLWallFunction.H:100
void operator()(Field &temperature, const FieldState rho_state) override
Definition ABLWallFunction.cpp:354
Definition ABLWallFunction.H:72
std::string m_wall_shear_stress_type
Definition ABLWallFunction.H:84
ABLVelWallFunc(Field &velocity, const ABLWallFunction &wall_func)
Definition ABLWallFunction.cpp:142
const ABLWallFunction & m_wall_func
Definition ABLWallFunction.H:83
void operator()(Field &velocity, const FieldState rho_state) override
Definition ABLWallFunction.cpp:238
Definition ABLWallFunction.H:20
amrex::Array< amrex::Real, 2 > m_wf_vel
Definition ABLWallFunction.H:62
amrex::Real m_wf_vmag
Definition ABLWallFunction.H:61
MOData & mo()
Definition ABLWallFunction.H:26
bool m_tempflux
Definition ABLWallFunction.H:55
amrex::Real m_surf_temp_rate_tstart
Definition ABLWallFunction.H:57
ABLWallFunction(const CFDSim &sim)
Definition ABLWallFunction.cpp:16
amrex::Real m_surf_temp_rate
Definition ABLWallFunction.H:56
int m_direction
Direction normal to wall.
Definition ABLWallFunction.H:50
const CFDSim & m_sim
Definition ABLWallFunction.H:43
const amrex::AmrCore & m_mesh
Definition ABLWallFunction.H:45
bool m_inflow_outflow
Definition ABLWallFunction.H:60
amrex::Real utau() const
Definition ABLWallFunction.H:31
amrex::Vector< amrex::Real > m_gravity
Definition ABLWallFunction.H:53
bool m_use_fch
Use first cell height?
Definition ABLWallFunction.H:51
amrex::Real m_surf_temp_init
Definition ABLWallFunction.H:58
void update_umean(const VelPlaneAveragingFine &vpa, const FieldPlaneAveragingFine &tpa)
Update the mean velocity at a given timestep.
Definition ABLWallFunction.cpp:104
MOData m_mo
Monin-Obukhov instance.
Definition ABLWallFunction.H:48
const MOData & mo() const
Definition ABLWallFunction.H:27
void init_log_law_height()
Initialize the log-law height based on user inputs.
Definition ABLWallFunction.cpp:96
amrex::Real m_wf_theta
Definition ABLWallFunction.H:63
void update_tflux(const amrex::Real tflux)
Definition ABLWallFunction.cpp:137
Definition CFDSim.H:47
Definition FieldBCOps.H:32
Definition Field.H:116
Definition FieldPlaneAveragingFine.H:114
FieldState
Definition FieldDescTypes.H:14
@ wall_model
Definition BCInterface.cpp:7
Definition MOData.H:21
amrex::Real utau
Friction velocity (m/s)
Definition MOData.H:29