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 TwoPOneCTests | ||
10 | * \brief Spatial parameters non-isothermal steam injection test problem for the 2p1cni model. | ||
11 | */ | ||
12 | |||
13 | #ifndef DUMUX_STEAMINJECTION_SPATIAL_PARAMS_HH | ||
14 | #define DUMUX_STEAMINJECTION_SPATIAL_PARAMS_HH | ||
15 | |||
16 | #include <dumux/porousmediumflow/properties.hh> | ||
17 | #include <dumux/porousmediumflow/fvspatialparamsmp.hh> | ||
18 | #include <dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh> | ||
19 | |||
20 | namespace Dumux { | ||
21 | /*! | ||
22 | * \ingroup TwoPOneCTests | ||
23 | * \brief Definition of the spatial parameters for various steam injection problems. | ||
24 | */ | ||
25 | template<class GridGeometry, class Scalar> | ||
26 |
1/6✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
|
4 | class InjectionProblemSpatialParams |
27 | : public FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, | ||
28 | InjectionProblemSpatialParams<GridGeometry, Scalar>> | ||
29 | { | ||
30 | using GridView = typename GridGeometry::GridView; | ||
31 | using FVElementGeometry = typename GridGeometry::LocalView; | ||
32 | using SubControlVolume = typename FVElementGeometry::SubControlVolume; | ||
33 | using Element = typename GridView::template Codim<0>::Entity; | ||
34 | using ThisType = InjectionProblemSpatialParams<GridGeometry, Scalar>; | ||
35 | using ParentType = FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, ThisType>; | ||
36 | |||
37 | static constexpr int dimWorld = GridView::dimensionworld; | ||
38 | |||
39 | using GlobalPosition = typename Element::Geometry::GlobalCoordinate; | ||
40 | |||
41 | using DimWorldMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>; | ||
42 | |||
43 | using PcKrSwCurve = FluidMatrix::VanGenuchtenDefault<Scalar>; | ||
44 | |||
45 | public: | ||
46 | using PermeabilityType = DimWorldMatrix; | ||
47 | |||
48 | 4 | InjectionProblemSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry) | |
49 | : ParentType(gridGeometry) | ||
50 |
7/18✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 4 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 4 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✓ Branch 16 taken 4 times.
✓ Branch 18 taken 4 times.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
|
12 | , pcKrSwCurve_("SpatialParams") |
51 | { | ||
52 |
1/4✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
|
4 | gasWetting_ = getParam<bool>("SpatialParams.GasWetting", false); |
53 | 4 | } | |
54 | |||
55 | /*! | ||
56 | * \brief Returns the hydraulic conductivity \f$[m^2]\f$ | ||
57 | * | ||
58 | * \param globalPos The global position | ||
59 | */ | ||
60 | ✗ | DimWorldMatrix permeabilityAtPos(const GlobalPosition& globalPos) const | |
61 | { | ||
62 | 1226483 | DimWorldMatrix permMatrix(0.0); | |
63 | |||
64 | // intrinsic permeability | ||
65 | 2452966 | permMatrix[0][0] = 1e-9; | |
66 | 3679449 | permMatrix[1][1] = 1e-9; | |
67 | |||
68 | ✗ | return permMatrix; //default value | |
69 | } | ||
70 | |||
71 | /*! | ||
72 | * \brief Defines the porosity \f$[-]\f$ of the spatial parameters | ||
73 | * | ||
74 | * \param globalPos The global position | ||
75 | */ | ||
76 | ✗ | Scalar porosityAtPos(const GlobalPosition& globalPos) const | |
77 | { | ||
78 | ✗ | return 0.4; | |
79 | } | ||
80 | |||
81 | /*! | ||
82 | * \brief Returns the parameter object for the capillary-pressure/ | ||
83 | * saturation material law. | ||
84 | * | ||
85 | * \param globalPos The global position | ||
86 | */ | ||
87 | ✗ | auto fluidMatrixInteractionAtPos(const GlobalPosition& globalPos) const | |
88 | { | ||
89 | 4905940 | return makeFluidMatrixInteraction(pcKrSwCurve_); | |
90 | } | ||
91 | |||
92 | /*! | ||
93 | * \brief Function for defining which phase is to be considered as the wetting phase. | ||
94 | * | ||
95 | * \param globalPos The position of the center of the element | ||
96 | * \return The wetting phase index | ||
97 | */ | ||
98 | template<class FluidSystem> | ||
99 | ✗ | int wettingPhaseAtPos(const GlobalPosition& globalPos) const | |
100 | { | ||
101 |
2/6✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 825160 times.
✓ Branch 5 taken 401327 times.
|
1226487 | if (gasWetting_) |
102 | ✗ | return FluidSystem::gasPhaseIdx; | |
103 | else | ||
104 | ✗ | return FluidSystem::liquidPhaseIdx; | |
105 | } | ||
106 | |||
107 | private: | ||
108 | bool gasWetting_; | ||
109 | const PcKrSwCurve pcKrSwCurve_; | ||
110 | }; | ||
111 | |||
112 | } | ||
113 | |||
114 | #endif | ||
115 |