3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
fvnonequilibrium.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_FV_SPATIALPARAMS_NONEQUILIBRIUM_HH
26#define DUMUX_FV_SPATIALPARAMS_NONEQUILIBRIUM_HH
27
29
30namespace Dumux {
31
36template<class GridGeometry, class Scalar, class Implementation>
38: public FVSpatialParams<GridGeometry, Scalar, Implementation>
39{
41 using GridView = typename GridGeometry::GridView;
42 using FVElementGeometry = typename GridGeometry::LocalView;
43 using SubControlVolume = typename GridGeometry::SubControlVolume;
44 using Element = typename GridView::template Codim<0>::Entity;
45 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
46
47public:
49 using AwnSurfaceParams = Scalar;
50 using AwsSurfaceParams = Scalar;
51 using AnsSurfaceParams = Scalar;
52
53 FVNonEquilibriumSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
55 { }
56
63 template<class ElementSolution>
64 const Scalar characteristicLength(const Element & element,
65 const SubControlVolume &scv,
66 const ElementSolution &elemSol) const
67
68 { return this->asImp_().characteristicLengthAtPos(scv.dofPosition()); }
69
75 const Scalar characteristicLengthAtPos(const GlobalPosition & globalPos) const
76 {
77 DUNE_THROW(Dune::InvalidStateException,
78 "The spatial parameters do not provide "
79 "a characteristicLengthAtPos() method.");
80 }
81
88 template<class ElementSolution>
89 const Scalar factorEnergyTransfer(const Element &element,
90 const SubControlVolume &scv,
91 const ElementSolution &elemSol) const
92 { return this->asImp_().factorEnergyTransferAtPos(scv.dofPosition()); }
93
99 const Scalar factorEnergyTransferAtPos(const GlobalPosition & globalPos) const
100 {
101 DUNE_THROW(Dune::InvalidStateException,
102 "The spatial parameters do not provide "
103 "a factorEnergyTransferAtPos() method.");
104 }
105
112 template<class ElementSolution>
113 const Scalar factorMassTransfer(const Element &element,
114 const SubControlVolume &scv,
115 const ElementSolution &elemSol) const
116 { return this->asImp_().factorMassTransferAtPos(scv.dofPosition()); }
117
118
124 const Scalar factorMassTransferAtPos(const GlobalPosition & globalPos) const
125 {
126 DUNE_THROW(Dune::InvalidStateException,
127 "The spatial parameters do not provide "
128 "a factorMassTransferAtPos() method.");
129 }
130};
131
132} // end namespace Dumux
133
134#endif // GUARDIAN
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
Definition: adapt.hh:29
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
Definition: fv.hh:57
The base class for spatial parameters of one-phase problems using a fully implicit discretization met...
Definition: fv1p.hh:77
Implementation & asImp_()
Definition: fv1p.hh:334
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: fv1p.hh:329
Definition of the spatial parameters for non-equilibrium.
Definition: fvnonequilibrium.hh:39
const Scalar factorEnergyTransfer(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Return the pre-factor the the energy transfer.
Definition: fvnonequilibrium.hh:89
const Scalar characteristicLengthAtPos(const GlobalPosition &globalPos) const
Return the characteristic length for the mass transfer.
Definition: fvnonequilibrium.hh:75
FVNonEquilibriumSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: fvnonequilibrium.hh:53
const Scalar characteristicLength(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Return the characteristic length for the mass transfer.
Definition: fvnonequilibrium.hh:64
const Scalar factorMassTransfer(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Return the pre-factor the the mass transfer.
Definition: fvnonequilibrium.hh:113
Scalar AwsSurfaceParams
Definition: fvnonequilibrium.hh:50
Scalar AwnSurfaceParams
export the types used for interfacial area calculations
Definition: fvnonequilibrium.hh:49
const Scalar factorMassTransferAtPos(const GlobalPosition &globalPos) const
Return the pre-factor the the mass transfer.
Definition: fvnonequilibrium.hh:124
const Scalar factorEnergyTransferAtPos(const GlobalPosition &globalPos) const
Return the pre factor the the energy transfer.
Definition: fvnonequilibrium.hh:99
Scalar AnsSurfaceParams
Definition: fvnonequilibrium.hh:51