26#ifndef DUMUX_3P2CNI_VOLUME_VARIABLES_HH
27#define DUMUX_3P2CNI_VOLUME_VARIABLES_HH
50template <
class Flu
idMatrixInteraction>
54template<
class Flu
idMatrixInteraction>
56{
return Dune::Std::is_detected<AdsorptionModelDetector, FluidMatrixInteraction>::value; }
65template <
class Traits>
72 using Scalar =
typename Traits::PrimaryVariables::value_type;
73 using ModelTraits =
typename Traits::ModelTraits;
74 using FS =
typename Traits::FluidSystem;
80 wCompIdx = FS::wCompIdx,
81 nCompIdx = FS::nCompIdx,
83 wPhaseIdx = FS::wPhaseIdx,
84 gPhaseIdx = FS::gPhaseIdx,
85 nPhaseIdx = FS::nPhaseIdx,
87 switch1Idx = ModelTraits::Indices::switch1Idx,
88 switch2Idx = ModelTraits::Indices::switch2Idx,
89 pressureIdx = ModelTraits::Indices::pressureIdx
94 threePhases = ModelTraits::Indices::threePhases,
95 wPhaseOnly = ModelTraits::Indices::wPhaseOnly,
96 gnPhaseOnly = ModelTraits::Indices::gnPhaseOnly,
97 wnPhaseOnly = ModelTraits::Indices::wnPhaseOnly,
98 gPhaseOnly = ModelTraits::Indices::gPhaseOnly,
99 wgPhaseOnly = ModelTraits::Indices::wgPhaseOnly
102 using EffDiffModel =
typename Traits::EffectiveDiffusivityModel;
103 using DiffusionCoefficients =
typename Traits::DiffusionType::DiffusionCoefficientsContainer;
111 using Indices =
typename ModelTraits::Indices;
120 {
return Traits::ModelTraits::onlyGasPhaseCanDisappear(); }
130 template<
class ElemSol,
class Problem,
class Element,
class Scv>
132 const Problem &problem,
133 const Element &element,
137 const auto&
priVars = elemSol[scv.localDofIndex()];
147 sg_ = 1. - sw_ - sn_;
179 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
185 const auto fluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(element, scv, elemSol);
188 const Scalar pcgw = fluidMatrixInteraction.pcgw(sw_, sn_);
189 const Scalar pcnw = fluidMatrixInteraction.pcnw(sw_, sn_);
190 const Scalar pcgn = fluidMatrixInteraction.pcgn(sw_, sn_);
192 const Scalar pcAlpha = fluidMatrixInteraction.pcAlpha(sw_, sn_);
193 const Scalar pcNW1 = 0.0;
199 pn_ = pg_- pcAlpha * pcgn - (1.-pcAlpha)*(pcgw - pcNW1);
200 pw_ = pn_ - pcAlpha * pcnw - (1.-pcAlpha)*pcNW1;
205 pn_ = pw_ + pcAlpha * pcnw + (1.-pcAlpha)*pcNW1;
206 pg_ = pn_ + pcAlpha * pcgn + (1.-pcAlpha)*(pcgw - pcNW1);
208 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
222 Scalar temp = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, wCompIdx);
223 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
228 Scalar defect = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
229 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
232 while(abs(defect) > 0.01)
234 Scalar deltaT = 1.e-8 * temp;
235 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
240 Scalar fUp = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
241 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
243 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
248 Scalar fDown = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
249 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
251 temp = temp - defect * 2. * deltaT / (fUp - fDown);
253 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
258 defect = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
259 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
266 temp_ = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, wCompIdx);
271 temp_ = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, nCompIdx);
273 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
275 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
286 Scalar partPressH2O = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx);
287 Scalar partPressNAPL = pg_ - partPressH2O;
289 Scalar xgn = partPressNAPL/pg_;
290 Scalar xgw = partPressH2O/pg_;
293 Scalar xwn = partPressNAPL / FluidSystem::henryCoefficient(
fluidState_, wPhaseIdx,nCompIdx);
297 Scalar xnw = partPressH2O / FluidSystem::henryCoefficient(
fluidState_, nPhaseIdx,wCompIdx);
300 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
301 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
302 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
303 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
304 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
305 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
326 Scalar xwn =
priVars[switch2Idx];
327 Scalar xww = 1 - xwn;
330 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
331 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
335 Scalar xgn = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx) / pg_;
336 Scalar xgw = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx) / pg_;
342 Scalar xnn = xwn * FluidSystem::henryCoefficient(
fluidState_, wPhaseIdx,nCompIdx) / (xgn * pg_);
343 Scalar xnw = xgw*pg_ / FluidSystem::henryCoefficient(
fluidState_, nPhaseIdx,wCompIdx);
345 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
346 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
347 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
348 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
368 Scalar xnw =
priVars[switch2Idx];
370 Scalar xgn = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx) / pg_;
375 Scalar xww = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx) / pg_;
378 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
379 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
380 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
381 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
382 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
402 Scalar partPressH2O = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx);
403 Scalar partPressNAPL = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
405 Scalar xgn = partPressNAPL/pg_;
406 Scalar xgw = partPressH2O/pg_;
409 Scalar xwn = partPressNAPL / FluidSystem::henryCoefficient(
fluidState_, wPhaseIdx,nCompIdx);
412 Scalar xnw = partPressH2O / FluidSystem::henryCoefficient(
fluidState_, nPhaseIdx,wCompIdx);
415 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
416 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
417 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
418 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
419 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
420 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
440 const Scalar xgn =
priVars[switch2Idx];
441 Scalar xgw = 1 - xgn;
444 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
445 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
449 Scalar xww = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx) / pg_;
450 Scalar xnn = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx) / pg_;
452 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
453 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
471 const Scalar xgn =
priVars[switch2Idx];
472 Scalar xgw = 1 - xgn;
475 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
476 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
479 Scalar xwn = xgn*pg_/FluidSystem::henryCoefficient(
fluidState_, wPhaseIdx,nCompIdx);
483 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
484 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
488 Scalar xnn = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx) / pg_;
490 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
517 sg_ = 1. - sw_ - sn_;
525 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
531 const auto fluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(element, scv, elemSol);
534 const Scalar pcgw = fluidMatrixInteraction.pcgw(sw_, sn_);
535 const Scalar pcnw = fluidMatrixInteraction.pcnw(sw_, sn_);
536 const Scalar pcgn = fluidMatrixInteraction.pcgn(sw_, sn_);
538 const Scalar pcAlpha = fluidMatrixInteraction.pcAlpha(sw_, sn_);
539 const Scalar pcNW1 = 0.0;
545 pn_ = pg_- pcAlpha * pcgn - (1.-pcAlpha)*(pcgw - pcNW1);
546 pw_ = pn_ - pcAlpha * pcnw - (1.-pcAlpha)*pcNW1;
551 pn_ = pw_ + pcAlpha * pcnw + (1.-pcAlpha)*pcNW1;
552 pg_ = pn_ + pcAlpha * pcgn + (1.-pcAlpha)*(pcgw - pcNW1);
554 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
569 Scalar tempOnlyWater = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, wCompIdx);
570 temp_ = tempOnlyWater;
574 Scalar tempOnlyNAPL = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, nCompIdx);
575 temp_ = tempOnlyNAPL;
580 Scalar tempOnlyNAPL = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, nCompIdx);
581 Scalar tempOnlyWater = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, wCompIdx);
582 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
584 fluidState_.setTemperature(phaseIdx, tempOnlyWater);
587 Scalar defect = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
588 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
590 Scalar temp = tempOnlyWater;
593 while(abs(defect) > 0.01)
595 Scalar deltaT = 1.e-6;
596 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
601 Scalar fUp = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
602 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
604 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
609 Scalar fDown = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
610 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
612 temp = temp - defect * 2. * deltaT / (fUp - fDown);
614 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
619 defect = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
620 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
622 if (counter>10)
break;
624 if ((sw_>1.e-10)&&(sw_<0.01))
625 temp = temp + (sw_ - 1.e-10) * (temp - tempOnlyNAPL) / (0.01 - 1.e-10);
626 if ((sn_>1.e-10)&&(sn_<0.01))
627 temp = temp + (sn_ - 1.e-10) * (temp - tempOnlyWater) / (0.01 - 1.e-10);
631 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
633 for (
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
643 Scalar partPressH2O = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx);
644 Scalar partPressNAPL = pg_ - partPressH2O;
647 if (sw_<0.02) partPressH2O *= sw_/0.02;
648 if (partPressH2O < 0.) partPressH2O = 0;
649 if (sn_<0.02) partPressNAPL *= sn_ / 0.02;
650 if (partPressNAPL < 0.) partPressNAPL = 0;
652 Scalar xgn = partPressNAPL/pg_;
653 Scalar xgw = partPressH2O/pg_;
663 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
664 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
665 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
666 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
667 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
668 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
686 Scalar partPressH2O = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx);
687 Scalar partPressNAPL = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
689 Scalar xgn = partPressNAPL/pg_;
690 Scalar xgw = partPressH2O/pg_;
699 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
700 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
701 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
702 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
703 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
704 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
720 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
723 const auto fluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(element, scv, elemSol);
724 for (
int phaseIdx = 0; phaseIdx < numPs; ++phaseIdx)
732 const Scalar kr = fluidMatrixInteraction.kr(phaseIdx,
735 mobility_[phaseIdx] = kr / mu;
740 bulkDensTimesAdsorpCoeff_ = fluidMatrixInteraction.adsorptionModel().bulkDensTimesAdsorpCoeff();
744 EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv,
solidState_);
746 auto getEffectiveDiffusionCoefficient = [&](
int phaseIdx,
int compIIdx,
int compJIdx)
748 return EffDiffModel::effectiveDiffusionCoefficient(*
this, phaseIdx, compIIdx, compJIdx);
751 effectiveDiffCoeff_.update(getEffectiveDiffusionCoefficient);
754 permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
758 for (
int phaseIdx = 0; phaseIdx < numPs; ++phaseIdx)
760 Scalar h = FluidSystem::enthalpy(
fluidState_, phaseIdx);
764 EnergyVolVars::updateEffectiveThermalConductivity();
804 {
return fluidState_.massFraction(phaseIdx, compIdx); }
814 {
return fluidState_.moleFraction(phaseIdx, compIdx); }
860 {
return mobility_[phaseIdx]; }
881 {
return permeability_; }
888 if (phaseIdx != nPhaseIdx)
889 return FluidSystem::diffusionCoefficient(
fluidState_, phaseIdx);
898 {
return effectiveDiffCoeff_(phaseIdx, compIIdx, compJIdx); }
905 if (bulkDensTimesAdsorpCoeff_)
906 return bulkDensTimesAdsorpCoeff_.
value();
908 DUNE_THROW(Dune::NotImplemented,
"Your spatialParams do not provide an adsorption model");
934 Scalar sw_, sg_, sn_, pg_, pw_, pn_, temp_;
936 Scalar moleFrac_[numPs][numFluidComps];
937 Scalar massFrac_[numPs][numFluidComps];
939 Scalar permeability_;
940 Scalar mobility_[numPs];
944 DiffusionCoefficients effectiveDiffCoeff_;
Some exceptions thrown in DuMux
A wrapper that can either contain a valid Scalar or NaN.
Define some often used mathematical functions.
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:45
static constexpr bool hasAdsorptionModel()
Definition: porousmediumflow/3p3c/volumevariables.hh:48
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:69
const FluidState & fluidState() const
Returns the phase state for the control-volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:770
SolidState solidState_
Definition: porousmediumflow/3pwateroil/volumevariables.hh:931
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Definition: porousmediumflow/3pwateroil/volumevariables.hh:886
Scalar molarDensity(const int phaseIdx) const
Returns the molar density of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:831
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:803
typename Traits::FluidState FluidState
The type of the object returned by the fluidState() method.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:107
Scalar permeability() const
Returns the permeability within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:880
typename Traits::FluidSystem FluidSystem
The type of the fluid system.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:109
Scalar viscosity(const int phaseIdx) const
Definition: porousmediumflow/3pwateroil/volumevariables.hh:862
Scalar bulkDensTimesAdsorpCoeff() const
Returns the adsorption information.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:903
typename Traits::SolidState SolidState
Export type of solid state.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:113
Scalar porosity() const
Returns the average porosity within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:874
Scalar enthalpy(int phaseIdx) const
Returns the total enthalpy of a phase in the sub-control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:926
Scalar mobility(const int phaseIdx) const
Returns the effective mobility of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:859
Scalar capillaryPressure() const
Returns the effective capillary pressure within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:868
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:813
Scalar saturation(const int phaseIdx) const
Returns the effective saturation of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:793
Scalar density(const int phaseIdx) const
Returns the mass density of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:822
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:115
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:131
Scalar effectiveDiffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Returns the effective diffusion coefficients for a phase in .
Definition: porousmediumflow/3pwateroil/volumevariables.hh:897
static constexpr bool onlyGasPhaseCanDisappear()
State if only the gas phase is allowed to disappear.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:119
Scalar temperature() const
Returns temperature inside the sub-control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:850
Scalar internalEnergy(int phaseIdx) const
Returns the total internal energy of a phase in the sub-control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:917
typename ModelTraits::Indices Indices
Export the indices.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:111
const SolidState & solidState() const
Returns the phase state for the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:776
Scalar averageMolarMass(int phaseIdx) const
Returns the average molar mass of the fluid phase.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:784
FluidState fluidState_
Definition: porousmediumflow/3pwateroil/volumevariables.hh:927
Scalar pressure(const int phaseIdx) const
Returns the effective pressure of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:840
Definition: porousmediumflow/nonisothermal/volumevariables.hh:76
The isothermal base class.
Definition: porousmediumflow/volumevariables.hh:42
static constexpr int numFluidComponents()
Return number of components considered by the model.
Definition: porousmediumflow/volumevariables.hh:54
const PrimaryVariables & priVars() const
Returns the vector of primary variables.
Definition: porousmediumflow/volumevariables.hh:78
static constexpr int numFluidPhases()
Return number of phases considered by the model.
Definition: porousmediumflow/volumevariables.hh:52
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:66
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.