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
std::array< BoundaryInfo, numEq > boundaryInfo_
Definition common/boundarytypes.hh:380
void resetEq(const int eqIdx)
Reset the boundary types for one equation.
Definition freeflow/navierstokes/boundarytypes.hh:51
NavierStokesBoundaryTypes()
Definition freeflow/navierstokes/boundarytypes.hh:42
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
Class to specify the type of a boundary condition for the Navier-Stokes model.