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 ThreePThreeCTests | ||
10 | * \brief Definition of the spatial parameters for the kuevette problem | ||
11 | * which uses the isothermal two-phase two component fully implicit model. | ||
12 | */ | ||
13 | |||
14 | #ifndef DUMUX_INFILTRATION_THREEPTHREEC_SPATIAL_PARAMETERS_HH | ||
15 | #define DUMUX_INFILTRATION_THREEPTHREEC_SPATIAL_PARAMETERS_HH | ||
16 | |||
17 | #include <dumux/porousmediumflow/properties.hh> | ||
18 | #include <dumux/porousmediumflow/fvspatialparamsmp.hh> | ||
19 | #include <dumux/material/fluidmatrixinteractions/3p/parkervangenuchten.hh> | ||
20 | |||
21 | namespace Dumux { | ||
22 | |||
23 | /*! | ||
24 | * \ingroup ThreePThreeCTests | ||
25 | * \brief Definition of the spatial parameters for the infiltration problem | ||
26 | */ | ||
27 | template<class GridGeometry, class Scalar> | ||
28 |
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 InfiltrationThreePThreeCSpatialParams |
29 | : public FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, | ||
30 | InfiltrationThreePThreeCSpatialParams<GridGeometry, Scalar>> | ||
31 | { | ||
32 | using GridView = typename GridGeometry::GridView; | ||
33 | using FVElementGeometry = typename GridGeometry::LocalView; | ||
34 | using SubControlVolume = typename FVElementGeometry::SubControlVolume; | ||
35 | using Element = typename GridView::template Codim<0>::Entity; | ||
36 | using ParentType = FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, | ||
37 | InfiltrationThreePThreeCSpatialParams<GridGeometry, Scalar>>; | ||
38 | |||
39 | using GlobalPosition = typename SubControlVolume::GlobalPosition; | ||
40 | |||
41 | using ThreePhasePcKrSw = FluidMatrix::ParkerVanGenuchten3PDefault<Scalar>; | ||
42 | |||
43 | public: | ||
44 | using PermeabilityType = Scalar; | ||
45 | |||
46 | 2 | InfiltrationThreePThreeCSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry) | |
47 | : ParentType(gridGeometry) | ||
48 |
6/18✓ 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.
|
6 | , pcKrSwCurve_("SpatialParams") |
49 | { | ||
50 | // intrinsic permeabilities | ||
51 | 2 | fineK_ = 1.e-11; | |
52 | 2 | coarseK_ = 1.e-11; | |
53 | |||
54 | // porosities | ||
55 | 2 | porosity_ = 0.40; | |
56 | 2 | } | |
57 | |||
58 | /*! | ||
59 | * \brief Function for defining the (intrinsic) permeability \f$[m^2]\f$ | ||
60 | * \note It is possibly solution dependent. | ||
61 | * | ||
62 | * \param element The current element | ||
63 | * \param scv The sub-control volume inside the element. | ||
64 | * \param elemSol The solution at the dofs connected to the element. | ||
65 | * \return The permeability | ||
66 | */ | ||
67 | template<class ElementSolution> | ||
68 | ✗ | PermeabilityType permeability(const Element& element, | |
69 | const SubControlVolume& scv, | ||
70 | const ElementSolution& elemSol) const | ||
71 | { | ||
72 |
2/4✗ Branch 0 not taken.
✗ Branch 1 not taken.
✓ Branch 2 taken 174390 times.
✓ Branch 3 taken 28485 times.
|
202875 | const auto& globalPos = scv.dofPosition(); |
73 | 202875 | if (isFineMaterial_(globalPos)) | |
74 | ✗ | return fineK_; | |
75 | 201916 | return coarseK_; | |
76 | } | ||
77 | |||
78 | /*! | ||
79 | * \brief Returns the porosity \f$[-]\f$ | ||
80 | * | ||
81 | * \param globalPos The position for which the porosity is evaluated | ||
82 | */ | ||
83 | ✗ | Scalar porosityAtPos(const GlobalPosition& globalPos) const | |
84 | { | ||
85 | ✗ | return porosity_; | |
86 | } | ||
87 | |||
88 | /*! | ||
89 | * \brief Returns the fluid-matrix interaction law at a given location | ||
90 | * | ||
91 | * \param globalPos The global coordinates for the given location | ||
92 | */ | ||
93 | ✗ | auto fluidMatrixInteractionAtPos(const GlobalPosition& globalPos) const | |
94 | { | ||
95 | 406932 | return makeFluidMatrixInteraction(pcKrSwCurve_); | |
96 | } | ||
97 | |||
98 | /*! | ||
99 | * \brief Returns the temperature at a given location | ||
100 | * | ||
101 | * \param globalPos The global coordinates for the given location | ||
102 | */ | ||
103 | ✗ | Scalar temperatureAtPos(const GlobalPosition &globalPos) const | |
104 | { | ||
105 | ✗ | return 273.15 + 10.0; // -> 10 degrees Celsius | |
106 | } | ||
107 | |||
108 | private: | ||
109 | ✗ | bool isFineMaterial_(const GlobalPosition &globalPos) const | |
110 | { return | ||
111 |
6/18✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
✓ Branch 12 taken 174390 times.
✓ Branch 13 taken 28485 times.
✓ Branch 14 taken 5073 times.
✓ Branch 15 taken 169317 times.
✓ Branch 16 taken 5073 times.
✓ Branch 17 taken 169317 times.
|
202875 | 70.0 <= globalPos[0] && globalPos[0] <= 85.0 && |
112 |
10/30✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✓ Branch 20 taken 174390 times.
✓ Branch 21 taken 28485 times.
✓ Branch 22 taken 1748 times.
✓ Branch 23 taken 3325 times.
✓ Branch 24 taken 1748 times.
✓ Branch 25 taken 3325 times.
✓ Branch 26 taken 789 times.
✓ Branch 27 taken 959 times.
✓ Branch 28 taken 789 times.
✓ Branch 29 taken 959 times.
|
213021 | 7.0 <= globalPos[1] && globalPos[1] <= 7.50; |
113 | } | ||
114 | |||
115 | Scalar fineK_; | ||
116 | Scalar coarseK_; | ||
117 | |||
118 | Scalar porosity_; | ||
119 | |||
120 | const ThreePhasePcKrSw pcKrSwCurve_; | ||
121 | }; | ||
122 | |||
123 | } // end namespace Dumux | ||
124 | |||
125 | #endif | ||
126 |