24#ifndef DUMUX_NAVIERSTOKES_MASS_PROBLEM_HH
25#define DUMUX_NAVIERSTOKES_MASS_PROBLEM_HH
27#include <dune/common/exceptions.hh>
28#include <dune/common/typetraits.hh>
37template<
class TypeTag,
class DiscretizationMethod>
44 using GridView =
typename GridGeometry::GridView;
45 using FVElementGeometry =
typename GridGeometry::LocalView;
46 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
47 using Element =
typename GridView::template Codim<0>::Entity;
48 using GlobalPosition =
typename SubControlVolumeFace::GlobalPosition;
49 using VelocityVector = GlobalPosition;
54 static constexpr bool isCoupled_ = !std::is_empty_v<CouplingManager>;
63 using Sources = Dune::FieldVector<Scalar, ModelTraits::numEq()>;
100 const FVElementGeometry& fvGeometry,
101 const SubControlVolumeFace& scvf)
const
103 if constexpr (isCoupled_)
104 return couplingManager_->faceVelocity(element, scvf);
106 return asImp_().velocityAtPos(scvf.ipGlobal());
114 if constexpr (isCoupled_)
115 return couplingManager_->elementVelocity(fvGeometry);
117 return asImp_().velocityAtPos(fvGeometry.element().geometry().center());
125 DUNE_THROW(Dune::NotImplemented,
"velocityAtPos not implemented");
130 if constexpr (isCoupled_)
131 return *couplingManager_;
133 DUNE_THROW(Dune::InvalidStateException,
134 "Accessing coupling manager of an uncoupled problem is not possible."
140 Implementation &asImp_()
141 {
return *
static_cast<Implementation *
>(
this); }
144 const Implementation &asImp_()
const
145 {
return *
static_cast<const Implementation *
>(
this); }
147 std::shared_ptr<CouplingManager> couplingManager_;
156template<
class TypeTag>
A helper to deduce a vector with the same size as numbers of equations.
Base class for all finite volume problems that are parameterized.
The available discretization methods in Dumux.
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
Class to specify the type of a boundary.
Definition: common/boundarytypes.hh:38
Base class for all finite-volume problems.
Definition: common/fvproblem.hh:55
const std::string & paramGroup() const
The parameter group in which to retrieve runtime parameters.
Definition: common/fvproblem.hh:544
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: common/fvproblem.hh:540
Base class for all finite-volume problems using spatial parameters.
Definition: fvproblemwithspatialparams.hh:41
Definition: freeflow/navierstokes/mass/problem.hh:39
VelocityVector elementVelocity(const FVElementGeometry &fvGeometry) const
Returns the velocity at the element center.
Definition: freeflow/navierstokes/mass/problem.hh:112
Dune::FieldVector< Scalar, ModelTraits::numEq()> BoundaryFluxes
Definition: freeflow/navierstokes/mass/problem.hh:65
const CouplingManager & couplingManager() const
Definition: freeflow/navierstokes/mass/problem.hh:128
VelocityVector faceVelocity(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf) const
Returns the normal velocity at a given sub control volume face.
Definition: freeflow/navierstokes/mass/problem.hh:99
Dune::FieldVector< Scalar, ModelTraits::numEq()> DirichletValues
Definition: freeflow/navierstokes/mass/problem.hh:64
NavierStokesMassProblemImpl(std::shared_ptr< const GridGeometry > gridGeometry, const std::string ¶mGroup="")
The constructor for usage without a coupling manager.
Definition: freeflow/navierstokes/mass/problem.hh:91
Dune::FieldVector< Scalar, ModelTraits::numEq()> Sources
Definition: freeflow/navierstokes/mass/problem.hh:63
NavierStokesMassProblemImpl(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< CouplingManager > couplingManager, const std::string ¶mGroup="")
The constructor.
Definition: freeflow/navierstokes/mass/problem.hh:79
VelocityVector velocityAtPos(const GlobalPosition &) const
Returns the velocity at a given position.
Definition: freeflow/navierstokes/mass/problem.hh:123
Dune::FieldVector< Scalar, ModelTraits::numEq()> InitialValues
Definition: freeflow/navierstokes/mass/problem.hh:62
static constexpr bool isMomentumProblem()
this problem is used for the mass balance model
Definition: freeflow/navierstokes/mass/problem.hh:71
Declares all properties used in Dumux.