26#ifndef DUMUX_3P2CNI_VOLUME_VARIABLES_HH
27#define DUMUX_3P2CNI_VOLUME_VARIABLES_HH
52template <
class Flu
idMatrixInteraction>
56template<
class Flu
idMatrixInteraction>
58{
return Dune::Std::is_detected<AdsorptionModelDetector, FluidMatrixInteraction>::value; }
67template <
class Traits>
74 using Scalar =
typename Traits::PrimaryVariables::value_type;
75 using ModelTraits =
typename Traits::ModelTraits;
76 using FS =
typename Traits::FluidSystem;
82 wCompIdx = FS::wCompIdx,
83 nCompIdx = FS::nCompIdx,
85 wPhaseIdx = FS::wPhaseIdx,
86 gPhaseIdx = FS::gPhaseIdx,
87 nPhaseIdx = FS::nPhaseIdx,
89 switch1Idx = ModelTraits::Indices::switch1Idx,
90 switch2Idx = ModelTraits::Indices::switch2Idx,
91 pressureIdx = ModelTraits::Indices::pressureIdx
96 threePhases = ModelTraits::Indices::threePhases,
97 wPhaseOnly = ModelTraits::Indices::wPhaseOnly,
98 gnPhaseOnly = ModelTraits::Indices::gnPhaseOnly,
99 wnPhaseOnly = ModelTraits::Indices::wnPhaseOnly,
100 gPhaseOnly = ModelTraits::Indices::gPhaseOnly,
101 wgPhaseOnly = ModelTraits::Indices::wgPhaseOnly
104 using EffDiffModel =
typename Traits::EffectiveDiffusivityModel;
105 using DiffusionCoefficients =
typename Traits::DiffusionType::DiffusionCoefficientsContainer;
113 using Indices =
typename ModelTraits::Indices;
122 {
return Traits::ModelTraits::onlyGasPhaseCanDisappear(); }
132 template<
class ElemSol,
class Problem,
class Element,
class Scv>
134 const Problem &problem,
135 const Element &element,
139 const auto&
priVars = elemSol[scv.localDofIndex()];
149 sg_ = 1. - sw_ - sn_;
181 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
190 const auto fluidMatrixInteraction = Deprecated::makePcKrSw<3>(Scalar{}, problem.spatialParams(), element, scv, elemSol);
193 const Scalar pcgw = fluidMatrixInteraction.pcgw(sw_, sn_);
194 const Scalar pcnw = fluidMatrixInteraction.pcnw(sw_, sn_);
195 const Scalar pcgn = fluidMatrixInteraction.pcgn(sw_, sn_);
197 const Scalar pcAlpha = fluidMatrixInteraction.pcAlpha(sw_, sn_);
198 const Scalar pcNW1 = 0.0;
204 pn_ = pg_- pcAlpha * pcgn - (1.-pcAlpha)*(pcgw - pcNW1);
205 pw_ = pn_ - pcAlpha * pcnw - (1.-pcAlpha)*pcNW1;
210 pn_ = pw_ + pcAlpha * pcnw + (1.-pcAlpha)*pcNW1;
211 pg_ = pn_ + pcAlpha * pcgn + (1.-pcAlpha)*(pcgw - pcNW1);
213 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
227 Scalar temp = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, wCompIdx);
228 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
233 Scalar defect = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
234 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
237 while(abs(defect) > 0.01)
239 Scalar deltaT = 1.e-8 * temp;
240 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
245 Scalar fUp = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
246 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
248 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
253 Scalar fDown = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
254 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
256 temp = temp - defect * 2. * deltaT / (fUp - fDown);
258 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
263 defect = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
264 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
271 temp_ = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, wCompIdx);
276 temp_ = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, nCompIdx);
278 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
280 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
291 Scalar partPressH2O = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx);
292 Scalar partPressNAPL = pg_ - partPressH2O;
294 Scalar xgn = partPressNAPL/pg_;
295 Scalar xgw = partPressH2O/pg_;
298 Scalar xwn = partPressNAPL / FluidSystem::henryCoefficient(
fluidState_, wPhaseIdx,nCompIdx);
302 Scalar xnw = partPressH2O / FluidSystem::henryCoefficient(
fluidState_, nPhaseIdx,wCompIdx);
305 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
306 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
307 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
308 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
309 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
310 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
331 Scalar xwn =
priVars[switch2Idx];
332 Scalar xww = 1 - xwn;
335 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
336 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
340 Scalar xgn = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx) / pg_;
341 Scalar xgw = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx) / pg_;
347 Scalar xnn = xwn * FluidSystem::henryCoefficient(
fluidState_, wPhaseIdx,nCompIdx) / (xgn * pg_);
348 Scalar xnw = xgw*pg_ / FluidSystem::henryCoefficient(
fluidState_, nPhaseIdx,wCompIdx);
350 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
351 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
352 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
353 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
373 Scalar xnw =
priVars[switch2Idx];
375 Scalar xgn = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx) / pg_;
380 Scalar xww = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx) / pg_;
383 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
384 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
385 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
386 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
387 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
407 Scalar partPressH2O = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx);
408 Scalar partPressNAPL = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
410 Scalar xgn = partPressNAPL/pg_;
411 Scalar xgw = partPressH2O/pg_;
414 Scalar xwn = partPressNAPL / FluidSystem::henryCoefficient(
fluidState_, wPhaseIdx,nCompIdx);
417 Scalar xnw = partPressH2O / FluidSystem::henryCoefficient(
fluidState_, nPhaseIdx,wCompIdx);
420 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
421 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
422 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
423 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
424 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
425 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
445 const Scalar xgn =
priVars[switch2Idx];
446 Scalar xgw = 1 - xgn;
449 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
450 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
454 Scalar xww = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx) / pg_;
455 Scalar xnn = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx) / pg_;
457 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
458 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
476 const Scalar xgn =
priVars[switch2Idx];
477 Scalar xgw = 1 - xgn;
480 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
481 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
484 Scalar xwn = xgn*pg_/FluidSystem::henryCoefficient(
fluidState_, wPhaseIdx,nCompIdx);
488 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
489 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
493 Scalar xnn = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx) / pg_;
495 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
522 sg_ = 1. - sw_ - sn_;
530 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
539 const auto fluidMatrixInteraction = Deprecated::makePcKrSw<3>(Scalar{}, problem.spatialParams(), element, scv, elemSol);
542 const Scalar pcgw = fluidMatrixInteraction.pcgw(sw_, sn_);
543 const Scalar pcnw = fluidMatrixInteraction.pcnw(sw_, sn_);
544 const Scalar pcgn = fluidMatrixInteraction.pcgn(sw_, sn_);
546 const Scalar pcAlpha = fluidMatrixInteraction.pcAlpha(sw_, sn_);
547 const Scalar pcNW1 = 0.0;
553 pn_ = pg_- pcAlpha * pcgn - (1.-pcAlpha)*(pcgw - pcNW1);
554 pw_ = pn_ - pcAlpha * pcnw - (1.-pcAlpha)*pcNW1;
559 pn_ = pw_ + pcAlpha * pcnw + (1.-pcAlpha)*pcNW1;
560 pg_ = pn_ + pcAlpha * pcgn + (1.-pcAlpha)*(pcgw - pcNW1);
562 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
577 Scalar tempOnlyWater = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, wCompIdx);
578 temp_ = tempOnlyWater;
582 Scalar tempOnlyNAPL = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, nCompIdx);
583 temp_ = tempOnlyNAPL;
588 Scalar tempOnlyNAPL = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, nCompIdx);
589 Scalar tempOnlyWater = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, wCompIdx);
590 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
592 fluidState_.setTemperature(phaseIdx, tempOnlyWater);
595 Scalar defect = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
596 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
598 Scalar temp = tempOnlyWater;
601 while(abs(defect) > 0.01)
603 Scalar deltaT = 1.e-6;
604 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
609 Scalar fUp = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
610 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
612 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
617 Scalar fDown = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
618 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
620 temp = temp - defect * 2. * deltaT / (fUp - fDown);
622 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
627 defect = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
628 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
630 if (counter>10)
break;
632 if ((sw_>1.e-10)&&(sw_<0.01))
633 temp = temp + (sw_ - 1.e-10) * (temp - tempOnlyNAPL) / (0.01 - 1.e-10);
634 if ((sn_>1.e-10)&&(sn_<0.01))
635 temp = temp + (sn_ - 1.e-10) * (temp - tempOnlyWater) / (0.01 - 1.e-10);
639 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
641 for (
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
651 Scalar partPressH2O = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx);
652 Scalar partPressNAPL = pg_ - partPressH2O;
655 if (sw_<0.02) partPressH2O *= sw_/0.02;
656 if (partPressH2O < 0.) partPressH2O = 0;
657 if (sn_<0.02) partPressNAPL *= sn_ / 0.02;
658 if (partPressNAPL < 0.) partPressNAPL = 0;
660 Scalar xgn = partPressNAPL/pg_;
661 Scalar xgw = partPressH2O/pg_;
671 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
672 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
673 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
674 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
675 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
676 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
694 Scalar partPressH2O = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx);
695 Scalar partPressNAPL = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
697 Scalar xgn = partPressNAPL/pg_;
698 Scalar xgw = partPressH2O/pg_;
707 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
708 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
709 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
710 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
711 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
712 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
728 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
734 const auto fluidMatrixInteraction = Deprecated::makePcKrSw<3>(Scalar{}, problem.spatialParams(), element, scv, elemSol);
736 for (
int phaseIdx = 0; phaseIdx < numPs; ++phaseIdx)
744 const Scalar kr = fluidMatrixInteraction.kr(phaseIdx,
747 mobility_[phaseIdx] = kr / mu;
752 bulkDensTimesAdsorpCoeff_ = fluidMatrixInteraction.adsorptionModel().bulkDensTimesAdsorpCoeff();
756 EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv,
solidState_);
758 auto getEffectiveDiffusionCoefficient = [&](
int phaseIdx,
int compIIdx,
int compJIdx)
760 return EffDiffModel::effectiveDiffusionCoefficient(*
this, phaseIdx, compIIdx, compJIdx);
763 effectiveDiffCoeff_.update(getEffectiveDiffusionCoefficient);
766 permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
770 for (
int phaseIdx = 0; phaseIdx < numPs; ++phaseIdx)
772 Scalar h = FluidSystem::enthalpy(
fluidState_, phaseIdx);
776 EnergyVolVars::updateEffectiveThermalConductivity();
816 {
return fluidState_.massFraction(phaseIdx, compIdx); }
826 {
return fluidState_.moleFraction(phaseIdx, compIdx); }
872 {
return mobility_[phaseIdx]; }
893 {
return permeability_; }
900 if (phaseIdx != nPhaseIdx)
901 return FluidSystem::diffusionCoefficient(
fluidState_, phaseIdx);
910 {
return effectiveDiffCoeff_(phaseIdx, compIIdx, compJIdx); }
917 if (bulkDensTimesAdsorpCoeff_)
918 return bulkDensTimesAdsorpCoeff_.
value();
920 DUNE_THROW(Dune::NotImplemented,
"Your spatialParams do not provide an adsorption model");
946 Scalar sw_, sg_, sn_, pg_, pw_, pn_, temp_;
948 Scalar moleFrac_[numPs][numFluidComps];
949 Scalar massFrac_[numPs][numFluidComps];
951 Scalar permeability_;
952 Scalar mobility_[numPs];
956 DiffusionCoefficients effectiveDiffCoeff_;
Some exceptions thrown in DuMux
Define some often used mathematical functions.
A wrapper that can either contain a valid Scalar or NaN.
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Update the solid volume fractions (inert and reacitve) and set them in the solidstate.
A central place for various physical constants occuring in some equations.
void updateSolidVolumeFractions(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv, SolidState &solidState, const int solidVolFracOffset)
update the solid volume fractions (inert and reacitve) and set them in the solidstate
Definition: updatesolidvolumefractions.hh:36
decltype(std::declval< FluidMatrixInteraction >().adsorptionModel()) AdsorptionModelDetector
Definition: porousmediumflow/3p3c/volumevariables.hh:47
static constexpr bool hasAdsorptionModel()
Definition: porousmediumflow/3p3c/volumevariables.hh:50
std::string phasePresence() noexcept
I/O name of phase presence.
Definition: name.hh:147
std::string viscosity(int phaseIdx) noexcept
I/O name of viscosity for multiphase systems.
Definition: name.hh:74
std::string molarDensity(int phaseIdx) noexcept
I/O name of molar density for multiphase systems.
Definition: name.hh:83
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:65
T value() const
Definition: optionalscalar.hh:48
The primary variable switch controlling the phase presence state variable.
Definition: 3pwateroil/primaryvariableswitch.hh:39
Contains the quantities which are are constant within a finite volume in the three-phase,...
Definition: porousmediumflow/3pwateroil/volumevariables.hh:71
const FluidState & fluidState() const
Returns the phase state for the control-volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:782
SolidState solidState_
Definition: porousmediumflow/3pwateroil/volumevariables.hh:943
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Definition: porousmediumflow/3pwateroil/volumevariables.hh:898
Scalar molarDensity(const int phaseIdx) const
Returns the molar density of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:843
Scalar massFraction(const int phaseIdx, const int compIdx) const
Returns the mass fraction of a given component in a given phase within the control volume in .
Definition: porousmediumflow/3pwateroil/volumevariables.hh:815
typename Traits::FluidState FluidState
The type of the object returned by the fluidState() method.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:109
Scalar permeability() const
Returns the permeability within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:892
typename Traits::FluidSystem FluidSystem
The type of the fluid system.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:111
Scalar viscosity(const int phaseIdx) const
Definition: porousmediumflow/3pwateroil/volumevariables.hh:874
Scalar bulkDensTimesAdsorpCoeff() const
Returns the adsorption information.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:915
typename Traits::SolidState SolidState
Export type of solid state.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:115
Scalar porosity() const
Returns the average porosity within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:886
Scalar enthalpy(int phaseIdx) const
Returns the total enthalpy of a phase in the sub-control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:938
Scalar mobility(const int phaseIdx) const
Returns the effective mobility of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:871
Scalar capillaryPressure() const
Returns the effective capillary pressure within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:880
Scalar moleFraction(const int phaseIdx, const int compIdx) const
Returns the mole fraction of a given component in a given phase within the control volume in .
Definition: porousmediumflow/3pwateroil/volumevariables.hh:825
Scalar saturation(const int phaseIdx) const
Returns the effective saturation of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:805
Scalar density(const int phaseIdx) const
Returns the mass density of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:834
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:117
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:133
Scalar effectiveDiffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Returns the effective diffusion coefficients for a phase in .
Definition: porousmediumflow/3pwateroil/volumevariables.hh:909
static constexpr bool onlyGasPhaseCanDisappear()
State if only the gas phase is allowed to disappear.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:121
Scalar temperature() const
Returns temperature inside the sub-control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:862
Scalar internalEnergy(int phaseIdx) const
Returns the total internal energy of a phase in the sub-control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:929
typename ModelTraits::Indices Indices
Export the indices.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:113
const SolidState & solidState() const
Returns the phase state for the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:788
Scalar averageMolarMass(int phaseIdx) const
Returns the average molar mass of the fluid phase.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:796
FluidState fluidState_
Definition: porousmediumflow/3pwateroil/volumevariables.hh:939
Scalar pressure(const int phaseIdx) const
Returns the effective pressure of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:852
Definition: porousmediumflow/nonisothermal/volumevariables.hh:75
The isothermal base class.
Definition: porousmediumflow/volumevariables.hh:40
static constexpr int numFluidComponents()
Return number of components considered by the model.
Definition: porousmediumflow/volumevariables.hh:52
const PrimaryVariables & priVars() const
Returns the vector of primary variables.
Definition: porousmediumflow/volumevariables.hh:76
static constexpr int numFluidPhases()
Return number of phases considered by the model.
Definition: porousmediumflow/volumevariables.hh:50
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition: porousmediumflow/volumevariables.hh:64
Base class for the model specific class which provides access to all volume averaged quantities.
Base class for the model specific class which provides access to all volume averaged quantities.
The primary variable switch for the extended Richards model.