26#ifndef DUMUX_2P2C_VOLUME_VARIABLES_HH
27#define DUMUX_2P2C_VOLUME_VARIABLES_HH
43template <
class Traits,
bool enableChemicalNonEquilibrium,
bool useConstra
intSolver>
52template <
class Traits,
bool useConstra
intSolver = true>
61template <
class Traits,
class Impl>
69 using Scalar =
typename Traits::PrimaryVariables::value_type;
70 using ModelTraits =
typename Traits::ModelTraits;
76 comp0Idx = Traits::FluidSystem::comp0Idx,
77 comp1Idx = Traits::FluidSystem::comp1Idx,
78 phase0Idx = Traits::FluidSystem::phase0Idx,
79 phase1Idx = Traits::FluidSystem::phase1Idx
85 firstPhaseOnly = ModelTraits::Indices::firstPhaseOnly,
86 secondPhaseOnly = ModelTraits::Indices::secondPhaseOnly,
87 bothPhases = ModelTraits::Indices::bothPhases
93 switchIdx = ModelTraits::Indices::switchIdx,
94 pressureIdx = ModelTraits::Indices::pressureIdx
98 static constexpr auto formulation = ModelTraits::priVarFormulation();
100 using PermeabilityType =
typename Traits::PermeabilityType;
103 using EffDiffModel =
typename Traits::EffectiveDiffusivityModel;
104 using DiffusionCoefficients =
typename Traits::DiffusionType::DiffusionCoefficientsContainer;
118 static constexpr bool useMoles() {
return ModelTraits::useMoles(); }
123 static_assert(ModelTraits::numFluidPhases() == 2,
"NumPhases set in the model is not two!");
124 static_assert(ModelTraits::numFluidComponents() == 2,
"NumComponents set in the model is not two!");
136 template<
class ElemSol,
class Problem,
class Element,
class Scv>
137 void update(
const ElemSol& elemSol,
const Problem& problem,
const Element& element,
const Scv& scv)
140 asImp_().completeFluidState(elemSol, problem, element, scv, fluidState_, solidState_);
142 using MaterialLaw =
typename Problem::SpatialParams::MaterialLaw;
143 const auto& matParams = problem.spatialParams().materialLawParams(element, scv, elemSol);
145 const int wPhaseIdx = fluidState_.wettingPhase();
146 const int nPhaseIdx = 1 - wPhaseIdx;
149 relativePermeability_[wPhaseIdx] = MaterialLaw::krw(matParams,
saturation(wPhaseIdx));
150 relativePermeability_[nPhaseIdx] = MaterialLaw::krn(matParams,
saturation(wPhaseIdx));
154 EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv, solidState_);
155 permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
157 auto getEffectiveDiffusionCoefficient = [&](
int phaseIdx,
int compIIdx,
int compJIdx)
159 return EffDiffModel::effectiveDiffusionCoefficient(*
this, phaseIdx, compIIdx, compJIdx);
162 effectiveDiffCoeff_.update(getEffectiveDiffusionCoefficient);
164 EnergyVolVars::updateEffectiveThermalConductivity();
180 template<
class ElemSol,
class Problem,
class Element,
class Scv>
182 const Problem& problem,
183 const Element& element,
190 const auto&
priVars = elemSol[scv.localDofIndex()];
193 using MaterialLaw =
typename Problem::SpatialParams::MaterialLaw;
194 const auto& materialParams = problem.spatialParams().materialLawParams(element, scv, elemSol);
195 const auto wPhaseIdx = problem.spatialParams().template wettingPhase<FluidSystem>(element, scv, elemSol);
223 DUNE_THROW(Dune::InvalidStateException,
"Invalid phase presence.");
226 pc_ = MaterialLaw::pc(materialParams,
fluidState.saturation(wPhaseIdx));
230 fluidState.setPressure(phase1Idx, (wPhaseIdx == phase0Idx) ?
priVars[pressureIdx] + pc_
236 fluidState.setPressure(phase0Idx, (wPhaseIdx == phase0Idx) ?
priVars[pressureIdx] - pc_
245 {
return fluidState_; }
251 {
return solidState_; }
259 {
return fluidState_.averageMolarMass(phaseIdx); }
268 {
return fluidState_.saturation(phaseIdx); }
278 {
return fluidState_.massFraction(phaseIdx, compIdx); }
288 {
return fluidState_.moleFraction(phaseIdx, compIdx); }
297 {
return fluidState_.density(phaseIdx); }
306 {
return fluidState_.viscosity(phaseIdx); }
315 {
return fluidState_.molarDensity(phaseIdx); }
324 {
return fluidState_.pressure(phaseIdx); }
334 {
return fluidState_.temperature(0); }
343 {
return relativePermeability_[phaseIdx]; }
352 {
return relativePermeability_[phaseIdx]/fluidState_.viscosity(phaseIdx); }
365 {
return solidState_.porosity(); }
371 {
return permeability_; }
376 [[deprecated(
"Will be removed after release 3.2. Use diffusionCoefficient(phaseIdx, compIIdx, compJIdx)!")]]
385 typename FluidSystem::ParameterCache paramCache;
386 paramCache.updatePhase(fluidState_, phaseIdx);
387 return FluidSystem::binaryDiffusionCoefficient(fluidState_, paramCache, phaseIdx, compIIdx, compJIdx);
394 {
return effectiveDiffCoeff_(phaseIdx, compIIdx, compJIdx); }
400 {
return fluidState_.wettingPhase(); }
407 PermeabilityType permeability_;
410 std::array<Scalar, ModelTraits::numFluidPhases()> relativePermeability_;
413 DiffusionCoefficients effectiveDiffCoeff_;
416 const Impl &
asImp_()
const {
return *
static_cast<const Impl*
>(
this); }
417 Impl &
asImp_() {
return *
static_cast<Impl*
>(
this); }
425template <
class Traits,
bool useConstra
intSolver>
432 using Scalar =
typename Traits::PrimaryVariables::value_type;
433 using ModelTraits =
typename Traits::ModelTraits;
435 static constexpr int numFluidComps = ParentType::numFluidComponents();
439 comp0Idx = Traits::FluidSystem::comp0Idx,
440 comp1Idx = Traits::FluidSystem::comp1Idx,
441 phase0Idx = Traits::FluidSystem::phase0Idx,
442 phase1Idx = Traits::FluidSystem::phase1Idx
448 firstPhaseOnly = ModelTraits::Indices::firstPhaseOnly,
449 secondPhaseOnly = ModelTraits::Indices::secondPhaseOnly,
450 bothPhases = ModelTraits::Indices::bothPhases
456 switchIdx = ModelTraits::Indices::switchIdx,
457 pressureIdx = ModelTraits::Indices::pressureIdx
461 static constexpr auto formulation = ModelTraits::priVarFormulation();
478 static constexpr bool useMoles() {
return ModelTraits::useMoles(); }
483 static_assert(useMoles() || (!useMoles() && useConstraintSolver),
"if !UseMoles, UseConstraintSolver has to be set to true");
487 static_assert(useConstraintSolver || (!FluidSystem::isGas(phase0Idx) && FluidSystem::isGas(phase1Idx)),
488 "Explicit composition calculation has to be re-checked for NON-liquid-gas equilibria");
503 template<
class ElemSol,
class Problem,
class Element,
class Scv>
505 const Problem& problem,
506 const Element& element,
511 ParentType::completeFluidState(elemSol, problem, element, scv, fluidState, solidState);
513 const auto& priVars = elemSol[scv.localDofIndex()];
517 typename FluidSystem::ParameterCache paramCache;
520 if(!useConstraintSolver)
522 for (
int phaseIdx = 0; phaseIdx < ModelTraits::numFluidPhases(); ++ phaseIdx)
524 assert(FluidSystem::isIdealMixture(phaseIdx));
525 for (
int compIdx = 0; compIdx < ModelTraits::numFluidComponents(); ++ compIdx) {
526 Scalar phi = FluidSystem::fugacityCoefficient(fluidState, paramCache, phaseIdx, compIdx);
527 fluidState.setFugacityCoefficient(phaseIdx, compIdx, phi);
533 const Scalar p0 = fluidState.pressure(phase0Idx);
534 const Scalar p1 = fluidState.pressure(phase1Idx);
540 if(useConstraintSolver)
549 const Scalar partPressLiquid = FluidSystem::fugacityCoefficient(fluidState, phase0Idx, comp0Idx)*p0;
552 const Scalar partPressGas = p1 - partPressLiquid;
555 const Scalar xnn = partPressGas / p1;
556 const Scalar xnw = partPressLiquid / p1;
561 const Scalar xwn = partPressGas / (FluidSystem::fugacityCoefficient(fluidState, phase0Idx, comp1Idx)*p0);
562 const Scalar xww = 1.0 - xwn;
565 fluidState.setMoleFraction(phase0Idx, comp0Idx, xww);
566 fluidState.setMoleFraction(phase0Idx, comp1Idx, xwn);
567 fluidState.setMoleFraction(phase1Idx, comp0Idx, xnw);
568 fluidState.setMoleFraction(phase1Idx, comp1Idx, xnn);
576 fluidState.setMoleFraction(phase1Idx, comp1Idx, 1 - priVars[switchIdx]);
577 fluidState.setMoleFraction(phase1Idx, comp0Idx, priVars[switchIdx]);
581 fluidState.setMassFraction(phase1Idx, comp0Idx, priVars[switchIdx]);
586 if (useConstraintSolver)
595 const Scalar xnw = priVars[switchIdx];
596 const Scalar xnn = 1.0 - xnw;
605 const Scalar xww = xnw*p1/( FluidSystem::fugacityCoefficient(fluidState, phase0Idx, comp0Idx)*p0 );
612 const Scalar xwn = xnn*p1/( FluidSystem::fugacityCoefficient(fluidState, phase0Idx, comp1Idx)*p0 );
614 fluidState.setMoleFraction(phase0Idx, comp0Idx, xww);
615 fluidState.setMoleFraction(phase0Idx, comp1Idx, xwn);
624 fluidState.setMoleFraction(phase0Idx, comp0Idx, 1-priVars[switchIdx]);
625 fluidState.setMoleFraction(phase0Idx, comp1Idx, priVars[switchIdx]);
629 fluidState.setMassFraction(phase0Idx, comp1Idx, priVars[switchIdx]);
634 if (useConstraintSolver)
643 const Scalar xwn = priVars[switchIdx];
648 const Scalar xnw = ( FluidSystem::fugacityCoefficient(fluidState, phase0Idx, comp0Idx)*p0 )/p1;
656 const Scalar xnn = xwn*( FluidSystem::fugacityCoefficient(fluidState, phase0Idx, comp1Idx)*p0 )/p1;
658 fluidState.setMoleFraction(phase1Idx, comp1Idx, xnn);
659 fluidState.setMoleFraction(phase1Idx, comp0Idx, xnw);
663 for (
int phaseIdx = 0; phaseIdx < ModelTraits::numFluidPhases(); ++phaseIdx)
666 if(!useConstraintSolver)
668 paramCache.updateComposition(fluidState, phaseIdx);
670 fluidState.setDensity(phaseIdx, rho);
672 fluidState.setMolarDensity(phaseIdx, rhoMolar);
677 fluidState.setViscosity(phaseIdx,mu);
678 Scalar h = EnergyVolVars::enthalpy(fluidState, paramCache, phaseIdx);
679 fluidState.setEnthalpy(phaseIdx, h);
691template <
class Traits,
bool useConstra
intSolver>
698 using Scalar =
typename Traits::PrimaryVariables::value_type;
699 using ModelTraits =
typename Traits::ModelTraits;
701 static constexpr int numFluidComps = ParentType::numFluidComponents();
705 comp0Idx = Traits::FluidSystem::comp0Idx,
706 comp1Idx = Traits::FluidSystem::comp1Idx,
707 phase0Idx = Traits::FluidSystem::phase0Idx,
708 phase1Idx = Traits::FluidSystem::phase1Idx
714 firstPhaseOnly = ModelTraits::Indices::firstPhaseOnly,
715 secondPhaseOnly = ModelTraits::Indices::secondPhaseOnly,
716 bothPhases = ModelTraits::Indices::bothPhases
722 switchIdx = ModelTraits::Indices::switchIdx,
723 pressureIdx = ModelTraits::Indices::pressureIdx
727 static constexpr auto formulation = ModelTraits::priVarFormulation();
729 using PermeabilityType =
typename Traits::PermeabilityType;
746 static constexpr bool useMoles() {
return ModelTraits::useMoles(); }
751 static_assert(useMoles() || (!useMoles() && useConstraintSolver),
"if !UseMoles, UseConstraintSolver has to be set to true");
756 static_assert(useConstraintSolver || (!FluidSystem::isGas(phase0Idx) && FluidSystem::isGas(phase1Idx)),
757 "Explicit composition calculation has to be re-checked for NON-liquid-gas equilibria");
772 template<
class ElemSol,
class Problem,
class Element,
class Scv>
774 const Problem& problem,
775 const Element& element,
780 ParentType::completeFluidState(elemSol, problem, element, scv, fluidState, solidState);
782 const auto& priVars = elemSol[scv.localDofIndex()];
787 typename FluidSystem::ParameterCache paramCache;
788 paramCache.updateAll(fluidState);
790 updateMoleFraction(fluidState,
795 for (
int phaseIdx = 0; phaseIdx < ModelTraits::numFluidPhases(); ++phaseIdx)
799 fluidState.setViscosity(phaseIdx,mu);
800 Scalar h = EnergyVolVars::enthalpy(fluidState, paramCache, phaseIdx);
801 fluidState.setEnthalpy(phaseIdx, h);
813 typename Traits::FluidSystem::ParameterCache & paramCache,
814 const typename Traits::PrimaryVariables& priVars)
818 Scalar xwnNonEquil = 0.0;
819 Scalar xwwNonEquil = 0.0;
820 Scalar xnwNonEquil = 0.0;
821 Scalar xnnNonEquil = 0.0;
825 xwnNonEquil = priVars[ModelTraits::numFluidPhases()];
826 xwwNonEquil = 1-xwnNonEquil;
827 xnwNonEquil = priVars[ModelTraits::numFluidPhases()+comp1Idx];
830 if (actualFluidState.saturation(phase0Idx) < 0.01)
832 const Scalar p1 = actualFluidState.pressure(phase1Idx);
833 const Scalar partPressLiquid = FluidSystem::vaporPressure(actualFluidState, comp0Idx);
834 xnwNonEquil =std::min(partPressLiquid/p1, xnwNonEquil);
836 xnnNonEquil = 1- xnwNonEquil;
838 actualFluidState.setMoleFraction(phase0Idx, comp0Idx, xwwNonEquil);
839 actualFluidState.setMoleFraction(phase0Idx, comp1Idx, xwnNonEquil);
840 actualFluidState.setMoleFraction(phase1Idx, comp0Idx, xnwNonEquil);
841 actualFluidState.setMoleFraction(phase1Idx, comp1Idx, xnnNonEquil);
844 for(
int phaseIdx=0; phaseIdx<ModelTraits::numFluidPhases(); ++phaseIdx)
845 for (
int compIdx = 0; compIdx < numFluidComps; ++compIdx)
847 const Scalar phi = FluidSystem::fugacityCoefficient(actualFluidState,
851 actualFluidState.setFugacityCoefficient(phaseIdx,
857 equilFluidState.assign(actualFluidState) ;
859 if(!useConstraintSolver)
861 for (
int phaseIdx = 0; phaseIdx < ModelTraits::numFluidPhases(); ++ phaseIdx)
863 assert(FluidSystem::isIdealMixture(phaseIdx));
864 for (
int compIdx = 0; compIdx < ModelTraits::numFluidComponents(); ++ compIdx) {
865 Scalar phi = FluidSystem::fugacityCoefficient(equilFluidState, paramCache, phaseIdx, compIdx);
866 equilFluidState.setFugacityCoefficient(phaseIdx, compIdx, phi);
872 const Scalar p0 = equilFluidState.pressure(phase0Idx);
873 const Scalar p1 = equilFluidState.pressure(phase1Idx);
877 if(useConstraintSolver)
886 const Scalar partPressLiquid = FluidSystem::fugacityCoefficient(equilFluidState, phase0Idx, comp0Idx)*p0;
889 const Scalar partPressGas = p1 - partPressLiquid;
892 const Scalar xnn = partPressGas / p1;
893 const Scalar xnw = partPressLiquid / p1;
898 const Scalar xwn = partPressGas / (FluidSystem::fugacityCoefficient(equilFluidState, phase0Idx, comp1Idx)*p0);
899 const Scalar xww = 1.0 - xwn;
902 equilFluidState.setMoleFraction(phase0Idx, comp0Idx, xww);
903 equilFluidState.setMoleFraction(phase0Idx, comp1Idx, xwn);
904 equilFluidState.setMoleFraction(phase1Idx, comp0Idx, xnw);
905 equilFluidState.setMoleFraction(phase1Idx, comp1Idx, xnn);
909 for(
int phaseIdx=0; phaseIdx<ModelTraits::numFluidPhases(); ++phaseIdx){
910 for (
int compIdx=0; compIdx< numFluidComps; ++ compIdx){
911 xEquil_[phaseIdx][compIdx] = equilFluidState.moleFraction(phaseIdx, compIdx);
917 DUNE_THROW(Dune::InvalidStateException,
"nonequilibrium is only possible for 2 phases present ");
920 for(
int phaseIdx=0; phaseIdx<ModelTraits::numFluidPhases(); ++phaseIdx)
923 actualFluidState.setDensity(phaseIdx, rho);
925 actualFluidState.setMolarDensity(phaseIdx, rhoMolar);
936 const Scalar
xEquil(
const unsigned int phaseIdx,
const unsigned int compIdx)
const
938 return xEquil_[phaseIdx][compIdx] ;
942 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:77
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:112
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
Definition: porousmediumflow/2p2c/volumevariables.hh:44
Contains the quantities which are constant within a finite volume in the two-phase two-component mode...
Definition: porousmediumflow/2p2c/volumevariables.hh:65
Scalar averageMolarMass(int phaseIdx) const
Returns the average molar mass of the fluid phase.
Definition: porousmediumflow/2p2c/volumevariables.hh:258
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:181
const PermeabilityType & permeability() const
Returns the average permeability within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:370
Scalar porosity() const
Returns the average porosity within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:364
const Impl & asImp_() const
Definition: porousmediumflow/2p2c/volumevariables.hh:416
typename Traits::FluidSystem FluidSystem
The fluid system used here.
Definition: porousmediumflow/2p2c/volumevariables.hh:109
Scalar mobility(const int phaseIdx) const
Returns the effective mobility of a given phase within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:351
Impl & asImp_()
Definition: porousmediumflow/2p2c/volumevariables.hh:417
Scalar relativePermeability(const int phaseIdx) const
Returns the relative permeability of a given phase within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:342
int wettingPhase() const
Returns the wetting phase index.
Definition: porousmediumflow/2p2c/volumevariables.hh:399
Scalar diffusionCoefficient(int phaseIdx, int compIdx) const
Returns the binary diffusion coefficients for a phase in .
Definition: porousmediumflow/2p2c/volumevariables.hh:377
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:137
Scalar effectiveDiffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Returns the effective diffusion coefficients for a phase in .
Definition: porousmediumflow/2p2c/volumevariables.hh:393
Scalar temperature() const
Returns temperature within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:333
typename Traits::FluidState FluidState
The type of the object returned by the fluidState() method.
Definition: porousmediumflow/2p2c/volumevariables.hh:107
Scalar capillaryPressure() const
Returns the effective capillary pressure within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:358
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
Returns the binary diffusion coefficients for a phase in .
Definition: porousmediumflow/2p2c/volumevariables.hh:383
Scalar molarDensity(const int phaseIdx) const
Returns the mass density of a given phase within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:314
const FluidState & fluidState() const
Returns the phase state within the control volume.
Definition: porousmediumflow/2p2c/volumevariables.hh:244
static constexpr TwoPFormulation priVarFormulation()
Return the two-phase formulation used here.
Definition: porousmediumflow/2p2c/volumevariables.hh:120
Scalar density(const int phaseIdx) const
Returns the mass density of a given phase within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:296
typename Traits::SolidState SolidState
Export type of solid state.
Definition: porousmediumflow/2p2c/volumevariables.hh:111
Scalar saturation(const int phaseIdx) const
Returns the saturation of a given phase within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:267
static constexpr bool useMoles()
Return whether moles or masses are balanced.
Definition: porousmediumflow/2p2c/volumevariables.hh:118
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition: porousmediumflow/2p2c/volumevariables.hh:113
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:287
const SolidState & solidState() const
Returns the phase state for the control-volume.
Definition: porousmediumflow/2p2c/volumevariables.hh:250
Scalar pressure(const int phaseIdx) const
Returns the effective pressure of a given phase within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:323
Scalar viscosity(const int phaseIdx) const
Returns the dynamic viscosity of the fluid within the control volume in .
Definition: porousmediumflow/2p2c/volumevariables.hh:305
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:277
typename Traits::FluidState FluidState
The type of the object returned by the fluidState() method.
Definition: porousmediumflow/2p2c/volumevariables.hh:467
typename Traits::SolidState SolidState
Export type of solid state.
Definition: porousmediumflow/2p2c/volumevariables.hh:471
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:504
typename Traits::FluidSystem FluidSystem
The fluid system used here.
Definition: porousmediumflow/2p2c/volumevariables.hh:469
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition: porousmediumflow/2p2c/volumevariables.hh:473
static constexpr bool useMoles()
Return whether moles or masses are balanced.
Definition: porousmediumflow/2p2c/volumevariables.hh:478
static constexpr TwoPFormulation priVarFormulation()
Return the two-phase formulation used here.
Definition: porousmediumflow/2p2c/volumevariables.hh:480
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:773
typename Traits::FluidSystem FluidSystem
The fluid system used here.
Definition: porousmediumflow/2p2c/volumevariables.hh:737
typename Traits::SolidState SolidState
Export type of solid state.
Definition: porousmediumflow/2p2c/volumevariables.hh:739
static constexpr TwoPFormulation priVarFormulation()
Return the two-phase formulation used here.
Definition: porousmediumflow/2p2c/volumevariables.hh:748
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:936
typename Traits::FluidState FluidState
The type of the object returned by the fluidState() method.
Definition: porousmediumflow/2p2c/volumevariables.hh:735
static constexpr bool useMoles()
Return whether moles or masses are balanced.
Definition: porousmediumflow/2p2c/volumevariables.hh:746
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition: porousmediumflow/2p2c/volumevariables.hh:741
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:812
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.