3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/solidenergy/localresidual.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 2 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 *****************************************************************************/
24#ifndef DUMUX_SOLID_ENERGY_LOCAL_RESIDUAL_HH
25#define DUMUX_SOLID_ENERGY_LOCAL_RESIDUAL_HH
26
28
29namespace Dumux {
30
35template<class TypeTag>
36class SolidEnergyLocalResidual : public GetPropType<TypeTag, Properties::BaseLocalResidual>
37{
43 using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
45 using ElementFluxVariablesCache = typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView;
46 using FVElementGeometry = typename GetPropType<TypeTag, Properties::GridGeometry>::LocalView;
47 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
48 using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
50 using Element = typename GridView::template Codim<0>::Entity;
51
52public:
53 using ParentType::ParentType;
54
64 NumEqVector computeStorage(const Problem& problem,
65 const SubControlVolume& scv,
66 const VolumeVariables& volVars) const
67 {
68 NumEqVector storage;
69 storage[0] = volVars.temperatureSolid()
70 * volVars.solidHeatCapacity()
71 * volVars.solidDensity()
72 * (1.0 - volVars.porosity());
73
74 return storage;
75 }
76
77
88 NumEqVector computeFlux(const Problem& problem,
89 const Element& element,
90 const FVElementGeometry& fvGeometry,
91 const ElementVolumeVariables& elemVolVars,
92 const SubControlVolumeFace& scvf,
93 const ElementFluxVariablesCache& elemFluxVarsCache) const
94 {
95 FluxVariables fluxVars;
96 fluxVars.init(problem, element, fvGeometry, elemVolVars, scvf, elemFluxVarsCache);
97 return fluxVars.heatConductionFlux();
98 }
99};
100
101} // end namespace Dumux
102
103#endif
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
Element-wise calculation of the residual.
Definition: porousmediumflow/solidenergy/localresidual.hh:37
NumEqVector computeStorage(const Problem &problem, const SubControlVolume &scv, const VolumeVariables &volVars) const
Evaluate the rate of change of all conservation quantites.
Definition: porousmediumflow/solidenergy/localresidual.hh:64
NumEqVector computeFlux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf, const ElementFluxVariablesCache &elemFluxVarsCache) const
Evaluate the energy flux over a face of a sub control volume.
Definition: porousmediumflow/solidenergy/localresidual.hh:88
Declares all properties used in Dumux.