Commit e34c62d3 authored by Ned Coltman's avatar Ned Coltman Committed by Kilian Weishaupt
Browse files

[rans][lowrekepsilon] add density in all terms of the lowrekepsilon model

parent 2a96db92
...@@ -97,11 +97,11 @@ public: ...@@ -97,11 +97,11 @@ public:
// calculate advective flux // calculate advective flux
auto upwindTermK = [](const auto& volVars) auto upwindTermK = [](const auto& volVars)
{ {
return volVars.turbulentKineticEnergy(); return volVars.turbulentKineticEnergy() * volVars.density();
}; };
auto upwindTermEpsilon = [](const auto& volVars) auto upwindTermEpsilon = [](const auto& volVars)
{ {
return volVars.dissipationTilde(); return volVars.dissipationTilde() * volVars.density();
}; };
flux[turbulentKineticEnergyEqIdx] flux[turbulentKineticEnergyEqIdx]
...@@ -116,14 +116,14 @@ public: ...@@ -116,14 +116,14 @@ public:
const auto& outsideVolVars = elemVolVars[scvf.outsideScvIdx()]; const auto& outsideVolVars = elemVolVars[scvf.outsideScvIdx()];
// effective diffusion coefficients // effective diffusion coefficients
Scalar insideCoeff_k = insideVolVars.kinematicViscosity() Scalar insideCoeff_k = insideVolVars.viscosity() + insideVolVars.kinematicEddyViscosity()
+ insideVolVars.kinematicEddyViscosity() / insideVolVars.sigmaK(); * insideVolVars.density() / insideVolVars.sigmaK();
Scalar outsideCoeff_k = outsideVolVars.kinematicViscosity() Scalar outsideCoeff_k = outsideVolVars.viscosity() + outsideVolVars.kinematicEddyViscosity()
+ outsideVolVars.kinematicEddyViscosity() / outsideVolVars.sigmaK(); * outsideVolVars.density() / outsideVolVars.sigmaK();
Scalar insideCoeff_e = insideVolVars.kinematicViscosity() Scalar insideCoeff_e = insideVolVars.viscosity() + insideVolVars.kinematicEddyViscosity()
+ insideVolVars.kinematicEddyViscosity() / insideVolVars.sigmaEpsilon(); * insideVolVars.density() / insideVolVars.sigmaEpsilon();
Scalar outsideCoeff_e = outsideVolVars.kinematicViscosity() Scalar outsideCoeff_e = outsideVolVars.viscosity() + outsideVolVars.kinematicEddyViscosity()
+ outsideVolVars.kinematicEddyViscosity() / outsideVolVars.sigmaEpsilon(); * outsideVolVars.density() / outsideVolVars.sigmaEpsilon();
// scale by extrusion factor // scale by extrusion factor
insideCoeff_k *= insideVolVars.extrusionFactor(); insideCoeff_k *= insideVolVars.extrusionFactor();
......
...@@ -82,8 +82,8 @@ public: ...@@ -82,8 +82,8 @@ public:
{ {
CellCenterPrimaryVariables storage = ParentType::computeStorageForCellCenter(problem, scv, volVars); CellCenterPrimaryVariables storage = ParentType::computeStorageForCellCenter(problem, scv, volVars);
storage[turbulentKineticEnergyEqIdx] = volVars.turbulentKineticEnergy(); storage[turbulentKineticEnergyEqIdx] = volVars.turbulentKineticEnergy() * volVars.density();
storage[dissipationEqIdx] = volVars.dissipationTilde(); storage[dissipationEqIdx] = volVars.dissipationTilde() * volVars.density();
return storage; return storage;
} }
...@@ -101,22 +101,22 @@ public: ...@@ -101,22 +101,22 @@ public:
const auto& volVars = elemVolVars[scv]; const auto& volVars = elemVolVars[scv];
// production // production
source[turbulentKineticEnergyEqIdx] += 2.0 * volVars.kinematicEddyViscosity() source[turbulentKineticEnergyEqIdx] += 2.0 * volVars.dynamicEddyViscosity()
* volVars.stressTensorScalarProduct(); * volVars.stressTensorScalarProduct();
source[dissipationEqIdx] += volVars.cOneEpsilon() * volVars.fOne() source[dissipationEqIdx] += volVars.cOneEpsilon() * volVars.fOne()
* volVars.dissipationTilde() / volVars.turbulentKineticEnergy() * volVars.dissipationTilde() / volVars.turbulentKineticEnergy()
* 2.0 * volVars.kinematicEddyViscosity() * 2.0 * volVars.dynamicEddyViscosity()
* volVars.stressTensorScalarProduct(); * volVars.stressTensorScalarProduct();
// destruction // destruction
source[turbulentKineticEnergyEqIdx] -= volVars.dissipationTilde(); source[turbulentKineticEnergyEqIdx] -= volVars.dissipationTilde() * volVars.density();
source[dissipationEqIdx] -= volVars.cTwoEpsilon() * volVars.fTwo() source[dissipationEqIdx] -= volVars.cTwoEpsilon() * volVars.fTwo() * volVars.density()
* volVars.dissipationTilde() * volVars.dissipationTilde() * volVars.dissipationTilde() * volVars.dissipationTilde()
/ volVars.turbulentKineticEnergy(); / volVars.turbulentKineticEnergy();
// dampening functions // dampening functions
source[turbulentKineticEnergyEqIdx] -= volVars.dValue(); source[turbulentKineticEnergyEqIdx] -= volVars.dValue() * volVars.density();
source[dissipationEqIdx] += volVars.eValue(); source[dissipationEqIdx] += volVars.eValue() * volVars.density();
return source; return source;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment