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 class for the test problem using the 1p cc model. | ||
11 | */ | ||
12 | |||
13 | #ifndef DUMUX_CONSERVATION_SPATIAL_PARAMS_HH | ||
14 | #define DUMUX_CONSERVATION_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 | * | ||
24 | * \brief The spatial parameters class for the test problem using the | ||
25 | * 1p cc model. | ||
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 1 times.
✗ Branch 5 not taken.
|
1 | class ConservationSpatialParams |
29 | : public FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, | ||
30 | ConservationSpatialParams<GridGeometry, Scalar>> | ||
31 | { | ||
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 | using ThisType = ConservationSpatialParams<GridGeometry, Scalar>; | ||
37 | using ParentType = FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, ThisType>; | ||
38 | |||
39 | using GlobalPosition = typename Element::Geometry::GlobalCoordinate; | ||
40 | |||
41 | using PcKrSwCurve = FluidMatrix::VanGenuchtenDefault<Scalar>; | ||
42 | |||
43 | public: | ||
44 | using PermeabilityType = Scalar; | ||
45 | |||
46 | 1 | ConservationSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry) | |
47 | : ParentType(gridGeometry) | ||
48 |
7/20✓ 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 18 taken 1 times.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
|
3 | , pcKrSwCurve_("SpatialParams") |
49 | { | ||
50 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | permeability_ = getParam<Scalar>("SpatialParams.Permeability"); |
51 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | porosity_ = getParam<Scalar>("SpatialParams.Porosity"); |
52 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | alphaBJ_ = getParam<Scalar>("SpatialParams.AlphaBJ"); |
53 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | temperature_ = getParam<Scalar>("SpatialParams.PorousMediumTemperature"); |
54 | 1 | } | |
55 | |||
56 | /*! | ||
57 | * \brief Function for defining the (intrinsic) permeability \f$[m^2]\f$. | ||
58 | * | ||
59 | * \param globalPos The global position | ||
60 | * \return the intrinsic permeability | ||
61 | */ | ||
62 | ✗ | PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const | |
63 | ✗ | { return permeability_; } | |
64 | |||
65 | /*! \brief Defines the porosity in [-]. | ||
66 | * | ||
67 | * \param globalPos The global position | ||
68 | */ | ||
69 | ✗ | Scalar porosityAtPos(const GlobalPosition& globalPos) const | |
70 | ✗ | { return porosity_; } | |
71 | |||
72 | /*! \brief Defines the temperature in [K]. | ||
73 | * | ||
74 | * \param globalPos The global position | ||
75 | */ | ||
76 | ✗ | Scalar temperatureAtPos(const GlobalPosition& globalPos) const | |
77 | ✗ | { return temperature_; } | |
78 | |||
79 | /*! \brief Defines the Beavers-Joseph coefficient in [-]. | ||
80 | * | ||
81 | * \param globalPos The global position | ||
82 | */ | ||
83 | Scalar beaversJosephCoeffAtPos(const GlobalPosition& globalPos) const | ||
84 | { return alphaBJ_; } | ||
85 | |||
86 | /*! | ||
87 | * \brief Returns the parameters for the material law at a given location | ||
88 | * | ||
89 | * \param globalPos The global coordinates for the given location | ||
90 | */ | ||
91 | ✗ | auto fluidMatrixInteractionAtPos(const GlobalPosition& globalPos) const | |
92 | { | ||
93 | 1249440 | return makeFluidMatrixInteraction(pcKrSwCurve_); | |
94 | } | ||
95 | |||
96 | /*! | ||
97 | * \brief Function for defining which phase is to be considered as the wetting phase. | ||
98 | * | ||
99 | * \param globalPos The global position | ||
100 | * \return The wetting phase index | ||
101 | */ | ||
102 | template<class FluidSystem> | ||
103 | ✗ | int wettingPhaseAtPos(const GlobalPosition& globalPos) const | |
104 | ✗ | { return FluidSystem::phase0Idx; } | |
105 | |||
106 | private: | ||
107 | Scalar permeability_; | ||
108 | Scalar porosity_; | ||
109 | Scalar alphaBJ_; | ||
110 | Scalar temperature_; | ||
111 | const PcKrSwCurve pcKrSwCurve_; | ||
112 | static constexpr Scalar eps_ = 1.0e-7; | ||
113 | }; | ||
114 | |||
115 | } // end namespace Dumux | ||
116 | |||
117 | #endif | ||
118 |