3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
scalarvolumevariables.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*****************************************************************************
4 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_NAVIERSTOKES_SCALAR_CONSERVATION_MODEL_VOLUME_VARIABLES_HH
25#define DUMUX_NAVIERSTOKES_SCALAR_CONSERVATION_MODEL_VOLUME_VARIABLES_HH
26
27
28namespace Dumux {
29
34template <class Traits>
36{
37 using Scalar = typename Traits::PrimaryVariables::value_type;
38
39public:
41 using PrimaryVariables = typename Traits::PrimaryVariables;
43 using Indices = typename Traits::ModelTraits::Indices;
45 using FluidSystem = typename Traits::FluidSystem;
47 using FluidState = typename Traits::FluidState;
48
50 static constexpr int numFluidPhases() { return Traits::ModelTraits::numFluidPhases(); }
52 static constexpr int numFluidComponents() { return Traits::ModelTraits::numFluidComponents(); }
53
63 template<class ElementSolution, class Problem, class Element, class SubControlVolume>
64 void update(const ElementSolution& elemSol,
65 const Problem& problem,
66 const Element& element,
67 const SubControlVolume& scv)
68 {
69 priVars_ = elemSol[scv.indexInElement()];
70 extrusionFactor_ = problem.spatialParams().extrusionFactor(element, scv, elemSol);
71 }
72
82 Scalar extrusionFactor() const
83 { return extrusionFactor_; }
84
90 Scalar priVar(const int pvIdx) const
91 { return priVars_[pvIdx]; }
92
97 { return priVars_; }
98
99protected:
102};
103
104} // end namespace Dumux
105
106#endif // DUMUX_NAVIERSTOKES_MOMENTUM_VOLUME_VARIABLES_HH
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
Volume variables for the single-phase Navier-Stokes model.
Definition: scalarvolumevariables.hh:36
typename Traits::FluidSystem FluidSystem
Export the underlying fluid system.
Definition: scalarvolumevariables.hh:45
static constexpr int numFluidComponents()
Return number of components considered by the model.
Definition: scalarvolumevariables.hh:52
typename Traits::FluidState FluidState
Export the fluid state type.
Definition: scalarvolumevariables.hh:47
typename Traits::PrimaryVariables PrimaryVariables
export the type used for the primary variables
Definition: scalarvolumevariables.hh:41
Scalar extrusionFactor_
Definition: scalarvolumevariables.hh:101
typename Traits::ModelTraits::Indices Indices
export the indices type
Definition: scalarvolumevariables.hh:43
PrimaryVariables priVars_
Definition: scalarvolumevariables.hh:100
Scalar extrusionFactor() const
Return how much the sub-control volume is extruded.
Definition: scalarvolumevariables.hh:82
const PrimaryVariables & priVars() const
Return the primary variable vector.
Definition: scalarvolumevariables.hh:96
Scalar priVar(const int pvIdx) const
Return a component of primary variable vector.
Definition: scalarvolumevariables.hh:90
static constexpr int numFluidPhases()
Return number of phases considered by the model.
Definition: scalarvolumevariables.hh:50
void update(const ElementSolution &elemSol, const Problem &problem, const Element &element, const SubControlVolume &scv)
Update all quantities for a given control volume.
Definition: scalarvolumevariables.hh:64