Commit 567e78be authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[cleanup] Use convenience function for pressure and density

Implement a pressure()  and density() function in the volvars and use it
instead of volvars.fluidstate().x(phaseIdx).
parent fd1a2322
......@@ -196,7 +196,7 @@ public:
const Scalar characteristicLength = volVars.characteristicLength() ;
const Scalar temperature = volVars.fluidState().temperature(wPhaseIdx);
const Scalar pn = volVars.fluidState().pressure(nPhaseIdx);
const Scalar pn = volVars.pressure(nPhaseIdx);
const Scalar henry = FluidSystem::henry(temperature) ;
const Scalar gradNinWApprox = ( mu_wPhaseNComp - mu_nPhaseNCompEquil) / characteristicLength; // very 2p2c // 1. / henry *
const Scalar gradWinNApprox = ( mu_nPhaseWComp - mu_wPhaseWCompEquil) / characteristicLength; // very 2p2c // 1. / pn *
......
......@@ -127,7 +127,7 @@ public:
// }
if (deltaPOutput_) {
deltaP_[vIdxGlobal] = volVars.fluidState().pressure(nPhaseIdx) - 100000.;
deltaP_[vIdxGlobal] = volVars.pressure(nPhaseIdx) - 100000.;
}
}
}
......
......@@ -308,6 +308,19 @@ public:
Scalar molarDensity(const int phaseIdx) const
{ return fluidState_.molarDensity(phaseIdx);}
/*!
* \brief Return the effective pressure \f$\mathrm{[Pa]}\f$ of a given phase within
* the control volume.
*/
Scalar pressure(const int phaseIdx) const
{ return fluidState_.pressure(phaseIdx); }
/*!
* \brief Return density \f$\mathrm{[kg/m^3]}\f$ the of the fluid phase.
*/
Scalar density(const int phaseIdx) const
{ return fluidState_.density(phaseIdx); }
/*!
* \brief Returns the effective mobility of a given phase within
* the control volume.
......
......@@ -152,8 +152,8 @@ public:
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
if (saturationOutput_) saturation_[phaseIdx][dofIdxGlobal] = volVars.saturation(phaseIdx);
if (pressureOutput_) pressure_[phaseIdx][dofIdxGlobal] = volVars.fluidState().pressure(phaseIdx);
if (densityOutput_) density_[phaseIdx][dofIdxGlobal] = volVars.fluidState().density(phaseIdx);
if (pressureOutput_) pressure_[phaseIdx][dofIdxGlobal] = volVars.pressure(phaseIdx);
if (densityOutput_) density_[phaseIdx][dofIdxGlobal] = volVars.density(phaseIdx);
if (mobilityOutput_) mobility_[phaseIdx][dofIdxGlobal] = volVars.mobility(phaseIdx);
if (averageMolarMassOutput_) averageMolarMass_[phaseIdx][dofIdxGlobal] = volVars.fluidState().averageMolarMass(phaseIdx);
for (int compIdx = 0; compIdx < numComponents; ++compIdx) {
......
......@@ -478,8 +478,8 @@ public:
FluidState fluidState;
const Scalar pn = elemVolVars[scvIdx].fluidState().pressure(nPhaseIdx);
const Scalar pw = elemVolVars[scvIdx].fluidState().pressure(wPhaseIdx);
const Scalar pn = elemVolVars[scvIdx].pressure(nPhaseIdx);
const Scalar pw = elemVolVars[scvIdx].pressure(wPhaseIdx);
const Scalar Tn = elemVolVars[scvIdx].fluidState().temperature(nPhaseIdx);
const Scalar Tw = elemVolVars[scvIdx].fluidState().temperature(wPhaseIdx);
......
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