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-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder | ||
5 | // SPDX-License-Identifier: GPL-3.0-or-later | ||
6 | // | ||
7 | |||
8 | #ifndef DUMUX_RICHARDS_ANNULUS_SPATIAL_PARAMETERS_HH | ||
9 | #define DUMUX_RICHARDS_ANNULUS_SPATIAL_PARAMETERS_HH | ||
10 | |||
11 | #include <iostream> | ||
12 | #include <dumux/common/parameters.hh> | ||
13 | |||
14 | #include <dumux/porousmediumflow/fvspatialparamsmp.hh> | ||
15 | #include <dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh> | ||
16 | |||
17 | namespace Dumux { | ||
18 | |||
19 | /*! | ||
20 | * \ingroup RichardsTests | ||
21 | * \brief Spatial parameters for the Richards benchmarks | ||
22 | */ | ||
23 | template<class GridGeometry, class Scalar> | ||
24 | class RichardsAnnulusSpatialParams | ||
25 | : public FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, RichardsAnnulusSpatialParams<GridGeometry, Scalar>> | ||
26 | { | ||
27 | using ThisType = RichardsAnnulusSpatialParams<GridGeometry, Scalar>; | ||
28 | using ParentType = FVPorousMediumFlowSpatialParamsMP<GridGeometry, Scalar, ThisType>; | ||
29 | using GridView = typename GridGeometry::GridView; | ||
30 | using GlobalPosition = typename GridView::template Codim<0>::Geometry::GlobalCoordinate; | ||
31 | using PcKrSwCurve = FluidMatrix::VanGenuchtenDefault<Scalar>; | ||
32 | |||
33 | public: | ||
34 | // export permeability type | ||
35 | using PermeabilityType = Scalar; | ||
36 | |||
37 | 4 | RichardsAnnulusSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry) | |
38 | : ParentType(gridGeometry) | ||
39 | 4 | , paramGroup_("SpatialParams." + getParam<std::string>("SpatialParams.SoilType")) | |
40 |
1/2✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
|
4 | , pcKrSwCurve_(paramGroup_) |
41 |
1/2✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
|
8 | , permeability_(getParam<Scalar>(paramGroup_ + ".Permeability")) |
42 |
4/8✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 4 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 4 times.
✗ Branch 9 not taken.
✓ Branch 12 taken 4 times.
✗ Branch 13 not taken.
|
16 | , porosity_(getParam<Scalar>(paramGroup_ + ".Porosity")) |
43 | { | ||
44 |
4/8✓ Branch 1 taken 4 times.
✗ Branch 2 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.
|
8 | std::cout << "Using " << getParam<std::string>(paramGroup_ + ".Name") << " parameters" << std::endl; |
45 | 4 | } | |
46 | |||
47 | /*! | ||
48 | * \brief Returns the intrinsic permeability tensor [m^2] at a given location | ||
49 | */ | ||
50 | 648600 | PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const | |
51 | 648600 | { return permeability_; } | |
52 | |||
53 | /*! | ||
54 | * \brief Returns the porosity [-] at a given location | ||
55 | */ | ||
56 | 648600 | Scalar porosityAtPos(const GlobalPosition& globalPos) const | |
57 | 648600 | { return porosity_; } | |
58 | |||
59 | /*! | ||
60 | * \brief Returns the fluid-matrix interaction law for the sub-control volume | ||
61 | */ | ||
62 | 1674000 | auto fluidMatrixInteractionAtPos(const GlobalPosition& globalPos) const | |
63 |
4/4✓ Branch 0 taken 123121 times.
✓ Branch 1 taken 8279 times.
✓ Branch 3 taken 16567 times.
✓ Branch 4 taken 632033 times.
|
1674000 | { return makeFluidMatrixInteraction(pcKrSwCurve_); } |
64 | |||
65 | /*! | ||
66 | * \brief material law for analytic solution | ||
67 | */ | ||
68 |
1/2✓ Branch 2 taken 4 times.
✗ Branch 3 not taken.
|
739348199 | const PcKrSwCurve& pcKrSwCurve() const { return pcKrSwCurve_; } |
69 | |||
70 | /*! | ||
71 | * \brief the parameter group selecting the soil type | ||
72 | */ | ||
73 |
1/2✓ Branch 1 taken 4 times.
✗ Branch 2 not taken.
|
4 | const std::string& paramGroup() const { return paramGroup_; } |
74 | |||
75 | private: | ||
76 | std::string paramGroup_; | ||
77 | const PcKrSwCurve pcKrSwCurve_; | ||
78 | const Scalar permeability_, porosity_; | ||
79 | }; | ||
80 | |||
81 | } // end namespace Dumux | ||
82 | |||
83 | #endif | ||
84 |