26#ifndef DUMUX_MPNC_VOLUME_VARIABLES_HH
27#define DUMUX_MPNC_VOLUME_VARIABLES_HH
41template <
class Traits,
bool enableChemicalNonEquilibrium>
49template <
class Traits>
52template <
class Traits>
60 using Scalar =
typename Traits::PrimaryVariables::value_type;
61 using PermeabilityType =
typename Traits::PermeabilityType;
63 using ModelTraits =
typename Traits::ModelTraits;
64 static constexpr auto pressureFormulation = ModelTraits::pressureFormulation();
66 static constexpr bool enableThermalNonEquilibrium = ModelTraits::enableThermalNonEquilibrium();
67 static constexpr bool enableChemicalNonEquilibrium = ModelTraits::enableChemicalNonEquilibrium();
68 static constexpr bool enableDiffusion = ModelTraits::enableMolecularDiffusion();
70 using Indices =
typename ModelTraits::Indices;
71 using ComponentVector = Dune::FieldVector<Scalar, ModelTraits::numFluidComponents()>;
85 static constexpr int numFluidPhases() {
return ModelTraits::numFluidPhases(); }
98 template<
class ElemSol,
class Problem,
class Element,
class Scv>
100 const Problem& problem,
101 const Element& element,
109 const auto& materialParams = problem.spatialParams().materialLawParams(element, scv, elemSol);
110 const int wPhaseIdx = problem.spatialParams().template wettingPhase<FluidSystem>(element, scv, elemSol);
112 using MaterialLaw =
typename Problem::SpatialParams::MaterialLaw;
116 typename FluidSystem::ParameterCache paramCache;
123 int compIIdx = phaseIdx;
124 for (
unsigned int compJIdx = 0; compJIdx <
numFluidComps; ++compJIdx)
127 if(compIIdx!= compJIdx)
130 FluidSystem::binaryDiffusionCoefficient(
fluidState_,
141 EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv,
solidState_);
142 permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
157 template<
class ElemSol,
class Problem,
class Element,
class Scv>
159 const Problem& problem,
160 const Element& element,
174 auto&&
priVars = elemSol[scv.localDofIndex()];
176 for (
int phaseIdx = 0; phaseIdx <
numFluidPhases() - 1; ++phaseIdx) {
177 sumSat +=
priVars[Indices::s0Idx + phaseIdx];
187 const int wPhaseIdx = problem.spatialParams().template wettingPhase<FluidSystem>(element, scv, elemSol);
189 const auto& materialParams =
190 problem.spatialParams().materialLawParams(element, scv, elemSol);
193 using MaterialLaw =
typename Problem::SpatialParams::MaterialLaw;
195 MPAdapter::capillaryPressures(capPress, materialParams,
fluidState, wPhaseIdx);
202 const Scalar pw =
priVars[Indices::p0Idx];
204 fluidState.setPressure(phaseIdx, pw - capPress[0] + capPress[phaseIdx]);
209 const Scalar pn =
priVars[Indices::p0Idx];
210 for (
int phaseIdx =
numFluidPhases()-1; phaseIdx >= 0; --phaseIdx)
214 DUNE_THROW(Dune::InvalidStateException,
"MPNCVolumeVariables do not support the chosen pressure formulation");
219 typename FluidSystem::ParameterCache paramCache;
225 fug[compIdx] =
priVars[Indices::fug0Idx + compIdx];
247 Scalar mu = FluidSystem::viscosity(
fluidState, paramCache, phaseIdx);
251 Scalar h = FluidSystem::enthalpy(
fluidState, paramCache, phaseIdx);
286 {
return fluidState_.massFraction(phaseIdx, compIdx); }
296 {
return fluidState_.moleFraction(phaseIdx, compIdx); }
304 Scalar
molarity(
const int phaseIdx,
int compIdx)
const
305 {
return fluidState_.molarity(phaseIdx, compIdx); }
362 {
return FluidSystem::thermalConductivity(
fluidState_, phaseIdx); }
434 if (compIdx < phaseIdx)
436 else if (compIdx > phaseIdx)
439 DUNE_THROW(Dune::InvalidStateException,
"Diffusion coeffiecient called for phaseIdx = compIdx");
464 const unsigned int phaseIdx)
const
475 const unsigned int phaseIdx)
const
480 a -=
fluidState.moleFraction(phaseIdx, compIdx);
488 if (compIdx < phaseIdx)
490 else if (compIdx > phaseIdx)
493 DUNE_THROW(Dune::InvalidStateException,
"Diffusion coeffiecient for phaseIdx = compIdx doesn't exist");
507template <
class Traits>
514 using Scalar =
typename Traits::PrimaryVariables::value_type;
515 using PermeabilityType =
typename Traits::PermeabilityType;
517 using ModelTraits =
typename Traits::ModelTraits;
518 static constexpr auto pressureFormulation = ModelTraits::pressureFormulation();
520 static constexpr bool enableThermalNonEquilibrium = ModelTraits::enableThermalNonEquilibrium();
521 static constexpr bool enableChemicalNonEquilibrium = ModelTraits::enableChemicalNonEquilibrium();
522 static constexpr bool enableDiffusion = ModelTraits::enableMolecularDiffusion();
524 using Indices =
typename ModelTraits::Indices;
525 using ComponentVector = Dune::FieldVector<Scalar, ModelTraits::numFluidComponents()>;
528 using ParameterCache =
typename Traits::FluidSystem::ParameterCache;
554 template<
class ElemSol,
class Problem,
class Element,
class Scv>
556 const Problem& problem,
557 const Element& element,
565 const auto& materialParams = problem.spatialParams().materialLawParams(element, scv, elemSol);
566 const int wPhaseIdx = problem.spatialParams().template wettingPhase<FluidSystem>(element, scv, elemSol);
569 using MaterialLaw =
typename Problem::SpatialParams::MaterialLaw;
572 typename FluidSystem::ParameterCache paramCache;
578 int compIIdx = phaseIdx;
579 for (
unsigned int compJIdx = 0; compJIdx <
numFluidComps; ++compJIdx)
582 if(compIIdx!= compJIdx)
585 FluidSystem::binaryDiffusionCoefficient(
fluidState_,
596 EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv,
solidState_);
597 permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
612 template<
class ElemSol,
class Problem,
class Element,
class Scv>
614 const Problem& problem,
615 const Element& element,
627 auto&&
priVars = elemSol[scv.localDofIndex()];
629 for (
int phaseIdx = 0; phaseIdx <
numFluidPhases() - 1; ++phaseIdx) {
630 sumSat +=
priVars[Indices::s0Idx + phaseIdx];
640 const auto& materialParams =
641 problem.spatialParams().materialLawParams(element, scv, elemSol);
642 const int wPhaseIdx = problem.spatialParams().template wettingPhase<FluidSystem>(element, scv, elemSol);
646 using MaterialLaw =
typename Problem::SpatialParams::MaterialLaw;
648 MPAdapter::capillaryPressures(capPress, materialParams,
fluidState, wPhaseIdx);
655 const Scalar pw =
priVars[Indices::p0Idx];
657 fluidState.setPressure(phaseIdx, pw - capPress[0] + capPress[phaseIdx]);
662 const Scalar pn =
priVars[Indices::p0Idx];
663 for (
int phaseIdx =
numFluidPhases()-1; phaseIdx >= 0; --phaseIdx)
667 DUNE_THROW(Dune::InvalidStateException,
"MPNCVolumeVariables do not support the chosen pressure formulation");
673 typename FluidSystem::ParameterCache paramCache;
679 fug[compIdx] =
priVars[Indices::fug0Idx + compIdx];
689 Scalar mu = FluidSystem::viscosity(
fluidState, paramCache, phaseIdx);
693 Scalar h = FluidSystem::enthalpy(
fluidState, paramCache, phaseIdx);
707 ParameterCache & paramCache,
708 const typename Traits::PrimaryVariables&
priVars)
715 actualFluidState.setMoleFraction(phaseIdx,
717 priVars[Indices::moleFrac00Idx +
727 const Scalar phi = FluidSystem::fugacityCoefficient(actualFluidState,
731 actualFluidState.setFugacityCoefficient(phaseIdx,
737 equilFluidState.assign(actualFluidState) ;
744 xEquil_[phaseIdx][compIdx] = equilFluidState.moleFraction(phaseIdx, compIdx);
750 const Scalar rho = FluidSystem::density(actualFluidState, paramCache, phaseIdx);
751 actualFluidState.setDensity(phaseIdx, rho);
752 const Scalar rhoMolar = FluidSystem::molarDensity(actualFluidState, paramCache, phaseIdx);
753 actualFluidState.setMolarDensity(phaseIdx, rhoMolar);
765 const Scalar
xEquil(
const unsigned int phaseIdx,
const unsigned int compIdx)
const
767 return xEquil_[phaseIdx][compIdx] ;
800 {
return fluidState_.massFraction(phaseIdx, compIdx); }
810 {
return fluidState_.moleFraction(phaseIdx, compIdx); }
818 Scalar
molarity(
const int phaseIdx,
int compIdx)
const
819 {
return fluidState_.molarity(phaseIdx, compIdx); }
873 {
return FluidSystem::thermalConductivity(
fluidState_, phaseIdx); }
945 if (compIdx < phaseIdx)
947 else if (compIdx > phaseIdx)
950 DUNE_THROW(Dune::InvalidStateException,
"Diffusion coeffiecient called for phaseIdx = compIdx");
975 const unsigned int phaseIdx)
const
986 const unsigned int phaseIdx)
const
991 a -=
fluidState.moleFraction(phaseIdx, compIdx);
999 if (compIdx < phaseIdx)
1001 else if (compIdx > phaseIdx)
1004 DUNE_THROW(Dune::InvalidStateException,
"Diffusion coeffiecient for phaseIdx = compIdx doesn't exist");
Determines the fluid composition given the component fugacities and an arbitary equation of state.
Computes the composition of all phases of a N-phase, N-component fluid system assuming that all N pha...
Makes the capillary pressure-saturation relations available under the M-phase API for material laws.
Update the solid volume fractions (inert and reacitve) and set them in the solidstate.
Enumeration of the formulations accepted by the MpNc model.
MPNCVolumeVariablesImplementation< Traits, Traits::ModelTraits::enableChemicalNonEquilibrium()> MPNCVolumeVariables
Contains the quantities which are constant within a finite volume in the MpNc model.
Definition porousmediumflow/mpnc/volumevariables.hh:50
@ mostWettingFirst
Definition pressureformulation.hh:37
@ leastWettingFirst
Definition pressureformulation.hh:37
EnergyVolumeVariablesImplementation< IsothermalTraits, Impl, IsothermalTraits::ModelTraits::enableEnergyBalance()> EnergyVolumeVariables
Base class for the model specific class which provides access to all volume averaged quantities.
Definition porousmediumflow/nonisothermal/volumevariables.hh:85
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
make the local view function available whenever we use the grid geometry
Definition adapt.hh:29
Calculates the chemical equilibrium from the component fugacities in the phase .
Definition compositionfromfugacities.hh:55
static void guessInitial(FluidState &fluidState, ParameterCache ¶mCache, int phaseIdx, const ComponentVector &fugVec)
Guess an initial value for the composition of the phase.
Definition compositionfromfugacities.hh:71
static void solve(FluidState &fluidState, ParameterCache ¶mCache, int phaseIdx, const ComponentVector &targetFug)
Calculates the chemical equilibrium from the component fugacities in a phase.
Definition compositionfromfugacities.hh:99
Computes the composition of all phases of a N-phase, N-component fluid system assuming that all N pha...
Definition misciblemultiphasecomposition.hh:60
static void solve(FluidState &fluidState, ParameterCache ¶mCache, int knownPhaseIdx=0)
Computes the composition of all phases of a N-phase, N-component fluid system assuming that all N pha...
Definition misciblemultiphasecomposition.hh:82
An adapter for mpnc to use the capillary pressure-saturation relationships.
Definition mpadapter.hh:42
Definition porousmediumflow/mpnc/volumevariables.hh:42
typename Traits::SolidState SolidState
Export type of solid state.
Definition porousmediumflow/mpnc/volumevariables.hh:80
Scalar temperature() const
Returns the temperature inside the sub-control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:339
Scalar averageMolarMass(const int phaseIdx) const
Returns the average molar mass the of the phase.
Definition porousmediumflow/mpnc/volumevariables.hh:373
FluidState fluidState_
Mass fractions of each component within each phase.
Definition porousmediumflow/mpnc/volumevariables.hh:502
Scalar saturation(int phaseIdx) const
Returns the saturation of a given phase within the control volume in .
Definition porousmediumflow/mpnc/volumevariables.hh:275
Scalar pressure(const int phaseIdx) const
Returns the effective pressure of a given phase within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:321
static constexpr int numFluidComps
Return number of components considered by the model.
Definition porousmediumflow/mpnc/volumevariables.hh:87
const FluidState & fluidState() const
Returns the fluid configuration at the given primary variables.
Definition porousmediumflow/mpnc/volumevariables.hh:260
Scalar fluidThermalConductivity(const int phaseIdx) const
Returns the thermal conductivity of a fluid phase in the sub-control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:361
Scalar porosity() const
Returns the average porosity within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:406
Scalar mobility(const unsigned int phaseIdx) const
Returns the effective mobility of a given phase within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:382
const SolidState & solidState() const
Returns the phase state for the control-volume.
Definition porousmediumflow/mpnc/volumevariables.hh:266
Scalar relativePermeability(const unsigned int phaseIdx) const
Returns the relative permeability of a given phase within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:400
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/mpnc/volumevariables.hh:285
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:99
Scalar molarity(const int phaseIdx, int compIdx) const
Returns the concentration of a component in the phase.
Definition porousmediumflow/mpnc/volumevariables.hh:304
Scalar temperature(const int phaseIdx) const
Definition porousmediumflow/mpnc/volumevariables.hh:342
const PermeabilityType & permeability() const
Returns the permeability within the control volume in .
Definition porousmediumflow/mpnc/volumevariables.hh:412
Scalar fugacity(const int compIdx) const
Returns the fugacity the of the component.
Definition porousmediumflow/mpnc/volumevariables.hh:367
Scalar enthalpy(const int phaseIdx) const
Return enthalpy the of the fluid phase.
Definition porousmediumflow/mpnc/volumevariables.hh:348
SolidState solidState_
Definition porousmediumflow/mpnc/volumevariables.hh:503
Scalar density(const int phaseIdx) const
Returns the density the of the fluid phase.
Definition porousmediumflow/mpnc/volumevariables.hh:329
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/mpnc/volumevariables.hh:295
std::array< Scalar, ModelTraits::numFluidPhases()> relativePermeability_
Effective relative permeability within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:498
typename Traits::FluidState FluidState
Export the fluid state type.
Definition porousmediumflow/mpnc/volumevariables.hh:78
Scalar molarDensity(const int phaseIdx) const
Returns the molar density the of the fluid phase.
Definition porousmediumflow/mpnc/volumevariables.hh:312
Scalar phaseNcp(const unsigned int phaseIdx) const
Returns the value of the NCP-function for a phase.
Definition porousmediumflow/mpnc/volumevariables.hh:447
static constexpr int numFluidPhases()
Return number of phases considered by the model.
Definition porousmediumflow/mpnc/volumevariables.hh:85
Scalar phasePresentIneq(const FluidState &fluidState, const unsigned int phaseIdx) const
Returns the value of the inequality where a phase is present.
Definition porousmediumflow/mpnc/volumevariables.hh:463
Scalar viscosity(const unsigned int phaseIdx) const
Returns the viscosity of a given phase within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:391
void setDiffusionCoefficient_(int phaseIdx, int compIdx, Scalar d)
Definition porousmediumflow/mpnc/volumevariables.hh:486
std::array< std::array< Scalar, numFluidComps-1 >, numFluidPhases()> diffCoefficient_
Definition porousmediumflow/mpnc/volumevariables.hh:496
void completeFluidState(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv, FluidState &fluidState, SolidState &solidState)
Sets complete fluid state.
Definition porousmediumflow/mpnc/volumevariables.hh:158
PermeabilityType permeability_
Definition porousmediumflow/mpnc/volumevariables.hh:499
Scalar internalEnergy(const int phaseIdx) const
Returns the internal energy the of the fluid phase.
Definition porousmediumflow/mpnc/volumevariables.hh:354
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition porousmediumflow/mpnc/volumevariables.hh:82
Scalar phaseNotPresentIneq(const FluidState &fluidState, const unsigned int phaseIdx) const
Returns the value of the inequality where a phase is not present.
Definition porousmediumflow/mpnc/volumevariables.hh:474
typename Traits::FluidSystem FluidSystem
Export the underlying fluid system.
Definition porousmediumflow/mpnc/volumevariables.hh:76
Scalar porosity_
Effective porosity within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:497
Scalar diffusionCoefficient(int phaseIdx, int compIdx) const
Returns the diffusion coefficient.
Definition porousmediumflow/mpnc/volumevariables.hh:432
bool isPhaseActive(const unsigned int phaseIdx) const
Returns true if the fluid state is in the active set for a phase,.
Definition porousmediumflow/mpnc/volumevariables.hh:421
Scalar fugacity(const int compIdx) const
Returns the fugacity the of the component.
Definition porousmediumflow/mpnc/volumevariables.hh:878
void setDiffusionCoefficient_(int phaseIdx, int compIdx, Scalar d)
Definition porousmediumflow/mpnc/volumevariables.hh:997
PermeabilityType permeability_
Definition porousmediumflow/mpnc/volumevariables.hh:1009
Scalar fluidThermalConductivity(const int phaseIdx) const
Returns the thermal conductivity of a fluid phase in the sub-control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:872
Scalar temperature() const
Returns the temperature inside the sub-control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:853
MiscibleMultiPhaseComposition< Scalar, FluidSystem > ConstraintSolver
Definition porousmediumflow/mpnc/volumevariables.hh:543
Scalar mobility(const unsigned int phaseIdx) const
Returns the effective mobility of a given phase within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:893
void updateMoleFraction(FluidState &actualFluidState, ParameterCache ¶mCache, const typename Traits::PrimaryVariables &priVars)
Updates composition of all phases in the mutable parameters from the primary variables.
Definition porousmediumflow/mpnc/volumevariables.hh:706
Scalar pressure(const int phaseIdx) const
Returns the effective pressure of a given phase within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:835
static constexpr int numFluidComps
Return number of components considered by the model.
Definition porousmediumflow/mpnc/volumevariables.hh:542
const SolidState & solidState() const
Returns the phase state for the control-volume.
Definition porousmediumflow/mpnc/volumevariables.hh:780
Scalar phasePresentIneq(const FluidState &fluidState, const unsigned int phaseIdx) const
Returns the value of the inequality where a phase is present.
Definition porousmediumflow/mpnc/volumevariables.hh:974
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition porousmediumflow/mpnc/volumevariables.hh:537
Scalar porosity() const
Returns the average porosity within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:917
typename Traits::SolidState SolidState
Export type of solid state.
Definition porousmediumflow/mpnc/volumevariables.hh:535
Scalar phaseNotPresentIneq(const FluidState &fluidState, const unsigned int phaseIdx) const
Returns the value of the inequality where a phase is not present.
Definition porousmediumflow/mpnc/volumevariables.hh:985
typename Traits::FluidState FluidState
Export the fluid state type.
Definition porousmediumflow/mpnc/volumevariables.hh:533
Scalar enthalpy(const int phaseIdx) const
Returns the enthalpy the of the fluid phase.
Definition porousmediumflow/mpnc/volumevariables.hh:859
Scalar density(const int phaseIdx) const
Returns the density the of the fluid phase.
Definition porousmediumflow/mpnc/volumevariables.hh:843
SolidState solidState_
Definition porousmediumflow/mpnc/volumevariables.hh:1014
typename Traits::FluidSystem FluidSystem
Export the underlying fluid system.
Definition porousmediumflow/mpnc/volumevariables.hh:531
const PermeabilityType & permeability() const
Returns the permeability within the control volume in .
Definition porousmediumflow/mpnc/volumevariables.hh:923
Scalar molarDensity(const int phaseIdx) const
Returns the molar density the of the fluid phase.
Definition porousmediumflow/mpnc/volumevariables.hh:826
Scalar viscosity(const unsigned int phaseIdx) const
Returns the viscosity of a given phase within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:902
Scalar internalEnergy(const int phaseIdx) const
Returns the internal energy the of the fluid phase.
Definition porousmediumflow/mpnc/volumevariables.hh:865
std::array< std::array< Scalar, numFluidComps >, numFluidPhases()> xEquil_
Definition porousmediumflow/mpnc/volumevariables.hh:1010
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/mpnc/volumevariables.hh:809
std::array< std::array< Scalar, numFluidComps-1 >, numFluidPhases()> diffCoefficient_
Definition porousmediumflow/mpnc/volumevariables.hh:1007
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:555
static constexpr int numFluidPhases()
Return number of phases considered by the model.
Definition porousmediumflow/mpnc/volumevariables.hh:540
Scalar saturation(int phaseIdx) const
Returns the saturation of a given phase within the control volume in .
Definition porousmediumflow/mpnc/volumevariables.hh:789
FluidState fluidState_
Mass fractions of each component within each phase.
Definition porousmediumflow/mpnc/volumevariables.hh:1013
Scalar phaseNcp(const unsigned int phaseIdx) const
Returns the value of the NCP-function for a phase.
Definition porousmediumflow/mpnc/volumevariables.hh:958
Scalar averageMolarMass(const int phaseIdx) const
Returns the average molar mass the of the phase.
Definition porousmediumflow/mpnc/volumevariables.hh:884
Scalar diffusionCoefficient(int phaseIdx, int compIdx) const
Returns the diffusion coefficient.
Definition porousmediumflow/mpnc/volumevariables.hh:943
std::array< Scalar, ModelTraits::numFluidPhases()> relativePermeability_
Effective relative permeability within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:1008
void completeFluidState(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv, FluidState &fluidState, SolidState &solidState)
Sets complete fluid state.
Definition porousmediumflow/mpnc/volumevariables.hh:613
bool isPhaseActive(const unsigned int phaseIdx) const
Returns true if the fluid state is in the active set for a phase,.
Definition porousmediumflow/mpnc/volumevariables.hh:932
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/mpnc/volumevariables.hh:799
const Scalar xEquil(const unsigned int phaseIdx, const unsigned int compIdx) const
The mole fraction we would have in the case of chemical equilibrium / on the interface.
Definition porousmediumflow/mpnc/volumevariables.hh:765
Scalar relativePermeability(const unsigned int phaseIdx) const
Returns the relative permeability of a given phase within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:911
const FluidState & fluidState() const
Returns the fluid configuration at the given primary variables.
Definition porousmediumflow/mpnc/volumevariables.hh:774
Scalar molarity(const int phaseIdx, int compIdx) const
Returns the concentration of a component in the phase.
Definition porousmediumflow/mpnc/volumevariables.hh:818
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
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.