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 EmbeddedTests | ||
10 | * \brief The spatial parameters class for the soil problem | ||
11 | */ | ||
12 | #ifndef DUMUX_TEST_ROOT_SOIL_BENCHMARK_SOIL_SPATIALPARAMS_HH | ||
13 | #define DUMUX_TEST_ROOT_SOIL_BENCHMARK_SOIL_SPATIALPARAMS_HH | ||
14 | |||
15 | #include <dumux/common/parameters.hh> | ||
16 | #include <dumux/porousmediumflow/fvspatialparamsmp.hh> | ||
17 | #include <dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh> | ||
18 | |||
19 | namespace Dumux { | ||
20 | |||
21 | /*! | ||
22 | * \ingroup EmbeddedTests | ||
23 | * \brief The spatial parameters class for the soil problem | ||
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 1 times.
✗ Branch 5 not taken.
|
1 | class SoilSpatialParams |
27 | : public FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, SoilSpatialParams<GridGeometry, Scalar>> | ||
28 | { | ||
29 | using ThisType = SoilSpatialParams<GridGeometry, Scalar>; | ||
30 | using ParentType = FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, ThisType>; | ||
31 | using GridView = typename GridGeometry::GridView; | ||
32 | using Element = typename GridView::template Codim<0>::Entity; | ||
33 | using SubControlVolume = typename GridGeometry::SubControlVolume; | ||
34 | using GlobalPosition = typename Element::Geometry::GlobalCoordinate; | ||
35 | |||
36 | public: | ||
37 | // export permeability type | ||
38 | using PermeabilityType = Scalar; | ||
39 | // export material law type | ||
40 | using PcKrSwCurve = FluidMatrix::VanGenuchtenDefault<Scalar>; | ||
41 | |||
42 | 1 | SoilSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry) | |
43 | : ParentType(gridGeometry) | ||
44 |
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 taken 1 times.
✗ Branch 16 not taken.
✓ 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.
|
4 | , pcKrSw_("Soil.SpatialParams") |
45 | { | ||
46 | // perm and poro | ||
47 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | permeability_ = getParam<Scalar>("Soil.SpatialParams.Permeability"); |
48 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | porosity_ = getParam<Scalar>("Soil.SpatialParams.Porosity"); |
49 | 1 | } | |
50 | |||
51 | /*! | ||
52 | * \brief Defines the intrinsic permeability \f$\mathrm{[m^2]}\f$. | ||
53 | */ | ||
54 | template<class ElementSolution> | ||
55 | ✗ | PermeabilityType permeability(const Element& element, | |
56 | const SubControlVolume& scv, | ||
57 | const ElementSolution& elemSol) const | ||
58 | { | ||
59 | ✗ | return permeability_; | |
60 | } | ||
61 | |||
62 | /*! | ||
63 | * \brief Defines the porosity \f$\mathrm{[-]}\f$. | ||
64 | */ | ||
65 | template<class ElementSolution> | ||
66 | ✗ | Scalar porosity(const Element& element, | |
67 | const SubControlVolume& scv, | ||
68 | const ElementSolution& elemSol) const | ||
69 | { | ||
70 | ✗ | return porosity_; | |
71 | } | ||
72 | |||
73 | ✗ | auto fluidMatrixInteractionAtPos(const GlobalPosition& globalPos) const | |
74 |
2/4✗ Branch 2 not taken.
✓ Branch 3 taken 14392320 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 14392320 times.
|
57569282 | { return makeFluidMatrixInteraction(pcKrSw_); } |
75 | |||
76 | /*! | ||
77 | * \brief Returns the temperature within the domain in [K]. | ||
78 | */ | ||
79 | ✗ | Scalar temperatureAtPos(const GlobalPosition& globalPos) const | |
80 | ✗ | { return 273.15 + 10.0; } | |
81 | |||
82 | private: | ||
83 | const PcKrSwCurve pcKrSw_; | ||
84 | Scalar permeability_; | ||
85 | Scalar porosity_; | ||
86 | }; | ||
87 | |||
88 | } // end namespace Dumux | ||
89 | |||
90 | #endif | ||
91 |