3.4
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porenetwork/1pnc/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_1PNC_VOLUME_VARIABLES_HH
26#define DUMUX_PNM_1PNC_VOLUME_VARIABLES_HH
27
29
30namespace Dumux::PoreNetwork {
31
41template <class Traits>
43: public Dumux::OnePNCVolumeVariables<Traits>
44{
46 using Scalar = typename Traits::PrimaryVariables::value_type;
47public:
48
58 template<class ElemSol, class Problem, class Element, class Scv>
59 void update(const ElemSol& elemSol,
60 const Problem& problem,
61 const Element& element,
62 const Scv& scv)
63 {
64 ParentType::update(elemSol, problem, element, scv);
65
66 poreInscribedRadius_ = problem.spatialParams().poreInscribedRadius(element, scv, elemSol);
67 poreVolume_ = problem.gridGeometry().poreVolume(scv.dofIndex()) * this->porosity();
68 }
69
73 Scalar poreInscribedRadius() const
74 { return poreInscribedRadius_; }
75
79 Scalar poreVolume() const
80 { return poreVolume_; }
81
82protected:
85};
86
87} // end namespace Dumux::PoreNetwork
88
89#endif
Definition: discretization/porenetwork/fvelementgeometry.hh:33
Contains the quantities which are are constant within a finite volume in the one-phase,...
Definition: porenetwork/1pnc/volumevariables.hh:44
Scalar poreInscribedRadius() const
Returns the pore's inscribed radius.
Definition: porenetwork/1pnc/volumevariables.hh:73
Scalar poreVolume() const
Returns the pore volume. // TODO should this be a fraction only?
Definition: porenetwork/1pnc/volumevariables.hh:79
Scalar poreInscribedRadius_
Definition: porenetwork/1pnc/volumevariables.hh:83
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition: porenetwork/1pnc/volumevariables.hh:59
Scalar poreVolume_
Definition: porenetwork/1pnc/volumevariables.hh:84
Contains the quantities which are are constant within a finite volume in the one-phase,...
Definition: porousmediumflow/1pnc/volumevariables.hh:50
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition: porousmediumflow/1pnc/volumevariables.hh:91
Scalar porosity() const
Returns the average porosity within the control volume.
Definition: porousmediumflow/1pnc/volumevariables.hh:311
Quantities required by the single-phase, n-component box model defined on a vertex.