12#ifndef DUMUX_FREEFLOW_SHALLOW_WATER_VOLUME_VARIABLES_HH
13#define DUMUX_FREEFLOW_SHALLOW_WATER_VOLUME_VARIABLES_HH
21template <
class Traits>
24 using Indices =
typename Traits::ModelTraits::Indices;
25 using Scalar =
typename Traits::PrimaryVariables::value_type;
32 template<
class ElemSol,
class Problem,
class Element,
class Scv>
34 const Problem &problem,
35 const Element &element,
39 priVars_ = elemSol[scv.localDofIndex()];
40 bedSurface_ = problem.spatialParams().bedSurface(element,scv);
60 return priVars_[Indices::waterdepthIdx];
88 static_assert(!FluidSystem::isCompressible(0),
89 "The shallow water model assumes incompressible fluids"
101 static_assert(FluidSystem::viscosityIsConstant(0),
102 "The shallow water model assumes fluids with constant viscosity"
Volume variables for the shallow water equations model.
Definition: freeflow/shallowwater/volumevariables.hh:23
Scalar viscosity(int phaseIdx=0) const
Return the dynamic viscosity of the fluid.
Definition: freeflow/shallowwater/volumevariables.hh:99
Scalar extrusionFactor() const
Return the extrusion factor (dummy variable).
Definition: freeflow/shallowwater/volumevariables.hh:47
Scalar waterDepth() const
Return water detph h inside the sub-control volume.
Definition: freeflow/shallowwater/volumevariables.hh:58
typename Traits::FluidSystem FluidSystem
export the underlying fluid system
Definition: freeflow/shallowwater/volumevariables.hh:30
const PrimaryVariables & priVars() const
Return the vector of primary variables.
Definition: freeflow/shallowwater/volumevariables.hh:51
typename Traits::PrimaryVariables PrimaryVariables
Definition: freeflow/shallowwater/volumevariables.hh:28
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Definition: freeflow/shallowwater/volumevariables.hh:33
Scalar density(int phaseIdx=0) const
Returns the mass density of the fluid.
Definition: freeflow/shallowwater/volumevariables.hh:86
Scalar velocity(int directionIndex) const
Return water velocity component inside the sub-control volume.
Definition: freeflow/shallowwater/volumevariables.hh:68
Scalar bedSurface() const
Return the bed surface inside the sub-control volume.
Definition: freeflow/shallowwater/volumevariables.hh:78
static unsigned int directionIndex(Vector &&vector)
Returns the direction index of the facet (0 = x, 1 = y, 2 = z)
Definition: staggeredgeometryhelper.hh:121
std::string viscosity(int phaseIdx) noexcept
I/O name of viscosity for multiphase systems.
Definition: name.hh:62
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:53