Line | Branch | Exec | Source |
---|---|---|---|
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-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder | ||
5 | // SPDX-License-Identifier: GPL-3.0-or-later | ||
6 | // | ||
7 | /*! | ||
8 | * \file | ||
9 | * \ingroup PNMOnePNCModel | ||
10 | * \copydoc Dumux::PoreNetwork::OnePNCVolumeVariables | ||
11 | */ | ||
12 | |||
13 | #ifndef DUMUX_PNM_1PNC_VOLUME_VARIABLES_HH | ||
14 | #define DUMUX_PNM_1PNC_VOLUME_VARIABLES_HH | ||
15 | |||
16 | #include <dumux/porousmediumflow/1pnc/volumevariables.hh> | ||
17 | |||
18 | namespace Dumux::PoreNetwork { | ||
19 | |||
20 | /*! | ||
21 | * \ingroup PNMOnePNCModel | ||
22 | * \brief Contains the quantities which are are constant within a | ||
23 | * finite volume in the one-phase, n-component model. | ||
24 | * | ||
25 | * \note The default value for the phase index given in the fluid property interfaces is not used, | ||
26 | * but is only here to enable calling these functions without handing in a phase index | ||
27 | * (as in a single-phasic context there is only one phase). | ||
28 | */ | ||
29 | template <class Traits> | ||
30 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 399 times.
|
202451 | class OnePNCVolumeVariables |
31 | : public Dumux::OnePNCVolumeVariables<Traits> | ||
32 | { | ||
33 | using ParentType = Dumux::OnePNCVolumeVariables<Traits>; | ||
34 | using Scalar = typename Traits::PrimaryVariables::value_type; | ||
35 | public: | ||
36 | |||
37 | /*! | ||
38 | * \brief Updates all quantities for a given control volume. | ||
39 | * | ||
40 | * \param elemSol A vector containing all primary variables connected to the element | ||
41 | * \param problem The object specifying the problem which ought to | ||
42 | * be simulated | ||
43 | * \param element An element which contains part of the control volume | ||
44 | * \param scv The sub-control volume | ||
45 | */ | ||
46 | template<class ElemSol, class Problem, class Element, class Scv> | ||
47 | 555263 | void update(const ElemSol& elemSol, | |
48 | const Problem& problem, | ||
49 | const Element& element, | ||
50 | const Scv& scv) | ||
51 | { | ||
52 | 555263 | ParentType::update(elemSol, problem, element, scv); | |
53 | |||
54 | 555263 | poreInscribedRadius_ = problem.spatialParams().poreInscribedRadius(element, scv, elemSol); | |
55 | 555263 | poreVolume_ = problem.gridGeometry().poreVolume(scv.dofIndex()) * this->porosity(); | |
56 | 555263 | } | |
57 | |||
58 | /*! | ||
59 | * \brief Returns the pore's inscribed radius. | ||
60 | */ | ||
61 | 117884 | Scalar poreInscribedRadius() const | |
62 | 117884 | { return poreInscribedRadius_; } | |
63 | |||
64 | /*! | ||
65 | * \brief Returns the pore volume. // TODO should this be a fraction only? | ||
66 | */ | ||
67 | Scalar poreVolume() const | ||
68 | { return poreVolume_; } | ||
69 | |||
70 | protected: | ||
71 | Scalar poreInscribedRadius_; | ||
72 | Scalar poreVolume_; | ||
73 | }; | ||
74 | |||
75 | } // end namespace Dumux::PoreNetwork | ||
76 | |||
77 | #endif | ||
78 |