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 PNMOnePModel | ||
10 | * \copydoc Dumux::PoreNetwork::OnePVolumeVariables | ||
11 | */ | ||
12 | |||
13 | #ifndef DUMUX_PNM_1P_VOLUME_VARIABLES_HH | ||
14 | #define DUMUX_PNM_1P_VOLUME_VARIABLES_HH | ||
15 | |||
16 | #include <dumux/porousmediumflow/1p/volumevariables.hh> | ||
17 | |||
18 | namespace Dumux::PoreNetwork { | ||
19 | |||
20 | /*! | ||
21 | * \ingroup PNMOnePModel | ||
22 | * \brief Contains the quantities which are constant within a | ||
23 | * finite volume (the pore body) in the one-phase model. | ||
24 | * | ||
25 | * \tparam Traits Class encapsulating types to be used by the volVars | ||
26 | */ | ||
27 | template<class Traits> | ||
28 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 166 times.
|
6149814 | class OnePVolumeVariables : public Dumux::OnePVolumeVariables<Traits> |
29 | { | ||
30 | using ParentType = Dumux::OnePVolumeVariables<Traits>; | ||
31 | using Scalar = typename Traits::PrimaryVariables::value_type; | ||
32 | public: | ||
33 | |||
34 | /*! | ||
35 | * \brief Updates all quantities for a given control volume. | ||
36 | * | ||
37 | * \param elemSol A vector containing all primary variables connected to the element | ||
38 | * \param problem The object specifying the problem which ought to | ||
39 | * be simulated | ||
40 | * \param element An element which contains part of the control volume | ||
41 | * \param scv The sub-control volume | ||
42 | */ | ||
43 | template<class ElemSol, class Problem, class Element, class Scv> | ||
44 | 17127754 | void update(const ElemSol& elemSol, | |
45 | const Problem& problem, | ||
46 | const Element& element, | ||
47 | const Scv& scv) | ||
48 | { | ||
49 | 17127754 | ParentType::update(elemSol, problem, element, scv); | |
50 | 17127754 | inscribedPoreRadius_ = problem.spatialParams().poreInscribedRadius(element, scv, elemSol); | |
51 | 17127754 | poreVolume_ = problem.gridGeometry().poreVolume(scv.dofIndex()) * this->porosity(); | |
52 | 17125288 | } | |
53 | |||
54 | /*! | ||
55 | * \brief Returns the pore's inscribed radius. | ||
56 | */ | ||
57 | 136269 | Scalar poreInscribedRadius() const | |
58 |
2/2✓ Branch 0 taken 1 times.
✓ Branch 1 taken 39040 times.
|
132241 | { return inscribedPoreRadius_; } |
59 | |||
60 | /*! | ||
61 | * \brief Returns the pore volume. // TODO should this be a fraction only? | ||
62 | */ | ||
63 | 23161 | Scalar poreVolume() const | |
64 |
2/2✓ Branch 0 taken 1 times.
✓ Branch 1 taken 23160 times.
|
23161 | { return poreVolume_; } |
65 | |||
66 | protected: | ||
67 | Scalar inscribedPoreRadius_; | ||
68 | Scalar poreVolume_; | ||
69 | }; | ||
70 | |||
71 | } // end namespace Dumux::PoreNetwork | ||
72 | |||
73 | #endif | ||
74 |