24#ifndef DUMUX_TRACER_VOLUME_VARIABLES_HH
25#define DUMUX_TRACER_VOLUME_VARIABLES_HH
29#include <dune/common/std/type_traits.hh>
39template <
typename T,
typename ...Ts>
40using SaturationDetector =
decltype(std::declval<T>().spatialParams().saturation(std::declval<Ts>()...));
42template<
class T,
typename ...Args>
53template <
class Traits>
58 using Scalar =
typename Traits::PrimaryVariables::value_type;
59 static constexpr bool useMoles = Traits::ModelTraits::useMoles();
75 template<
class ElemSol,
class Problem,
class Element,
class Scv>
77 const Problem &problem,
78 const Element &element,
88 fluidDensity_ = problem.spatialParams().fluidDensity(element, scv);
95 diffCoeff_[compIdx] = FluidSystem::binaryDiffusionCoefficient(compIdx, problem, element, scv);
216 template<
class Problem,
class Element,
class Scv,
217 std::enable_if_t<Detail::hasSaturation<Problem, Element, Scv>(),
int> = 0>
219 const Element& element,
221 {
return problem.spatialParams().saturation(element, scv); }
231 template<
class Problem,
class Element,
class Scv,
232 std::enable_if_t<!Detail::hasSaturation<Problem, Element, Scv>(),
int> = 0>
234 const Element &element,
Update the solid volume fractions (inert and reacitve) and set them in the solidstate.
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
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
decltype(std::declval< T >().spatialParams().saturation(std::declval< Ts >()...)) SaturationDetector
Definition: porousmediumflow/tracer/volumevariables.hh:40
static constexpr bool hasSaturation()
Definition: porousmediumflow/tracer/volumevariables.hh:43
Contains the quantities which are constant within a finite volume for the tracer model.
Definition: porousmediumflow/tracer/volumevariables.hh:56
Scalar averageMolarMass(int phaseIdx=0) const
Returns the average molar mass of the fluid phase.
Definition: porousmediumflow/tracer/volumevariables.hh:114
Scalar diffusionCoefficient(int phaseIdx, int compIdx) const
Returns the binary diffusion coefficient in the fluid.
Definition: porousmediumflow/tracer/volumevariables.hh:188
typename Traits::FluidSystem FluidSystem
Export fluid system type.
Definition: porousmediumflow/tracer/volumevariables.hh:63
Scalar moleFraction(int phaseIdx, int compIdx) const
Returns the mole fraction of a component in the phase.
Definition: porousmediumflow/tracer/volumevariables.hh:161
Scalar massFraction(int phaseIdx, int compIdx) const
Returns the mass fraction of a component in the phase.
Definition: porousmediumflow/tracer/volumevariables.hh:170
Scalar molarDensity(int phaseIdx=0) const
Returns the molar density the of the fluid phase.
Definition: porousmediumflow/tracer/volumevariables.hh:152
typename Traits::SolidState SolidState
Definition: porousmediumflow/tracer/volumevariables.hh:64
Scalar fluidDensity_
Definition: porousmediumflow/tracer/volumevariables.hh:206
SolidState solidState_
Definition: porousmediumflow/tracer/volumevariables.hh:205
Scalar density(int phaseIdx=0) const
Returns the density the of the fluid phase.
Definition: porousmediumflow/tracer/volumevariables.hh:106
const SolidState & solidState() const
Returns the phase state for the control volume.
Definition: porousmediumflow/tracer/volumevariables.hh:120
Scalar mobility(int phaseIdx=0) const
Returns the mobility.
Definition: porousmediumflow/tracer/volumevariables.hh:144
Scalar saturation(int phaseIdx=0) const
Returns the saturation.
Definition: porousmediumflow/tracer/volumevariables.hh:133
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition: porousmediumflow/tracer/volumevariables.hh:76
Scalar porosity() const
Definition: porousmediumflow/tracer/volumevariables.hh:201
std::array< Scalar, ParentType::numFluidComponents()> diffCoeff_
Definition: porousmediumflow/tracer/volumevariables.hh:239
Scalar saturation_(const Problem &problem, const Element &element, const Scv &scv)
Gets the saturation in an scv.
Definition: porousmediumflow/tracer/volumevariables.hh:218
Scalar fluidSaturation_
Definition: porousmediumflow/tracer/volumevariables.hh:207
Scalar fluidMolarMass_
Definition: porousmediumflow/tracer/volumevariables.hh:206
Scalar molarity(int phaseIdx, int compIdx) const
Returns the concentration of a component in the phase.
Definition: porousmediumflow/tracer/volumevariables.hh:179
std::array< Scalar, ParentType::numFluidComponents()> moleOrMassFraction_
Definition: porousmediumflow/tracer/volumevariables.hh:240
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.