/home/runner/work/amr-wind/amr-wind/amr-wind/turbulence/TurbulenceModel.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/turbulence/TurbulenceModel.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
TurbulenceModel.H
Go to the documentation of this file.
1#ifndef TURBULENCEMODEL_H
2#define TURBULENCEMODEL_H
3
4#include <unordered_map>
5
8#include "amr-wind/incflo.H"
9
10namespace amr_wind {
11
12class CFDSim;
13class ScratchField;
14class Field;
15
16namespace turbulence {
17
31class TurbulenceModel : public Factory<TurbulenceModel, CFDSim&>
32{
33public:
35 using CoeffsDictType = std::unordered_map<std::string, amrex::Real>;
36
37 static std::string base_identifier() { return "TurbulenceModel"; }
38
39 ~TurbulenceModel() override = default;
40
53 const FieldState fstate, const DiffusionType diff_type) = 0;
54
56 virtual void post_advance_work() = 0;
57
59 virtual void register_mueff_field(Field& mueff) = 0;
60
63
65 virtual std::string model_name() const = 0;
66
68 virtual std::unique_ptr<ScratchField> mu() = 0;
69
71 virtual std::unique_ptr<ScratchField> alpha() = 0;
72
74 virtual std::unique_ptr<ScratchField>
75 scalar_diffusivity(const std::string& name) = 0;
76
78 virtual Field& mu_turb() = 0;
79
81 virtual Field& alpha_turb() = 0;
82
84 virtual Field& mueff() = 0;
85
87 virtual Field& alphaeff() = 0;
88
90 virtual bool is_turbulent() const { return true; }
91
95 virtual void update_mueff(Field& mueff) = 0;
96
98 virtual void update_alphaeff(Field& alphaeff) = 0;
99
101 virtual void update_scalar_diff(Field& deff, const std::string& name) = 0;
102
104 virtual void parse_model_coeffs() = 0;
105
107 virtual CoeffsDictType model_coeffs() const = 0;
108};
109
110} // namespace turbulence
111} // namespace amr_wind
112
113#endif /* TURBULENCEMODEL_H */
Definition Field.H:116
Definition TurbulenceModel.H:32
static std::string base_identifier()
Definition TurbulenceModel.H:37
virtual void post_advance_work()=0
Do any post advance actions for the turbulence model.
virtual Field & mu_turb()=0
Return the turbulent dynamic viscosity field.
virtual bool is_turbulent() const
Flag indicating whether the model is turbulent.
Definition TurbulenceModel.H:90
virtual Field & alpha_turb()=0
Return the turbulent dynamic viscosity field.
virtual void register_alphaeff_field(Field &alphaeff)=0
Register the thermal diffusivity field.
virtual std::unique_ptr< ScratchField > scalar_diffusivity(const std::string &name)=0
Return the scalar diffusivity field.
virtual CoeffsDictType model_coeffs() const =0
Return model coefficients dictionary.
virtual std::unique_ptr< ScratchField > alpha()=0
Return the thermal diffusivity (laminar) field for enthalpy/temperature.
virtual void parse_model_coeffs()=0
Parse turbulence model coefficients.
virtual void register_mueff_field(Field &mueff)=0
Register the effective viscosity (for momentum field)
virtual std::unique_ptr< ScratchField > mu()=0
Return the dynamic viscosity (laminar) field.
virtual void update_mueff(Field &mueff)=0
virtual Field & mueff()=0
Return the effective dynamic viscosity field.
virtual std::string model_name() const =0
String representation of this turbulence model for I/O.
virtual void update_turbulent_viscosity(const FieldState fstate, const DiffusionType diff_type)=0
virtual Field & alphaeff()=0
Return the effective thermal diffusivity field.
virtual void update_alphaeff(Field &alphaeff)=0
Interface to update effective thermal diffusivity.
virtual void update_scalar_diff(Field &deff, const std::string &name)=0
Interface to update scalar diffusivity based on Schmidt number.
std::unordered_map< std::string, amrex::Real > CoeffsDictType
Default identifier used by factor methods.
Definition TurbulenceModel.H:35
FieldState
Definition FieldDescTypes.H:14
DiffusionType
Definition incflo_enums.H:4
Definition BCInterface.cpp:7
Definition Factory.H:65