25#ifndef DUMUX_ONEEQ_VOLUME_VARIABLES_HH
26#define DUMUX_ONEEQ_VOLUME_VARIABLES_HH
28#include <dune/common/math.hh>
39template <
class Traits,
class NSVolumeVariables>
45 using Scalar =
typename Traits::PrimaryVariables::value_type;
46 using DimVector = Dune::FieldVector<Scalar, Traits::ModelTraits::dim()>;
50 using Indices =
typename Traits::ModelTraits::Indices;
61 template<
class ElementSolution,
class Problem,
class Element,
class SubControlVolume>
62 void update(
const ElementSolution &elemSol,
63 const Problem &problem,
64 const Element &element,
65 const SubControlVolume& scv)
81 template<
class ElementSolution,
class Problem,
class Element,
class SubControlVolume>
83 const Problem &problem,
84 const Element &element,
85 const SubControlVolume& scv)
93 if (problem.useStoredEddyViscosity())
159 return g() * pow(1.0 + power(
cw3(), 6) / (power(
g(), 6) + power(
cw3(), 6)), 1.0/6.0);
166 return r() +
cw2() * (power(
r(), 6) -
r());
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
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:42
Scalar c2() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:219
Scalar fv2() const
Returns a model function.
Definition: freeflow/rans/oneeq/volumevariables.hh:142
Scalar vorticityMagnitude() const
Returns the magnitude of the vorticity.
Definition: freeflow/rans/oneeq/volumevariables.hh:212
Scalar cb2() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:235
Scalar fv1() const
Returns damping function for the eddy viscosity.
Definition: freeflow/rans/oneeq/volumevariables.hh:134
DimVector storedViscosityTildeGradient() const
Returns the gradient of the viscosity parameter.
Definition: freeflow/rans/oneeq/volumevariables.hh:122
Scalar viscosityTilde_
Definition: freeflow/rans/oneeq/volumevariables.hh:266
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:62
Scalar sigma() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:227
Scalar viscosityRatio() const
Returns the ratio of the kinematic viscosity and the viscosity parameter.
Definition: freeflow/rans/oneeq/volumevariables.hh:180
typename Traits::ModelTraits::Indices Indices
export the indices type
Definition: freeflow/rans/oneeq/volumevariables.hh:50
Scalar storedViscosityTilde_
Definition: freeflow/rans/oneeq/volumevariables.hh:267
Scalar vorticityTensorScalarProduct_
Definition: freeflow/rans/oneeq/volumevariables.hh:270
Scalar ft2() const
Returns a model function.
Definition: freeflow/rans/oneeq/volumevariables.hh:146
Scalar g() const
Returns a model function.
Definition: freeflow/rans/oneeq/volumevariables.hh:163
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:82
Scalar stressTensorScalarProductTilde() const
Definition: freeflow/rans/oneeq/volumevariables.hh:192
DimVector storedViscosityTildeGradient_
Definition: freeflow/rans/oneeq/volumevariables.hh:268
Scalar fW() const
Returns a model function.
Definition: freeflow/rans/oneeq/volumevariables.hh:155
Scalar c3() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:223
Scalar calculateEddyViscosity()
Returns the dynamic eddy viscosity .
Definition: freeflow/rans/oneeq/volumevariables.hh:104
Scalar storedViscosityTilde() const
Returns the viscosity parameter from the last iteration .
Definition: freeflow/rans/oneeq/volumevariables.hh:116
Scalar cw1() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:251
Scalar cb1() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:231
Scalar ct3() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:243
Scalar cv1() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:239
Scalar r() const
Returns a model function.
Definition: freeflow/rans/oneeq/volumevariables.hh:170
Scalar ct4() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:247
Scalar viscosityTilde() const
Returns the viscosity parameter .
Definition: freeflow/rans/oneeq/volumevariables.hh:110
Scalar stressTensorScalarProduct() const
Returns the scalar product of the stress tensor.
Definition: freeflow/rans/oneeq/volumevariables.hh:128
Scalar stressTensorScalarProduct_
Definition: freeflow/rans/oneeq/volumevariables.hh:269
Scalar cw2() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:258
Scalar cw3() const
Returns a model constant.
Definition: freeflow/rans/oneeq/volumevariables.hh:262
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:156
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:221
Scalar wallDistance() const
Return the wall distance of the control volume.
Definition: freeflow/rans/volumevariables.hh:150
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:266
Scalar kinematicViscosity() const
Return the kinematic viscosity of the fluid within the control volume.
Definition: freeflow/rans/volumevariables.hh:202
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:210
unsigned int elementIdx() const
Return the element Idx of the control volume.
Definition: freeflow/rans/volumevariables.hh:120