14#ifndef DUMUX_3P2CNI_VOLUME_VARIABLES_HH
15#define DUMUX_3P2CNI_VOLUME_VARIABLES_HH
38template <
class Flu
idMatrixInteraction>
42template<
class Flu
idMatrixInteraction>
44{
return Dune::Std::is_detected<AdsorptionModelDetector, FluidMatrixInteraction>::value; }
53template <
class Traits>
60 using Scalar =
typename Traits::PrimaryVariables::value_type;
61 using ModelTraits =
typename Traits::ModelTraits;
62 using FS =
typename Traits::FluidSystem;
68 wCompIdx = FS::wCompIdx,
69 nCompIdx = FS::nCompIdx,
71 wPhaseIdx = FS::wPhaseIdx,
72 gPhaseIdx = FS::gPhaseIdx,
73 nPhaseIdx = FS::nPhaseIdx,
75 switch1Idx = ModelTraits::Indices::switch1Idx,
76 switch2Idx = ModelTraits::Indices::switch2Idx,
77 pressureIdx = ModelTraits::Indices::pressureIdx
82 threePhases = ModelTraits::Indices::threePhases,
83 wPhaseOnly = ModelTraits::Indices::wPhaseOnly,
84 gnPhaseOnly = ModelTraits::Indices::gnPhaseOnly,
85 wnPhaseOnly = ModelTraits::Indices::wnPhaseOnly,
86 gPhaseOnly = ModelTraits::Indices::gPhaseOnly,
87 wgPhaseOnly = ModelTraits::Indices::wgPhaseOnly
90 using EffDiffModel =
typename Traits::EffectiveDiffusivityModel;
91 using DiffusionCoefficients =
typename Traits::DiffusionType::DiffusionCoefficientsContainer;
99 using Indices =
typename ModelTraits::Indices;
108 {
return Traits::ModelTraits::onlyGasPhaseCanDisappear(); }
118 template<
class ElemSol,
class Problem,
class Element,
class Scv>
120 const Problem &problem,
121 const Element &element,
125 const auto&
priVars = elemSol[scv.localDofIndex()];
135 sg_ = 1. - sw_ - sn_;
167 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
173 const auto fluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(element, scv, elemSol);
176 const Scalar pcgw = fluidMatrixInteraction.pcgw(sw_, sn_);
177 const Scalar pcnw = fluidMatrixInteraction.pcnw(sw_, sn_);
178 const Scalar pcgn = fluidMatrixInteraction.pcgn(sw_, sn_);
180 const Scalar pcAlpha = fluidMatrixInteraction.pcAlpha(sw_, sn_);
181 const Scalar pcNW1 = 0.0;
187 pn_ = pg_- pcAlpha * pcgn - (1.-pcAlpha)*(pcgw - pcNW1);
188 pw_ = pn_ - pcAlpha * pcnw - (1.-pcAlpha)*pcNW1;
193 pn_ = pw_ + pcAlpha * pcnw + (1.-pcAlpha)*pcNW1;
194 pg_ = pn_ + pcAlpha * pcgn + (1.-pcAlpha)*(pcgw - pcNW1);
196 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
210 Scalar temp = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, wCompIdx);
211 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
216 Scalar defect = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
217 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
220 while(abs(defect) > 0.01)
222 Scalar deltaT = 1.e-8 * temp;
223 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
228 Scalar fUp = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
229 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
231 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
236 Scalar fDown = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
237 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
239 temp = temp - defect * 2. * deltaT / (fUp - fDown);
241 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
246 defect = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
247 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
254 temp_ = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, wCompIdx);
259 temp_ = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, nCompIdx);
261 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
263 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
274 Scalar partPressH2O = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx);
275 Scalar partPressNAPL = pg_ - partPressH2O;
277 Scalar xgn = partPressNAPL/pg_;
278 Scalar xgw = partPressH2O/pg_;
281 Scalar xwn = partPressNAPL / FluidSystem::henryCoefficient(
fluidState_, wPhaseIdx,nCompIdx);
285 Scalar xnw = partPressH2O / FluidSystem::henryCoefficient(
fluidState_, nPhaseIdx,wCompIdx);
288 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
289 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
290 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
291 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
292 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
293 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
314 Scalar xwn =
priVars[switch2Idx];
315 Scalar xww = 1 - xwn;
318 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
319 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
323 Scalar xgn = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx) / pg_;
324 Scalar xgw = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx) / pg_;
330 Scalar xnn = xwn * FluidSystem::henryCoefficient(
fluidState_, wPhaseIdx,nCompIdx) / (xgn * pg_);
331 Scalar xnw = xgw*pg_ / FluidSystem::henryCoefficient(
fluidState_, nPhaseIdx,wCompIdx);
333 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
334 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
335 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
336 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
356 Scalar xnw =
priVars[switch2Idx];
358 Scalar xgn = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx) / pg_;
363 Scalar xww = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx) / pg_;
366 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
367 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
368 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
369 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
370 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
390 Scalar partPressH2O = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx);
391 Scalar partPressNAPL = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
393 Scalar xgn = partPressNAPL/pg_;
394 Scalar xgw = partPressH2O/pg_;
397 Scalar xwn = partPressNAPL / FluidSystem::henryCoefficient(
fluidState_, wPhaseIdx,nCompIdx);
400 Scalar xnw = partPressH2O / FluidSystem::henryCoefficient(
fluidState_, nPhaseIdx,wCompIdx);
403 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
404 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
405 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
406 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
407 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
408 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
428 const Scalar xgn =
priVars[switch2Idx];
429 Scalar xgw = 1 - xgn;
432 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
433 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
437 Scalar xww = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx) / pg_;
438 Scalar xnn = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx) / pg_;
440 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
441 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
459 const Scalar xgn =
priVars[switch2Idx];
460 Scalar xgw = 1 - xgn;
463 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
464 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
467 Scalar xwn = xgn*pg_/FluidSystem::henryCoefficient(
fluidState_, wPhaseIdx,nCompIdx);
471 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
472 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
476 Scalar xnn = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx) / pg_;
478 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
505 sg_ = 1. - sw_ - sn_;
513 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
519 const auto fluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(element, scv, elemSol);
522 const Scalar pcgw = fluidMatrixInteraction.pcgw(sw_, sn_);
523 const Scalar pcnw = fluidMatrixInteraction.pcnw(sw_, sn_);
524 const Scalar pcgn = fluidMatrixInteraction.pcgn(sw_, sn_);
526 const Scalar pcAlpha = fluidMatrixInteraction.pcAlpha(sw_, sn_);
527 const Scalar pcNW1 = 0.0;
533 pn_ = pg_- pcAlpha * pcgn - (1.-pcAlpha)*(pcgw - pcNW1);
534 pw_ = pn_ - pcAlpha * pcnw - (1.-pcAlpha)*pcNW1;
539 pn_ = pw_ + pcAlpha * pcnw + (1.-pcAlpha)*pcNW1;
540 pg_ = pn_ + pcAlpha * pcgn + (1.-pcAlpha)*(pcgw - pcNW1);
542 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
557 Scalar tempOnlyWater = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, wCompIdx);
558 temp_ = tempOnlyWater;
562 Scalar tempOnlyNAPL = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, nCompIdx);
563 temp_ = tempOnlyNAPL;
568 Scalar tempOnlyNAPL = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, nCompIdx);
569 Scalar tempOnlyWater = FluidSystem::inverseVaporPressureCurve(
fluidState_, gPhaseIdx, wCompIdx);
570 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
572 fluidState_.setTemperature(phaseIdx, tempOnlyWater);
575 Scalar defect = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
576 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
578 Scalar temp = tempOnlyWater;
581 while(abs(defect) > 0.01)
583 Scalar deltaT = 1.e-6;
584 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
589 Scalar fUp = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
590 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
592 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
597 Scalar fDown = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
598 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
600 temp = temp - defect * 2. * deltaT / (fUp - fDown);
602 for(
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
607 defect = pg_ - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx)
608 - FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
610 if (counter>10)
break;
612 if ((sw_>1.e-10)&&(sw_<0.01))
613 temp = temp + (sw_ - 1.e-10) * (temp - tempOnlyNAPL) / (0.01 - 1.e-10);
614 if ((sn_>1.e-10)&&(sn_<0.01))
615 temp = temp + (sn_ - 1.e-10) * (temp - tempOnlyWater) / (0.01 - 1.e-10);
619 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
621 for (
int phaseIdx=0; phaseIdx < FluidSystem::numPhases; ++phaseIdx)
631 Scalar partPressH2O = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx);
632 Scalar partPressNAPL = pg_ - partPressH2O;
635 if (sw_<0.02) partPressH2O *= sw_/0.02;
636 if (partPressH2O < 0.) partPressH2O = 0;
637 if (sn_<0.02) partPressNAPL *= sn_ / 0.02;
638 if (partPressNAPL < 0.) partPressNAPL = 0;
640 Scalar xgn = partPressNAPL/pg_;
641 Scalar xgw = partPressH2O/pg_;
651 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
652 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
653 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
654 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
655 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
656 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
674 Scalar partPressH2O = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, wCompIdx);
675 Scalar partPressNAPL = FluidSystem::partialPressureGas(
fluidState_, gPhaseIdx, nCompIdx);
677 Scalar xgn = partPressNAPL/pg_;
678 Scalar xgw = partPressH2O/pg_;
687 fluidState_.setMoleFraction(wPhaseIdx, wCompIdx, xww);
688 fluidState_.setMoleFraction(wPhaseIdx, nCompIdx, xwn);
689 fluidState_.setMoleFraction(gPhaseIdx, wCompIdx, xgw);
690 fluidState_.setMoleFraction(gPhaseIdx, nCompIdx, xgn);
691 fluidState_.setMoleFraction(nPhaseIdx, wCompIdx, xnw);
692 fluidState_.setMoleFraction(nPhaseIdx, nCompIdx, xnn);
708 else DUNE_THROW(Dune::InvalidStateException,
"phasePresence: " <<
phasePresence <<
" is invalid.");
711 const auto fluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(element, scv, elemSol);
712 for (
int phaseIdx = 0; phaseIdx < numPs; ++phaseIdx)
720 const Scalar kr = fluidMatrixInteraction.kr(phaseIdx,
723 mobility_[phaseIdx] = kr / mu;
728 bulkDensTimesAdsorpCoeff_ = fluidMatrixInteraction.adsorptionModel().bulkDensTimesAdsorpCoeff();
732 EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv,
solidState_);
734 auto getEffectiveDiffusionCoefficient = [&](
int phaseIdx,
int compIIdx,
int compJIdx)
736 return EffDiffModel::effectiveDiffusionCoefficient(*
this, phaseIdx, compIIdx, compJIdx);
739 effectiveDiffCoeff_.update(getEffectiveDiffusionCoefficient);
742 permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
746 for (
int phaseIdx = 0; phaseIdx < numPs; ++phaseIdx)
748 Scalar h = FluidSystem::enthalpy(
fluidState_, phaseIdx);
752 EnergyVolVars::updateEffectiveThermalConductivity();
792 {
return fluidState_.massFraction(phaseIdx, compIdx); }
802 {
return fluidState_.moleFraction(phaseIdx, compIdx); }
848 {
return mobility_[phaseIdx]; }
869 {
return permeability_; }
876 if (phaseIdx != nPhaseIdx)
877 return FluidSystem::diffusionCoefficient(
fluidState_, phaseIdx);
886 {
return effectiveDiffCoeff_(phaseIdx, compIIdx, compJIdx); }
893 if (bulkDensTimesAdsorpCoeff_)
894 return bulkDensTimesAdsorpCoeff_.
value();
896 DUNE_THROW(Dune::NotImplemented,
"Your spatialParams do not provide an adsorption model");
922 Scalar sw_, sg_, sn_, pg_, pw_, pn_, temp_;
924 Scalar moleFrac_[numPs][numFluidComps];
925 Scalar massFrac_[numPs][numFluidComps];
927 Scalar permeability_;
928 Scalar mobility_[numPs];
932 DiffusionCoefficients effectiveDiffCoeff_;
Definition: porousmediumflow/nonisothermal/volumevariables.hh:63
The isothermal base class.
Definition: porousmediumflow/volumevariables.hh:28
static constexpr int numFluidComponents()
Return number of components considered by the model.
Definition: porousmediumflow/volumevariables.hh:40
const PrimaryVariables & priVars() const
Returns the vector of primary variables.
Definition: porousmediumflow/volumevariables.hh:64
static constexpr int numFluidPhases()
Return number of phases considered by the model.
Definition: porousmediumflow/volumevariables.hh:38
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:52
The primary variable switch controlling the phase presence state variable.
Definition: 3pwateroil/primaryvariableswitch.hh:27
Contains the quantities which are are constant within a finite volume in the three-phase,...
Definition: porousmediumflow/3pwateroil/volumevariables.hh:57
const FluidState & fluidState() const
Returns the phase state for the control-volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:758
SolidState solidState_
Definition: porousmediumflow/3pwateroil/volumevariables.hh:919
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Definition: porousmediumflow/3pwateroil/volumevariables.hh:874
Scalar molarDensity(const int phaseIdx) const
Returns the molar density of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:819
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:791
typename Traits::FluidState FluidState
The type of the object returned by the fluidState() method.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:95
Scalar permeability() const
Returns the permeability within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:868
typename Traits::FluidSystem FluidSystem
The type of the fluid system.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:97
Scalar viscosity(const int phaseIdx) const
Definition: porousmediumflow/3pwateroil/volumevariables.hh:850
Scalar bulkDensTimesAdsorpCoeff() const
Returns the adsorption information.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:891
typename Traits::SolidState SolidState
Export type of solid state.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:101
Scalar porosity() const
Returns the average porosity within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:862
Scalar enthalpy(int phaseIdx) const
Returns the total enthalpy of a phase in the sub-control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:914
Scalar mobility(const int phaseIdx) const
Returns the effective mobility of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:847
Scalar capillaryPressure() const
Returns the effective capillary pressure within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:856
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:801
Scalar saturation(const int phaseIdx) const
Returns the effective saturation of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:781
Scalar density(const int phaseIdx) const
Returns the mass density of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:810
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:103
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:119
Scalar effectiveDiffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Returns the effective diffusion coefficients for a phase in .
Definition: porousmediumflow/3pwateroil/volumevariables.hh:885
static constexpr bool onlyGasPhaseCanDisappear()
State if only the gas phase is allowed to disappear.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:107
Scalar temperature() const
Returns temperature inside the sub-control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:838
Scalar internalEnergy(int phaseIdx) const
Returns the total internal energy of a phase in the sub-control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:905
typename ModelTraits::Indices Indices
Export the indices.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:99
const SolidState & solidState() const
Returns the phase state for the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:764
Scalar averageMolarMass(int phaseIdx) const
Returns the average molar mass of the fluid phase.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:772
FluidState fluidState_
Definition: porousmediumflow/3pwateroil/volumevariables.hh:915
Scalar pressure(const int phaseIdx) const
Returns the effective pressure of a given phase within the control volume.
Definition: porousmediumflow/3pwateroil/volumevariables.hh:828
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
A central place for various physical constants occurring in some equations.
Some exceptions thrown in DuMux
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:24
Define some often used mathematical functions.
decltype(std::declval< FluidMatrixInteraction >().adsorptionModel()) AdsorptionModelDetector
Definition: porousmediumflow/3p3c/volumevariables.hh:33
static constexpr bool hasAdsorptionModel()
Definition: porousmediumflow/3p3c/volumevariables.hh:36
std::string phasePresence() noexcept
I/O name of phase presence.
Definition: name.hh:135
std::string viscosity(int phaseIdx) noexcept
I/O name of viscosity for multiphase systems.
Definition: name.hh:62
std::string molarDensity(int phaseIdx) noexcept
I/O name of molar density for multiphase systems.
Definition: name.hh:71
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:53
A wrapper that can either contain a valid Scalar or NaN.
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.
T value() const
Definition: optionalscalar.hh:36
Update the solid volume fractions (inert and reacitve) and set them in the solidstate.