24#ifndef FREEFLOW_RANS_BOUNDARY_TYPES_HH
25#define FREEFLOW_RANS_BOUNDARY_TYPES_HH
27#include <dune/common/exceptions.hh>
38template <
class ModelTraits,
int numEq>
42 static constexpr auto dimWorld = ModelTraits::dim();
43 using Indices =
typename ModelTraits::Indices;
44 static_assert(dimWorld > 1,
"Wall conditions cannot be set for 1D domains.");
48 for (
int eqIdx=0; eqIdx < numEq; ++eqIdx)
55 for (
int eqIdx=0; eqIdx < numEq; ++eqIdx)
57 if constexpr (dimWorld == 3)
59 if ((eqIdx == Indices::velocityXIdx)
60 || (eqIdx == Indices::velocityYIdx)
61 || (eqIdx == Indices::velocityZIdx))
64 else if constexpr (dimWorld == 2)
66 if ((eqIdx == Indices::velocityXIdx)
67 || (eqIdx == Indices::velocityYIdx))
71 DUNE_THROW(Dune::NotImplemented,
"1D Turbulence models are not supported");
75 if (eqIdx == Indices::viscosityTildeIdx)
78 else if constexpr (
numTurbulenceEq(ModelTraits::turbulenceModel()) == 2)
80 if (eqIdx == Indices::turbulentKineticEnergyEqIdx || eqIdx == Indices::dissipationEqIdx)
constexpr unsigned int numTurbulenceEq(TurbulenceModel model)
Definition: turbulencemodel.hh:42
Class to specify the type of a boundary.
Definition: common/boundarytypes.hh:38
bool isDirichlet(unsigned eqIdx) const
Returns true if an equation is used to specify a Dirichlet condition.
Definition: common/boundarytypes.hh:212
Class to specify the type of a boundary condition for the Navier-Stokes model.
Definition: freeflow/navierstokes/boundarytypes.hh:38
void resetEq(const int eqIdx)
Reset the boundary types for one equation.
Definition: freeflow/navierstokes/boundarytypes.hh:51
Class to specify the type of a boundary condition for the RANS extension to the Navier-Stokes model.
Definition: freeflow/rans/boundarytypes.hh:40
bool hasWall() const
Returns true if some equation is used to specify a Wall boundary condition.
Definition: freeflow/rans/boundarytypes.hh:90
bool isWall_
Definition: freeflow/rans/boundarytypes.hh:103
void setWall()
Definition: freeflow/rans/boundarytypes.hh:52
RANSBoundaryTypes()
Definition: freeflow/rans/boundarytypes.hh:46
void resetEq(const int eqIdx)
Reset the boundary types for one equation.
Definition: freeflow/rans/boundarytypes.hh:96