24#ifndef DUMUX_ROUGH_CHANNEL_SPATIAL_PARAMETERS_HH
25#define DUMUX_ROUGH_CHANNEL_SPATIAL_PARAMETERS_HH
40template<
class Gr
idGeometry,
class Scalar,
class VolumeVariables>
43 RoughChannelSpatialParams<GridGeometry, Scalar, VolumeVariables>>
47 using GridView =
typename GridGeometry::GridView;
48 using FVElementGeometry =
typename GridGeometry::LocalView;
49 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
50 using Element =
typename GridView::template Codim<0>::Entity;
51 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
68 if (frictionLawType_ ==
"Manning")
71 frictionLaw_ = std::make_unique<FrictionLawManning<VolumeVariables>>(gravity_, manningN);
73 else if (frictionLawType_ ==
"Nikuradse")
76 frictionLaw_ = std::make_unique<FrictionLawNikuradse<VolumeVariables>>(ks);
80 std::cout<<
"The FrictionLaw in params.input is unknown. Valid entries are 'Manning' and 'Nikuradse'!"<<std::endl;
88 Scalar
gravity(
const GlobalPosition& globalPos)
const
110 const SubControlVolume& scv)
const
112 return *frictionLaw_;
123 const SubControlVolume& scv)
const
126 return 10.0 - element.geometry().center()[0] * bedSlope_;
132 std::string frictionLawType_;
133 std::unique_ptr<FrictionLaw<VolumeVariables>> frictionLaw_;
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Implementation of the abstract base class for friction laws.
Implementation of the friction law after Manning.
Implementation of the friction law after Nikuradse.
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
T getParam(Args &&... args)
A free function to get a parameter from the parameter tree singleton.
Definition parameters.hh:428
make the local view function available whenever we use the grid geometry
Definition adapt.hh:29
Implementation of the abstract base class for friction laws.
Definition frictionlaw.hh:42
FVSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition fv.hh:67
const GridGeometry & gridGeometry() const
Definition fv1p.hh:334
Scalar gravity() const
Define the gravitation.
Definition freeflow/shallowwater/roughchannel/spatialparams.hh:97
Scalar bedSurface(const Element &element, const SubControlVolume &scv) const
Define the bed surface.
Definition freeflow/shallowwater/roughchannel/spatialparams.hh:122
RoughChannelSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition freeflow/shallowwater/roughchannel/spatialparams.hh:54
Scalar gravity(const GlobalPosition &globalPos) const
Define the gravitation.
Definition freeflow/shallowwater/roughchannel/spatialparams.hh:88
const FrictionLaw< VolumeVariables > & frictionLaw(const Element &element, const SubControlVolume &scv) const
Get the frictionLaw.
Definition freeflow/shallowwater/roughchannel/spatialparams.hh:109
void initFrictionLaw()
Initialize the FrictionLaw.
Definition freeflow/shallowwater/roughchannel/spatialparams.hh:66