3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
25#ifndef DUMUX_POROUS_MEDIUM_FLOW_FV_SPATIAL_PARAMS_ONEP_CONSTANT_HH
26#define DUMUX_POROUS_MEDIUM_FLOW_FV_SPATIAL_PARAMS_ONEP_CONSTANT_HH
27
29#include "fvspatialparams1p.hh"
30
31namespace Dumux {
32
38template<class GridGeometry, class Scalar>
40: public FVPorousMediumFlowSpatialParamsOneP<GridGeometry, Scalar, FVPorousMediumFlowSpatialParamsOnePConstant<GridGeometry, Scalar>>
41{
44 using GlobalPosition = typename GridGeometry::GridView::template Codim<0>::Geometry::GlobalCoordinate;
45
46public:
47 using PermeabilityType = Scalar;
48
49 FVPorousMediumFlowSpatialParamsOnePConstant(std::shared_ptr<const GridGeometry> gridGeometry)
51 , porosity_(getParam<Scalar>("SpatialParams.Porosity"))
52 , permeability_(getParam<Scalar>("SpatialParams.Permeability"))
53 , temperature_(getParam<Scalar>(
54 "SpatialParams.Temperature",
55 ParentType::temperatureAtPos(GlobalPosition(0.0))
56 ))
57 {}
58
62 PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const
63 { return permeability_; }
64
68 Scalar porosityAtPos(const GlobalPosition& globalPos) const
69 { return porosity_; }
70
74 Scalar temperatureAtPos(const GlobalPosition& globalPos) const
75 { return temperature_; }
76
77private:
78 const Scalar porosity_;
79 const Scalar permeability_;
80 const Scalar temperature_;
81};
82
83} // end namespace Dumux
84
85#endif
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
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:151
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: common/fvspatialparams.hh:142
The base class for spatial parameters of single-phase problems.
Definition: fvspatialparams1p.hh:38
A spatial params implementation for 1p problem with constant properties.
Definition: fvspatialparams1pconstant.hh:41
Scalar porosityAtPos(const GlobalPosition &globalPos) const
The porosity .
Definition: fvspatialparams1pconstant.hh:68
FVPorousMediumFlowSpatialParamsOnePConstant(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: fvspatialparams1pconstant.hh:49
PermeabilityType permeabilityAtPos(const GlobalPosition &globalPos) const
The (intrinsic) permeability .
Definition: fvspatialparams1pconstant.hh:62
Scalar PermeabilityType
Definition: fvspatialparams1pconstant.hh:47
Scalar temperatureAtPos(const GlobalPosition &globalPos) const
The temperature .
Definition: fvspatialparams1pconstant.hh:74