version 3.10-dev
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// 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_1PNC_VOLUME_VARIABLES_HH
14#define DUMUX_PNM_1PNC_VOLUME_VARIABLES_HH
15
17
18namespace Dumux::PoreNetwork {
19
29template <class Traits>
31: public Dumux::OnePNCVolumeVariables<Traits>
32{
34 using Scalar = typename Traits::PrimaryVariables::value_type;
35public:
36
46 template<class ElemSol, class Problem, class Element, class Scv>
47 void update(const ElemSol& elemSol,
48 const Problem& problem,
49 const Element& element,
50 const Scv& scv)
51 {
52 ParentType::update(elemSol, problem, element, scv);
53
54 poreInscribedRadius_ = problem.spatialParams().poreInscribedRadius(element, scv, elemSol);
55 poreVolume_ = problem.gridGeometry().poreVolume(scv.dofIndex()) * this->porosity();
56 }
57
61 Scalar poreInscribedRadius() const
62 { return poreInscribedRadius_; }
63
67 Scalar poreVolume() const
68 { return poreVolume_; }
69
70protected:
73};
74
75} // end namespace Dumux::PoreNetwork
76
77#endif
Contains the quantities which are are constant within a finite volume in the one-phase,...
Definition: porousmediumflow/1pnc/volumevariables.hh:38
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:79
Scalar porosity() const
Returns the average porosity within the control volume.
Definition: porousmediumflow/1pnc/volumevariables.hh:299
Contains the quantities which are are constant within a finite volume in the one-phase,...
Definition: porenetwork/1pnc/volumevariables.hh:32
Scalar poreInscribedRadius() const
Returns the pore's inscribed radius.
Definition: porenetwork/1pnc/volumevariables.hh:61
Scalar poreVolume() const
Returns the pore volume. // TODO should this be a fraction only?
Definition: porenetwork/1pnc/volumevariables.hh:67
Scalar poreInscribedRadius_
Definition: porenetwork/1pnc/volumevariables.hh:71
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:47
Scalar poreVolume_
Definition: porenetwork/1pnc/volumevariables.hh:72
Definition: discretization/porenetwork/fvelementgeometry.hh:24
Quantities required by the single-phase, n-component box model defined on a vertex.