12#ifndef FREEFLOW_RANS_BOUNDARY_TYPES_HH
13#define FREEFLOW_RANS_BOUNDARY_TYPES_HH
15#include <dune/common/exceptions.hh>
26template <
class ModelTraits,
int numEq>
30 static constexpr auto dimWorld = ModelTraits::dim();
31 using Indices =
typename ModelTraits::Indices;
32 static_assert(dimWorld > 1,
"Wall conditions cannot be set for 1D domains.");
36 for (
int eqIdx=0; eqIdx < numEq; ++eqIdx)
43 for (
int eqIdx=0; eqIdx < numEq; ++eqIdx)
45 if constexpr (dimWorld == 3)
47 if ((eqIdx == Indices::velocityXIdx)
48 || (eqIdx == Indices::velocityYIdx)
49 || (eqIdx == Indices::velocityZIdx))
52 else if constexpr (dimWorld == 2)
54 if ((eqIdx == Indices::velocityXIdx)
55 || (eqIdx == Indices::velocityYIdx))
59 DUNE_THROW(Dune::NotImplemented,
"1D Turbulence models are not supported");
63 if (eqIdx == Indices::viscosityTildeIdx)
66 else if constexpr (
numTurbulenceEq(ModelTraits::turbulenceModel()) == 2)
68 if (eqIdx == Indices::turbulentKineticEnergyEqIdx || eqIdx == Indices::dissipationEqIdx)
Class to specify the type of a boundary.
Definition: common/boundarytypes.hh:26
bool isDirichlet(unsigned eqIdx) const
Returns true if an equation is used to specify a Dirichlet condition.
Definition: common/boundarytypes.hh:200
Class to specify the type of a boundary condition for the Navier-Stokes model.
Definition: freeflow/navierstokes/boundarytypes.hh:26
void resetEq(const int eqIdx)
Reset the boundary types for one equation.
Definition: freeflow/navierstokes/boundarytypes.hh:39
Class to specify the type of a boundary condition for the RANS extension to the Navier-Stokes model.
Definition: freeflow/rans/boundarytypes.hh:28
bool hasWall() const
Returns true if some equation is used to specify a Wall boundary condition.
Definition: freeflow/rans/boundarytypes.hh:78
bool isWall_
Definition: freeflow/rans/boundarytypes.hh:91
void setWall()
Definition: freeflow/rans/boundarytypes.hh:40
RANSBoundaryTypes()
Definition: freeflow/rans/boundarytypes.hh:34
void resetEq(const int eqIdx)
Reset the boundary types for one equation.
Definition: freeflow/rans/boundarytypes.hh:84
constexpr unsigned int numTurbulenceEq(TurbulenceModel model)
Definition: turbulencemodel.hh:30