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 ThreePWaterOilTests | ||
10 | * \brief Definition of the spatial parameters for the steam-assisted gravity | ||
11 | * drainage (SAGD) problem. | ||
12 | */ | ||
13 | |||
14 | #ifndef DUMUX_SAGD_SPATIAL_PARAMS_HH | ||
15 | #define DUMUX_SAGD_SPATIAL_PARAMS_HH | ||
16 | |||
17 | #include <dumux/porousmediumflow/properties.hh> | ||
18 | #include <dumux/porousmediumflow/fvspatialparamsmp.hh> | ||
19 | |||
20 | #include <dumux/material/fluidmatrixinteractions/3p/parkervangenuchten.hh> | ||
21 | |||
22 | namespace Dumux { | ||
23 | |||
24 | /*! | ||
25 | * \ingroup ThreePWaterOilTests | ||
26 | * \brief Definition of the spatial parameters for the steam-assisted gravity | ||
27 | * drainage (SAGD) problem | ||
28 | */ | ||
29 | template<class GridGeometry, class Scalar> | ||
30 |
1/6✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
|
1 | class SagdSpatialParams |
31 | : public FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, | ||
32 | SagdSpatialParams<GridGeometry, Scalar>> | ||
33 | { | ||
34 | using GridView = typename GridGeometry::GridView; | ||
35 | using FVElementGeometry = typename GridGeometry::LocalView; | ||
36 | using SubControlVolume = typename FVElementGeometry::SubControlVolume; | ||
37 | |||
38 | enum { dimWorld=GridView::dimensionworld }; | ||
39 | |||
40 | using GlobalPosition = typename SubControlVolume::GlobalPosition; | ||
41 | |||
42 | using Element = typename GridView::template Codim<0>::Entity; | ||
43 | using ParentType = FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, | ||
44 | SagdSpatialParams<GridGeometry, Scalar>>; | ||
45 | |||
46 | using ThreePhasePcKrSw = FluidMatrix::ParkerVanGenuchten3PDefault<Scalar>; | ||
47 | |||
48 | public: | ||
49 | using PermeabilityType = Scalar; | ||
50 | |||
51 | 1 | SagdSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry) | |
52 | : ParentType(gridGeometry) | ||
53 | , pcKrSwCurve_("SpatialParams") | ||
54 |
6/18✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✓ Branch 16 taken 1 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.
|
3 | , eps_(1e-6) |
55 | { | ||
56 | 1 | layerBottom_ = 35.0; | |
57 | |||
58 | // intrinsic permeabilities | ||
59 | 1 | fineK_ = 1e-16; | |
60 | 1 | coarseK_ = 4e-14; | |
61 | |||
62 | // porosities | ||
63 | 1 | finePorosity_ = 0.10; | |
64 | 1 | coarsePorosity_ = 0.1; | |
65 | 1 | } | |
66 | |||
67 | /*! | ||
68 | * \brief Function for defining the (intrinsic) permeability \f$[m^2]\f$ | ||
69 | * \note It is possibly solution dependent. | ||
70 | * | ||
71 | * \param element The current element | ||
72 | * \param scv The sub-control volume inside the element. | ||
73 | * \param elemSol The solution at the dofs connected to the element. | ||
74 | * \return The permeability | ||
75 | */ | ||
76 | template<class ElementSolution> | ||
77 | ✗ | PermeabilityType permeability(const Element& element, | |
78 | const SubControlVolume& scv, | ||
79 | const ElementSolution& elemSol) const | ||
80 |
2/4✗ Branch 0 not taken.
✗ Branch 1 not taken.
✓ Branch 2 taken 533126 times.
✓ Branch 3 taken 3321820 times.
|
7709892 | { return permeabilityAtPos(scv.dofPosition());} |
81 | |||
82 | /*! | ||
83 | * \brief Returns the intrinsic permeability tensor \f$[m^2]\f$ | ||
84 | * | ||
85 | * \param globalPos The global position | ||
86 | */ | ||
87 | PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const | ||
88 | { | ||
89 | 7709892 | if (isFineMaterial_(globalPos)) | |
90 | 533126 | return fineK_; | |
91 | 3321820 | return coarseK_; | |
92 | } | ||
93 | |||
94 | /*! | ||
95 | * \brief Returns the porosity \f$[-]\f$ | ||
96 | * | ||
97 | * \param globalPos The global position | ||
98 | */ | ||
99 | Scalar porosityAtPos(const GlobalPosition& globalPos) const | ||
100 | { | ||
101 | 7709892 | if (isFineMaterial_(globalPos)) | |
102 | 483270 | return finePorosity_; | |
103 | else | ||
104 | 3371676 | return coarsePorosity_; | |
105 | } | ||
106 | |||
107 | /*! | ||
108 | * \brief Returns the fluid-matrix interaction law at a given location | ||
109 | * | ||
110 | * \param globalPos The global coordinates for the given location | ||
111 | */ | ||
112 | ✗ | auto fluidMatrixInteractionAtPos(const GlobalPosition& globalPos) const | |
113 | { | ||
114 | 15419788 | return makeFluidMatrixInteraction(pcKrSwCurve_); | |
115 | } | ||
116 | |||
117 | private: | ||
118 | |||
119 | ✗ | bool isFineMaterial_(const GlobalPosition& pos) const | |
120 |
8/24✗ 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 taken 483270 times.
✓ Branch 17 taken 3371676 times.
✓ Branch 18 taken 483270 times.
✓ Branch 19 taken 3371676 times.
✓ Branch 20 taken 533126 times.
✓ Branch 21 taken 3321820 times.
✓ Branch 22 taken 533126 times.
✓ Branch 23 taken 3321820 times.
|
15419784 | { return pos[dimWorld-1] > layerBottom_ - eps_; } |
121 | |||
122 | Scalar layerBottom_; | ||
123 | |||
124 | Scalar fineK_; | ||
125 | Scalar coarseK_; | ||
126 | |||
127 | Scalar finePorosity_; | ||
128 | Scalar coarsePorosity_; | ||
129 | |||
130 | const ThreePhasePcKrSw pcKrSwCurve_; | ||
131 | |||
132 | Scalar eps_; | ||
133 | }; | ||
134 | |||
135 | } | ||
136 | |||
137 | #endif | ||
138 |