GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/porenetwork/2pnc/spatialparams.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 8 15 53.3%
Functions: 1 5 20.0%
Branches: 5 12 41.7%

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 PoreNetworkModels
10 * \ingroup SpatialParameters
11 * \brief Spatial parameters for a 2pnc pore-network model
12 */
13
14 #ifndef DUMUX_PNM_2P_NC_DRAINAGE_SPATIAL_PARAMS_HH
15 #define DUMUX_PNM_2P_NC_DRAINAGE_SPATIAL_PARAMS_HH
16
17 #include <dumux/porenetwork/2p/spatialparams.hh>
18
19 namespace Dumux::PoreNetwork {
20
21 template<class GridGeometry, class Scalar, class MaterialLawT>
22 2 class TwoPNCDrainageSpatialParams
23 : public TwoPSpatialParams<GridGeometry, Scalar, MaterialLawT, TwoPNCDrainageSpatialParams<GridGeometry, Scalar, MaterialLawT>>
24 {
25 using ParentType = TwoPSpatialParams<GridGeometry, Scalar, MaterialLawT, TwoPNCDrainageSpatialParams<GridGeometry, Scalar, MaterialLawT>>;
26
27 using GridView = typename GridGeometry::GridView;
28 using Element = typename GridView::template Codim<0>::Entity;
29 using FVElementGeometry = typename GridGeometry::LocalView;
30 using SubControlVolume = typename GridGeometry::SubControlVolume;
31 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
32 public:
33 using PermeabilityType = Scalar;
34 using ParentType::ParentType;
35
36 2 TwoPNCDrainageSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
37
2/6
✓ Branch 2 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
2 : ParentType(gridGeometry)
38 {
39
1/2
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
2 temperature_ = getParam<Scalar>("SpatialParams.Temperature", 283.15);
40
1/2
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
2 gamma_ = getParam<Scalar>("SpatialParams.SurfaceTension", 0.0725); // default to surface tension of water/air
41
1/2
✓ Branch 1 taken 2 times.
✗ Branch 2 not taken.
2 theta_ = getParam<Scalar>("SpatialParams.ContactAngle", 0.0);
42 2 }
43
44 //! \brief Function for defining the temperature
45 Scalar temperatureAtPos(const GlobalPosition& globalPos) const
46 { return temperature_; }
47
48 //! \brief Function for defining the wetting phase
49 template<class FluidSystem>
50 int wettingPhaseAtPos(const GlobalPosition& globalPos) const
51 { return FluidSystem::phase0Idx; }
52
53
54 //! \brief Function for defining the contact angle
55 int contactAngleAtPos(const GlobalPosition& globalPos) const
56 97024 { return theta_; }
57
58 //! \brief Function for defining the surface tension
59 Scalar surfaceTensionAtPos(const GlobalPosition& globalPos) const
60 { return gamma_; }
61
62 private:
63 Scalar temperature_;
64 Scalar gamma_;
65 Scalar theta_;
66 };
67 } // end namespace Dumux::PoreNetwork
68
69 #endif
70