24#ifndef DUMUX_ONEEQ_PROBLEM_HH
25#define DUMUX_ONEEQ_PROBLEM_HH
45template<
class TypeTag>
52 using Grid =
typename GridView::Grid;
55 using DimVector = Dune::FieldVector<Scalar, Grid::dimension>;
59 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
69 RANSProblemImpl(std::shared_ptr<const GridGeometry> gridGeometry,
const std::string& paramGroup =
"")
70 : ParentType(gridGeometry, paramGroup)
73 "RANS.UseStoredEddyViscosity",
false);
98 for (
const auto& element : elements(this->gridGeometry().gridView()))
100 unsigned int elementIdx = this->gridGeometry().elementMapper().index(element);
102 auto fvGeometry =
localView(this->gridGeometry());
103 fvGeometry.bindElement(element);
104 for (
auto&& scv : scvs(fvGeometry))
106 const int dofIdx = scv.dofIndex();
107 const auto& cellCenterPriVars = curSol[GridGeometry::cellCenterIdx()][dofIdx];
113 VolumeVariables volVars;
114 volVars.update(elemSol, asImp_(), element, scv);
120 for (
const auto& element : elements(this->gridGeometry().gridView()))
122 unsigned int elementIdx = this->gridGeometry().elementMapper().index(element);
124 for (
unsigned int dimIdx = 0; dimIdx < Grid::dimension; ++dimIdx)
133 auto fvGeometry =
localView(this->gridGeometry());
134 fvGeometry.bindElement(element);
135 for (
auto&& scvf : scvfs(fvGeometry))
137 unsigned int normDim = scvf.directionIndex();
138 if (scvf.boundary() && asImp_().boundaryTypes(element, scvf).isDirichlet(Indices::viscosityTildeIdx))
141 Scalar dirichletViscosityTilde = asImp_().dirichlet(element, scvf)[Indices::viscosityTildeIdx];
163 Implementation &asImp_()
164 {
return *
static_cast<Implementation *
>(
this); }
167 const Implementation &asImp_()
const
168 {
return *
static_cast<const Implementation *
>(
this); }
Base class for all staggered fv problems.
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.
TurbulenceModel
The available free flow turbulence models in Dumux.
Definition turbulencemodel.hh:37
@ oneeq
Definition turbulencemodel.hh:38
GridCache::LocalView localView(const GridCache &gridCache)
Free function to get the local view of a grid cache object.
Definition localview.hh:38
auto elementSolution(const Element &element, const SolutionVector &sol, const GridGeometry &gg) -> std::enable_if_t< GridGeometry::discMethod==DiscretizationMethod::box, BoxElementSolution< typename GridGeometry::LocalView, std::decay_t< decltype(std::declval< SolutionVector >()[0])> > >
Make an element solution for box schemes.
Definition box/elementsolution.hh:115
PrimaryVariables makePriVarsFromCellCenterPriVars(const CellCenterPrimaryVariables &cellCenterPriVars)
Helper function to create a PrimaryVariables object from CellCenterPrimaryVariables.
Definition staggered/elementsolution.hh:41
T getParamFromGroup(Args &&... args)
A free function to get a parameter from the parameter tree singleton with a model group.
Definition parameters.hh:375
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
void updateStaticWallProperties()
Correct size of the static (solution independent) wall variables.
Definition freeflow/rans/oneeq/problem.hh:79
void updateDynamicWallProperties(const SolutionVector &curSol)
Update the dynamic (solution dependent) relations to the walls.
Definition freeflow/rans/oneeq/problem.hh:94
std::vector< Scalar > storedDynamicEddyViscosity_
Definition freeflow/rans/oneeq/problem.hh:156
RANSProblemImpl(std::shared_ptr< const GridGeometry > gridGeometry, const std::string ¶mGroup="")
The constructor sets the gravity, if desired by the user.
Definition freeflow/rans/oneeq/problem.hh:69
bool useStoredEddyViscosity_
Definition freeflow/rans/oneeq/problem.hh:159
std::vector< DimVector > storedViscosityTildeGradient_
Definition freeflow/rans/oneeq/problem.hh:158
std::vector< Scalar > storedViscosityTilde_
Definition freeflow/rans/oneeq/problem.hh:157
std::vector< std::array< std::array< unsigned int, 2 >, dim > > neighborIdx_
Definition freeflow/rans/problem.hh:535
void updateDynamicWallProperties(const SolutionVector &curSol)
Update the dynamic (solution dependent) relations to the walls.
Definition freeflow/rans/problem.hh:225
void updateStaticWallProperties()
Update the static (solution independent) relations to the walls.
Definition freeflow/rans/problem.hh:98
std::vector< GlobalPosition > cellCenter_
Definition freeflow/rans/problem.hh:536
RANSProblemBase(std::shared_ptr< const GridGeometry > gridGeometry, const std::string ¶mGroup="")
The constructor.
Definition freeflow/rans/problem.hh:88
Declares all properties used in Dumux.
A single-phase, isothermal one-equation turbulence model by Spalart-Allmaras.
The local element solution class for staggered methods.
the turbulence-model-specfic RANS problem