/home/runner/work/kynema-sgf/kynema-sgf/src/turbulence/RANS/KLAxell.H Source File

Kynema-SGF API: /home/runner/work/kynema-sgf/kynema-sgf/src/turbulence/RANS/KLAxell.H Source File
Kynema-SGF API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
KLAxell.H
Go to the documentation of this file.
1#ifndef KLAXELL_H
2#define KLAXELL_H
3
4#include <string>
7#include "AMReX_REAL.H"
8
9using namespace amrex::literals;
10
11namespace kynema_sgf::turbulence {
12
16template <typename Transport>
17class KLAxell : public TurbModelBase<Transport>
18{
19public:
20 static std::string identifier()
21 {
22 return "KLAxell-" + Transport::identifier();
23 }
24
25 explicit KLAxell(CFDSim& sim);
26
27 [[nodiscard]] std::string model_name() const override { return "KLAxell"; }
28
31 FieldState fstate, DiffusionType /*unused*/) override;
32
34 void post_advance_work() override;
35
37 void post_init_actions() override;
38
40 void post_regrid_actions() override;
41
43 void update_alphaeff(Field& alphaeff) override;
44
46 void update_scalar_diff(Field& deff, const std::string& name) override;
47
49 void parse_model_coeffs() override;
50
52 [[nodiscard]] TurbulenceModel::CoeffsDictType model_coeffs() const override;
53
54private:
61 Field* m_tke{nullptr};
63 amrex::Real m_Cmu{0.556_rt};
64 amrex::Real m_Cmu_prime{0.556_rt};
65 amrex::Real m_Cb_stable{0.25_rt};
66 amrex::Real m_Cb_unstable{0.35_rt};
67 amrex::Real m_prandtl{1.0_rt};
70 amrex::Vector<amrex::Real> m_gravity{0.0_rt, 0.0_rt, -9.81_rt};
71 amrex::Real m_surf_flux{0};
72 amrex::Real m_meso_sponge_start{2000};
73
74 std::unique_ptr<ScratchField> m_gradT;
75};
76
77} // namespace kynema_sgf::turbulence
78
79#endif /* KLAXELL_H */
Definition CFDSim.H:55
Definition Field.H:112
amrex::Real m_Cmu
Turbulence constant.
Definition KLAxell.H:63
amrex::Vector< amrex::Real > m_gravity
Gravity vector (m/s^2)
Definition KLAxell.H:70
void update_alphaeff(Field &alphaeff) override
Update the effective thermal diffusivity field.
Definition KLAxell.cpp:299
amrex::Real m_prandtl
Definition KLAxell.H:67
KLAxell(CFDSim &sim)
Definition KLAxell.cpp:17
void post_init_actions() override
Actions to perform post initialization.
Definition KLAxell.cpp:74
amrex::Real m_surf_flux
Definition KLAxell.H:71
Field & m_turb_lscale
Definition KLAxell.H:56
Field & m_vel
Definition KLAxell.H:55
static std::string identifier()
Definition KLAxell.H:20
void update_turbulent_viscosity(FieldState fstate, DiffusionType) override
Update the turbulent viscosity field.
Definition KLAxell.cpp:86
Field & m_dissip
Definition KLAxell.H:59
Field & m_buoy_prod
Definition KLAxell.H:58
amrex::Real m_Cmu_prime
Definition KLAxell.H:64
Field & m_temperature
Definition KLAxell.H:68
void update_scalar_diff(Field &deff, const std::string &name) override
Update the effective scalar diffusivity field.
Definition KLAxell.cpp:354
amrex::Real m_Cb_unstable
Definition KLAxell.H:66
TurbulenceModel::CoeffsDictType model_coeffs() const override
Return turbulence model coefficients.
Definition KLAxell.cpp:63
Field & m_shear_prod
Definition KLAxell.H:57
Field * m_tke
Definition KLAxell.H:61
std::unique_ptr< ScratchField > m_gradT
Definition KLAxell.H:74
amrex::Real m_meso_sponge_start
Definition KLAxell.H:72
Field & m_rho
Definition KLAxell.H:60
amrex::Real m_Cb_stable
Definition KLAxell.H:65
void parse_model_coeffs() override
Parse turbulence model coefficients.
Definition KLAxell.cpp:51
void post_regrid_actions() override
Actions to perform post regrid.
Definition KLAxell.cpp:80
std::string model_name() const override
String representation of this turbulence model for I/O.
Definition KLAxell.H:27
void post_advance_work() override
Do any post advance work.
Definition KLAxell.cpp:371
TurbModelBase(CFDSim &sim)
Definition TurbModelBase.H:95
Field & alphaeff() override
Return the effective thermal diffusivity field.
Definition TurbModel.H:53
std::unordered_map< std::string, amrex::Real > CoeffsDictType
Default identifier used by factor methods.
Definition TurbulenceModel.H:35
FieldState
Definition FieldDescTypes.H:16
DiffusionType
Definition incflo_enums.H:6
Definition CFDSim.H:31