Commit 129978c0 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

Merge branch 'cleanup/FS211-UseConvFunc-MPNC' into 'master'

Cleanup/fs211 use conv func mpnc

Thanks to Dennis for helping with the temperature issue!

See merge request !56
parents 55b3c013 149f77c1
......@@ -105,12 +105,12 @@ public:
for (int compIdx = 0; compIdx < numComponents; ++compIdx){
// calculate mole fractions at the integration points of the face
moleFraction_[phaseIdx][compIdx] += elemVolVars[volVarsIdx].fluidState().moleFraction(phaseIdx, compIdx)*
moleFraction_[phaseIdx][compIdx] += elemVolVars[volVarsIdx].moleFraction(phaseIdx, compIdx)*
face.shapeValue[idx];
// calculate mole fraction gradients
tmp = feGrad;
tmp *= elemVolVars[volVarsIdx].fluidState().moleFraction(phaseIdx, compIdx);
tmp *= elemVolVars[volVarsIdx].moleFraction(phaseIdx, compIdx);
moleFractionGrad_[phaseIdx][compIdx] += tmp;
}
}
......@@ -129,8 +129,8 @@ public:
{
// make sure to only calculate diffusion coefficents
// for phases which exist in both finite volumes
if (elemVolVars[i].fluidState().saturation(phaseIdx) <= 1e-4 ||
elemVolVars[j].fluidState().saturation(phaseIdx) <= 1e-4)
if (elemVolVars[i].saturation(phaseIdx) <= 1e-4 ||
elemVolVars[j].saturation(phaseIdx) <= 1e-4)
{
continue;
}
......@@ -141,11 +141,11 @@ public:
// and j
//
Scalar red_i =
elemVolVars[i].fluidState().saturation(phaseIdx)/elemVolVars[i].porosity() *
pow(elemVolVars[i].porosity() * elemVolVars[i].fluidState().saturation(phaseIdx), 7.0/3);
elemVolVars[i].saturation(phaseIdx)/elemVolVars[i].porosity() *
pow(elemVolVars[i].porosity() * elemVolVars[i].saturation(phaseIdx), 7.0/3);
Scalar red_j =
elemVolVars[j].fluidState().saturation(phaseIdx)/elemVolVars[j].porosity() *
pow(elemVolVars[j].porosity() * elemVolVars[j].fluidState().saturation(phaseIdx), 7.0/3);
elemVolVars[j].saturation(phaseIdx)/elemVolVars[j].porosity() *
pow(elemVolVars[j].porosity() * elemVolVars[j].saturation(phaseIdx), 7.0/3);
if (phaseIdx == wPhaseIdx) {
// Liquid phase diffusion coefficients in the porous medium
......
......@@ -141,7 +141,7 @@ public:
// index for the element volume variables
int volVarsIdx = face.fapIndices[idx];
tmp *= elemVolVars[volVarsIdx].fluidState().temperature(/*phaseIdx=*/0);
tmp *= elemVolVars[volVarsIdx].temperature(/*phaseIdx=*/0);
temperatureGradient += tmp;
}
......@@ -192,13 +192,13 @@ protected:
if (GET_PROP_VALUE(TypeTag, ImplicitIsBox))
{
lambdaI =
ThermalConductivityModel::effectiveThermalConductivity(elemVolVars[i].fluidState().saturation(wPhaseIdx),
ThermalConductivityModel::effectiveThermalConductivity(elemVolVars[i].saturation(wPhaseIdx),
elemVolVars[i].thermalConductivity(wPhaseIdx),
elemVolVars[i].thermalConductivity(nPhaseIdx),
problem.spatialParams().solidThermalConductivity(element, fvGeometry, i),
problem.spatialParams().porosity(element, fvGeometry, i));
lambdaJ =
ThermalConductivityModel::effectiveThermalConductivity(elemVolVars[j].fluidState().saturation(wPhaseIdx),
ThermalConductivityModel::effectiveThermalConductivity(elemVolVars[j].saturation(wPhaseIdx),
elemVolVars[j].thermalConductivity(wPhaseIdx),
elemVolVars[j].thermalConductivity(nPhaseIdx),
problem.spatialParams().solidThermalConductivity(element, fvGeometry, j),
......@@ -211,7 +211,7 @@ protected:
fvGeometryI.subContVol[0].global = elementI.geometry().center();
lambdaI =
ThermalConductivityModel::effectiveThermalConductivity(elemVolVars[i].fluidState().saturation(wPhaseIdx),
ThermalConductivityModel::effectiveThermalConductivity(elemVolVars[i].saturation(wPhaseIdx),
elemVolVars[i].thermalConductivity(wPhaseIdx),
elemVolVars[i].thermalConductivity(nPhaseIdx),
problem.spatialParams().solidThermalConductivity(elementI, fvGeometryI, 0),
......@@ -222,7 +222,7 @@ protected:
fvGeometryJ.subContVol[0].global = elementJ.geometry().center();
lambdaJ =
ThermalConductivityModel::effectiveThermalConductivity(elemVolVars[j].fluidState().saturation(wPhaseIdx),
ThermalConductivityModel::effectiveThermalConductivity(elemVolVars[j].saturation(wPhaseIdx),
elemVolVars[j].thermalConductivity(wPhaseIdx),
elemVolVars[j].thermalConductivity(nPhaseIdx),
problem.spatialParams().solidThermalConductivity(elementJ, fvGeometryJ, 0),
......
......@@ -246,13 +246,13 @@ protected:
if (GET_PROP_VALUE(TypeTag, ImplicitIsBox))
{
lambdaI =
ThermalConductivityModel::effectiveThermalConductivity(elemVolVars[i].fluidState().saturation(wPhaseIdx),
ThermalConductivityModel::effectiveThermalConductivity(elemVolVars[i].saturation(wPhaseIdx),
elemVolVars[i].thermalConductivity(wPhaseIdx),
elemVolVars[i].thermalConductivity(nPhaseIdx),
problem.spatialParams().solidThermalConductivity(element, fvGeometry, i),
problem.spatialParams().porosity(element, fvGeometry, i));
lambdaJ =
ThermalConductivityModel::effectiveThermalConductivity(elemVolVars[j].fluidState().saturation(wPhaseIdx),
ThermalConductivityModel::effectiveThermalConductivity(elemVolVars[j].saturation(wPhaseIdx),
elemVolVars[j].thermalConductivity(wPhaseIdx),
elemVolVars[j].thermalConductivity(nPhaseIdx),
problem.spatialParams().solidThermalConductivity(element, fvGeometry, j),
......@@ -265,7 +265,7 @@ protected:
fvGeometryI.subContVol[0].global = elementI.geometry().center();
lambdaI =
ThermalConductivityModel::effectiveThermalConductivity(elemVolVars[i].fluidState().saturation(wPhaseIdx),
ThermalConductivityModel::effectiveThermalConductivity(elemVolVars[i].saturation(wPhaseIdx),
elemVolVars[i].thermalConductivity(wPhaseIdx),
elemVolVars[i].thermalConductivity(nPhaseIdx),
problem.spatialParams().solidThermalConductivity(elementI, fvGeometryI, 0),
......@@ -276,7 +276,7 @@ protected:
fvGeometryJ.subContVol[0].global = elementJ.geometry().center();
lambdaJ =
ThermalConductivityModel::effectiveThermalConductivity(elemVolVars[j].fluidState().saturation(wPhaseIdx),
ThermalConductivityModel::effectiveThermalConductivity(elemVolVars[j].saturation(wPhaseIdx),
elemVolVars[j].thermalConductivity(wPhaseIdx),
elemVolVars[j].thermalConductivity(nPhaseIdx),
problem.spatialParams().solidThermalConductivity(elementJ, fvGeometryJ, 0),
......
......@@ -161,7 +161,7 @@ public:
// heat stored in the rock matrix
storage[energyEqIdx] +=
volVars.fluidState().temperature(/*phaseIdx=*/0)
volVars.temperature(/*phaseIdx=*/0)
* volVars.solidDensity()
* (1.0 - volVars.porosity())
* volVars.solidHeatCapacity();
......@@ -248,7 +248,7 @@ if (!std::isfinite(storage[energyEqIdx]))
// use the phase enthalpy of the upstream vertex to calculate
// the enthalpy transport
const VolumeVariables &up = elemVolVars[upIdx];
flux[energyEqIdx] += up.fluidState().enthalpy(phaseIdx) * massFlux;
flux[energyEqIdx] += up.enthalpy(phaseIdx) * massFlux;
#ifndef NDEBUG
if (!std::isfinite(flux[energyEqIdx]) )
DUNE_THROW(NumericalProblem, "Calculated non-finite energy flux");
......
......@@ -209,8 +209,8 @@ public:
* To be more precise this should be the components enthalpy.
* In the same vein: Counter current diffusion is not accounted for here.
*/
const Scalar transportedThingUp = up.fluidState().enthalpy(phaseIdx) ;
const Scalar transportedThingDn = dn.fluidState().enthalpy(phaseIdx) ;
const Scalar transportedThingUp = up.enthalpy(phaseIdx) ;
const Scalar transportedThingDn = dn.enthalpy(phaseIdx) ;
const Scalar massUpwindWeight_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Implicit, MassUpwindWeight);
......@@ -574,8 +574,8 @@ public:
/* todo
* CAUTION: this is not exactly correct: does diffusion carry the upstream phase enthalpy? To be more precise this should be the components enthalpy. In the same vein: Counter current diffusion is not accounted for here.
*/
const Scalar transportedThingUp = up.fluidState().enthalpy(phaseIdx) ;
const Scalar transportedThingDn = dn.fluidState().enthalpy(phaseIdx) ;
const Scalar transportedThingUp = up.enthalpy(phaseIdx) ;
const Scalar transportedThingDn = dn.enthalpy(phaseIdx) ;
const Scalar massUpwindWeight_ = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Implicit, MassUpwindWeight);
flux[energyEq0Idx] += massFlux *
......
......@@ -100,7 +100,7 @@ public:
const VolumeVariables &volVars = elemVolVars[scvIdx];
if (temperatureOutput_)
temperature_[dofIdxGlobal] = volVars.fluidState().temperature(/*phaseIdx=*/0);
temperature_[dofIdxGlobal] = volVars.temperature(/*phaseIdx=*/0);
}
}
......@@ -190,12 +190,12 @@ public:
int gobalIdx = this->problem_.model().dofMapper().subIndex(element, scvIdx, dofCodim);
const VolumeVariables &volVars = elemVolVars[scvIdx];
if (temperatureOutput_) temperature_[gobalIdx] = volVars.fluidState().temperature(/*phaseIdx=*/0);
if (temperatureOutput_) temperature_[gobalIdx] = volVars.temperature(/*phaseIdx=*/0);
for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
if (enthalpyOutput_)
enthalpy_[phaseIdx][gobalIdx] = volVars.fluidState().enthalpy(phaseIdx);
enthalpy_[phaseIdx][gobalIdx] = volVars.enthalpy(phaseIdx);
if (internalEnergyOutput_)
internalEnergy_[phaseIdx][gobalIdx] = volVars.fluidState().internalEnergy(phaseIdx);
internalEnergy_[phaseIdx][gobalIdx] = volVars.internalEnergy(phaseIdx);
}
}
}
......
......@@ -136,8 +136,8 @@ public:
const VolumeVariables &volVars = elemVolVars[localVertexIdx];
for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
enthalpy_[phaseIdx][vIdxGlobal] = volVars.fluidState().enthalpy(phaseIdx);
internalEnergy_[phaseIdx][vIdxGlobal] = volVars.fluidState().internalEnergy(phaseIdx);
enthalpy_[phaseIdx][vIdxGlobal] = volVars.enthalpy(phaseIdx);
internalEnergy_[phaseIdx][vIdxGlobal] = volVars.internalEnergy(phaseIdx);
reynoldsNumber_[phaseIdx][vIdxGlobal] = volVars.reynoldsNumber(phaseIdx);
prandtlNumber_[phaseIdx][vIdxGlobal] = volVars.prandtlNumber(phaseIdx);
nusseltNumber_[phaseIdx][vIdxGlobal] = volVars.nusseltNumber(phaseIdx);
......@@ -377,12 +377,12 @@ public:
const unsigned int vIdxGlobal = this->problem_.vertexMapper().subIndex(element, localVertexIdx, dim);
const VolumeVariables &volVars = elemVolVars[localVertexIdx];
qBoil_[vIdxGlobal] = LocalResidual::QBoilFunc(volVars, volVars.fluidState().saturation(wPhaseIdx));
qBoil_[vIdxGlobal] = LocalResidual::QBoilFunc(volVars, volVars.saturation(wPhaseIdx));
qsf_[vIdxGlobal] = LocalResidual::qsf(volVars);
for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
enthalpy_[phaseIdx][vIdxGlobal] = volVars.fluidState().enthalpy(phaseIdx);
internalEnergy_[phaseIdx][vIdxGlobal] = volVars.fluidState().internalEnergy(phaseIdx);
enthalpy_[phaseIdx][vIdxGlobal] = volVars.enthalpy(phaseIdx);
internalEnergy_[phaseIdx][vIdxGlobal] = volVars.internalEnergy(phaseIdx);
reynoldsNumber_[phaseIdx][vIdxGlobal] = volVars.reynoldsNumber(phaseIdx);
prandtlNumber_[phaseIdx][vIdxGlobal] = volVars.prandtlNumber(phaseIdx);
nusseltNumber_[phaseIdx][vIdxGlobal] = volVars.nusseltNumber(phaseIdx);
......
......@@ -76,8 +76,8 @@ public:
storage = 0;
for (int compIdx = 0; compIdx < numComponents; ++ compIdx) {
storage[compIdx] +=
volVars.fluidState().saturation(phaseIdx)*
volVars.fluidState().molarity(phaseIdx, compIdx);
volVars.saturation(phaseIdx)*
volVars.molarity(phaseIdx, compIdx);
#ifndef NDEBUG
if (!std::isfinite(storage[compIdx]))
DUNE_THROW(NumericalProblem, "Calculated non-finite storage");
......@@ -131,10 +131,10 @@ if (!std::isfinite(volumeFlux))
if (enableSmoothUpwinding_) {
const Scalar kGradPNormal = fluxVars.kGradPNormal(phaseIdx);
const Scalar mobUp = up.mobility(phaseIdx);
const Scalar conUp = up.fluidState().molarity(phaseIdx, compIdx);
const Scalar conUp = up.molarity(phaseIdx, compIdx);
const Scalar mobDn = dn.mobility(phaseIdx);
const Scalar conDn = dn.fluidState().molarity(phaseIdx, compIdx);
const Scalar conDn = dn.molarity(phaseIdx, compIdx);
const Scalar mobConUp = mobUp*conUp;
const Scalar mobConDn = mobDn*conDn;
......@@ -144,8 +144,8 @@ if (!std::isfinite(volumeFlux))
const Scalar sign = (kGradPNormal > 0)?-1:1;
// approximate the mean viscosity at the face
const Scalar meanVisc = (up.fluidState().viscosity(phaseIdx) +
dn.fluidState().viscosity(phaseIdx))/2;
const Scalar meanVisc = (up.viscosity(phaseIdx) +
dn.viscosity(phaseIdx))/2;
// put the mean viscosity and permeanbility in
// relation to the viscosity of water at
......@@ -180,11 +180,11 @@ if (!std::isfinite(volumeFlux))
{// not use smooth upwinding
flux[compIdx] =
volumeFlux *
(( massUpwindWeight)*up.fluidState().molarity(phaseIdx, compIdx)
(( massUpwindWeight)*up.molarity(phaseIdx, compIdx)
+
( 1. - massUpwindWeight)*dn.fluidState().molarity(phaseIdx, compIdx) );
( 1. - massUpwindWeight)*dn.molarity(phaseIdx, compIdx) );
if (!std::isfinite(flux[compIdx]))
DUNE_THROW(NumericalProblem, "Calculated non-finite normal flux in phase " << phaseIdx << " comp " << compIdx << "T: "<< up.fluidState().temperature(phaseIdx) << "S "<<up.fluidState().saturation(phaseIdx) ) ;
DUNE_THROW(NumericalProblem, "Calculated non-finite normal flux in phase " << phaseIdx << " comp " << compIdx << "T: "<< up.temperature(phaseIdx) << "S "<<up.saturation(phaseIdx) ) ;
}
}
}
......@@ -211,8 +211,8 @@ if (!std::isfinite(volumeFlux))
const VolumeVariables &volVarsI = fluxVars.volVars(fluxVars.face().i);
const VolumeVariables &volVarsJ = fluxVars.volVars(fluxVars.face().j);
if (volVarsI.fluidState().saturation(phaseIdx) < 1e-4 ||
volVarsJ.fluidState().saturation(phaseIdx) < 1e-4)
if (volVarsI.saturation(phaseIdx) < 1e-4 ||
volVarsJ.saturation(phaseIdx) < 1e-4)
{
return; // phase is not present in one of the finite volumes
}
......@@ -221,8 +221,8 @@ if (!std::isfinite(volumeFlux))
// integration point by the arithmetic mean of the
// concentration of the sub-control volumes
Scalar molarDensityAtIP;
molarDensityAtIP = volVarsI.fluidState().molarDensity(phaseIdx);
molarDensityAtIP += volVarsJ.fluidState().molarDensity(phaseIdx);
molarDensityAtIP = volVarsI.molarDensity(phaseIdx);
molarDensityAtIP += volVarsJ.molarDensity(phaseIdx);
molarDensityAtIP /= 2;
Diffusion::flux(flux, phaseIdx, fluxVars, molarDensityAtIP);
......
......@@ -195,8 +195,8 @@ public:
Valgrind::CheckDefined(mu_nPhaseWComp);
const Scalar characteristicLength = volVars.characteristicLength() ;
const Scalar temperature = volVars.fluidState().temperature(wPhaseIdx);
const Scalar pn = volVars.fluidState().pressure(nPhaseIdx);
const Scalar temperature = volVars.temperature(wPhaseIdx);
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 *
......@@ -205,7 +205,7 @@ public:
Scalar x[numPhases][numComponents]; // mass fractions in wetting phase
for(int phaseIdx=0; phaseIdx<numPhases; ++phaseIdx){
for (int compIdx=0; compIdx< numComponents; ++ compIdx){
x[phaseIdx][compIdx] = volVars.fluidState().moleFraction(phaseIdx, compIdx);
x[phaseIdx][compIdx] = volVars.moleFraction(phaseIdx, compIdx);
}
}
Valgrind::CheckDefined(x);
......@@ -221,7 +221,7 @@ public:
#endif
Scalar phaseDensity[numPhases];
for(int phaseIdx=0; phaseIdx<numPhases; ++phaseIdx){
phaseDensity[phaseIdx] = volVars.fluidState().molarDensity(phaseIdx);
phaseDensity[phaseIdx] = volVars.molarDensity(phaseIdx);
}
// diffusion coefficients in wetting phase
......
......@@ -99,7 +99,7 @@ public:
if (fugacityOutput_) {
for (int compIdx = 0; compIdx < numComponents; ++compIdx) {
fugacity_[compIdx][dofIdxGlobal] = volVars.fluidState().fugacity(compIdx);
fugacity_[compIdx][dofIdxGlobal] = volVars.fugacity(compIdx);
}
}
}
......
......@@ -127,7 +127,7 @@ public:
// }
if (deltaPOutput_) {
deltaP_[vIdxGlobal] = volVars.fluidState().pressure(nPhaseIdx) - 100000.;
deltaP_[vIdxGlobal] = volVars.pressure(nPhaseIdx) - 100000.;
}
}
}
......
......@@ -265,6 +265,114 @@ public:
const FluidState &fluidState() const
{ return fluidState_; }
/*!
* \brief Returns the saturation of a given phase within
* the control volume in \f$[-]\f$.
*
* \param phaseIdx The phase index
*/
Scalar saturation(int phaseIdx) const
{ return fluidState_.saturation(phaseIdx); }
/*!
* \brief Returns the mass fraction of a given component in a
* given phase within the control volume in \f$[-]\f$.
*
* \param phaseIdx The phase index
* \param compIdx The component index
*/
Scalar massFraction(const int phaseIdx, const int compIdx) const
{ return fluidState_.massFraction(phaseIdx, compIdx); }
/*!
* \brief Returns the mole fraction of a given component in a
* given phase within the control volume in \f$[-]\f$.
*
* \param phaseIdx The phase index
* \param compIdx The component index
*/
Scalar moleFraction(const int phaseIdx, const int compIdx) const
{ return fluidState_.moleFraction(phaseIdx, compIdx); }
/*!
* \brief Return concentration \f$\mathrm{[mol/m^3]}\f$ of a component in the phase.
*
* \param compIdx The index of the component
*/
Scalar molarity(const int phaseIdx, int compIdx) const
{ return fluidState_.molarity(phaseIdx, compIdx); }
/*!
* \brief Return molar density \f$\mathrm{[mol/m^3]}\f$ the of the fluid phase.
*/
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 fluid/solid phase temperature
* in the sub-control volume for the assumption of local thermal
* non-equillibrium where there is more than one energy equation
* and each phase and the matrix can have different temperatures
*
* \param phaseIdx The local index of the phases
*/
template <class T = TypeTag>
typename std::enable_if<(GET_PROP_VALUE(T, NumEnergyEquations) > 1), Scalar>::type temperature(const unsigned int phaseIdx) const
{
return EnergyVolumeVariables::temperature(phaseIdx);
}
/*!
* \brief Returns the fluid/solid phase temperature
* in the sub-control volume for the assumption of local thermal
* equillibrium where there is only one or no energy equation
* and all phases including the matrix have the same temperature
*
* \param phaseIdx The local index of the phases
*/
template <class T = TypeTag>
typename std::enable_if<(GET_PROP_VALUE(T, NumEnergyEquations) < 2), Scalar>::type temperature(const unsigned int phaseIdx) const
{
return fluidState_.temperature(phaseIdx);
}
/*!
* \brief Return enthalpy \f$\mathrm{[kg/m^3]}\f$ the of the fluid phase.
*/
Scalar enthalpy(const int phaseIdx) const
{ return fluidState_.enthalpy(phaseIdx); }
/*!
* \brief Return internal energy \f$\mathrm{[kg/m^3]}\f$ the of the fluid phase.
*/
Scalar internalEnergy(const int phaseIdx) const
{ return fluidState_.internalEnergy(phaseIdx); }
/*!
* \brief Return fugacity \f$\mathrm{[kg/m^3]}\f$ the of the component.
*/
Scalar fugacity(const int compIdx) const
{ return fluidState_.fugacity(compIdx); }
/*!
* \brief Return average molar mass \f$\mathrm{[kg/m^3]}\f$ the of the phase.
*/
Scalar averageMolarMass(const int phaseIdx) const
{ return fluidState_.averageMolarMass(phaseIdx); }
/*!
* \brief Returns the effective mobility of a given phase within
* the control volume.
......
......@@ -151,15 +151,15 @@ public:
if (boundaryTypesOutput_) boundaryTypes_[dofIdxGlobal] = tmp;
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
if (saturationOutput_) saturation_[phaseIdx][dofIdxGlobal] = volVars.fluidState().saturation(phaseIdx);
if (pressureOutput_) pressure_[phaseIdx][dofIdxGlobal] = volVars.fluidState().pressure(phaseIdx);
if (densityOutput_) density_[phaseIdx][dofIdxGlobal] = volVars.fluidState().density(phaseIdx);
if (saturationOutput_) saturation_[phaseIdx][dofIdxGlobal] = volVars.saturation(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);
if (averageMolarMassOutput_) averageMolarMass_[phaseIdx][dofIdxGlobal] = volVars.averageMolarMass(phaseIdx);
for (int compIdx = 0; compIdx < numComponents; ++compIdx) {
if (moleFracOutput_) moleFrac_[phaseIdx][compIdx][dofIdxGlobal] = volVars.fluidState().moleFraction(phaseIdx, compIdx);
if (massFracOutput_) massFrac_[phaseIdx][compIdx][dofIdxGlobal] = volVars.fluidState().massFraction(phaseIdx, compIdx);
if (molarityOutput_) molarity_[phaseIdx][compIdx][dofIdxGlobal] = volVars.fluidState().molarity(phaseIdx, compIdx);
if (moleFracOutput_) moleFrac_[phaseIdx][compIdx][dofIdxGlobal] = volVars.moleFraction(phaseIdx, compIdx);
if (massFracOutput_) massFrac_[phaseIdx][compIdx][dofIdxGlobal] = volVars.massFraction(phaseIdx, compIdx);
if (molarityOutput_) molarity_[phaseIdx][compIdx][dofIdxGlobal] = volVars.molarity(phaseIdx, compIdx);
}
}
}
......
......@@ -478,11 +478,11 @@ 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);
const Scalar Tn = elemVolVars[scvIdx].temperature(nPhaseIdx);
const Scalar Tw = elemVolVars[scvIdx].temperature(wPhaseIdx);
fluidState.setPressure(nPhaseIdx, pn);
fluidState.setPressure(wPhaseIdx, pw);
......
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