3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porenetwork/1p/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_1P_VOLUME_VARIABLES_HH
26#define DUMUX_PNM_1P_VOLUME_VARIABLES_HH
27
29
30namespace Dumux::PoreNetwork {
31
39template<class Traits>
41{
43 using Scalar = typename Traits::PrimaryVariables::value_type;
44public:
45
55 template<class ElemSol, class Problem, class Element, class Scv>
56 void update(const ElemSol& elemSol,
57 const Problem& problem,
58 const Element& element,
59 const Scv& scv)
60 {
61 ParentType::update(elemSol, problem, element, scv);
62 inscribedPoreRadius_ = problem.spatialParams().poreInscribedRadius(element, scv, elemSol);
63 poreVolume_ = problem.gridGeometry().poreVolume(scv.dofIndex()) * this->porosity();
64 }
65
69 Scalar poreInscribedRadius() const
70 { return inscribedPoreRadius_; }
71
75 Scalar poreVolume() const
76 { return poreVolume_; }
77
78protected:
81};
82
83} // end namespace Dumux::PoreNetwork
84
85#endif
Definition: discretization/porenetwork/fvelementgeometry.hh:34
Contains the quantities which are constant within a finite volume (the pore body) in the one-phase mo...
Definition: porenetwork/1p/volumevariables.hh:41
Scalar poreInscribedRadius() const
Returns the pore's inscribed radius.
Definition: porenetwork/1p/volumevariables.hh:69
Scalar poreVolume_
Definition: porenetwork/1p/volumevariables.hh:80
Scalar poreVolume() const
Returns the pore volume. // TODO should this be a fraction only?
Definition: porenetwork/1p/volumevariables.hh:75
Scalar inscribedPoreRadius_
Definition: porenetwork/1p/volumevariables.hh:79
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition: porenetwork/1p/volumevariables.hh:56
Contains the quantities which are constant within a sub-control volume in the one-phase model.
Definition: porousmediumflow/1p/volumevariables.hh:47
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition: porousmediumflow/1p/volumevariables.hh:77
Scalar porosity() const
Returns the average porosity within the control volume.
Definition: porousmediumflow/1p/volumevariables.hh:196
Class to encapsulate the quantities required by the single-phase porous medium flow model per sub-con...