7 #include <athena/athena.hpp>
8 #include <athena/mesh/mesh.hpp>
9 #include <athena/scalars/scalars.hpp>
12 #include <application/application.hpp>
13 #include <application/exceptions.hpp>
16 #include <configure.hpp>
25 if (NTURBULENCE == 0)
return;
27 w.InitWithShallowSlice(pmb->pscalars->r, 4, NCLOUD + NCHEMISTRY + NTRACER,
29 u.InitWithShallowSlice(pmb->pscalars->s, 4, NCLOUD + NCHEMISTRY + NTRACER,
32 int ncells1 = pmb->ncells1;
33 int ncells2 = pmb->ncells2;
34 int ncells3 = pmb->ncells3;
36 mut.NewAthenaArray(ncells3, ncells2, ncells1);
40 if (NTURBULENCE == 0)
return;
42 Application::Logger app(
"snap");
43 app->Log(
"Destroy TurbulenceModel");
47 ParameterInput *pin) {
48 Application::Logger app(
"snap");
49 app->Log(
"Create turbulenceModel");
53 if (pin->DoesParameterExist(
"hydro",
"turbulence")) {
54 std::string turbulence_model = pin->GetString(
"hydro",
"turbulence");
55 if (turbulence_model ==
"none") {
56 pturb = std::make_shared<TurbulenceModel>(pmb, pin);
57 }
else if (turbulence_model ==
"kepsilon") {
58 pturb = std::make_shared<KEpsilonTurbulence>(pmb, pin);
60 throw NotImplementedError(
61 "NTURBULENCE must be at least 2 for k-epsilon model");
63 throw NotImplementedError(turbulence_model);
static TurbulenceModelPtr Create(MeshBlock *pmb, ParameterInput *pin)
TurbulenceModel(MeshBlock *pmb, ParameterInput *pin)
virtual ~TurbulenceModel()
std::shared_ptr< TurbulenceModel > TurbulenceModelPtr