26#ifndef DUMUX_2P2C_VOLUME_VARIABLES_HH
27#define DUMUX_2P2C_VOLUME_VARIABLES_HH
45template <
class Traits,
bool enableChemicalNonEquilibrium,
bool useConstra
intSolver>
54template <
class Traits,
bool useConstra
intSolver = true>
63template <
class Traits,
class Impl>
71 using Scalar =
typename Traits::PrimaryVariables::value_type;
72 using ModelTraits =
typename Traits::ModelTraits;
78 comp0Idx = Traits::FluidSystem::comp0Idx,
79 comp1Idx = Traits::FluidSystem::comp1Idx,
80 phase0Idx = Traits::FluidSystem::phase0Idx,
81 phase1Idx = Traits::FluidSystem::phase1Idx
87 firstPhaseOnly = ModelTraits::Indices::firstPhaseOnly,
88 secondPhaseOnly = ModelTraits::Indices::secondPhaseOnly,
89 bothPhases = ModelTraits::Indices::bothPhases
95 switchIdx = ModelTraits::Indices::switchIdx,
96 pressureIdx = ModelTraits::Indices::pressureIdx
100 static constexpr auto formulation = ModelTraits::priVarFormulation();
102 using PermeabilityType =
typename Traits::PermeabilityType;
105 using EffDiffModel =
typename Traits::EffectiveDiffusivityModel;
106 using DiffusionCoefficients =
typename Traits::DiffusionType::DiffusionCoefficientsContainer;
113 using Indices =
typename ModelTraits::Indices;
122 static constexpr bool useMoles() {
return ModelTraits::useMoles(); }
127 static_assert(ModelTraits::numFluidPhases() == 2,
"NumPhases set in the model is not two!");
128 static_assert(ModelTraits::numFluidComponents() == 2,
"NumComponents set in the model is not two!");
140 template<
class ElemSol,
class Problem,
class Element,
class Scv>
141 void update(
const ElemSol& elemSol,
const Problem& problem,
const Element& element,
const Scv& scv)
144 asImp_().completeFluidState(elemSol, problem, element, scv, fluidState_, solidState_);
149 const auto fluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(), element, scv, elemSol);
151 const int wPhaseIdx = fluidState_.wettingPhase();
152 const int nPhaseIdx = 1 - wPhaseIdx;
155 relativePermeability_[wPhaseIdx] = fluidMatrixInteraction.krw(
saturation(wPhaseIdx));
156 relativePermeability_[nPhaseIdx] = fluidMatrixInteraction.krn(
saturation(wPhaseIdx));
160 EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv, solidState_);
161 permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
163 auto getEffectiveDiffusionCoefficient = [&](
int phaseIdx,
int compIIdx,
int compJIdx)
165 return EffDiffModel::effectiveDiffusionCoefficient(*
this, phaseIdx, compIIdx, compJIdx);
168 effectiveDiffCoeff_.update(getEffectiveDiffusionCoefficient);
170 EnergyVolVars::updateEffectiveThermalConductivity();
186 template<
class ElemSol,
class Problem,
class Element,
class Scv>
188 const Problem& problem,
189 const Element& element,
196 const auto&
priVars = elemSol[scv.localDofIndex()];
202 const auto fluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(), element, scv, elemSol);
204 const auto wPhaseIdx = problem.spatialParams().template wettingPhase<FluidSystem>(element, scv, elemSol);
232 DUNE_THROW(Dune::InvalidStateException,
"Invalid phase presence.");
235 pc_ = fluidMatrixInteraction.pc(
fluidState.saturation(wPhaseIdx));
239 fluidState.setPressure(phase1Idx, (wPhaseIdx == phase0Idx) ?
priVars[pressureIdx] + pc_
245 fluidState.setPressure(phase0Idx, (wPhaseIdx == phase0Idx) ?
priVars[pressureIdx] - pc_
254 {
return fluidState_; }
260 {
return solidState_; }
268 {
return fluidState_.averageMolarMass(phaseIdx); }
277 {
return fluidState_.saturation(phaseIdx); }
287 {
return fluidState_.massFraction(phaseIdx, compIdx); }
297 {
return fluidState_.moleFraction(phaseIdx, compIdx); }
306 {
return fluidState_.density(phaseIdx); }
315 {
return fluidState_.viscosity(phaseIdx); }
324 {
return fluidState_.molarDensity(phaseIdx); }
333 {
return fluidState_.pressure(phaseIdx); }
343 {
return fluidState_.temperature(0); }
352 {
return relativePermeability_[phaseIdx]; }
361 {
return relativePermeability_[phaseIdx]/fluidState_.viscosity(phaseIdx); }
374 {
return solidState_.porosity(); }
380 {
return permeability_; }
387 typename FluidSystem::ParameterCache paramCache;
388 paramCache.updatePhase(fluidState_, phaseIdx);
389 return FluidSystem::binaryDiffusionCoefficient(fluidState_, paramCache, phaseIdx, compIIdx, compJIdx);
396 {
return effectiveDiffCoeff_(phaseIdx, compIIdx, compJIdx); }
402 {
return fluidState_.wettingPhase(); }
409 PermeabilityType permeability_;
412 std::array<Scalar, ModelTraits::numFluidPhases()> relativePermeability_;
415 DiffusionCoefficients effectiveDiffCoeff_;
418 const Impl &
asImp_()
const {
return *
static_cast<const Impl*
>(
this); }
419 Impl &
asImp_() {
return *
static_cast<Impl*
>(
this); }
427template <
class Traits,
bool useConstra
intSolver>
434 using Scalar =
typename Traits::PrimaryVariables::value_type;
435 using ModelTraits =
typename Traits::ModelTraits;
437 static constexpr int numFluidComps = ParentType::numFluidComponents();
441 comp0Idx = Traits::FluidSystem::comp0Idx,
442 comp1Idx = Traits::FluidSystem::comp1Idx,
443 phase0Idx = Traits::FluidSystem::phase0Idx,
444 phase1Idx = Traits::FluidSystem::phase1Idx
450 firstPhaseOnly = ModelTraits::Indices::firstPhaseOnly,
451 secondPhaseOnly = ModelTraits::Indices::secondPhaseOnly,
452 bothPhases = ModelTraits::Indices::bothPhases
458 switchIdx = ModelTraits::Indices::switchIdx,
459 pressureIdx = ModelTraits::Indices::pressureIdx
463 static constexpr auto formulation = ModelTraits::priVarFormulation();
480 static constexpr bool useMoles() {
return ModelTraits::useMoles(); }
485 static_assert(useMoles() || (!useMoles() && useConstraintSolver),
"if !UseMoles, UseConstraintSolver has to be set to true");
489 static_assert(useConstraintSolver || (!FluidSystem::isGas(phase0Idx) && FluidSystem::isGas(phase1Idx)),
490 "Explicit composition calculation has to be re-checked for NON-liquid-gas equilibria");
505 template<
class ElemSol,
class Problem,
class Element,
class Scv>
507 const Problem& problem,
508 const Element& element,
513 ParentType::completeFluidState(elemSol, problem, element, scv, fluidState, solidState);
515 const auto& priVars = elemSol[scv.localDofIndex()];
519 typename FluidSystem::ParameterCache paramCache;
522 if(!useConstraintSolver)
524 for (
int phaseIdx = 0; phaseIdx < ModelTraits::numFluidPhases(); ++ phaseIdx)
526 assert(FluidSystem::isIdealMixture(phaseIdx));
527 for (
int compIdx = 0; compIdx < ModelTraits::numFluidComponents(); ++ compIdx) {
528 Scalar phi = FluidSystem::fugacityCoefficient(fluidState, paramCache, phaseIdx, compIdx);
529 fluidState.setFugacityCoefficient(phaseIdx, compIdx, phi);
535 const Scalar p0 = fluidState.pressure(phase0Idx);
536 const Scalar p1 = fluidState.pressure(phase1Idx);
542 if(useConstraintSolver)
551 const Scalar partPressLiquid = FluidSystem::fugacityCoefficient(fluidState, phase0Idx, comp0Idx)*p0;
554 const Scalar partPressGas = p1 - partPressLiquid;
557 const Scalar xnn = partPressGas / p1;
558 const Scalar xnw = partPressLiquid / p1;
563 const Scalar xwn = partPressGas / (FluidSystem::fugacityCoefficient(fluidState, phase0Idx, comp1Idx)*p0);
564 const Scalar xww = 1.0 - xwn;
567 fluidState.setMoleFraction(phase0Idx, comp0Idx, xww);
568 fluidState.setMoleFraction(phase0Idx, comp1Idx, xwn);
569 fluidState.setMoleFraction(phase1Idx, comp0Idx, xnw);
570 fluidState.setMoleFraction(phase1Idx, comp1Idx, xnn);
578 fluidState.setMoleFraction(phase1Idx, comp1Idx, 1 - priVars[switchIdx]);
579 fluidState.setMoleFraction(phase1Idx, comp0Idx, priVars[switchIdx]);
583 fluidState.setMassFraction(phase1Idx, comp0Idx, priVars[switchIdx]);
588 if (useConstraintSolver)
597 const Scalar xnw = priVars[switchIdx];
598 const Scalar xnn = 1.0 - xnw;
607 const Scalar xww = xnw*p1/( FluidSystem::fugacityCoefficient(fluidState, phase0Idx, comp0Idx)*p0 );
614 const Scalar xwn = xnn*p1/( FluidSystem::fugacityCoefficient(fluidState, phase0Idx, comp1Idx)*p0 );
616 fluidState.setMoleFraction(phase0Idx, comp0Idx, xww);
617 fluidState.setMoleFraction(phase0Idx, comp1Idx, xwn);
626 fluidState.setMoleFraction(phase0Idx, comp0Idx, 1-priVars[switchIdx]);
627 fluidState.setMoleFraction(phase0Idx, comp1Idx, priVars[switchIdx]);
631 fluidState.setMassFraction(phase0Idx, comp1Idx, priVars[switchIdx]);
636 if (useConstraintSolver)
645 const Scalar xwn = priVars[switchIdx];
650 const Scalar xnw = ( FluidSystem::fugacityCoefficient(fluidState, phase0Idx, comp0Idx)*p0 )/p1;
658 const Scalar xnn = xwn*( FluidSystem::fugacityCoefficient(fluidState, phase0Idx, comp1Idx)*p0 )/p1;
660 fluidState.setMoleFraction(phase1Idx, comp1Idx, xnn);
661 fluidState.setMoleFraction(phase1Idx, comp0Idx, xnw);
665 for (
int phaseIdx = 0; phaseIdx < ModelTraits::numFluidPhases(); ++phaseIdx)
668 if(!useConstraintSolver)
670 paramCache.updateComposition(fluidState, phaseIdx);
672 fluidState.setDensity(phaseIdx, rho);
674 fluidState.setMolarDensity(phaseIdx, rhoMolar);
679 fluidState.setViscosity(phaseIdx,mu);
680 Scalar h = EnergyVolVars::enthalpy(fluidState, paramCache, phaseIdx);
681 fluidState.setEnthalpy(phaseIdx, h);
693template <
class Traits,
bool useConstra
intSolver>
700 using Scalar =
typename Traits::PrimaryVariables::value_type;
701 using ModelTraits =
typename Traits::ModelTraits;
703 static constexpr int numFluidComps = ParentType::numFluidComponents();
707 comp0Idx = Traits::FluidSystem::comp0Idx,
708 comp1Idx = Traits::FluidSystem::comp1Idx,
709 phase0Idx = Traits::FluidSystem::phase0Idx,
710 phase1Idx = Traits::FluidSystem::phase1Idx
716 firstPhaseOnly = ModelTraits::Indices::firstPhaseOnly,
717 secondPhaseOnly = ModelTraits::Indices::secondPhaseOnly,
718 bothPhases = ModelTraits::Indices::bothPhases
724 switchIdx = ModelTraits::Indices::switchIdx,
725 pressureIdx = ModelTraits::Indices::pressureIdx
729 static constexpr auto formulation = ModelTraits::priVarFormulation();
731 using PermeabilityType =
typename Traits::PermeabilityType;
748 static constexpr bool useMoles() {
return ModelTraits::useMoles(); }
753 static_assert(useMoles() || (!useMoles() && useConstraintSolver),
"if !UseMoles, UseConstraintSolver has to be set to true");
758 static_assert(useConstraintSolver || (!FluidSystem::isGas(phase0Idx) && FluidSystem::isGas(phase1Idx)),
759 "Explicit composition calculation has to be re-checked for NON-liquid-gas equilibria");
774 template<
class ElemSol,
class Problem,
class Element,
class Scv>
776 const Problem& problem,
777 const Element& element,
782 ParentType::completeFluidState(elemSol, problem, element, scv, fluidState, solidState);
784 const auto& priVars = elemSol[scv.localDofIndex()];
789 typename FluidSystem::ParameterCache paramCache;
790 paramCache.updateAll(fluidState);
792 updateMoleFraction(fluidState,
797 for (
int phaseIdx = 0; phaseIdx < ModelTraits::numFluidPhases(); ++phaseIdx)
801 fluidState.setViscosity(phaseIdx,mu);
802 Scalar h = EnergyVolVars::enthalpy(fluidState, paramCache, phaseIdx);
803 fluidState.setEnthalpy(phaseIdx, h);
815 typename Traits::FluidSystem::ParameterCache & paramCache,
816 const typename Traits::PrimaryVariables& priVars)
820 Scalar xwnNonEquil = 0.0;
821 Scalar xwwNonEquil = 0.0;
822 Scalar xnwNonEquil = 0.0;
823 Scalar xnnNonEquil = 0.0;
827 xwnNonEquil = priVars[ModelTraits::numFluidPhases()];
828 xwwNonEquil = 1-xwnNonEquil;
829 xnwNonEquil = priVars[ModelTraits::numFluidPhases()+comp1Idx];
832 if (actualFluidState.saturation(phase0Idx) < 0.01)
834 const Scalar p1 = actualFluidState.pressure(phase1Idx);
835 const Scalar partPressLiquid = FluidSystem::vaporPressure(actualFluidState, comp0Idx);
836 xnwNonEquil =std::min(partPressLiquid/p1, xnwNonEquil);
838 xnnNonEquil = 1- xnwNonEquil;
840 actualFluidState.setMoleFraction(phase0Idx, comp0Idx, xwwNonEquil);
841 actualFluidState.setMoleFraction(phase0Idx, comp1Idx, xwnNonEquil);
842 actualFluidState.setMoleFraction(phase1Idx, comp0Idx, xnwNonEquil);
843 actualFluidState.setMoleFraction(phase1Idx, comp1Idx, xnnNonEquil);
846 for(
int phaseIdx=0; phaseIdx<ModelTraits::numFluidPhases(); ++phaseIdx)
847 for (
int compIdx = 0; compIdx < numFluidComps; ++compIdx)
849 const Scalar phi = FluidSystem::fugacityCoefficient(actualFluidState,
853 actualFluidState.setFugacityCoefficient(phaseIdx,
859 equilFluidState.assign(actualFluidState) ;
861 if(!useConstraintSolver)
863 for (
int phaseIdx = 0; phaseIdx < ModelTraits::numFluidPhases(); ++ phaseIdx)
865 assert(FluidSystem::isIdealMixture(phaseIdx));
866 for (
int compIdx = 0; compIdx < ModelTraits::numFluidComponents(); ++ compIdx) {
867 Scalar phi = FluidSystem::fugacityCoefficient(equilFluidState, paramCache, phaseIdx, compIdx);
868 equilFluidState.setFugacityCoefficient(phaseIdx, compIdx, phi);
874 const Scalar p0 = equilFluidState.pressure(phase0Idx);
875 const Scalar p1 = equilFluidState.pressure(phase1Idx);
879 if(useConstraintSolver)
888 const Scalar partPressLiquid = FluidSystem::fugacityCoefficient(equilFluidState, phase0Idx, comp0Idx)*p0;
891 const Scalar partPressGas = p1 - partPressLiquid;
894 const Scalar xnn = partPressGas / p1;
895 const Scalar xnw = partPressLiquid / p1;
900 const Scalar xwn = partPressGas / (FluidSystem::fugacityCoefficient(equilFluidState, phase0Idx, comp1Idx)*p0);
901 const Scalar xww = 1.0 - xwn;
904 equilFluidState.setMoleFraction(phase0Idx, comp0Idx, xww);
905 equilFluidState.setMoleFraction(phase0Idx, comp1Idx, xwn);
906 equilFluidState.setMoleFraction(phase1Idx, comp0Idx, xnw);
907 equilFluidState.setMoleFraction(phase1Idx, comp1Idx, xnn);
911 for(
int phaseIdx=0; phaseIdx<ModelTraits::numFluidPhases(); ++phaseIdx){
912 for (
int compIdx=0; compIdx< numFluidComps; ++ compIdx){
913 xEquil_[phaseIdx][compIdx] = equilFluidState.moleFraction(phaseIdx, compIdx);
919 DUNE_THROW(Dune::InvalidStateException,
"nonequilibrium is only possible for 2 phases present ");
922 for(
int phaseIdx=0; phaseIdx<ModelTraits::numFluidPhases(); ++phaseIdx)
925 actualFluidState.setDensity(phaseIdx, rho);
927 actualFluidState.setMolarDensity(phaseIdx, rhoMolar);
938 const Scalar
xEquil(
const unsigned int phaseIdx,
const unsigned int compIdx)
const
940 return xEquil_[phaseIdx][compIdx] ;
944 std::array<std::array<Scalar, numFluidComps>, ModelTraits::numFluidPhases()> xEquil_;
The available discretization methods in Dumux.
Computes all quantities of a generic fluid state if a reference phase has been specified.
Computes the composition of all phases of a N-phase, N-component fluid system assuming that all N pha...
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.
Defines an enumeration for the formulations accepted by the two-phase model.
TwoPFormulation
Enumerates the formulations which the two-phase model accepts.
Definition: formulation.hh:35
@ p1s0
first phase saturation and second phase pressure as primary variables
@ p0s1
first phase pressure and second phase saturation as primary variables
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
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
Computes all quantities of a generic fluid state if a reference phase has been specified.
Definition: computefromreferencephase.hh:76
static void solve(FluidState &fluidState, ParameterCache ¶mCache, int refPhaseIdx)
Computes all quantities of a generic fluid state if a reference phase has been specified.
Definition: computefromreferencephase.hh:111
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/2p2c/volumevariables.hh:46
Contains the quantities which are constant within a finite volume in the two-phase two-component mode...
Definition: porousmediumflow/2p2c/volumevariables.hh:67
Scalar averageMolarMass(int phaseIdx) const
Returns the average molar mass of the fluid phase.
Definition: porousmediumflow/2p2c/volumevariables.hh:267
void completeFluidState(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv, FluidState &fluidState, SolidState &solidState)
Sets complete fluid state.
Definition: porousmediumflow/2p2c/volumevariables.hh:187
const PermeabilityType & permeability() const
Returns the average permeability within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:379
typename ModelTraits::Indices Indices
Export the indices.
Definition: porousmediumflow/2p2c/volumevariables.hh:113
Scalar porosity() const
Returns the average porosity within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:373
const Impl & asImp_() const
Definition: porousmediumflow/2p2c/volumevariables.hh:418
typename Traits::FluidSystem FluidSystem
The fluid system used here.
Definition: porousmediumflow/2p2c/volumevariables.hh:111
Scalar mobility(const int phaseIdx) const
Returns the effective mobility of a given phase within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:360
Impl & asImp_()
Definition: porousmediumflow/2p2c/volumevariables.hh:419
Scalar relativePermeability(const int phaseIdx) const
Returns the relative permeability of a given phase within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:351
int wettingPhase() const
Returns the wetting phase index.
Definition: porousmediumflow/2p2c/volumevariables.hh:401
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition: porousmediumflow/2p2c/volumevariables.hh:141
Scalar effectiveDiffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Returns the effective diffusion coefficients for a phase in .
Definition: porousmediumflow/2p2c/volumevariables.hh:395
Scalar temperature() const
Returns temperature within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:342
typename Traits::FluidState FluidState
The type of the object returned by the fluidState() method.
Definition: porousmediumflow/2p2c/volumevariables.hh:109
Scalar capillaryPressure() const
Returns the effective capillary pressure within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:367
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Returns the binary diffusion coefficients for a phase in .
Definition: porousmediumflow/2p2c/volumevariables.hh:385
Scalar molarDensity(const int phaseIdx) const
Returns the mass density of a given phase within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:323
const FluidState & fluidState() const
Returns the phase state within the control volume.
Definition: porousmediumflow/2p2c/volumevariables.hh:253
static constexpr TwoPFormulation priVarFormulation()
Return the two-phase formulation used here.
Definition: porousmediumflow/2p2c/volumevariables.hh:124
Scalar density(const int phaseIdx) const
Returns the mass density of a given phase within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:305
typename Traits::SolidState SolidState
Export type of solid state.
Definition: porousmediumflow/2p2c/volumevariables.hh:115
Scalar saturation(const int phaseIdx) const
Returns the saturation of a given phase within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:276
static constexpr bool useMoles()
Return whether moles or masses are balanced.
Definition: porousmediumflow/2p2c/volumevariables.hh:122
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition: porousmediumflow/2p2c/volumevariables.hh:117
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/2p2c/volumevariables.hh:296
const SolidState & solidState() const
Returns the phase state for the control-volume.
Definition: porousmediumflow/2p2c/volumevariables.hh:259
Scalar pressure(const int phaseIdx) const
Returns the effective pressure of a given phase within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:332
Scalar viscosity(const int phaseIdx) const
Returns the dynamic viscosity of the fluid within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:314
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/2p2c/volumevariables.hh:286
typename Traits::FluidState FluidState
The type of the object returned by the fluidState() method.
Definition: porousmediumflow/2p2c/volumevariables.hh:469
typename Traits::SolidState SolidState
Export type of solid state.
Definition: porousmediumflow/2p2c/volumevariables.hh:473
void completeFluidState(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv, FluidState &fluidState, SolidState &solidState)
Sets complete fluid state.
Definition: porousmediumflow/2p2c/volumevariables.hh:506
typename Traits::FluidSystem FluidSystem
The fluid system used here.
Definition: porousmediumflow/2p2c/volumevariables.hh:471
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition: porousmediumflow/2p2c/volumevariables.hh:475
static constexpr bool useMoles()
Return whether moles or masses are balanced.
Definition: porousmediumflow/2p2c/volumevariables.hh:480
static constexpr TwoPFormulation priVarFormulation()
Return the two-phase formulation used here.
Definition: porousmediumflow/2p2c/volumevariables.hh:482
void completeFluidState(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv, FluidState &fluidState, SolidState &solidState)
Sets complete fluid state.
Definition: porousmediumflow/2p2c/volumevariables.hh:775
typename Traits::FluidSystem FluidSystem
The fluid system used here.
Definition: porousmediumflow/2p2c/volumevariables.hh:739
typename Traits::SolidState SolidState
Export type of solid state.
Definition: porousmediumflow/2p2c/volumevariables.hh:741
static constexpr TwoPFormulation priVarFormulation()
Return the two-phase formulation used here.
Definition: porousmediumflow/2p2c/volumevariables.hh:750
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/2p2c/volumevariables.hh:938
typename Traits::FluidState FluidState
The type of the object returned by the fluidState() method.
Definition: porousmediumflow/2p2c/volumevariables.hh:737
static constexpr bool useMoles()
Return whether moles or masses are balanced.
Definition: porousmediumflow/2p2c/volumevariables.hh:748
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition: porousmediumflow/2p2c/volumevariables.hh:743
void updateMoleFraction(FluidState &actualFluidState, typename Traits::FluidSystem::ParameterCache ¶mCache, const typename Traits::PrimaryVariables &priVars)
Updates composition of all phases from the primary variables.
Definition: porousmediumflow/2p2c/volumevariables.hh:814
The primary variable switch controlling the phase presence state variable.
Definition: 2pnc/primaryvariableswitch.hh:41
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
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 2pnc model.