version 3.10-dev
fvspatialparams1pconstant.hh
Go to the documentation of this file.
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//
13#ifndef DUMUX_POROUS_MEDIUM_FLOW_FV_SPATIAL_PARAMS_ONEP_CONSTANT_HH
14#define DUMUX_POROUS_MEDIUM_FLOW_FV_SPATIAL_PARAMS_ONEP_CONSTANT_HH
15
17#include "fvspatialparams1p.hh"
18
19namespace Dumux {
20
26template<class GridGeometry, class Scalar>
28: public FVPorousMediumFlowSpatialParamsOneP<GridGeometry, Scalar, FVPorousMediumFlowSpatialParamsOnePConstant<GridGeometry, Scalar>>
29{
32 using GlobalPosition = typename GridGeometry::GridView::template Codim<0>::Geometry::GlobalCoordinate;
33
34public:
35 using PermeabilityType = Scalar;
36
37 FVPorousMediumFlowSpatialParamsOnePConstant(std::shared_ptr<const GridGeometry> gridGeometry)
39 , porosity_(getParam<Scalar>("SpatialParams.Porosity"))
40 , permeability_(getParam<Scalar>("SpatialParams.Permeability"))
41 , temperature_(getParam<Scalar>(
42 "SpatialParams.Temperature",
43 ParentType::temperatureAtPos(GlobalPosition(0.0))
44 ))
45 {}
46
50 PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const
51 { return permeability_; }
52
56 Scalar porosityAtPos(const GlobalPosition& globalPos) const
57 { return porosity_; }
58
62 Scalar temperatureAtPos(const GlobalPosition& globalPos) const
63 { return temperature_; }
64
65private:
66 const Scalar porosity_;
67 const Scalar permeability_;
68 const Scalar temperature_;
69};
70
71} // end namespace Dumux
72
73#endif
A spatial params implementation for 1p problem with constant properties.
Definition: fvspatialparams1pconstant.hh:29
Scalar porosityAtPos(const GlobalPosition &globalPos) const
The porosity .
Definition: fvspatialparams1pconstant.hh:56
FVPorousMediumFlowSpatialParamsOnePConstant(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: fvspatialparams1pconstant.hh:37
PermeabilityType permeabilityAtPos(const GlobalPosition &globalPos) const
The (intrinsic) permeability .
Definition: fvspatialparams1pconstant.hh:50
Scalar PermeabilityType
Definition: fvspatialparams1pconstant.hh:35
Scalar temperatureAtPos(const GlobalPosition &globalPos) const
The temperature .
Definition: fvspatialparams1pconstant.hh:62
The base class for spatial parameters of single-phase problems.
Definition: fvspatialparams1p.hh:26
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: common/fvspatialparams.hh:130
The base class for spatial parameters in single-phase porous-medium-flow problems.
T getParam(Args &&... args)
A free function to get a parameter from the parameter tree singleton.
Definition: parameters.hh:139
Definition: adapt.hh:17
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.