24#ifndef DUMUX_FREEFLOW_SHALLOW_WATER_LOCAL_RESIDUAL_HH
25#define DUMUX_FREEFLOW_SHALLOW_WATER_LOCAL_RESIDUAL_HH
35template<
class TypeTag>
37:
public GetPropType<TypeTag, Properties::BaseLocalResidual>
47 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
48 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
49 using Element =
typename GridView::template Codim<0>::Entity;
55 using ParentType::ParentType;
69 const SubControlVolume& scv,
70 const VolumeVariables& volVars)
const
73 NumEqVector storage(0.0);
74 storage[Indices::massBalanceIdx] = volVars.waterDepth();
75 storage[Indices::momentumXBalanceIdx] = volVars.waterDepth() * volVars.velocity(0);
76 storage[Indices::momentumYBalanceIdx] = volVars.waterDepth() * volVars.velocity(1);
91 const Element& element,
92 const FVElementGeometry& fvGeometry,
93 const ElementVolumeVariables& elemVolVars,
94 const SubControlVolumeFace& scvf,
95 const ElementFluxVariablesCache& elemFluxVarsCache)
const
97 NumEqVector flux(0.0);
98 FluxVariables fluxVars;
99 flux += fluxVars.advectiveFlux(problem, element, fvGeometry, elemVolVars, scvf);
100 flux += fluxVars.diffusiveFlux(problem, element, fvGeometry, elemVolVars, scvf);
make the local view function available whenever we use the grid geometry
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 for the shallow water equations.
Definition: freeflow/shallowwater/localresidual.hh:38
NumEqVector computeFlux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf, const ElementFluxVariablesCache &elemFluxVarsCache) const
Evaluate the mass flux over a face of a sub control volume.
Definition: freeflow/shallowwater/localresidual.hh:90
NumEqVector computeStorage(const Problem &problem, const SubControlVolume &scv, const VolumeVariables &volVars) const
Evaluate the rate of change of all conservation quantites (e.g. mass, momentum) within a sub-control ...
Definition: freeflow/shallowwater/localresidual.hh:68
Declares all properties used in Dumux.