25#ifndef DUMUX_SST_VOLUME_VARIABLES_HH
26#define DUMUX_SST_VOLUME_VARIABLES_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;
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)
102 if (problem.useStoredEddyViscosity())
114 template<
class Problem>
127 const Scalar divisor = std::max(possibleMax1,possibleMax2);
131 DUNE_THROW(Dune::NotImplemented,
"\nThis SST Model is not implemented.\n");
277 Scalar gradientProduct = 0.0;
278 for (
unsigned int i = 0; i < Traits::ModelTraits::dim(); ++i){
282 positiveCrossDiffusion = std::max(positiveCrossDiffusion, 1e-20);
289 const Scalar possibleMin1 = std::max(possibleMax1, possibleMax2);
291 const Scalar argument = std::min(possibleMin1,possibleMin2);
293 return tanh(argument * argument * argument * argument);
302 const Scalar argument = std::max(possibleMax1, possibleMax2);
304 return tanh(argument * argument);
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
The available free flow turbulence models in Dumux.
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 SST 2-Eq model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:42
const Scalar kappa1SST() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:247
Scalar storedDissipation_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:364
const Scalar sigmaK1SST() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:199
Scalar storedTurbulentKineticEnergy() const
Returns the turbulent kinetic energy .
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:144
const Scalar gamma1SST() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:259
const Scalar sigmaOmega1SST() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:211
const Scalar gamma1BSL() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:255
const Scalar gammaBSL() const
Returns the constant for the BSL-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:356
const Scalar sigmaOmega() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:187
Scalar wallDistance() const
Definition: freeflow/rans/twoeq/sst/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/twoeq/sst/volumevariables.hh:81
const Scalar beta2() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:227
Scalar absoluteValueVorticity() const
Returns the absolute value of the vorticity .
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:271
typename Traits::ModelTraits::Indices Indices
export the indices type
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:50
Scalar vorticityTensorScalarProduct_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:371
const Scalar sigmaOmegaSST() const
Returns the constant for the SST-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:313
const Scalar sigmaK2() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:203
const Scalar betaStar1BSL() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:231
const Scalar betaStarSST() const
Returns the constant for the SST-model. is the same for all models.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:321
Scalar F1() const
Returns the transformation function for the constants of the BSL- and SST-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:275
const Scalar kappa1BSL() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:243
Scalar dissipation_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:363
const Scalar betaK() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:191
DimVector storedTurbulentKineticEnergyGradient() const
Returns the gradient of the turbulent kinetic energy .
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:152
const Scalar betaBSL() const
Returns the constant for the BSL-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:344
const Scalar kappa2() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:251
const Scalar betaSST() const
Returns the constant for the SST-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:317
const Scalar betaStar1SST() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:235
Scalar F2() const
Returns the transformation function for the eddy viscosity of the SST-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:298
const Scalar betaStar2() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:239
Scalar storedTurbulentKineticEnergy_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:367
DimVector storedDissipationGradient() const
Returns the gradient of the effective dissipation .
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:156
Scalar calculateEddyViscosity(const Problem &problem)
Returns the dynamic eddy viscosity for the SST-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:115
const Scalar kappaSST() const
Returns the constant for the SST-model. is the same for all models.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:325
Scalar turbulentKineticEnergy() const
Returns the turbulent kinetic energy .
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:136
const Scalar betaOmega() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:175
Scalar vorticityTensorScalarProduct() const
Returns the scalar product of the vorticity tensor.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:164
const Scalar sigmaK() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:183
const Scalar beta1BSL() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:219
Scalar betaOmega_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:361
const Scalar sigmaKBSL() const
Returns the constant for the BSL-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:336
Scalar kinematicViscosity() const
Returns the kinematic viscosity.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:168
Scalar dissipation() const
Returns an effective dissipation .
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:140
Scalar kinematicViscosity_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:373
Scalar stressTensorScalarProduct() const
Returns the scalar product of the stress tensor.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:160
Scalar turbulentKineticEnergy_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:366
const Scalar a1SST() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:267
const Scalar sigmaK1BSL() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:195
Scalar storedDissipation() const
Returns an effective dissipation .
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:148
const Scalar betaStarBSL() const
Returns the constant for the BSL-model. is the same for all models.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:348
Scalar stressTensorScalarProduct_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:370
const Scalar sigmaOmegaBSL() const
Returns the constant for the BSL-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:340
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/twoeq/sst/volumevariables.hh:61
const Scalar sigmaOmega1BSL() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:207
const Scalar gammaSST() const
Returns the constant for the SST-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:329
DimVector storedTurbulentKineticEnergyGradient_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:368
const Scalar gamma2() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:263
const Scalar sigmaOmega2() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:215
const Scalar sigmaKSST() const
Returns the constant for the SST-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:309
const Scalar alpha() const
Returns the value.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:179
const Scalar kappaBSL() const
Returns the constant for the BSL-model. is the same for all models.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:352
const Scalar beta1SST() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:223
DimVector storedDissipationGradient_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:365
Scalar wallDistance_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:372
Volume variables for the isothermal single-phase Reynolds-Averaged Navier-Stokes models.
Definition: freeflow/rans/volumevariables.hh:42
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
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
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
Declares all properties used in Dumux.