12#ifndef DUMUX_SST_PROBLEM_HH
13#define DUMUX_SST_PROBLEM_HH
33template<
class TypeTag>
48 using Element =
typename GridGeometry::GridView::template Codim<0>::Entity;
49 using DimVector =
typename Element::Geometry::GlobalCoordinate;
65 storedDynamicEddyViscosity_.resize(this->
gridGeometry().elementMapper().size(), 0.0);
66 storedDissipation_.resize(this->
gridGeometry().elementMapper().size(), 0.0);
67 storedDissipationGradient_.resize(this->
gridGeometry().elementMapper().size(), DimVector(0.0));
68 storedTurbulentKineticEnergy_.resize(this->
gridGeometry().elementMapper().size(), 0.0);
69 storedTurbulentKineticEnergyGradient_.resize(this->
gridGeometry().elementMapper().size(), DimVector(0.0));
77 template<
class SolutionVector>
82 for (
const auto& element : elements(this->
gridGeometry().gridView()))
84 unsigned int elementIdx = this->
gridGeometry().elementMapper().index(element);
87 fvGeometry.bindElement(element);
88 for (
auto&& scv : scvs(fvGeometry))
90 const int dofIdx = scv.dofIndex();
91 const auto& cellCenterPriVars = curSol[GridGeometry::cellCenterIdx()][dofIdx];
95 storedDissipation_[elementIdx] = elemSol[0][Indices::dissipationEqIdx];
96 storedTurbulentKineticEnergy_[elementIdx] = elemSol[0][Indices::turbulentKineticEnergyEqIdx];
98 VolumeVariables volVars;
99 volVars.update(elemSol, asImp_(), element, scv);
100 storedDynamicEddyViscosity_[elementIdx] = volVars.calculateEddyViscosity(*
this);
105 for (
const auto& element : elements(this->
gridGeometry().gridView()))
107 const unsigned int elementIdx = this->
gridGeometry().elementMapper().index(element);
109 for (
unsigned int axisIdx = 0; axisIdx < DimVector::dimension; ++axisIdx)
115 storedTurbulentKineticEnergyGradient_[elementIdx][axisIdx]
119 storedDissipationGradient_[elementIdx][axisIdx]
133 {
return storedDynamicEddyViscosity_[elementIdx]; }
136 {
return storedTurbulentKineticEnergy_[elementIdx]; }
139 {
return storedDissipation_[elementIdx]; }
142 {
return storedTurbulentKineticEnergyGradient_[elementIdx]; }
145 {
return storedDissipationGradient_[elementIdx]; }
148 {
return sstModelVersion_; }
151 std::vector<Scalar> storedDynamicEddyViscosity_;
152 std::vector<Scalar> storedTurbulentKineticEnergy_;
153 std::vector<Scalar> storedDissipation_;
154 std::vector<DimVector> storedDissipationGradient_;
155 std::vector<DimVector> storedTurbulentKineticEnergyGradient_;
160 Implementation &asImp_()
161 {
return *
static_cast<Implementation *
>(
this); }
164 const Implementation &asImp_()
const
165 {
return *
static_cast<const Implementation *
>(
this); }
const std::string & paramGroup() const
The parameter group in which to retrieve runtime parameters.
Definition common/fvproblem.hh:524
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition common/fvproblem.hh:520
void updateDynamicWallProperties(const SolutionVector &curSol)
Update the dynamic (solution dependent) turbulence parameters.
Definition freeflow/rans/problem.hh:131
void updateStaticWallProperties()
Update the static (solution independent) relations to the walls and neighbors.
Definition freeflow/rans/problem.hh:115
GlobalPosition cellCenter(const int elementIdx) const
Definition freeflow/rans/problem.hh:256
unsigned int neighborIndex(const int elementIdx, const int axisIdx, const int sideIdx) const
Definition freeflow/rans/problem.hh:262
RANSProblemBase(std::shared_ptr< const GridGeometry > gridGeometry, const std::string ¶mGroup="")
The constructor.
Definition freeflow/rans/problem.hh:90
DimVector storedDissipationGradient(const int elementIdx) const
Definition freeflow/rans/twoeq/sst/problem.hh:144
bool useStoredEddyViscosity() const
Definition freeflow/rans/twoeq/sst/problem.hh:126
void updateStaticWallProperties()
Correct size of the static (solution independent) wall variables.
Definition freeflow/rans/twoeq/sst/problem.hh:61
Scalar storedDynamicEddyViscosity(const int elementIdx) const
Definition freeflow/rans/twoeq/sst/problem.hh:132
Scalar storedTurbulentKineticEnergy(const int elementIdx) const
Definition freeflow/rans/twoeq/sst/problem.hh:135
DimVector storedTurbulentKineticEnergyGradient(const int elementIdx) const
Definition freeflow/rans/twoeq/sst/problem.hh:141
RANSProblemImpl(std::shared_ptr< const GridGeometry > gridGeometry, const std::string ¶mGroup="")
Definition freeflow/rans/twoeq/sst/problem.hh:52
Scalar storedDissipation(const int elementIdx) const
Definition freeflow/rans/twoeq/sst/problem.hh:138
void updateDynamicWallProperties(const SolutionVector &curSol)
Update the dynamic (solution dependent) relations to the walls.
Definition freeflow/rans/twoeq/sst/problem.hh:78
SSTModel sstModelVersion() const
Definition freeflow/rans/twoeq/sst/problem.hh:147
Defines all properties used in Dumux.
the turbulence-model-specfic RANS problem
A single-phase, isothermal SST (Shear Stress Transport) -Eq. model.
GridCache::LocalView localView(const GridCache &gridCache)
Free function to get the local view of a grid cache object.
Definition localview.hh:26
auto elementSolution(const Element &element, const SolutionVector &sol, const GridGeometry &gg) -> std::enable_if_t< GridGeometry::discMethod==DiscretizationMethods::cctpfa||GridGeometry::discMethod==DiscretizationMethods::ccmpfa, CCElementSolution< typename GridGeometry::LocalView, std::decay_t< decltype(std::declval< SolutionVector >()[0])> > >
Make an element solution for cell-centered schemes.
Definition cellcentered/elementsolution.hh:101
TurbulenceModel
The available free flow turbulence models in Dumux.
Definition turbulencemodel.hh:26
@ sst
Definition turbulencemodel.hh:27
T getParamFromGroup(Args &&... args)
A free function to get a parameter from the parameter tree singleton with a model group.
Definition parameters.hh:149
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition propertysystem.hh:296
SSTModel
The available variations of the SST Turbulence Model.
Definition turbulencemodel.hh:63
PrimaryVariables makePriVarsFromCellCenterPriVars(const CellCenterPrimaryVariables &cellCenterPriVars)
Helper function to create a PrimaryVariables object from CellCenterPrimaryVariables.
Definition staggered/elementsolution.hh:29
Free function to get the local view of a grid cache object.
The available discretization methods in Dumux.
SSTModel sstModelFromString(const std::string &sstModel)
Convenience function to convert user input given as std::string to the corresponding enum class used ...
Definition turbulencemodel.hh:82
The local element solution class for staggered methods.
Base class for all staggered fv problems.
The available free flow turbulence models in Dumux.