Canoe
Comprehensive Atmosphere N' Ocean Engine
turbulence_model.hpp
Go to the documentation of this file.
1 #ifndef SRC_SNAP_TURBULENCE_TURBULENCE_MODEL_HPP_
2 #define SRC_SNAP_TURBULENCE_TURBULENCE_MODEL_HPP_
3 
4 // C/C++
5 #include <memory>
6 
7 // Athena++ headers
8 #include <athena/athena.hpp>
9 #include <athena/athena_arrays.hpp>
10 #include <athena/bvals/cc/bvals_cc.hpp>
11 
12 class MeshBlock;
13 class ParameterInput;
14 
16 // \brief
17 
19  public:
20  TurbulenceModel(MeshBlock *pmb, ParameterInput *pin);
21  virtual ~TurbulenceModel();
22 
23  // access members
25 
26  // public data
27  AthenaArray<Real> mut; // dynamic turbulent viscosity
28 
29  // public functions:
30  virtual void DriveTurbulence(Real dt) {}
31  virtual void Initialize() {}
33  const AthenaArray<Real> &w,
34  const AthenaArray<Real> &bc, int il, int iu,
35  int jl, int ju, int kl, int ku) {}
36 
37  protected:
38  MeshBlock *pmy_block;
39 };
40 
42  public:
43  KEpsilonTurbulence(MeshBlock *pmb, ParameterInput *pin);
45 
46  void DriveTurbulence(Real dt);
47  void Initialize();
49  const AthenaArray<Real> &w, const AthenaArray<Real> &bc,
50  int il, int iu, int jl, int ju, int kl, int ku);
51 
52  private:
53  Real cmu_, c1_, c2_, sigk_, sige_;
54 };
55 
56 using TurbulenceModelPtr = std::shared_ptr<TurbulenceModel>;
57 
59  public:
60  static TurbulenceModelPtr Create(MeshBlock *pmb, ParameterInput *pin);
61 };
62 
63 #endif // SRC_SNAP_TURBULENCE_TURBULENCE_MODEL_HPP_
KEpsilonTurbulence(MeshBlock *pmb, ParameterInput *pin)
void SetDiffusivity(AthenaArray< Real > &nu, AthenaArray< Real > &kappa, const AthenaArray< Real > &w, const AthenaArray< Real > &bc, int il, int iu, int jl, int ju, int kl, int ku)
static TurbulenceModelPtr Create(MeshBlock *pmb, ParameterInput *pin)
TurbulenceModel(MeshBlock *pmb, ParameterInput *pin)
virtual void DriveTurbulence(Real dt)
virtual ~TurbulenceModel()
virtual void SetDiffusivity(AthenaArray< Real > &nu, AthenaArray< Real > &kappa, const AthenaArray< Real > &w, const AthenaArray< Real > &bc, int il, int iu, int jl, int ju, int kl, int ku)
AthenaArray< Real > u
MeshBlock * pmy_block
AthenaArray< Real > mut
AthenaArray< Real > w
virtual void Initialize()
std::shared_ptr< TurbulenceModel > TurbulenceModelPtr