GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/dumux/porenetwork/2pnc/volumevariables.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 7 11 63.6%
Functions: 2 6 33.3%
Branches: 0 0 -%

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-FileCopyrightInfo: 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 PNMTwoPNCModel
10 * \copydoc Dumux::PoreNetwork::TwoPNCVolumeVariables
11 */
12
13 #ifndef DUMUX_PNM_2P_NC_VOLUME_VARIABLES_HH
14 #define DUMUX_PNM_2P_NC_VOLUME_VARIABLES_HH
15
16 #include <dumux/porousmediumflow/2pnc/volumevariables.hh>
17
18 namespace Dumux::PoreNetwork {
19
20 /*!
21 * \ingroup PNMTwoPNCModel
22 * \brief Contains the quantities which are constant within a
23 * finite volume in the two-phase n-components model.
24 */
25 template <class Traits>
26 31804 class TwoPNCVolumeVariables
27 : public Dumux::TwoPNCVolumeVariables<Traits>
28 {
29 using ParentType = Dumux::TwoPNCVolumeVariables<Traits>;
30 using Scalar = typename Traits::PrimaryVariables::value_type;
31
32 public:
33 //! Export type of fluid system
34 using FluidSystem = typename Traits::FluidSystem;
35 //! Export type of fluid state
36 using FluidState = typename Traits::FluidState;
37 //! Export type of solid state
38 using SolidState = typename Traits::SolidState;
39 //! Export type of solid system
40 using SolidSystem = typename Traits::SolidSystem;
41
42 /*!
43 * \brief Updates all quantities for a given control volume.
44 *
45 * \param elemSol A vector containing all primary variables connected to the element
46 * \param problem The object specifying the problem which ought to
47 * be simulated
48 * \param element An element which contains part of the control volume
49 * \param scv The sub control volume
50 */
51 template<class ElemSol, class Problem, class Element, class Scv>
52 41660 void update(const ElemSol &elemSol,
53 const Problem &problem,
54 const Element &element,
55 const Scv& scv)
56 {
57 41660 ParentType::update(elemSol, problem, element, scv);
58 124941 poreInscribedRadius_ = problem.spatialParams().poreInscribedRadius(element, scv, elemSol);
59 166588 poreVolume_ = problem.gridGeometry().poreVolume(scv.dofIndex()) * this->porosity();
60 124941 surfaceTension_ = problem.spatialParams().surfaceTension(element, scv, elemSol);
61 41647 }
62
63 /*!
64 * \brief Returns the pore's inscribed radius.
65 */
66 Scalar poreInscribedRadius() const
67 { return poreInscribedRadius_; }
68
69 /*!
70 * \brief Returns the pore volume. // TODO should this be a fraction only?
71 */
72 Scalar poreVolume() const
73 { return poreVolume_; }
74
75 /*!
76 * \brief Returns the surface tension.
77 */
78 Scalar surfaceTension() const
79 { return surfaceTension_; }
80
81 protected:
82 Scalar poreInscribedRadius_;
83 Scalar poreVolume_;
84 Scalar surfaceTension_;
85 };
86
87 } // end namespace Dumux::PoreNetwork
88
89 #endif
90