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