version 3.8
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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
13#ifndef DUMUX_PNM_1P_VOLUME_VARIABLES_HH
14#define DUMUX_PNM_1P_VOLUME_VARIABLES_HH
15
17
18namespace Dumux::PoreNetwork {
19
27template<class Traits>
29{
31 using Scalar = typename Traits::PrimaryVariables::value_type;
32public:
33
43 template<class ElemSol, class Problem, class Element, class Scv>
44 void update(const ElemSol& elemSol,
45 const Problem& problem,
46 const Element& element,
47 const Scv& scv)
48 {
49 ParentType::update(elemSol, problem, element, scv);
50 inscribedPoreRadius_ = problem.spatialParams().poreInscribedRadius(element, scv, elemSol);
51 poreVolume_ = problem.gridGeometry().poreVolume(scv.dofIndex()) * this->porosity();
52 }
53
57 Scalar poreInscribedRadius() const
58 { return inscribedPoreRadius_; }
59
63 Scalar poreVolume() const
64 { return poreVolume_; }
65
66protected:
69};
70
71} // end namespace Dumux::PoreNetwork
72
73#endif
Contains the quantities which are constant within a sub-control volume in the one-phase model.
Definition: porousmediumflow/1p/volumevariables.hh:35
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:65
Scalar porosity() const
Returns the average porosity within the control volume.
Definition: porousmediumflow/1p/volumevariables.hh:184
Contains the quantities which are constant within a finite volume (the pore body) in the one-phase mo...
Definition: porenetwork/1p/volumevariables.hh:29
Scalar poreInscribedRadius() const
Returns the pore's inscribed radius.
Definition: porenetwork/1p/volumevariables.hh:57
Scalar poreVolume_
Definition: porenetwork/1p/volumevariables.hh:68
Scalar poreVolume() const
Returns the pore volume. // TODO should this be a fraction only?
Definition: porenetwork/1p/volumevariables.hh:63
Scalar inscribedPoreRadius_
Definition: porenetwork/1p/volumevariables.hh:67
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:44
Definition: discretization/porenetwork/fvelementgeometry.hh:24
Class to encapsulate the quantities required by the single-phase porous medium flow model per sub-con...