3.4
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porenetwork/2p/volumevariables.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 *****************************************************************************/
25#ifndef DUMUX_PNM_2P_VOLUME_VARIABLES_HH
26#define DUMUX_PNM_2P_VOLUME_VARIABLES_HH
27
30
31namespace Dumux::PoreNetwork {
32
38template <class Traits>
40: public Dumux::TwoPVolumeVariables<Traits>
41{
43 using ModelTraits = typename Traits::ModelTraits;
44 using Scalar = typename Traits::PrimaryVariables::value_type;
45 using FS = typename Traits::FluidSystem;
46 static constexpr int numFluidComps = ParentType::numFluidComponents();
47 static constexpr auto formulation = ModelTraits::priVarFormulation();
48public:
49
51 using FluidSystem = typename Traits::FluidSystem;
53 using FluidState = typename Traits::FluidState;
55 using SolidState = typename Traits::SolidState;
57 using SolidSystem = typename Traits::SolidSystem;
59 using Indices = typename ModelTraits::Indices;
60
70 template<class ElemSol, class Problem, class Element, class Scv>
71 void update(const ElemSol& elemSol,
72 const Problem& problem,
73 const Element& element,
74 const Scv& scv)
75 {
76 ParentType::update(elemSol, problem, element, scv);
77 poreInscribedRadius_ = problem.spatialParams().poreInscribedRadius(element, scv, elemSol);
78 poreVolume_ = problem.gridGeometry().poreVolume(scv.dofIndex()) * this->porosity();
79 surfaceTension_ = problem.spatialParams().surfaceTension(element, scv, elemSol);
80 }
81
85 Scalar poreInscribedRadius() const
86 { return poreInscribedRadius_; }
87
91 Scalar poreVolume() const
92 { return poreVolume_; }
93
97 Scalar surfaceTension() const
98 { return surfaceTension_; }
99
100protected:
104};
105
106} // end namespace Dumux::PoreNetwork
107
108#endif
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Definition: discretization/porenetwork/fvelementgeometry.hh:33
Contains the quantities which are are constant within a finite volume (the pore body) in the two-phas...
Definition: porenetwork/2p/volumevariables.hh:41
typename ModelTraits::Indices Indices
Export the indices.
Definition: porenetwork/2p/volumevariables.hh:59
typename Traits::FluidSystem FluidSystem
Export type of fluid system.
Definition: porenetwork/2p/volumevariables.hh:51
typename Traits::SolidState SolidState
Export type of solid state.
Definition: porenetwork/2p/volumevariables.hh:55
Scalar surfaceTension_
Definition: porenetwork/2p/volumevariables.hh:103
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition: porenetwork/2p/volumevariables.hh:71
Scalar poreVolume_
Definition: porenetwork/2p/volumevariables.hh:102
Scalar poreVolume() const
Returns the pore volume. // TODO should this be a fraction only?
Definition: porenetwork/2p/volumevariables.hh:91
Scalar poreInscribedRadius() const
Returns the pore's inscribed radius.
Definition: porenetwork/2p/volumevariables.hh:85
Scalar surfaceTension() const
Returns the surface tension.
Definition: porenetwork/2p/volumevariables.hh:97
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition: porenetwork/2p/volumevariables.hh:57
typename Traits::FluidState FluidState
Export type of fluid state.
Definition: porenetwork/2p/volumevariables.hh:53
Scalar poreInscribedRadius_
Definition: porenetwork/2p/volumevariables.hh:101
Contains the quantities which are are constant within a finite volume in the two-phase model.
Definition: porousmediumflow/2p/volumevariables.hh:45
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition: porousmediumflow/2p/volumevariables.hh:87
Scalar porosity() const
Returns the average porosity within the control volume in .
Definition: porousmediumflow/2p/volumevariables.hh:283
static constexpr int numFluidComponents()
Return number of components considered by the model.
Definition: porousmediumflow/volumevariables.hh:52
Contains the quantities which are constant within a finite volume in the two-phase model.