13#ifndef DUMUX_RICHARDS_VOLUME_VARIABLES_HH
14#define DUMUX_RICHARDS_VOLUME_VARIABLES_HH
18#include <dune/common/exceptions.hh>
36template <
class Traits>
43 using Scalar =
typename Traits::PrimaryVariables::value_type;
44 using PermeabilityType =
typename Traits::PermeabilityType;
45 using ModelTraits =
typename Traits::ModelTraits;
51 static constexpr auto fsCheck = ModelTraits::checkFluidSystem(
typename Traits::FluidSystem{});
63 using Indices =
typename Traits::ModelTraits::Indices;
67 static constexpr auto gasPhaseIdx = Traits::FluidSystem::phase1Idx;
78 template<
class ElemSol,
class Problem,
class Element,
class Scv>
80 const Problem &problem,
81 const Element &element,
86 const auto fluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(element, scv, elemSol);
90 minPc_ = fluidMatrixInteraction.endPointPc();
100 EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv,
solidState_);
101 permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
102 EnergyVolVars::updateEffectiveThermalConductivity();
119 template<
class ElemSol,
class Problem,
class Element,
class Scv>
121 const Problem& problem,
122 const Element& element,
129 const auto fluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(element, scv, elemSol);
131 const auto&
priVars = elemSol[scv.localDofIndex()];
143 const Scalar sw = fluidMatrixInteraction.sw(pc);
148 typename FluidSystem::ParameterCache paramCache;
Definition porousmediumflow/nonisothermal/volumevariables.hh:63
The isothermal base class.
Definition porousmediumflow/volumevariables.hh:28
static constexpr int numFluidComponents()
Return number of components considered by the model.
Definition porousmediumflow/volumevariables.hh:40
const PrimaryVariables & priVars() const
Returns the vector of primary variables.
Definition porousmediumflow/volumevariables.hh:64
static constexpr int numFluidPhases()
Return number of phases considered by the model.
Definition porousmediumflow/volumevariables.hh:38
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition porousmediumflow/volumevariables.hh:52
Volume averaged quantities required by the Richards model.
Definition porousmediumflow/richards/volumevariables.hh:40
Scalar saturation(const int phaseIdx=liquidPhaseIdx) const
Returns the average absolute saturation [] of a given fluid phase within the finite volume.
Definition porousmediumflow/richards/volumevariables.hh:207
FluidState fluidState_
the fluid state
Definition porousmediumflow/richards/volumevariables.hh:314
Scalar relativePermeabilityWetting_
the relative permeability of the wetting phase
Definition porousmediumflow/richards/volumevariables.hh:316
const PermeabilityType & permeability() const
Returns the permeability within the control volume in .
Definition porousmediumflow/richards/volumevariables.hh:194
Scalar waterContent(const int phaseIdx=liquidPhaseIdx) const
Returns the water content of a fluid phase within the finite volume.
Definition porousmediumflow/richards/volumevariables.hh:310
Scalar porosity() const
Returns the average porosity [] within the control volume.
Definition porousmediumflow/richards/volumevariables.hh:188
SolidState solidState_
Definition porousmediumflow/richards/volumevariables.hh:315
const FluidState & fluidState() const
Returns the fluid configuration at the given primary variables.
Definition porousmediumflow/richards/volumevariables.hh:167
Scalar viscosity(const int phaseIdx=liquidPhaseIdx) const
Returns the dynamic viscosity of a given phase within the control volume.
Definition porousmediumflow/richards/volumevariables.hh:254
static constexpr auto liquidPhaseIdx
Export phase indices.
Definition porousmediumflow/richards/volumevariables.hh:66
static constexpr auto gasPhaseIdx
Definition porousmediumflow/richards/volumevariables.hh:67
Scalar pressureHead(const int phaseIdx=liquidPhaseIdx) const
Returns the pressureHead of a given phase within the control volume.
Definition porousmediumflow/richards/volumevariables.hh:297
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition porousmediumflow/richards/volumevariables.hh:79
Scalar capillaryPressure() const
Returns the effective capillary pressure within the control volume.
Definition porousmediumflow/richards/volumevariables.hh:277
PermeabilityType permeability_
the intrinsic permeability
Definition porousmediumflow/richards/volumevariables.hh:317
Scalar density(const int phaseIdx=liquidPhaseIdx) const
Returns the average mass density of a given fluid phase within the control volume.
Definition porousmediumflow/richards/volumevariables.hh:216
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition porousmediumflow/richards/volumevariables.hh:62
typename Traits::ModelTraits::Indices Indices
Definition porousmediumflow/richards/volumevariables.hh:63
Scalar relativePermeability(const int phaseIdx=liquidPhaseIdx) const
Returns relative permeability [-] of a given phase within the control volume.
Definition porousmediumflow/richards/volumevariables.hh:263
const SolidState & solidState() const
Returns the phase state for the control volume.
Definition porousmediumflow/richards/volumevariables.hh:173
typename Traits::SolidState SolidState
Definition porousmediumflow/richards/volumevariables.hh:60
Scalar effectiveDiffCoeff_
Definition porousmediumflow/richards/volumevariables.hh:321
void completeFluidState(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv, FluidState &fluidState, SolidState &solidState)
Fills the fluid state according to the primary variables.
Definition porousmediumflow/richards/volumevariables.hh:120
Scalar mobility(const int phaseIdx=liquidPhaseIdx) const
Returns the effective mobility of a given phase within the control volume.
Definition porousmediumflow/richards/volumevariables.hh:244
Scalar pressure(const int phaseIdx=liquidPhaseIdx) const
Returns the effective pressure of a given phase within the control volume.
Definition porousmediumflow/richards/volumevariables.hh:230
typename Traits::FluidSystem FluidSystem
Export type of the fluid system.
Definition porousmediumflow/richards/volumevariables.hh:55
typename Traits::FluidState FluidState
Export type of the fluid state.
Definition porousmediumflow/richards/volumevariables.hh:57
Scalar temperature() const
Returns the temperature.
Definition porousmediumflow/richards/volumevariables.hh:179
Scalar minPc_
the minimum capillary pressure (entry pressure)
Definition porousmediumflow/richards/volumevariables.hh:318
void updateSolidVolumeFractions(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv, SolidState &solidState, const int solidVolFracOffset)
update the solid volume fractions (inert and reacitve) and set them in the solidstate
Definition updatesolidvolumefractions.hh:24
Relations valid for an ideal gas.
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.
Type traits to be used with matrix types.
Update the solid volume fractions (inert and reacitve) and set them in the solidstate.