24#ifndef DUMUX_FREEFLOW_SHALLOW_WATER_LOCAL_RESIDUAL_HH
25#define DUMUX_FREEFLOW_SHALLOW_WATER_LOCAL_RESIDUAL_HH
37template<
class TypeTag>
39:
public GetPropType<TypeTag, Properties::BaseLocalResidual>
49 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
50 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
51 using Element =
typename GridView::template Codim<0>::Entity;
57 using ParentType::ParentType;
71 const SubControlVolume& scv,
72 const VolumeVariables& volVars)
const
75 NumEqVector storage(0.0);
76 storage[Indices::massBalanceIdx] = volVars.waterDepth();
77 storage[Indices::momentumXBalanceIdx] = volVars.waterDepth() * volVars.velocity(0);
78 storage[Indices::momentumYBalanceIdx] = volVars.waterDepth() * volVars.velocity(1);
93 const Element& element,
94 const FVElementGeometry& fvGeometry,
95 const ElementVolumeVariables& elemVolVars,
96 const SubControlVolumeFace& scvf,
97 const ElementFluxVariablesCache& elemFluxVarsCache)
const
99 NumEqVector flux(0.0);
100 FluxVariables fluxVars;
101 flux += fluxVars.advectiveFlux(problem, element, fvGeometry, elemVolVars, scvf);
104 static const bool enableViscousFlux = getParamFromGroup<bool>(problem.paramGroup(),
"ShallowWater.EnableViscousFlux",
false);
105 if (enableViscousFlux)
106 flux += fluxVars.viscousFlux(problem, element, fvGeometry, elemVolVars, scvf);
A helper to deduce a vector with the same size as numbers of equations.
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
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:46
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:180
Element-wise calculation of the residual for the shallow water equations.
Definition: freeflow/shallowwater/localresidual.hh:40
NumEqVector computeFlux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf, const ElementFluxVariablesCache &elemFluxVarsCache) const
Evaluate the mass/momentum flux over a face of a sub control volume.
Definition: freeflow/shallowwater/localresidual.hh:92
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:70
Declares all properties used in Dumux.