13#ifndef DUMUX_SST_VOLUME_VARIABLES_HH
14#define DUMUX_SST_VOLUME_VARIABLES_HH
27template <
class Traits,
class NSVolumeVariables>
33 using Scalar =
typename Traits::PrimaryVariables::value_type;
34 using DimVector = Dune::FieldVector<Scalar, Traits::ModelTraits::dim()>;
38 using Indices =
typename Traits::ModelTraits::Indices;
48 template<
class ElementSolution,
class Problem,
class Element,
class SubControlVolume>
49 void update(
const ElementSolution &elemSol,
50 const Problem &problem,
51 const Element &element,
52 const SubControlVolume& scv)
68 template<
class ElementSolution,
class Problem,
class Element,
class SubControlVolume>
70 const Problem &problem,
71 const Element &element,
72 const SubControlVolume& scv)
90 if (problem.useStoredEddyViscosity())
102 template<
class Problem>
115 const Scalar divisor = std::max(possibleMax1,possibleMax2);
119 DUNE_THROW(Dune::NotImplemented,
"\nThis SST Model is not implemented.\n");
265 Scalar gradientProduct = 0.0;
266 for (
unsigned int i = 0; i < Traits::ModelTraits::dim(); ++i){
270 positiveCrossDiffusion = std::max(positiveCrossDiffusion, 1e-20);
277 const Scalar possibleMin1 = std::max(possibleMax1, possibleMax2);
279 const Scalar argument = std::min(possibleMin1,possibleMin2);
281 return tanh(argument * argument * argument * argument);
290 const Scalar argument = std::max(possibleMax1, possibleMax2);
292 return tanh(argument * argument);
Volume variables for the isothermal single-phase Reynolds-Averaged Navier-Stokes models.
Definition: freeflow/rans/volumevariables.hh:30
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
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:53
Scalar setDynamicEddyViscosity_(Scalar value)
Sets the dynamic eddy viscosity .
Definition: freeflow/rans/volumevariables.hh:254
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:73
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:108
Volume variables for the isothermal single-phase SST 2-Eq model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:30
const Scalar kappa1SST() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:235
Scalar storedDissipation_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:352
const Scalar sigmaK1SST() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:187
Scalar storedTurbulentKineticEnergy() const
Returns the turbulent kinetic energy .
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:132
const Scalar gamma1SST() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:247
const Scalar sigmaOmega1SST() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:199
const Scalar gamma1BSL() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:243
const Scalar gammaBSL() const
Returns the constant for the BSL-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:344
const Scalar sigmaOmega() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:175
Scalar wallDistance() const
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:159
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:69
const Scalar beta2() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:215
Scalar absoluteValueVorticity() const
Returns the absolute value of the vorticity .
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:259
typename Traits::ModelTraits::Indices Indices
export the indices type
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:38
Scalar vorticityTensorScalarProduct_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:359
const Scalar sigmaOmegaSST() const
Returns the constant for the SST-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:301
const Scalar sigmaK2() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:191
const Scalar betaStar1BSL() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:219
const Scalar betaStarSST() const
Returns the constant for the SST-model. is the same for all models.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:309
Scalar F1() const
Returns the transformation function for the constants of the BSL- and SST-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:263
const Scalar kappa1BSL() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:231
Scalar dissipation_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:351
const Scalar betaK() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:179
DimVector storedTurbulentKineticEnergyGradient() const
Returns the gradient of the turbulent kinetic energy .
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:140
const Scalar betaBSL() const
Returns the constant for the BSL-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:332
const Scalar kappa2() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:239
const Scalar betaSST() const
Returns the constant for the SST-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:305
const Scalar betaStar1SST() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:223
Scalar F2() const
Returns the transformation function for the eddy viscosity of the SST-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:286
const Scalar betaStar2() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:227
Scalar storedTurbulentKineticEnergy_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:355
DimVector storedDissipationGradient() const
Returns the gradient of the effective dissipation .
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:144
Scalar calculateEddyViscosity(const Problem &problem)
Returns the dynamic eddy viscosity for the SST-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:103
const Scalar kappaSST() const
Returns the constant for the SST-model. is the same for all models.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:313
Scalar turbulentKineticEnergy() const
Returns the turbulent kinetic energy .
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:124
const Scalar betaOmega() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:163
Scalar vorticityTensorScalarProduct() const
Returns the scalar product of the vorticity tensor.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:152
const Scalar sigmaK() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:171
const Scalar beta1BSL() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:207
Scalar betaOmega_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:349
const Scalar sigmaKBSL() const
Returns the constant for the BSL-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:324
Scalar kinematicViscosity() const
Returns the kinematic viscosity.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:156
Scalar dissipation() const
Returns an effective dissipation .
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:128
Scalar kinematicViscosity_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:361
Scalar stressTensorScalarProduct() const
Returns the scalar product of the stress tensor.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:148
Scalar turbulentKineticEnergy_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:354
const Scalar a1SST() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:255
const Scalar sigmaK1BSL() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:183
Scalar storedDissipation() const
Returns an effective dissipation .
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:136
const Scalar betaStarBSL() const
Returns the constant for the BSL-model. is the same for all models.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:336
Scalar stressTensorScalarProduct_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:358
const Scalar sigmaOmegaBSL() const
Returns the constant for the BSL-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:328
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:49
const Scalar sigmaOmega1BSL() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:195
const Scalar gammaSST() const
Returns the constant for the SST-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:317
DimVector storedTurbulentKineticEnergyGradient_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:356
const Scalar gamma2() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:251
const Scalar sigmaOmega2() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:203
const Scalar sigmaKSST() const
Returns the constant for the SST-model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:297
const Scalar alpha() const
Returns the value.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:167
const Scalar kappaBSL() const
Returns the constant for the BSL-model. is the same for all models.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:340
const Scalar beta1SST() const
Returns the constant.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:211
DimVector storedDissipationGradient_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:353
Scalar wallDistance_
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:360
Defines all properties used in Dumux.
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:53
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
The available free flow turbulence models in Dumux.