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 ComponentVector = Dune::FieldVector<Scalar, ModelTraits::numFluidComponents()>;
72 using EffDiffModel =
typename Traits::EffectiveDiffusivityModel;
73 using DiffusionCoefficients =
typename Traits::DiffusionType::DiffusionCoefficientsContainer;
77 using Indices =
typename Traits::ModelTraits::Indices;
88 static constexpr int numFluidPhases() {
return ModelTraits::numFluidPhases(); }
101 template<
class ElemSol,
class Problem,
class Element,
class Scv>
103 const Problem& problem,
104 const Element& element,
112 const auto& spatialParams = problem.spatialParams();
113 const int wPhaseIdx = spatialParams.template wettingPhase<FluidSystem>(element, scv, elemSol);
114 const auto fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
115 const auto relPerm = fluidMatrixInteraction.relativePermeabilities(
fluidState_, wPhaseIdx);
118 typename FluidSystem::ParameterCache paramCache;
124 if constexpr (enableDiffusion)
126 auto getEffectiveDiffusionCoefficient = [&](
int phaseIdx,
int compIIdx,
int compJIdx)
127 {
return EffDiffModel::effectiveDiffusionCoefficient(*
this, phaseIdx, compIIdx, compJIdx); };
132 EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv,
solidState_);
133 permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
134 EnergyVolVars::updateEffectiveThermalConductivity();
149 template<
class ElemSol,
class Problem,
class Element,
class Scv>
151 const Problem& problem,
152 const Element& element,
166 auto&&
priVars = elemSol[scv.localDofIndex()];
168 for (
int phaseIdx = 0; phaseIdx <
numFluidPhases() - 1; ++phaseIdx) {
169 sumSat +=
priVars[Indices::s0Idx + phaseIdx];
178 const auto& spatialParams = problem.spatialParams();
179 const int wPhaseIdx = spatialParams.template wettingPhase<FluidSystem>(element, scv, elemSol);
183 const auto fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
184 const auto capPress = fluidMatrixInteraction.capillaryPressures(
fluidState, wPhaseIdx);
191 const Scalar pw =
priVars[Indices::p0Idx];
193 fluidState.setPressure(phaseIdx, pw - capPress[0] + capPress[phaseIdx]);
198 const Scalar pn =
priVars[Indices::p0Idx];
199 for (
int phaseIdx =
numFluidPhases()-1; phaseIdx >= 0; --phaseIdx)
203 DUNE_THROW(Dune::InvalidStateException,
"MPNCVolumeVariables do not support the chosen pressure formulation");
208 typename FluidSystem::ParameterCache paramCache;
214 fug[compIdx] =
priVars[Indices::fug0Idx + compIdx];
221 if (FluidSystem::fugacityCoefficient(
fluidState, paramCache, phaseIdx, compIdx) == 0.0)
222 DUNE_THROW(
NumericalProblem,
"MPNCVolumeVariables do not support fluidsystems with fugacity coefficients of 0");
237 Scalar mu = FluidSystem::viscosity(
fluidState, paramCache, phaseIdx);
241 Scalar h = FluidSystem::enthalpy(
fluidState, paramCache, phaseIdx);
276 {
return fluidState_.massFraction(phaseIdx, compIdx); }
286 {
return fluidState_.moleFraction(phaseIdx, compIdx); }
294 Scalar
molarity(
const int phaseIdx,
int compIdx)
const
295 {
return fluidState_.molarity(phaseIdx, compIdx); }
352 {
return FluidSystem::thermalConductivity(
fluidState_, phaseIdx); }
424 typename FluidSystem::ParameterCache paramCache;
426 return FluidSystem::binaryDiffusionCoefficient(
fluidState_, paramCache, phaseIdx, compIIdx, compJIdx);
457 const unsigned int phaseIdx)
const
468 const unsigned int phaseIdx)
const
473 a -=
fluidState.moleFraction(phaseIdx, compIdx);
490template <
class Traits>
497 using Scalar =
typename Traits::PrimaryVariables::value_type;
498 using PermeabilityType =
typename Traits::PermeabilityType;
500 using ModelTraits =
typename Traits::ModelTraits;
501 static constexpr auto pressureFormulation = ModelTraits::pressureFormulation();
503 static constexpr bool enableThermalNonEquilibrium = ModelTraits::enableThermalNonEquilibrium();
504 static constexpr bool enableChemicalNonEquilibrium = ModelTraits::enableChemicalNonEquilibrium();
505 static constexpr bool enableDiffusion = ModelTraits::enableMolecularDiffusion();
507 using Indices =
typename ModelTraits::Indices;
508 using ComponentVector = Dune::FieldVector<Scalar, ModelTraits::numFluidComponents()>;
510 using ParameterCache =
typename Traits::FluidSystem::ParameterCache;
511 using EffDiffModel =
typename Traits::EffectiveDiffusivityModel;
512 using DiffusionCoefficients =
typename Traits::DiffusionType::DiffusionCoefficientsContainer;
539 template<
class ElemSol,
class Problem,
class Element,
class Scv>
541 const Problem& problem,
542 const Element& element,
550 const auto& spatialParams = problem.spatialParams();
551 const int wPhaseIdx = spatialParams.template wettingPhase<FluidSystem>(element, scv, elemSol);
552 const auto fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
553 const auto relPerm = fluidMatrixInteraction.relativePermeabilities(
fluidState_, wPhaseIdx);
556 typename FluidSystem::ParameterCache paramCache;
561 if constexpr (enableDiffusion)
563 auto getEffectiveDiffusionCoefficient = [&](
int phaseIdx,
int compIIdx,
int compJIdx)
564 {
return EffDiffModel::effectiveDiffusionCoefficient(*
this, phaseIdx, compIIdx, compJIdx); };
569 EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv,
solidState_);
570 permeability_ = spatialParams.permeability(element, scv, elemSol);
571 EnergyVolVars::updateEffectiveThermalConductivity();
585 template<
class ElemSol,
class Problem,
class Element,
class Scv>
587 const Problem& problem,
588 const Element& element,
600 auto&&
priVars = elemSol[scv.localDofIndex()];
602 for (
int phaseIdx = 0; phaseIdx <
numFluidPhases() - 1; ++phaseIdx) {
603 sumSat +=
priVars[Indices::s0Idx + phaseIdx];
612 const auto& spatialParams = problem.spatialParams();
613 const int wPhaseIdx = spatialParams.template wettingPhase<FluidSystem>(element, scv, elemSol);
615 const auto fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
616 const auto capPress = fluidMatrixInteraction.capillaryPressures(
fluidState, wPhaseIdx);
623 const Scalar pw =
priVars[Indices::p0Idx];
625 fluidState.setPressure(phaseIdx, pw - capPress[0] + capPress[phaseIdx]);
630 const Scalar pn =
priVars[Indices::p0Idx];
631 for (
int phaseIdx =
numFluidPhases()-1; phaseIdx >= 0; --phaseIdx)
635 DUNE_THROW(Dune::InvalidStateException,
"MPNCVolumeVariables do not support the chosen pressure formulation");
641 typename FluidSystem::ParameterCache paramCache;
649 Scalar mu = FluidSystem::viscosity(
fluidState, paramCache, phaseIdx);
653 Scalar h = FluidSystem::enthalpy(
fluidState, paramCache, phaseIdx);
667 ParameterCache & paramCache,
668 const typename Traits::PrimaryVariables&
priVars)
675 actualFluidState.setMoleFraction(phaseIdx,
677 priVars[Indices::moleFrac00Idx +
686 const Scalar phi = FluidSystem::fugacityCoefficient(actualFluidState,
690 actualFluidState.setFugacityCoefficient(phaseIdx,
696 equilFluidState.assign(actualFluidState) ;
703 xEquil_[phaseIdx][compIdx] = equilFluidState.moleFraction(phaseIdx, compIdx);
709 const Scalar rho = FluidSystem::density(actualFluidState, paramCache, phaseIdx);
710 actualFluidState.setDensity(phaseIdx, rho);
711 const Scalar rhoMolar = FluidSystem::molarDensity(actualFluidState, paramCache, phaseIdx);
712 actualFluidState.setMolarDensity(phaseIdx, rhoMolar);
724 const Scalar
xEquil(
const unsigned int phaseIdx,
const unsigned int compIdx)
const
726 return xEquil_[phaseIdx][compIdx] ;
759 {
return fluidState_.massFraction(phaseIdx, compIdx); }
769 {
return fluidState_.moleFraction(phaseIdx, compIdx); }
777 Scalar
molarity(
const int phaseIdx,
int compIdx)
const
778 {
return fluidState_.molarity(phaseIdx, compIdx); }
832 {
return FluidSystem::thermalConductivity(
fluidState_, phaseIdx); }
904 typename FluidSystem::ParameterCache paramCache;
906 return FluidSystem::binaryDiffusionCoefficient(
fluidState_, paramCache, phaseIdx, compIIdx, compJIdx);
937 const unsigned int phaseIdx)
const
948 const unsigned int phaseIdx)
const
953 a -=
fluidState.moleFraction(phaseIdx, compIdx);
Enumeration of the formulations accepted by the MpNc model.
Update the solid volume fractions (inert and reacitve) and set them in the solidstate.
Computes the composition of all phases of a N-phase, N-component fluid system assuming that all N pha...
Determines the fluid composition given the component fugacities and an arbitary equation of state.
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:86
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
Exception thrown if a fixable numerical problem occurs.
Definition exceptions.hh:39
Calculates the chemical equilibrium from the component fugacities in the phase .
Definition compositionfromfugacities.hh:53
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:69
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:97
Computes the composition of all phases of a N-phase, N-component fluid system assuming that all N pha...
Definition misciblemultiphasecomposition.hh:59
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:81
Definition porousmediumflow/mpnc/volumevariables.hh:42
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Returns the binary diffusion coefficients for a phase in .
Definition porousmediumflow/mpnc/volumevariables.hh:422
typename Traits::SolidState SolidState
Export type of solid state.
Definition porousmediumflow/mpnc/volumevariables.hh:83
Scalar temperature() const
Returns the temperature inside the sub-control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:329
Scalar averageMolarMass(const int phaseIdx) const
Returns the average molar mass the of the phase.
Definition porousmediumflow/mpnc/volumevariables.hh:363
FluidState fluidState_
Mass fractions of each component within each phase.
Definition porousmediumflow/mpnc/volumevariables.hh:483
Scalar saturation(int phaseIdx) const
Returns the saturation of a given phase within the control volume in .
Definition porousmediumflow/mpnc/volumevariables.hh:265
Scalar pressure(const int phaseIdx) const
Returns the effective pressure of a given phase within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:311
static constexpr int numFluidComps
Return number of components considered by the model.
Definition porousmediumflow/mpnc/volumevariables.hh:90
const FluidState & fluidState() const
Returns the fluid configuration at the given primary variables.
Definition porousmediumflow/mpnc/volumevariables.hh:250
Scalar fluidThermalConductivity(const int phaseIdx) const
Returns the thermal conductivity of a fluid phase in the sub-control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:351
Scalar porosity() const
Returns the average porosity within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:396
Scalar mobility(const unsigned int phaseIdx) const
Returns the effective mobility of a given phase within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:372
const SolidState & solidState() const
Returns the phase state for the control-volume.
Definition porousmediumflow/mpnc/volumevariables.hh:256
Scalar relativePermeability(const unsigned int phaseIdx) const
Returns the relative permeability of a given phase within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:390
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:275
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:102
Scalar molarity(const int phaseIdx, int compIdx) const
Returns the concentration of a component in the phase.
Definition porousmediumflow/mpnc/volumevariables.hh:294
typename Traits::ModelTraits::Indices Indices
Export the type encapsulating primary variable indices.
Definition porousmediumflow/mpnc/volumevariables.hh:77
Scalar temperature(const int phaseIdx) const
Definition porousmediumflow/mpnc/volumevariables.hh:332
const PermeabilityType & permeability() const
Returns the permeability within the control volume in .
Definition porousmediumflow/mpnc/volumevariables.hh:402
Scalar fugacity(const int compIdx) const
Returns the fugacity the of the component.
Definition porousmediumflow/mpnc/volumevariables.hh:357
Scalar enthalpy(const int phaseIdx) const
Return enthalpy the of the fluid phase.
Definition porousmediumflow/mpnc/volumevariables.hh:338
Scalar effectiveDiffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Returns the effective diffusion coefficients for a phase in .
Definition porousmediumflow/mpnc/volumevariables.hh:432
SolidState solidState_
Definition porousmediumflow/mpnc/volumevariables.hh:484
Scalar density(const int phaseIdx) const
Returns the density the of the fluid phase.
Definition porousmediumflow/mpnc/volumevariables.hh:319
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:285
std::array< Scalar, ModelTraits::numFluidPhases()> relativePermeability_
Effective relative permeability within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:479
typename Traits::FluidState FluidState
Export the fluid state type.
Definition porousmediumflow/mpnc/volumevariables.hh:81
DiffusionCoefficients effectiveDiffCoeff_
Definition porousmediumflow/mpnc/volumevariables.hh:487
Scalar molarDensity(const int phaseIdx) const
Returns the molar density the of the fluid phase.
Definition porousmediumflow/mpnc/volumevariables.hh:302
Scalar phaseNcp(const unsigned int phaseIdx) const
Returns the value of the NCP-function for a phase.
Definition porousmediumflow/mpnc/volumevariables.hh:440
static constexpr int numFluidPhases()
Return number of phases considered by the model.
Definition porousmediumflow/mpnc/volumevariables.hh:88
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:456
Scalar viscosity(const unsigned int phaseIdx) const
Returns the viscosity of a given phase within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:381
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:150
PermeabilityType permeability_
Definition porousmediumflow/mpnc/volumevariables.hh:480
Scalar internalEnergy(const int phaseIdx) const
Returns the internal energy the of the fluid phase.
Definition porousmediumflow/mpnc/volumevariables.hh:344
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition porousmediumflow/mpnc/volumevariables.hh:85
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:467
typename Traits::FluidSystem FluidSystem
Export the underlying fluid system.
Definition porousmediumflow/mpnc/volumevariables.hh:79
Scalar porosity_
Effective porosity within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:478
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:411
Scalar fugacity(const int compIdx) const
Returns the fugacity the of the component.
Definition porousmediumflow/mpnc/volumevariables.hh:837
PermeabilityType permeability_
Definition porousmediumflow/mpnc/volumevariables.hh:959
Scalar fluidThermalConductivity(const int phaseIdx) const
Returns the thermal conductivity of a fluid phase in the sub-control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:831
Scalar temperature() const
Returns the temperature inside the sub-control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:812
MiscibleMultiPhaseComposition< Scalar, FluidSystem > ConstraintSolver
Definition porousmediumflow/mpnc/volumevariables.hh:528
Scalar mobility(const unsigned int phaseIdx) const
Returns the effective mobility of a given phase within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:852
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:666
Scalar pressure(const int phaseIdx) const
Returns the effective pressure of a given phase within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:794
static constexpr int numFluidComps
Return number of components considered by the model.
Definition porousmediumflow/mpnc/volumevariables.hh:527
const SolidState & solidState() const
Returns the phase state for the control-volume.
Definition porousmediumflow/mpnc/volumevariables.hh:739
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:936
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition porousmediumflow/mpnc/volumevariables.hh:522
Scalar porosity() const
Returns the average porosity within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:876
typename Traits::SolidState SolidState
Export type of solid state.
Definition porousmediumflow/mpnc/volumevariables.hh:520
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:947
typename Traits::FluidState FluidState
Export the fluid state type.
Definition porousmediumflow/mpnc/volumevariables.hh:518
Scalar enthalpy(const int phaseIdx) const
Returns the enthalpy the of the fluid phase.
Definition porousmediumflow/mpnc/volumevariables.hh:818
Scalar density(const int phaseIdx) const
Returns the density the of the fluid phase.
Definition porousmediumflow/mpnc/volumevariables.hh:802
Scalar effectiveDiffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Returns the effective diffusion coefficients for a phase in .
Definition porousmediumflow/mpnc/volumevariables.hh:912
SolidState solidState_
Definition porousmediumflow/mpnc/volumevariables.hh:964
typename Traits::FluidSystem FluidSystem
Export the underlying fluid system.
Definition porousmediumflow/mpnc/volumevariables.hh:516
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Returns the binary diffusion coefficients for a phase in .
Definition porousmediumflow/mpnc/volumevariables.hh:902
const PermeabilityType & permeability() const
Returns the permeability within the control volume in .
Definition porousmediumflow/mpnc/volumevariables.hh:882
Scalar molarDensity(const int phaseIdx) const
Returns the molar density the of the fluid phase.
Definition porousmediumflow/mpnc/volumevariables.hh:785
Scalar viscosity(const unsigned int phaseIdx) const
Returns the viscosity of a given phase within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:861
Scalar internalEnergy(const int phaseIdx) const
Returns the internal energy the of the fluid phase.
Definition porousmediumflow/mpnc/volumevariables.hh:824
std::array< std::array< Scalar, numFluidComps >, numFluidPhases()> xEquil_
Definition porousmediumflow/mpnc/volumevariables.hh:960
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:768
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:540
static constexpr int numFluidPhases()
Return number of phases considered by the model.
Definition porousmediumflow/mpnc/volumevariables.hh:525
Scalar saturation(int phaseIdx) const
Returns the saturation of a given phase within the control volume in .
Definition porousmediumflow/mpnc/volumevariables.hh:748
FluidState fluidState_
Mass fractions of each component within each phase.
Definition porousmediumflow/mpnc/volumevariables.hh:963
Scalar phaseNcp(const unsigned int phaseIdx) const
Returns the value of the NCP-function for a phase.
Definition porousmediumflow/mpnc/volumevariables.hh:920
Scalar averageMolarMass(const int phaseIdx) const
Returns the average molar mass the of the phase.
Definition porousmediumflow/mpnc/volumevariables.hh:843
std::array< Scalar, ModelTraits::numFluidPhases()> relativePermeability_
Effective relative permeability within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:958
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:586
DiffusionCoefficients effectiveDiffCoeff_
Definition porousmediumflow/mpnc/volumevariables.hh:967
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:891
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:758
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:724
Scalar relativePermeability(const unsigned int phaseIdx) const
Returns the relative permeability of a given phase within the control volume.
Definition porousmediumflow/mpnc/volumevariables.hh:870
const FluidState & fluidState() const
Returns the fluid configuration at the given primary variables.
Definition porousmediumflow/mpnc/volumevariables.hh:733
Scalar molarity(const int phaseIdx, int compIdx) const
Returns the concentration of a component in the phase.
Definition porousmediumflow/mpnc/volumevariables.hh:777
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
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.