26#ifndef DUMUX_3P2CNI_VOLUME_VARIABLES_HH
27#define DUMUX_3P2CNI_VOLUME_VARIABLES_HH
52template <
class Traits>
59 using Scalar =
typename Traits::PrimaryVariables::value_type;
60 using ModelTraits =
typename Traits::ModelTraits;
61 using FS =
typename Traits::FluidSystem;
67 wCompIdx = FS::wCompIdx,
68 nCompIdx = FS::nCompIdx,
70 wPhaseIdx = FS::wPhaseIdx,
71 gPhaseIdx = FS::gPhaseIdx,
72 nPhaseIdx = FS::nPhaseIdx,
74 switch1Idx = ModelTraits::Indices::switch1Idx,
75 switch2Idx = ModelTraits::Indices::switch2Idx,
76 pressureIdx = ModelTraits::Indices::pressureIdx
81 threePhases = ModelTraits::Indices::threePhases,
82 wPhaseOnly = ModelTraits::Indices::wPhaseOnly,
83 gnPhaseOnly = ModelTraits::Indices::gnPhaseOnly,
84 wnPhaseOnly = ModelTraits::Indices::wnPhaseOnly,
85 gPhaseOnly = ModelTraits::Indices::gPhaseOnly,
86 wgPhaseOnly = ModelTraits::Indices::wgPhaseOnly
89 using EffDiffModel =
typename Traits::EffectiveDiffusivityModel;
90 using DiffusionCoefficients =
typename Traits::DiffusionType::DiffusionCoefficientsContainer;
98 using Indices =
typename ModelTraits::Indices;
107 {
return Traits::ModelTraits::onlyGasPhaseCanDisappear(); }
117 template<
class ElemSol,
class Problem,
class Element,
class Scv>
119 const Problem &problem,
120 const Element &element,
124 const auto&
priVars = elemSol[scv.localDofIndex()];
128 using MaterialLaw =
typename Problem::SpatialParams::MaterialLaw;
129 const auto& materialParams = problem.spatialParams().materialLawParams(element, scv, elemSol);
138 sg_ = 1. - sw_ - sn_;
170 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
183 Scalar pcgw = MaterialLaw::pcgw(materialParams, sw_);
184 Scalar pcnw = MaterialLaw::pcnw(materialParams, sw_);
185 Scalar pcgn = MaterialLaw::pcgn(materialParams, sw_ + sn_);
187 Scalar pcAlpha = MaterialLaw::pcAlpha(materialParams, sn_);
190 pn_ = pg_- pcAlpha * pcgn - (1.-pcAlpha)*(pcgw - pcNW1);
191 pw_ = pn_ - pcAlpha * pcnw - (1.-pcAlpha)*pcNW1;
198 Scalar pcgw = MaterialLaw::pcgw(materialParams, sw_);
199 Scalar pcnw = MaterialLaw::pcnw(materialParams, sw_);
200 Scalar pcgn = MaterialLaw::pcgn(materialParams, sw_ + sn_);
202 Scalar pcAlpha = MaterialLaw::pcAlpha(materialParams, sn_);
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.");
223 Scalar temp = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, wCompIdx);
224 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
229 Scalar defect = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
230 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
233 while(abs(defect) > 0.01)
235 Scalar deltaT = 1.e-8 * temp;
236 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
241 Scalar fUp = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
242 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
244 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
249 Scalar fDown = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
250 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
252 temp = temp - defect * 2. * deltaT / (fUp - fDown);
254 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
259 defect = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
260 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
267 temp_ = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, wCompIdx);
272 temp_ = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, nCompIdx);
274 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
277 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
288 Scalar partPressH2O = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx);
289 Scalar partPressNAPL = pg_ - partPressH2O;
291 Scalar xgn = partPressNAPL/pg_;
292 Scalar xgw = partPressH2O/pg_;
295 Scalar xwn = partPressNAPL / FluidSystem::henryCoefficient(
fluidState_, wPhaseIdx,nCompIdx);
299 Scalar xnw = partPressH2O / FluidSystem::henryCoefficient(
fluidState_, nPhaseIdx,wCompIdx);
302 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
303 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
304 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
305 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
306 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
307 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
328 Scalar xwn =
priVars[switch2Idx];
329 Scalar xww = 1 - xwn;
332 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
333 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
337 Scalar xgn = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx) / pg_;
338 Scalar xgw = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx) / pg_;
344 Scalar xnn = xwn * FluidSystem::henryCoefficient(
fluidState_, wPhaseIdx,nCompIdx) / (xgn * pg_);
345 Scalar xnw = xgw*pg_ / FluidSystem::henryCoefficient(
fluidState_, nPhaseIdx,wCompIdx);
347 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
348 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
349 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
350 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
370 Scalar xnw =
priVars[switch2Idx];
372 Scalar xgn = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx) / pg_;
377 Scalar xww = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx) / pg_;
380 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
381 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
382 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
383 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
384 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
404 Scalar partPressH2O = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx);
405 Scalar partPressNAPL = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
407 Scalar xgn = partPressNAPL/pg_;
408 Scalar xgw = partPressH2O/pg_;
411 Scalar xwn = partPressNAPL / FluidSystem::henryCoefficient(
fluidState_, wPhaseIdx,nCompIdx);
414 Scalar xnw = partPressH2O / FluidSystem::henryCoefficient(
fluidState_, nPhaseIdx,wCompIdx);
417 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
418 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
419 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
420 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
421 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
422 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
442 const Scalar xgn =
priVars[switch2Idx];
443 Scalar xgw = 1 - xgn;
446 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
447 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
451 Scalar xww = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx) / pg_;
452 Scalar xnn = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx) / pg_;
454 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
455 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
473 const Scalar xgn =
priVars[switch2Idx];
474 Scalar xgw = 1 - xgn;
477 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
478 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
481 Scalar xwn = xgn*pg_/FluidSystem::henryCoefficient(
fluidState_, wPhaseIdx,nCompIdx);
485 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
486 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
490 Scalar xnn = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx) / pg_;
492 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
518 sg_ = 1. - sw_ - sn_;
526 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
539 Scalar pcgw = MaterialLaw::pcgw(materialParams, sw_);
540 Scalar pcnw = MaterialLaw::pcnw(materialParams, sw_);
541 Scalar pcgn = MaterialLaw::pcgn(materialParams, sw_ + sn_);
543 Scalar pcAlpha = MaterialLaw::pcAlpha(materialParams, sn_);
546 pn_ = pg_- pcAlpha * pcgn - (1.-pcAlpha)*(pcgw - pcNW1);
547 pw_ = pn_ - pcAlpha * pcnw - (1.-pcAlpha)*pcNW1;
554 Scalar pcgw = MaterialLaw::pcgw(materialParams, sw_);
555 Scalar pcnw = MaterialLaw::pcnw(materialParams, sw_);
556 Scalar pcgn = MaterialLaw::pcgn(materialParams, sw_ + sn_);
558 Scalar pcAlpha = MaterialLaw::pcAlpha(materialParams, sn_);
561 pn_ = pw_ + pcAlpha * pcnw + (1.-pcAlpha)*pcNW1;
562 pg_ = pn_ + pcAlpha * pcgn + (1.-pcAlpha)*(pcgw - pcNW1);
564 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
580 Scalar tempOnlyWater = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, wCompIdx);
581 temp_ = tempOnlyWater;
585 Scalar tempOnlyNAPL = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, nCompIdx);
586 temp_ = tempOnlyNAPL;
591 Scalar tempOnlyNAPL = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, nCompIdx);
592 Scalar tempOnlyWater = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, wCompIdx);
593 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
595 fluidState_.setTemperature(phaseIdx, tempOnlyWater);
598 Scalar defect = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
599 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
601 Scalar temp = tempOnlyWater;
604 while(abs(defect) > 0.01)
606 Scalar deltaT = 1.e-6;
607 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
612 Scalar fUp = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
613 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
615 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
620 Scalar fDown = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
621 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
623 temp = temp - defect * 2. * deltaT / (fUp - fDown);
625 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
630 defect = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
631 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
633 if (counter>10)
break;
635 if ((sw_>1.e-10)&&(sw_<0.01))
636 temp = temp + (sw_ - 1.e-10) * (temp - tempOnlyNAPL) / (0.01 - 1.e-10);
637 if ((sn_>1.e-10)&&(sn_<0.01))
638 temp = temp + (sn_ - 1.e-10) * (temp - tempOnlyWater) / (0.01 - 1.e-10);
642 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
645 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
656 Scalar partPressH2O = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx);
657 Scalar partPressNAPL = pg_ - partPressH2O;
660 if (sw_<0.02) partPressH2O *= sw_/0.02;
661 if (partPressH2O < 0.) partPressH2O = 0;
662 if (sn_<0.02) partPressNAPL *= sn_ / 0.02;
663 if (partPressNAPL < 0.) partPressNAPL = 0;
665 Scalar xgn = partPressNAPL/pg_;
666 Scalar xgw = partPressH2O/pg_;
676 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
677 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
678 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
679 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
680 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
681 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
699 Scalar partPressH2O = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx);
700 Scalar partPressNAPL = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
702 Scalar xgn = partPressNAPL/pg_;
703 Scalar xgw = partPressH2O/pg_;
712 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
713 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
714 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
715 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
716 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
717 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
733 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
736 for (
int phaseIdx = 0; phaseIdx < numPs; ++phaseIdx) {
744 kr = MaterialLaw::kr(materialParams, phaseIdx,
748 mobility_[phaseIdx] = kr / mu;
753 bulkDensTimesAdsorpCoeff_ = MaterialLaw::bulkDensTimesAdsorpCoeff(materialParams);
757 EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv,
solidState_);
759 auto getEffectiveDiffusionCoefficient = [&](
int phaseIdx,
int compIIdx,
int compJIdx)
761 return EffDiffModel::effectiveDiffusionCoefficient(*
this, phaseIdx, compIIdx, compJIdx);
764 effectiveDiffCoeff_.update(getEffectiveDiffusionCoefficient);
767 permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
772 for (
int phaseIdx = 0; phaseIdx < numPs; ++phaseIdx)
774 Scalar h = FluidSystem::enthalpy(
fluidState_, phaseIdx);
778 EnergyVolVars::updateEffectiveThermalConductivity();
818 {
return fluidState_.massFraction(phaseIdx, compIdx); }
828 {
return fluidState_.moleFraction(phaseIdx, compIdx); }
874 {
return mobility_[phaseIdx]; }
895 {
return permeability_; }
900 [[deprecated(
"Will be removed after release 3.2. Use diffusionCoefficient(phaseIdx, compIIdx, compJIdx)!")]]
909 if (phaseIdx != nPhaseIdx)
910 return FluidSystem::diffusionCoefficient(
fluidState_, phaseIdx);
919 {
return effectiveDiffCoeff_(phaseIdx, compIIdx, compJIdx); }
925 {
return bulkDensTimesAdsorpCoeff_; }
950 Scalar sw_, sg_, sn_, pg_, pw_, pn_, temp_;
952 Scalar moleFrac_[numPs][numFluidComps];
953 Scalar massFrac_[numPs][numFluidComps];
955 Scalar permeability_;
956 Scalar mobility_[numPs];
957 Scalar bulkDensTimesAdsorpCoeff_;
960 DiffusionCoefficients effectiveDiffCoeff_;
Some exceptions thrown in DuMux
Define some often used mathematical functions.
Some templates to wrap the valgrind macros.
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
bool CheckDefined(const T &value)
Make valgrind complain if the object occupied by an object is undefined.
Definition: valgrind.hh:72
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
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:56
const FluidState & fluidState() const
Returns the phase state for the control-volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:784
Scalar diffusionCoefficient(int phaseIdx, int compIdx) const
Returns the diffusion coefficient.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:901
SolidState solidState_
Definition: porousmediumflow/3pwateroil/volumevariables.hh:947
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Definition: porousmediumflow/3pwateroil/volumevariables.hh:907
Scalar molarDensity(const int phaseIdx) const
Returns the molar density of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:845
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:817
typename Traits::FluidState FluidState
The type of the object returned by the fluidState() method.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:94
Scalar permeability() const
Returns the permeability within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:894
typename Traits::FluidSystem FluidSystem
The type of the fluid system.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:96
Scalar viscosity(const int phaseIdx) const
Definition: porousmediumflow/3pwateroil/volumevariables.hh:876
Scalar bulkDensTimesAdsorpCoeff() const
Returns the adsorption information.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:924
typename Traits::SolidState SolidState
Export type of solid state.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:100
Scalar porosity() const
Returns the average porosity within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:888
Scalar enthalpy(int phaseIdx) const
Returns the total enthalpy of a phase in the sub-control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:942
Scalar mobility(const int phaseIdx) const
Returns the effective mobility of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:873
Scalar capillaryPressure() const
Returns the effective capillary pressure within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:882
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:827
Scalar saturation(const int phaseIdx) const
Returns the effective saturation of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:807
Scalar density(const int phaseIdx) const
Returns the mass density of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:836
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:102
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:118
Scalar effectiveDiffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Returns the effective diffusion coefficients for a phase in .
Definition: porousmediumflow/3pwateroil/volumevariables.hh:918
static constexpr bool onlyGasPhaseCanDisappear()
State if only the gas phase is allowed to disappear.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:106
Scalar temperature() const
Returns temperature inside the sub-control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:864
Scalar internalEnergy(int phaseIdx) const
Returns the total internal energy of a phase in the sub-control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:933
typename ModelTraits::Indices Indices
Export the indices.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:98
const SolidState & solidState() const
Returns the phase state for the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:790
Scalar averageMolarMass(int phaseIdx) const
Returns the average molar mass of the fluid phase.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:798
FluidState fluidState_
Definition: porousmediumflow/3pwateroil/volumevariables.hh:943
Scalar pressure(const int phaseIdx) const
Returns the effective pressure of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:854
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.