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 BoundaryTests | ||
10 | * \brief The spatial parameters for the incompressible test. | ||
11 | */ | ||
12 | |||
13 | #ifndef DUMUX_MULTIDOMAIN_1P_2P_TEST_SPATIAL_PARAMS_HH | ||
14 | #define DUMUX_MULTIDOMAIN_1P_2P_TEST_SPATIAL_PARAMS_HH | ||
15 | |||
16 | #include <dumux/porousmediumflow/fvspatialparamsmp.hh> | ||
17 | #include <dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh> | ||
18 | |||
19 | namespace Dumux { | ||
20 | |||
21 | /*! | ||
22 | * \ingroup BoundaryTests | ||
23 | * \brief The spatial parameters class for the test problem using the | ||
24 | * incompressible 1p model. | ||
25 | */ | ||
26 | template<class GridGeometry, class Scalar> | ||
27 |
1/6✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
|
2 | class TestSpatialParams |
28 | : public FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, TestSpatialParams<GridGeometry, Scalar>> | ||
29 | { | ||
30 | using ThisType = TestSpatialParams<GridGeometry, Scalar>; | ||
31 | using ParentType = FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, ThisType>; | ||
32 | using GridView = typename GridGeometry::GridView; | ||
33 | using Element = typename GridView::template Codim<0>::Entity; | ||
34 | using FVElementGeometry = typename GridGeometry::LocalView; | ||
35 | using SubControlVolume = typename FVElementGeometry::SubControlVolume; | ||
36 | |||
37 | static constexpr int dimWorld = GridView::dimensionworld; | ||
38 | using GlobalPosition = typename Element::Geometry::GlobalCoordinate; | ||
39 | |||
40 | using PcKrSwCurve = FluidMatrix::VanGenuchtenNoReg<Scalar>; | ||
41 | |||
42 | public: | ||
43 | using PermeabilityType = Scalar; | ||
44 | |||
45 | 2 | TestSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry) | |
46 | : ParentType(gridGeometry) | ||
47 |
6/20✓ Branch 2 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 2 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 2 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 2 times.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✓ Branch 16 taken 2 times.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
|
6 | , pcKrSwCurve_("SpatialParams") |
48 | 2 | {} | |
49 | |||
50 | /*! | ||
51 | * \brief Function for defining the (intrinsic) permeability \f$[m^2]\f$. | ||
52 | * \return the intrinsic permeability | ||
53 | */ | ||
54 | ✗ | PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const | |
55 | { | ||
56 | ✗ | return 1e-12; | |
57 | } | ||
58 | |||
59 | /*! | ||
60 | * \brief Defines the porosity \f$\mathrm{[-]}\f$. | ||
61 | * | ||
62 | * \param globalPos The global position | ||
63 | */ | ||
64 | ✗ | Scalar porosityAtPos(const GlobalPosition& globalPos) const | |
65 | { | ||
66 | ✗ | return 0.3; | |
67 | } | ||
68 | |||
69 | /*! | ||
70 | * \brief Defines the temperature at the given position \f$\mathrm{[K]}\f$. | ||
71 | * | ||
72 | * \param globalPos The global position | ||
73 | */ | ||
74 | ✗ | Scalar temperatureAtPos(const GlobalPosition& globalPos) const | |
75 | { | ||
76 | ✗ | return 283.15; | |
77 | } | ||
78 | |||
79 | /*! | ||
80 | * \brief Returns the parameters for the material law at a given location | ||
81 | * | ||
82 | * \param globalPos The global coordinates for the given location | ||
83 | */ | ||
84 | ✗ | auto fluidMatrixInteractionAtPos(const GlobalPosition& globalPos) const | |
85 | { | ||
86 | 1478048 | return makeFluidMatrixInteraction(pcKrSwCurve_); | |
87 | } | ||
88 | |||
89 | /*! | ||
90 | * \brief Function for defining which phase is to be considered as the wetting phase. | ||
91 | * | ||
92 | * \return the wetting phase index | ||
93 | * \param globalPos The global position | ||
94 | */ | ||
95 | template<class FluidSystem> | ||
96 | ✗ | int wettingPhaseAtPos(const GlobalPosition& globalPos) const | |
97 | { | ||
98 | ✗ | return FluidSystem::phase0Idx; | |
99 | } | ||
100 | |||
101 | private: | ||
102 | const PcKrSwCurve pcKrSwCurve_; | ||
103 | }; | ||
104 | |||
105 | } // end namespace Dumux | ||
106 | |||
107 | #endif | ||
108 |