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_1P_TEST_SPATIALPARAMS_HH | ||
14 | #define DUMUX_1P_TEST_SPATIALPARAMS_HH | ||
15 | |||
16 | #include <dumux/porousmediumflow/fvspatialparams1p.hh> | ||
17 | |||
18 | namespace Dumux { | ||
19 | |||
20 | /*! | ||
21 | * \ingroup BoundaryTests | ||
22 | * \brief The spatial parameters class for the test problem using the | ||
23 | * 1p cc model. | ||
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 6 times.
✗ Branch 5 not taken.
|
6 | class OnePSpatialParams |
27 | : public FVPorousMediumFlowSpatialParamsOneP<GridGeometry, Scalar, | ||
28 | OnePSpatialParams<GridGeometry, Scalar>> | ||
29 | { | ||
30 | using GridView = typename GridGeometry::GridView; | ||
31 | using ParentType = FVPorousMediumFlowSpatialParamsOneP<GridGeometry, Scalar, | ||
32 | OnePSpatialParams<GridGeometry, Scalar>>; | ||
33 | using FVElementGeometry = typename GridGeometry::LocalView; | ||
34 | using SubControlVolume = typename FVElementGeometry::SubControlVolume; | ||
35 | using Element = typename GridView::template Codim<0>::Entity; | ||
36 | using GlobalPosition = typename Element::Geometry::GlobalCoordinate; | ||
37 | |||
38 | public: | ||
39 | // export permeability type | ||
40 | using PermeabilityType = Scalar; | ||
41 | |||
42 | 6 | OnePSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry) | |
43 |
2/8✓ Branch 2 taken 6 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 9 not taken.
✗ Branch 10 not taken.
|
6 | : ParentType(gridGeometry) |
44 | { | ||
45 |
1/2✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
|
6 | permeability_ = getParam<Scalar>("SpatialParams.Permeability"); |
46 |
1/2✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
|
6 | porosity_ = getParam<Scalar>("SpatialParams.Porosity"); |
47 |
1/2✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
|
6 | alphaBJ_ = getParam<Scalar>("SpatialParams.AlphaBeaversJoseph"); |
48 | 6 | } | |
49 | |||
50 | /*! | ||
51 | * \brief Function for defining the (intrinsic) permeability \f$[m^2]\f$. | ||
52 | * | ||
53 | * \param globalPos The global position | ||
54 | * \return The intrinsic permeability | ||
55 | */ | ||
56 | ✗ | PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const | |
57 | ✗ | { return permeability_; } | |
58 | |||
59 | /*! \brief Defines the porosity in [-]. | ||
60 | * | ||
61 | * \param globalPos The global position | ||
62 | */ | ||
63 | ✗ | Scalar porosityAtPos(const GlobalPosition& globalPos) const | |
64 | ✗ | { return porosity_; } | |
65 | |||
66 | /*! | ||
67 | * \brief Returns the temperature within the domain. | ||
68 | * | ||
69 | * \param element The finite volume element | ||
70 | * \param scv The sub-control volume | ||
71 | * \param elemSol The element solution | ||
72 | */ | ||
73 | template<class ElementSolution> | ||
74 | ✗ | Scalar temperature(const Element& element, | |
75 | const SubControlVolume& scv, | ||
76 | const ElementSolution& elemSol) const | ||
77 | ✗ | { return 273.15 + 10; } | |
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 | private: | ||
88 | Scalar permeability_; | ||
89 | Scalar porosity_; | ||
90 | Scalar alphaBJ_; | ||
91 | }; | ||
92 | |||
93 | } // end namespace Dumux | ||
94 | |||
95 | #endif | ||
96 |