25#ifndef DUMUX_ONEEQ_VOLUME_VARIABLES_HH
26#define DUMUX_ONEEQ_VOLUME_VARIABLES_HH
38template <
class Traits,
class NSVolumeVariables>
44 using Scalar =
typename Traits::PrimaryVariables::value_type;
45 using DimVector = Dune::FieldVector<Scalar, Traits::ModelTraits::dim()>;
60 template<
class ElementSolution,
class Problem,
class Element,
class SubControlVolume>
61 void update(
const ElementSolution &elemSol,
62 const Problem &problem,
63 const Element &element,
64 const SubControlVolume& scv)
80 template<
class ElementSolution,
class Problem,
class Element,
class SubControlVolume>
82 const Problem &problem,
83 const Element &element,
84 const SubControlVolume& scv)
92 if (problem.useStoredEddyViscosity_)
167 return g() * pow(1.0 + pow(
cw3(), 6.0) / (pow(
g(), 6.0) + pow(
cw3(), 6.0)), 1.0/6.0);
174 return r() +
cw2() * (pow(
r(), 6.0) -
r());
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
Property tag Indices
Definition: porousmediumflow/sequential/properties.hh:59
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:65
Volume variables for the isothermal single-phase one-equation turbulence model by Spalart-Allmaras.
Definition: freeflow/rans/oneeq/volumevariables.hh:41
Scalar c2() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:227
Scalar fv2() const
Returns a model function.
Definition: freeflow/rans/oneeq/volumevariables.hh:151
Scalar vorticityMagnitude() const
Returns the magnitude of the vorticity.
Definition: freeflow/rans/oneeq/volumevariables.hh:220
Scalar cb2() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:243
Scalar fv1() const
Returns damping function for the eddy viscosity.
Definition: freeflow/rans/oneeq/volumevariables.hh:143
DimVector storedViscosityTildeGradient() const
Returns the gradient of the viscosity parameter.
Definition: freeflow/rans/oneeq/volumevariables.hh:127
Scalar viscosityTilde_
Definition: freeflow/rans/oneeq/volumevariables.hh:274
void update(const ElementSolution &elemSol, const Problem &problem, const Element &element, const SubControlVolume &scv)
Update all quantities for a given control volume.
Definition: freeflow/rans/oneeq/volumevariables.hh:61
Scalar sigma() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:235
Scalar viscosityRatio() const
Returns the ratio of the kinematic viscosity and the viscosity parameter.
Definition: freeflow/rans/oneeq/volumevariables.hh:188
typename Traits::ModelTraits::Indices Indices
export the indices type
Definition: freeflow/rans/oneeq/volumevariables.hh:49
Scalar storedViscosityTilde_
Definition: freeflow/rans/oneeq/volumevariables.hh:275
Scalar vorticityTensorScalarProduct_
Definition: freeflow/rans/oneeq/volumevariables.hh:278
Scalar ft2() const
Returns a model function.
Definition: freeflow/rans/oneeq/volumevariables.hh:155
Scalar g() const
Returns a model function.
Definition: freeflow/rans/oneeq/volumevariables.hh:171
void updateRANSProperties(const ElementSolution &elemSol, const Problem &problem, const Element &element, const SubControlVolume &scv)
Update all turbulent quantities for a given control volume.
Definition: freeflow/rans/oneeq/volumevariables.hh:81
Scalar stressTensorScalarProductTilde() const
Definition: freeflow/rans/oneeq/volumevariables.hh:200
DimVector storedViscosityTildeGradient_
Definition: freeflow/rans/oneeq/volumevariables.hh:276
Scalar fW() const
Returns a model function.
Definition: freeflow/rans/oneeq/volumevariables.hh:164
Scalar c3() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:231
Scalar calculateEddyViscosity()
Returns the dynamic eddy viscosity .
Definition: freeflow/rans/oneeq/volumevariables.hh:103
Scalar storedViscosityTilde() const
Returns the viscosity parameter from the last iteration .
Definition: freeflow/rans/oneeq/volumevariables.hh:119
Scalar cw1() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:259
Scalar cb1() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:239
Scalar ct3() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:251
Scalar cv1() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:247
Scalar r() const
Returns a model function.
Definition: freeflow/rans/oneeq/volumevariables.hh:178
Scalar ct4() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:255
Scalar viscosityTilde() const
Returns the viscosity parameter .
Definition: freeflow/rans/oneeq/volumevariables.hh:111
Scalar stressTensorScalarProduct() const
Returns the scalar product of the stress tensor.
Definition: freeflow/rans/oneeq/volumevariables.hh:135
Scalar stressTensorScalarProduct_
Definition: freeflow/rans/oneeq/volumevariables.hh:277
Scalar cw2() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:266
Scalar cw3() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:270
Volume variables for the isothermal single-phase Reynolds-Averaged Navier-Stokes models.
Definition: freeflow/rans/volumevariables.hh:42
Scalar karmanConstant() const
Return the Karman constant.
Definition: freeflow/rans/volumevariables.hh:144
void calculateEddyThermalConductivity(const Problem &problem)
Calculates the eddy thermal conductivity based on the kinematic eddy viscosity and the turbulent Pra...
Definition: freeflow/rans/volumevariables.hh:209
Scalar wallDistance() const
Return the wall distance of the control volume.
Definition: freeflow/rans/volumevariables.hh:138
void updateNavierStokesVolVars(const ElementSolution &elemSol, const Problem &problem, const Element &element, const SubControlVolume &scv)
Update all quantities for a given control volume.
Definition: freeflow/rans/volumevariables.hh:65
Scalar setDynamicEddyViscosity_(Scalar value)
Sets the dynamic eddy viscosity .
Definition: freeflow/rans/volumevariables.hh:259
Scalar kinematicViscosity() const
Return the kinematic viscosity of the fluid within the control volume.
Definition: freeflow/rans/volumevariables.hh:190
void updateRANSProperties(const ElementSolution &elemSol, const Problem &problem, const Element &element, const SubControlVolume &scv)
Update all turbulent quantities for a given control volume.
Definition: freeflow/rans/volumevariables.hh:85
void calculateEddyDiffusivity(const Problem &problem)
Calculates the eddy diffusivity based on the kinematic eddy viscosity and the turbulent Schmidt numb...
Definition: freeflow/rans/volumevariables.hh:198
unsigned int elementIdx() const
Return the element Idx of the control volume.
Definition: freeflow/rans/volumevariables.hh:114