24#ifndef DUMUX_LOWREKEPSILON_PROBLEM_HH
25#define DUMUX_LOWREKEPSILON_PROBLEM_HH
45template<
class TypeTag>
63 RANSProblemImpl(std::shared_ptr<const GridGeometry> gridGeometry,
const std::string& paramGroup =
"")
64 : ParentType(gridGeometry, paramGroup)
66 useStoredEddyViscosity_ = getParamFromGroup<bool>(this->paramGroup(),
"RANS.UseStoredEddyViscosity",
true);
74 ParentType::updateStaticWallProperties();
77 storedDissipationTilde_.resize(this->gridGeometry().elementMapper().size(), 0.0);
78 storedDynamicEddyViscosity_.resize(this->gridGeometry().elementMapper().size(), 0.0);
79 storedTurbulentKineticEnergy_.resize(this->gridGeometry().elementMapper().size(), 0.0);
89 ParentType::updateDynamicWallProperties(curSol);
91 for (
const auto& element : elements(this->gridGeometry().gridView()))
93 unsigned int elementIdx = this->gridGeometry().elementMapper().index(element);
95 auto fvGeometry =
localView(this->gridGeometry());
96 fvGeometry.bindElement(element);
97 for (
auto&& scv : scvs(fvGeometry))
99 const int dofIdx = scv.dofIndex();
100 const auto& cellCenterPriVars = curSol[GridGeometry::cellCenterIdx()][dofIdx];
101 PrimaryVariables priVars = makePriVarsFromCellCenterPriVars<PrimaryVariables>(cellCenterPriVars);
102 auto elemSol = elementSolution<typename GridGeometry::LocalView>(std::move(priVars));
104 storedDissipationTilde_[elementIdx] = elemSol[0][Indices::dissipationEqIdx];
105 storedTurbulentKineticEnergy_[elementIdx] = elemSol[0][Indices::turbulentKineticEnergyEqIdx];
107 VolumeVariables volVars;
108 volVars.update(elemSol, asImp_(), element, scv);
109 storedDynamicEddyViscosity_[elementIdx] = volVars.calculateEddyViscosity();
122 Implementation &asImp_()
123 {
return *
static_cast<Implementation *
>(
this); }
126 const Implementation &asImp_()
const
127 {
return *
static_cast<const Implementation *
>(
this); }
Free function to get the local view of a grid cache object.
The available discretization methods in Dumux.
The available free flow turbulence models in Dumux.
Base class for all staggered fv problems.
TurbulenceModel
The available free flow turbulence models in Dumux.
Definition: turbulencemodel.hh:37
GridCache::LocalView localView(const GridCache &gridCache)
Free function to get the local view of a grid cache object.
Definition: localview.hh:38
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
forward declare
Definition: dumux/freeflow/rans/problem.hh:41
Reynolds-Averaged Navier-Stokes problem base class.
Definition: dumux/freeflow/rans/problem.hh:57
bool useStoredEddyViscosity_
Definition: dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh:118
void updateStaticWallProperties()
Correct size of the static (solution independent) wall variables.
Definition: dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh:72
std::vector< Scalar > storedTurbulentKineticEnergy_
Definition: dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh:117
RANSProblemImpl(std::shared_ptr< const GridGeometry > gridGeometry, const std::string ¶mGroup="")
The constructor sets the gravity, if desired by the user.
Definition: dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh:63
std::vector< Scalar > storedDissipationTilde_
Definition: dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh:115
void updateDynamicWallProperties(const SolutionVector &curSol)
Update the dynamic (solution dependent) relations to the walls.
Definition: dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh:87
std::vector< Scalar > storedDynamicEddyViscosity_
Definition: dumux/freeflow/rans/twoeq/lowrekepsilon/problem.hh:116
The local element solution class for staggered methods.
Declares all properties used in Dumux.
Adaption of the fully implicit scheme to the tracer transport model.