version 3.11-dev
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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// SPDX-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_SOLID_ENERGY_LOCAL_RESIDUAL_HH
13#define DUMUX_SOLID_ENERGY_LOCAL_RESIDUAL_HH
14
18
19namespace Dumux {
20
25template<class TypeTag>
28{
35 using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
37 using ElementFluxVariablesCache = typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView;
38 using FVElementGeometry = typename GridGeometry::LocalView;
39 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
40 using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
41 using GridView = typename GridGeometry::GridView;
42 using Element = typename GridView::template Codim<0>::Entity;
43
44public:
45 using ParentType::ParentType;
46
56 NumEqVector computeStorage(const Problem& problem,
57 const SubControlVolume& scv,
58 const VolumeVariables& volVars) const
59 {
60 NumEqVector storage;
61 storage[0] = volVars.temperatureSolid()
62 * volVars.solidHeatCapacity()
63 * volVars.solidDensity()
64 * (1.0 - volVars.porosity());
65
66 return storage;
67 }
68
69
80 NumEqVector computeFlux(const Problem& problem,
81 const Element& element,
82 const FVElementGeometry& fvGeometry,
83 const ElementVolumeVariables& elemVolVars,
84 const SubControlVolumeFace& scvf,
85 const ElementFluxVariablesCache& elemFluxVarsCache) const
86 {
87 FluxVariables fluxVars;
88 fluxVars.init(problem, element, fvGeometry, elemVolVars, scvf, elemFluxVarsCache);
89 return fluxVars.heatConductionFlux();
90 }
91};
92
93} // end namespace Dumux
94
95#endif
Element-wise calculation of the residual.
Definition: porousmediumflow/solidenergy/localresidual.hh:28
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:56
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:80
Defines all properties used in Dumux.
The default local operator than can be specialized for each discretization scheme.
typename NumEqVectorTraits< PrimaryVariables >::type NumEqVector
A vector with the same size as numbers of equations This is the default implementation and has to be ...
Definition: numeqvector.hh:34
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
Definition: adapt.hh:17
typename Detail::DiscretizationDefaultLocalOperator< TypeTag >::type DiscretizationDefaultLocalOperator
Definition: defaultlocaloperator.hh:27
A helper to deduce a vector with the same size as numbers of equations.