GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/porousmediumflow/mpnc/kinetic/spatialparams.hh
Date: 2024-05-04 19:09:25
Exec Total Coverage
Lines: 80 93 86.0%
Functions: 7 12 58.3%
Branches: 163 454 35.9%

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 MPNCTests
10 * \brief Spatial parameters for the kinetic test-case of the mpnc model.
11 *
12 * "Poor-man's" coupling of free-flow and porous medium.
13 */
14 #ifndef DUMUX_EVAPORATION_ATMOSPHERE_SPATIALPARAMS_HH
15 #define DUMUX_EVAPORATION_ATMOSPHERE_SPATIALPARAMS_HH
16
17 #include <dumux/porousmediumflow/properties.hh>
18 #include <dumux/porousmediumflow/fvspatialparamsnonequilibrium.hh>
19
20 #include <dumux/material/fluidmatrixinteractions/fluidmatrixinteraction.hh>
21 #include <dumux/material/fluidmatrixinteractions/2p/brookscorey.hh>
22 #include <dumux/material/fluidmatrixinteractions/mp/mpadapter.hh>
23
24 #include <dumux/common/parameters.hh>
25
26 // material laws for interfacial area
27 #include <dumux/material/fluidmatrixinteractions/2p/interfacialarea/polynomial2ndorder.hh>
28 #include <dumux/material/fluidmatrixinteractions/2p/interfacialarea/pcmax.hh>
29 #include <dumux/material/fluidmatrixinteractions/2p/interfacialarea/exponentialcubic.hh>
30 #include <dumux/material/fluidmatrixinteractions/2p/interfacialarea/interfacialarea.hh>
31
32 namespace Dumux {
33
34 /**
35 * \brief Definition of the spatial parameters for the evaporation atmosphere Problem (using a "poor man's coupling")
36 */
37 template<class GridGeometry, class Scalar>
38 class EvaporationAtmosphereSpatialParams
39 : public FVPorousMediumFlowSpatialParamsNonEquilibrium<GridGeometry, Scalar,
40 EvaporationAtmosphereSpatialParams<GridGeometry, Scalar>>
41 {
42 using GridView = typename GridGeometry::GridView;
43 using FVElementGeometry = typename GridGeometry::LocalView;
44 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
45 using Element = typename GridView::template Codim<0>::Entity;
46 using ThisType = EvaporationAtmosphereSpatialParams<GridGeometry, Scalar>;
47 using ParentType = FVPorousMediumFlowSpatialParamsNonEquilibrium<GridGeometry, Scalar, ThisType>;
48
49 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
50
51 static constexpr auto dimWorld = GridView::dimensionworld;
52
53 using PcKrSwCurve = FluidMatrix::BrooksCoreyDefault<Scalar>;
54
55 using NonwettingSolidInterfacialArea = FluidMatrix::InterfacialArea<Scalar,
56 FluidMatrix::InterfacialAreaExponentialCubic,
57 FluidMatrix::NonwettingSolidInterfacialAreaPcSw>;
58 using WettingSolidInterfacialArea = FluidMatrix::InterfacialArea<Scalar,
59 FluidMatrix::InterfacialAreaPolynomialSecondOrder,
60 FluidMatrix::WettingSolidInterfacialAreaPcSw>;
61 using WettingNonwettingInterfacialArea = FluidMatrix::InterfacialArea<Scalar,
62 FluidMatrix::InterfacialAreaPcMax,
63 FluidMatrix::WettingNonwettingInterfacialAreaPcSw>;
64 public:
65 //! Export the type used for the permeability
66 using PermeabilityType = Scalar;
67
68 1 EvaporationAtmosphereSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
69
10/40
✓ 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 16 taken 1 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 1 times.
✗ Branch 23 not taken.
✓ Branch 25 taken 1 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 1 times.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
✗ Branch 33 not taken.
✗ Branch 34 not taken.
✗ Branch 35 not taken.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 38 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
✗ Branch 41 not taken.
✗ Branch 42 not taken.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
✗ Branch 46 not taken.
✗ Branch 47 not taken.
✗ Branch 48 not taken.
✗ Branch 49 not taken.
✗ Branch 50 not taken.
9 : ParentType(gridGeometry)
70 {
71
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 heightPM_ = getParam<std::vector<Scalar>>("Grid.Positions1")[1];
72
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 heightDomain_ = getParam<std::vector<Scalar>>("Grid.Positions1")[2];
73
74
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 porosityPM_ = getParam<Scalar>("SpatialParams.PorousMedium.porosity");
75
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 intrinsicPermeabilityPM_ = getParam<Scalar>("SpatialParams.PorousMedium.permeability");
76
77
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 porosityFF_ = getParam<Scalar>("SpatialParams.FreeFlow.porosity");
78
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 intrinsicPermeabilityFF_ = getParam<Scalar>("SpatialParams.FreeFlow.permeability");
79
80
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 aWettingNonwettingA1_ = getParam<Scalar>("SpatialParams.soil.aWettingNonwettingA1");
81
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 aWettingNonwettingA2_ = getParam<Scalar>("SpatialParams.soil.aWettingNonwettingA2");
82
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 aWettingNonwettingA3_ = getParam<Scalar>("SpatialParams.soil.aWettingNonwettingA3");
83
84
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 aNonwettingSolidA1_ = getParam<Scalar>("SpatialParams.soil.aNonwettingSolidA1");
85
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 aNonwettingSolidA2_ = getParam<Scalar>("SpatialParams.soil.aNonwettingSolidA2");
86
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 aNonwettingSolidA3_ = getParam<Scalar>("SpatialParams.soil.aNonwettingSolidA3");
87
88
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 BCPd_ = getParam<Scalar>("SpatialParams.soil.BCPd");
89
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 BClambda_ = getParam<Scalar>("SpatialParams.soil.BClambda");
90
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 Swr_ = getParam<Scalar>("SpatialParams.soil.Swr");
91
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 Snr_ = getParam<Scalar>("SpatialParams.soil.Snr");
92
93
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 characteristicLengthFF_ = getParam<Scalar>("SpatialParams.FreeFlow.meanPoreSize");
94
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 characteristicLengthPM_ = getParam<Scalar>("SpatialParams.PorousMedium.meanPoreSize");
95
96
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 factorEnergyTransfer_ = getParam<Scalar>("SpatialParams.PorousMedium.factorEnergyTransfer");
97
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 factorMassTransfer_ = getParam<Scalar>("SpatialParams.PorousMedium.factorMassTransfer");
98
99 // PM parameters for Brooks-Corey
100
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 typename PcKrSwCurve::BasicParams paramsPM(BCPd_, BClambda_);
101
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 typename PcKrSwCurve::EffToAbsParams effToAbsParamsPM(Swr_, Snr_);
102
3/6
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 times.
1 pcKrSwCurvePM_ = std::make_unique<PcKrSwCurve>(paramsPM, effToAbsParamsPM);
103
104 // FF parameters for Brooks-Corey
105
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 typename PcKrSwCurve::BasicParams paramsFF(0/*dummy pe*/, 42/*dummy lambda*/);
106
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 typename PcKrSwCurve::EffToAbsParams effToAbsParamsFF(0.0/*swr*/, 0.0/*snr*/);
107
3/6
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 times.
1 pcKrSwCurveFF_ = std::make_unique<PcKrSwCurve>(paramsFF, effToAbsParamsFF);
108
109 // determine maximum capillary pressure for wetting-nonwetting surface
110 /* Of course physically there is no such thing as a maximum capillary pressure.
111 * The parametrization (VG/BC) goes to infinity and physically there is only one pressure
112 * for single phase conditions.
113 * Here, this is used for fitting the interfacial area surface: the capillary pressure,
114 * where the interfacial area is zero.
115 * Technically this value is obtained as the capillary pressure of saturation zero.
116 * This value of course only exists for the case of a regularized pc-Sw relation.
117 */
118 2 const auto pcMax = pcKrSwCurvePM_->pc(/*sw = */0.0);
119
120 // non-wetting-solid
121 using NonwettingSolidInterfacialAreaParams = typename NonwettingSolidInterfacialArea::BasicParams;
122
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 NonwettingSolidInterfacialAreaParams ansParams;
123
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 ansParams.setA1(aNonwettingSolidA1_);
124
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 ansParams.setA2(aNonwettingSolidA2_);
125
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 ansParams.setA3(aNonwettingSolidA3_);
126
3/6
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
1 aNs_ = std::make_unique<NonwettingSolidInterfacialArea>(ansParams, effToAbsParamsPM);
127
128 // wetting-non wetting: surface which goes to zero on the edges, but is a polynomial
129 using WettingNonwettingInterfacialAreaParams = typename WettingNonwettingInterfacialArea::BasicParams;
130
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 WettingNonwettingInterfacialAreaParams anwParams;
131
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 anwParams.setPcMax(pcMax);
132
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 anwParams.setA1(aWettingNonwettingA1_);
133
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 anwParams.setA2(aWettingNonwettingA2_);
134
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 anwParams.setA3(aWettingNonwettingA3_);
135
3/6
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
1 aNw_ = std::make_unique<WettingNonwettingInterfacialArea>(anwParams, effToAbsParamsPM);
136
137 // zero-initialized dummys for free flow: no interface where there is only one phase
138
3/6
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
1 aNwFreeFlow_ = std::make_unique<WettingNonwettingInterfacialArea>(WettingNonwettingInterfacialAreaParams(), effToAbsParamsFF);
139
3/6
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
1 aNsFreeFlow_ = std::make_unique<NonwettingSolidInterfacialArea>(NonwettingSolidInterfacialAreaParams(), effToAbsParamsFF);
140
141 // dummy
142 using WettingSolidInterfacialAreaParams = typename WettingSolidInterfacialArea::BasicParams;
143
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
1 WettingSolidInterfacialAreaParams awsParams;
144
3/6
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 times.
1 aWs_ = std::make_unique<WettingSolidInterfacialArea>(awsParams, effToAbsParamsPM); // use ctor without effToAbs
145 1 }
146
147 template<class ElementSolution>
148 806400 PermeabilityType permeability(const Element& element,
149 const SubControlVolume& scv,
150 const ElementSolution& elemSol) const
151 {
152
1/2
✓ Branch 0 taken 806400 times.
✗ Branch 1 not taken.
806400 const auto & globalPos = scv.dofPosition();
153 1196160 if (inFF_(globalPos))
154 389760 return intrinsicPermeabilityFF_ ;
155 833280 else if (inPM_(globalPos))
156 416640 return intrinsicPermeabilityPM_ ;
157 else
158 DUNE_THROW(Dune::InvalidStateException, "You should not be here: x=" << globalPos[0] << " y= "<< globalPos[dimWorld-1]);
159 }
160
161 /*!
162 * \brief Function for defining the porosity.
163 * That is possibly solution dependent.
164 *
165 * \param element The current element
166 * \param scv The sub-control volume inside the element.
167 * \param elemSol The solution at the dofs connected to the element.
168 * \return The porosity
169 */
170 template<class ElementSolution>
171 806400 Scalar porosity(const Element& element,
172 const SubControlVolume& scv,
173 const ElementSolution& elemSol) const
174 {
175
1/2
✓ Branch 0 taken 806400 times.
✗ Branch 1 not taken.
806400 const auto& globalPos = scv.dofPosition();
176
177 1196160 if (inFF_(globalPos))
178 389760 return porosityFF_ ;
179 833280 else if (inPM_(globalPos))
180 416640 return porosityPM_ ;
181 else
182 DUNE_THROW(Dune::InvalidStateException, "You should not be here: x=" << globalPos[0] << " y= "<< globalPos[dimWorld-1]);
183 }
184
185 /*!
186 * \brief Returns the fluid-matrix interaction law at a given location
187 * \param globalPos A global coordinate vector
188 */
189 const NonwettingSolidInterfacialArea& nonwettingSolidInterfacialAreaAtPos(const GlobalPosition &globalPos) const
190 {
191 if (inFF_(globalPos) )
192 return *aNsFreeFlow_ ;
193 else if (inPM_(globalPos))
194 return *aNs_ ;
195 else DUNE_THROW(Dune::InvalidStateException, "You should not be here: x=" << globalPos[0] << " y= "<< globalPos[dimWorld-1]);
196 }
197
198 /*!
199 * \brief Returns the fluid-matrix interaction law at a given location
200 * \param globalPos A global coordinate vector
201 */
202 const WettingSolidInterfacialArea& wettingSolidInterfacialAreaAtPos(const GlobalPosition &globalPos) const
203 {
204 DUNE_THROW(Dune::InvalidStateException, "Should not be called in this test.");
205 }
206
207 /*!
208 * \brief Returns the fluid-matrix interaction law at a given location
209 * \param globalPos A global coordinate vector
210 */
211 const WettingNonwettingInterfacialArea& wettingNonwettingInterfacialAreaAtPos(const GlobalPosition &globalPos) const
212 {
213 if (inFF_(globalPos) )
214 return *aNwFreeFlow_ ;
215 else if (inPM_(globalPos))
216 return *aNw_ ;
217 else DUNE_THROW(Dune::InvalidStateException, "You should not be here: x=" << globalPos[0] << " y= "<< globalPos[dimWorld-1]);
218
219 }
220
221 /*!
222 * \brief Returns the fluid-matrix interaction law at a given location
223 */
224 template<class ElementSolution>
225 auto fluidMatrixInteraction(const Element& element,
226 const SubControlVolume& scv,
227 const ElementSolution& elemSol) const
228 {
229 4838400 return fluidMatrixInteractionAtPos(scv.dofPosition());
230 }
231
232 /*!
233 * \brief Returns the fluid-matrix interaction law at a given location
234 */
235 2420796 auto fluidMatrixInteractionAtPos(const GlobalPosition &globalPos) const
236 {
237 3591432 if (inFF_(globalPos))
238 8194452 return makeFluidMatrixInteraction(FluidMatrix::MPAdapter(*pcKrSwCurveFF_), *aNsFreeFlow_, *aNwFreeFlow_, *aWs_);
239 2500320 else if (inPM_(globalPos))
240 8751120 return makeFluidMatrixInteraction(FluidMatrix::MPAdapter(*pcKrSwCurvePM_), *aNs_, *aNw_, *aWs_);
241 else DUNE_THROW(Dune::InvalidStateException, "You should not be here: x=" << globalPos[0] << " y= "<< globalPos[dimWorld-1]);
242 }
243
244 /*!
245 * \brief Returns the characteristic length for the mass transfer.
246 * \param globalPos The position in global coordinates.
247 */
248 806400 const Scalar characteristicLengthAtPos(const GlobalPosition & globalPos) const
249 {
250 1196160 if (inFF_(globalPos) )
251 389760 return characteristicLengthFF_ ;
252 833280 else if (inPM_(globalPos))
253 416640 return characteristicLengthPM_ ;
254 else DUNE_THROW(Dune::InvalidStateException, "You should not be here: x=" << globalPos[0] << " y= "<< globalPos[dimWorld-1]);
255 }
256
257 /*!
258 * \brief Return the pre factor the the energy transfer
259 * \param globalPos The position in global coordinates.
260 */
261 806400 const Scalar factorEnergyTransferAtPos(const GlobalPosition & globalPos) const
262 {
263 1196160 if (inFF_(globalPos) )
264 389760 return factorEnergyTransfer_ ;
265 833280 else if (inPM_(globalPos))
266 416640 return factorEnergyTransfer_ ;
267 else DUNE_THROW(Dune::InvalidStateException, "You should not be here: x=" << globalPos[0] << " y= "<< globalPos[dimWorld-1]);
268 }
269
270 /*!
271 * \brief Return the pre factor the the mass transfer
272 * \param globalPos The position in global coordinates.
273 */
274 806400 const Scalar factorMassTransferAtPos(const GlobalPosition & globalPos) const
275 {
276 1196160 if (inFF_(globalPos) )
277 389760 return factorMassTransfer_ ;
278 833280 else if (inPM_(globalPos))
279 416640 return factorMassTransfer_ ;
280 else DUNE_THROW(Dune::InvalidStateException, "You should not be here: x=" << globalPos[0] << " y= "<< globalPos[dimWorld-1]);
281 }
282
283 /*!
284 * \brief Function for defining which phase is to be considered as the wetting phase.
285 *
286 * \param globalPos The global position
287 * \return The wetting phase index
288 */
289 template<class FluidSystem>
290 int wettingPhaseAtPos(const GlobalPosition& globalPos) const
291 {
292 return FluidSystem::phase0Idx;
293 }
294
295 /*!
296 * \brief Returns whether the tested position is in the porous medium part of the domain
297 *
298 * This setting ensures that the boundary between the two domains has porous
299 * medium properties. This is desirable, because I want to observe the
300 * boundary of the porous domain.
301 * However, the position has to be the coordinate of the vertex and not the
302 * integration point of the boundary flux. If the position is the ip of the
303 * Neumann flux this leads to a situation
304 * where the vertex belongs to porous medium and there is nonetheless
305 * injection over the boundary. That does not work.
306 * -> be careful with neumannAtPos
307 */
308 bool inPM_(const GlobalPosition & globalPos) const
309
42/80
✓ Branch 0 taken 416640 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 416640 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 416640 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 416640 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 416640 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 416640 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 416640 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 416640 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 416640 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 416640 times.
✗ Branch 19 not taken.
✓ Branch 20 taken 416640 times.
✗ Branch 21 not taken.
✓ Branch 22 taken 416640 times.
✗ Branch 23 not taken.
✓ Branch 24 taken 416640 times.
✗ Branch 25 not taken.
✓ Branch 26 taken 416640 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 416640 times.
✗ Branch 29 not taken.
✓ Branch 30 taken 416640 times.
✗ Branch 31 not taken.
✓ Branch 32 taken 416640 times.
✗ Branch 33 not taken.
✓ Branch 34 taken 416640 times.
✗ Branch 35 not taken.
✓ Branch 36 taken 416640 times.
✗ Branch 37 not taken.
✓ Branch 38 taken 416640 times.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
✗ Branch 41 not taken.
✗ Branch 42 not taken.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
✗ Branch 46 not taken.
✗ Branch 47 not taken.
✓ Branch 48 taken 1596 times.
✗ Branch 49 not taken.
✓ Branch 50 taken 1596 times.
✗ Branch 51 not taken.
✓ Branch 52 taken 240 times.
✓ Branch 53 taken 1356 times.
✓ Branch 54 taken 240 times.
✓ Branch 55 taken 1356 times.
✓ Branch 56 taken 1596 times.
✗ Branch 57 not taken.
✓ Branch 58 taken 1596 times.
✗ Branch 59 not taken.
✓ Branch 60 taken 240 times.
✓ Branch 61 taken 1356 times.
✓ Branch 62 taken 240 times.
✓ Branch 63 taken 1356 times.
✓ Branch 64 taken 6384 times.
✗ Branch 65 not taken.
✓ Branch 66 taken 6384 times.
✗ Branch 67 not taken.
✓ Branch 68 taken 960 times.
✓ Branch 69 taken 5424 times.
✓ Branch 70 taken 960 times.
✓ Branch 71 taken 5424 times.
✓ Branch 72 taken 1250160 times.
✗ Branch 73 not taken.
✓ Branch 74 taken 1250160 times.
✗ Branch 75 not taken.
✓ Branch 76 taken 1250160 times.
✗ Branch 77 not taken.
✓ Branch 78 taken 1250160 times.
✗ Branch 79 not taken.
6685872 { return ( (globalPos[dimWorld-1] > 0. - eps_) and (globalPos[dimWorld-1] < (heightPM_ + eps_) ) ); }
310
311 /*!
312 * \brief Returns whether the tested position is above PM / "free flow" in the domain.
313 *
314 * This setting ensures that the boundary between the two domains has porous
315 * medium properties. This is desirable, because I want to observe the
316 * boundary of the porous domain.
317 * However, the position has to be the coordinate of the vertex and not the
318 * integration point of the boundary flux. If the position is the ip of the
319 * Neumann flux this leads to a situation where the vertex belongs to porous
320 * medium and there is nonetheless injection over the boundary.
321 * That does not work.
322 * -> be careful with neumannAtPos
323 */
324 bool inFF_(const GlobalPosition & globalPos) const
325
54/88
✓ Branch 0 taken 89466 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 89466 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 43290 times.
✓ Branch 5 taken 46176 times.
✓ Branch 6 taken 43290 times.
✓ Branch 7 taken 46176 times.
✓ Branch 8 taken 806400 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 806400 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 389760 times.
✓ Branch 13 taken 416640 times.
✓ Branch 14 taken 389760 times.
✓ Branch 15 taken 416640 times.
✓ Branch 16 taken 806400 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 806400 times.
✗ Branch 19 not taken.
✓ Branch 20 taken 389760 times.
✓ Branch 21 taken 416640 times.
✓ Branch 22 taken 389760 times.
✓ Branch 23 taken 416640 times.
✓ Branch 24 taken 806400 times.
✗ Branch 25 not taken.
✓ Branch 26 taken 806400 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 389760 times.
✓ Branch 29 taken 416640 times.
✓ Branch 30 taken 389760 times.
✓ Branch 31 taken 416640 times.
✓ Branch 32 taken 806400 times.
✗ Branch 33 not taken.
✓ Branch 34 taken 806400 times.
✗ Branch 35 not taken.
✓ Branch 36 taken 389760 times.
✓ Branch 37 taken 416640 times.
✓ Branch 38 taken 389760 times.
✓ Branch 39 taken 416640 times.
✓ Branch 40 taken 806400 times.
✗ Branch 41 not taken.
✓ Branch 42 taken 806400 times.
✗ Branch 43 not taken.
✓ Branch 44 taken 389760 times.
✓ Branch 45 taken 416640 times.
✓ Branch 46 taken 389760 times.
✓ Branch 47 taken 416640 times.
✗ Branch 48 not taken.
✗ Branch 49 not taken.
✗ Branch 50 not taken.
✗ Branch 51 not taken.
✗ Branch 52 not taken.
✗ Branch 53 not taken.
✗ Branch 54 not taken.
✗ Branch 55 not taken.
✓ Branch 56 taken 1356 times.
✗ Branch 57 not taken.
✓ Branch 58 taken 1356 times.
✗ Branch 59 not taken.
✓ Branch 60 taken 1356 times.
✗ Branch 61 not taken.
✓ Branch 62 taken 1356 times.
✗ Branch 63 not taken.
✓ Branch 64 taken 1356 times.
✗ Branch 65 not taken.
✓ Branch 66 taken 1356 times.
✗ Branch 67 not taken.
✓ Branch 68 taken 1356 times.
✗ Branch 69 not taken.
✓ Branch 70 taken 1356 times.
✗ Branch 71 not taken.
✓ Branch 72 taken 5424 times.
✗ Branch 73 not taken.
✓ Branch 74 taken 5424 times.
✗ Branch 75 not taken.
✓ Branch 76 taken 5424 times.
✗ Branch 77 not taken.
✓ Branch 78 taken 5424 times.
✗ Branch 79 not taken.
✓ Branch 80 taken 2420796 times.
✗ Branch 81 not taken.
✓ Branch 82 taken 2420796 times.
✗ Branch 83 not taken.
✓ Branch 84 taken 1170636 times.
✓ Branch 85 taken 1250160 times.
✓ Branch 86 taken 1170636 times.
✓ Branch 87 taken 1250160 times.
13100796 { return ( (globalPos[dimWorld-1] < heightDomain_ + eps_) and (globalPos[dimWorld-1] > (heightPM_ + eps_) ) ); }
326
327 /*! \brief access function for the depth / height of the porous medium */
328 const Scalar heightPM() const
329 { return heightPM_; }
330
331 private:
332 static constexpr Scalar eps_ = 1e-6;
333 Scalar heightDomain_ ;
334
335 // Porous Medium Domain
336 Scalar intrinsicPermeabilityPM_ ;
337 Scalar porosityPM_ ;
338 Scalar heightPM_ ;
339 Scalar factorEnergyTransfer_ ;
340 Scalar factorMassTransfer_ ;
341 Scalar characteristicLengthPM_ ;
342 std::unique_ptr<PcKrSwCurve> pcKrSwCurvePM_;
343
344 // Free Flow Domain
345 Scalar porosityFF_ ;
346 Scalar intrinsicPermeabilityFF_ ;
347 Scalar characteristicLengthFF_ ;
348 std::unique_ptr<PcKrSwCurve> pcKrSwCurveFF_;
349
350 // interfacial area parameters
351 Scalar aWettingNonwettingA1_ ;
352 Scalar aWettingNonwettingA2_ ;
353 Scalar aWettingNonwettingA3_ ;
354
355 Scalar aNonwettingSolidA1_;
356 Scalar aNonwettingSolidA2_;
357 Scalar aNonwettingSolidA3_;
358
359 // capillary pressures parameters
360 Scalar BCPd_ ;
361 Scalar BClambda_ ;
362 Scalar Swr_ ;
363 Scalar Snr_ ;
364 std::vector<Scalar> gridVector_;
365
366 std::unique_ptr<NonwettingSolidInterfacialArea> aNs_;
367 std::unique_ptr<WettingNonwettingInterfacialArea> aNw_;
368
369 std::unique_ptr<WettingNonwettingInterfacialArea> aNwFreeFlow_;
370 std::unique_ptr<NonwettingSolidInterfacialArea> aNsFreeFlow_;
371
372 std::unique_ptr<WettingSolidInterfacialArea> aWs_; // dummy, never used
373
374 };
375
376 } // end namespace Dumux
377
378 #endif
379