12#ifndef DUMUX_NAVIERSTOKES_MOMENTUM_PROBLEM_HH
13#define DUMUX_NAVIERSTOKES_MOMENTUM_PROBLEM_HH
15#include <dune/common/exceptions.hh>
16#include <dune/common/fvector.hh>
17#include <dune/common/typetraits.hh>
18#include <dumux/common/boundarytypes_.hh>
21#include <dumux/common/concepts/variables_.hh>
30template<
class TypeTag,
class DiscretizationMethod>
33template<
class TypeTag>
41 using GridView =
typename GridGeometry::GridView;
42 using Element =
typename GridView::template Codim<0>::Entity;
45 using GridVolumeVariables =
typename GridVariables::GridVolumeVariables;
46 using ElementVolumeVariables =
typename GridVolumeVariables::LocalView;
49 using FVElementGeometry =
typename GridGeometry::LocalView;
50 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
51 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
55 dim = GridView::dimension,
56 dimWorld = GridView::dimensionworld
59 using GlobalPosition =
typename SubControlVolumeFace::GlobalPosition;
60 using VelocityVector = Dune::FieldVector<Scalar, dimWorld>;
61 using GravityVector = Dune::FieldVector<Scalar, dimWorld>;
65 static constexpr bool isCoupled_ = !std::is_empty_v<CouplingManager>;
73 using Sources = Dune::FieldVector<Scalar, dimWorld>;
99 gravity_[dim-1] = -9.81;
133 const FVElementGeometry& fvGeometry,
134 const ElementVolumeVariables& elemVolVars,
135 const SubControlVolume& scv)
const
138 return asImp_().sourceAtPos(scv.dofPosition());
168 const FVElementGeometry& fvGeometry,
169 const ElementVolumeVariables& elemVolVars,
170 const SubControlVolume& scv)
const
173 DUNE_THROW(Dune::NotImplemented,
"scvPointSources not implemented");
186 const SubControlVolumeFace& scvf)
const
191 return asImp_().boundaryTypesAtPos(scvf.center());
204 return asImp_().dirichletAtPos(scvf.ipGlobal());
216 template<
class ElementFluxVariablesCache>
218 const FVElementGeometry& fvGeometry,
219 const ElementVolumeVariables& elemVolVars,
220 const ElementFluxVariablesCache& elemFluxVarsCache,
221 const SubControlVolumeFace& scvf)
const
222 {
return asImp_().neumannAtPos(scvf.ipGlobal()); }
243 {
return enableInertiaTerms_; }
250 const FVElementGeometry& fvGeometry,
251 const SubControlVolumeFace& scvf)
const
253 if constexpr (isCoupled_)
254 return couplingManager_->pressure(element, fvGeometry, scvf);
256 return asImp_().pressureAtPos(scvf.ipGlobal());
264 DUNE_THROW(Dune::NotImplemented,
"pressureAtPos not implemented");
274 const FVElementGeometry& fvGeometry,
275 const SubControlVolumeFace& scvf)
const
283 const FVElementGeometry& fvGeometry,
284 const SubControlVolumeFace& scvf)
const
286 if constexpr (isCoupled_)
287 return couplingManager_->density(element, fvGeometry, scvf);
289 return asImp_().densityAtPos(scvf.ipGlobal());
297 const SubControlVolume& scv,
298 const bool isPreviousTimeStep =
false)
const
300 if constexpr (isCoupled_)
301 return couplingManager_->density(element, scv, isPreviousTimeStep);
303 return asImp_().densityAtPos(scv.dofPosition());
307 const FVElementGeometry& fvGeometry,
308 const SubControlVolumeFace& scvf,
309 const bool isPreviousTimeStep =
false)
const
311 if constexpr (isCoupled_)
312 return couplingManager_->insideAndOutsideDensity(element, fvGeometry, scvf, isPreviousTimeStep);
315 const auto rho = asImp_().densityAtPos(scvf.ipGlobal());
316 return std::make_pair(rho, rho);
325 DUNE_THROW(Dune::NotImplemented,
"densityAtPos not implemented");
333 const FVElementGeometry& fvGeometry,
334 const SubControlVolumeFace& scvf)
const
336 if constexpr (isCoupled_)
337 return couplingManager_->effectiveViscosity(element, fvGeometry, scvf);
339 return asImp_().effectiveViscosityAtPos(scvf.ipGlobal());
347 const FVElementGeometry& fvGeometry,
348 const SubControlVolume& scv)
const
350 if constexpr (isCoupled_)
351 return couplingManager_->effectiveViscosity(element, fvGeometry, scv);
353 return asImp_().effectiveViscosityAtPos(scv.dofPosition());
361 DUNE_THROW(Dune::NotImplemented,
"effectiveViscosityAtPos not implemented");
368 template<
class SolutionVector>
372 std::vector<bool> dofHandled(this->
gridGeometry().numDofs(),
false);
374 for (
const auto& element : elements(this->
gridGeometry().gridView()))
376 fvGeometry.bindElement(element);
377 for (
const auto& scv :
scvs(fvGeometry))
379 const auto dofIdx = scv.dofIndex();
380 if (!dofHandled[dofIdx])
382 dofHandled[dofIdx] =
true;
383 sol[dofIdx] = asImp_().initial(scv)[scv.dofAxis()];
394 return asImp_().initialAtPos(scv.dofPosition());
399 const FVElementGeometry& fvGeometry,
400 const ElementVolumeVariables& elemVolVars,
401 const SubControlVolume& scv,
403 const Scalar factor = 8.0)
const
405 const Scalar velocity = elemVolVars[scv].velocity();
406 const auto scvf = scvfs(fvGeometry, scv).begin();
425 const Scalar viscosity,
427 const Scalar factor = 8.0)
const
429 static_assert(dim == 2,
"Pseudo 3D wall friction may only be used in 2D");
430 return -factor * velocity * viscosity / (height*height);
438 bool onSlipBoundary(
const FVElementGeometry& fvGeometry,
const SubControlVolumeFace& scvf)
const
439 {
return asImp_().onSlipBoundaryAtPos(scvf.center()); }
450 if constexpr (isCoupled_)
451 return *couplingManager_;
453 DUNE_THROW(Dune::InvalidStateException,
454 "Accessing coupling manager of an uncoupled problem is not possible."
460 Implementation& asImp_()
461 {
return *
static_cast<Implementation *
>(
this); }
464 const Implementation& asImp_()
const
465 {
return *
static_cast<const Implementation *
>(
this); }
467 GravityVector gravity_;
468 bool enableInertiaTerms_;
469 std::shared_ptr<CouplingManager> couplingManager_;
475template<
class TypeTag,
class DM>
483 using GridView =
typename GridGeometry::GridView;
484 using Element =
typename GridView::template Codim<0>::Entity;
487 using GridVolumeVariables =
typename GridVariables::GridVolumeVariables;
488 using ElementVolumeVariables =
typename GridVolumeVariables::LocalView;
491 using FVElementGeometry =
typename GridGeometry::LocalView;
492 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
493 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
496 static constexpr int dim = GridView::dimension;
497 static constexpr int dimWorld = GridView::dimensionworld;
499 using GlobalPosition =
typename SubControlVolumeFace::GlobalPosition;
500 using VelocityVector = Dune::FieldVector<Scalar, dimWorld>;
501 using GravityVector = Dune::FieldVector<Scalar, dimWorld>;
510 using Sources = Dune::FieldVector<Scalar, dimWorld>;
527 std::shared_ptr<CouplingManager> couplingManager,
531 , couplingManager_(couplingManager)
534 gravity_[dim-1] = -9.81;
567 template<
class ElementVolumeVariables>
569 const FVElementGeometry& fvGeometry,
570 const ElementVolumeVariables& elemVolVars,
571 const SubControlVolume &scv)
const
574 return asImp_().sourceAtPos(scv.center());
604 const SubControlVolume& scv)
const
607 return asImp_().boundaryTypesAtPos(scv.dofPosition());
618 const SubControlVolumeFace& scvf)
const
620 DUNE_THROW(Dune::InvalidStateException,
"boundaryTypes(..., scvf) called for a CVFE method.");
633 return asImp_().dirichletAtPos(scv.dofPosition());
646 DUNE_THROW(Dune::InvalidStateException,
"dirichlet(scvf) called for CVFE method.");
662 {
return enableInertiaTerms_; }
678 const FVElementGeometry& fvGeometry,
679 const SubControlVolumeFace& scvf)
const
681 if constexpr (std::is_empty_v<CouplingManager>)
682 return asImp_().pressureAtPos(scvf.ipGlobal());
684 return couplingManager_->pressure(element, fvGeometry, scvf);
692 const FVElementGeometry& fvGeometry,
693 const SubControlVolume& scv,
694 const bool isPreviousTimeStep =
false)
const
696 if constexpr (std::is_empty_v<CouplingManager>)
697 return asImp_().pressureAtPos(scv.dofPosition());
699 return couplingManager_->pressure(element, fvGeometry, scv, isPreviousTimeStep);
706 template<
class IpData>
708 const FVElementGeometry& fvGeometry,
709 const IpData& ipData,
710 const bool isPreviousTimeStep =
false)
const
712 if constexpr (std::is_empty_v<CouplingManager>)
713 return asImp_().pressureAtPos(ipData.global());
715 return couplingManager_->pressure(element, fvGeometry, ipData, isPreviousTimeStep);
723 DUNE_THROW(Dune::NotImplemented,
"pressureAtPos not implemented");
731 const FVElementGeometry& fvGeometry,
732 const SubControlVolumeFace& scvf)
const
734 if constexpr (std::is_empty_v<CouplingManager>)
735 return asImp_().densityAtPos(scvf.ipGlobal());
737 return couplingManager_->density(element, fvGeometry, scvf);
745 const FVElementGeometry& fvGeometry,
746 const SubControlVolume& scv,
747 const bool isPreviousTimeStep =
false)
const
749 if constexpr (std::is_empty_v<CouplingManager>)
750 return asImp_().densityAtPos(scv.dofPosition());
752 return couplingManager_->density(element, fvGeometry, scv, isPreviousTimeStep);
759 template<
class IpData>
761 const FVElementGeometry& fvGeometry,
762 const IpData& ipData,
763 const bool isPreviousTimeStep =
false)
const
765 if constexpr (std::is_empty_v<CouplingManager>)
766 return asImp_().densityAtPos(ipData.global());
768 return couplingManager_->density(element, fvGeometry, ipData, isPreviousTimeStep);
776 DUNE_THROW(Dune::NotImplemented,
"densityAtPos not implemented");
784 const FVElementGeometry& fvGeometry,
785 const SubControlVolumeFace& scvf)
const
787 if constexpr (std::is_empty_v<CouplingManager>)
788 return asImp_().effectiveViscosityAtPos(scvf.ipGlobal());
790 return couplingManager_->effectiveViscosity(element, fvGeometry, scvf);
798 const FVElementGeometry& fvGeometry,
799 const SubControlVolume& scv,
800 const bool isPreviousTimeStep =
false)
const
802 if constexpr (std::is_empty_v<CouplingManager>)
803 return asImp_().effectiveViscosityAtPos(scv.dofPosition());
805 return couplingManager_->effectiveViscosity(element, fvGeometry, scv, isPreviousTimeStep);
812 template<
class IpData>
814 const FVElementGeometry& fvGeometry,
815 const IpData& ipData,
816 const bool isPreviousTimeStep =
false)
const
818 if constexpr (std::is_empty_v<CouplingManager>)
819 return asImp_().effectiveViscosityAtPos(ipData.global());
821 return couplingManager_->effectiveViscosity(element, fvGeometry, ipData, isPreviousTimeStep);
829 DUNE_THROW(Dune::NotImplemented,
"effectiveViscosityAtPos not implemented");
836 template<
class SolutionVector>
841 std::vector<bool> dofHandled(this->
gridGeometry().numDofs(),
false);
843 for (
const auto& element : elements(this->
gridGeometry().gridView()))
845 fvGeometry.bindElement(element);
846 for (
const auto& scv :
scvs(fvGeometry))
848 const auto dofIdx = scv.dofIndex();
849 if (!dofHandled[dofIdx])
851 dofHandled[dofIdx] =
true;
852 sol[dofIdx] = asImp_().initial(scv);
864 return asImp_().initialAtPos(scv.dofPosition());
869 Implementation &asImp_()
870 {
return *
static_cast<Implementation *
>(
this); }
873 const Implementation &asImp_()
const
874 {
return *
static_cast<const Implementation *
>(
this); }
876 GravityVector gravity_;
877 bool enableInertiaTerms_;
878 std::shared_ptr<CouplingManager> couplingManager_ = {};
885template<
class TypeTag>
893 using GridView =
typename GridGeometry::GridView;
894 using Element =
typename GridView::template Codim<0>::Entity;
897 using GridVariablesCache = Concept::GridVariablesCache_t<GridVariables>;
898 using ElementVariables =
typename GridVariablesCache::LocalView;
901 using FVElementGeometry =
typename GridGeometry::LocalView;
902 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
903 using LocalPosition =
typename Element::Geometry::LocalCoordinate;
905 static constexpr int dim = GridView::dimension;
906 static constexpr int dimWorld = GridView::dimensionworld;
908 using GravityVector = Dune::FieldVector<Scalar, dimWorld>;
914 using Sources = Dune::FieldVector<Scalar, ModelTraits::numEq()>;
919 using BoundaryTypes =
typename Dumux::Experimental::BoundaryTypes<ModelTraits::numEq()>;
931 std::shared_ptr<CouplingManager> couplingManager,
935 , couplingManager_(couplingManager)
938 gravity_[dim-1] = -9.81;
966 {
return enableInertiaTerms_; }
981 template<
class IpData>
983 const FVElementGeometry& fvGeometry,
984 const IpData& ipData,
985 const bool isPreviousTimeStep =
false)
const
987 if constexpr (std::is_empty_v<CouplingManager>)
988 return asImp_().pressureAtPos(ipData.global());
990 return couplingManager_->pressure(element, fvGeometry, ipData, isPreviousTimeStep);
998 DUNE_THROW(Dune::NotImplemented,
"pressureAtPos not implemented");
1005 template<
class IpData>
1007 const FVElementGeometry& fvGeometry,
1008 const IpData& ipData,
1009 const bool isPreviousTimeStep =
false)
const
1011 if constexpr (std::is_empty_v<CouplingManager>)
1012 return asImp_().densityAtPos(ipData.global());
1014 return couplingManager_->density(element, fvGeometry, ipData, isPreviousTimeStep);
1022 DUNE_THROW(Dune::NotImplemented,
"densityAtPos not implemented");
1029 template<
class IpData>
1031 const FVElementGeometry& fvGeometry,
1032 const IpData& ipData,
1033 const bool isPreviousTimeStep =
false)
const
1035 if constexpr (std::is_empty_v<CouplingManager>)
1036 return asImp_().effectiveViscosityAtPos(ipData.global());
1038 return couplingManager_->effectiveViscosity(element, fvGeometry, ipData, isPreviousTimeStep);
1046 DUNE_THROW(Dune::NotImplemented,
"effectiveViscosityAtPos not implemented");
1052 {
return *
static_cast<Implementation *
>(
this); }
1055 const Implementation &
asImp_()
const
1056 {
return *
static_cast<const Implementation *
>(
this); }
1058 GravityVector gravity_;
1059 bool enableInertiaTerms_;
1060 std::shared_ptr<CouplingManager> couplingManager_ = {};
1069template<
class TypeTag>
typename Dumux::Experimental::BoundaryTypes< ModelTraits::numEq()> BoundaryTypes
Export the boundary types.
Definition freeflow/navierstokes/momentum/problem.hh:919
Scalar densityAtPos(const GlobalPosition &) const
Returns the density at a given position.
Definition freeflow/navierstokes/momentum/problem.hh:1020
CVFENavierStokesMomentumProblem(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< CouplingManager > couplingManager, const std::string ¶mGroup="")
The constructor.
Definition freeflow/navierstokes/momentum/problem.hh:930
Dune::FieldVector< Scalar, ModelTraits::numEq()> BoundaryFluxes
Definition freeflow/navierstokes/momentum/problem.hh:916
bool enableInertiaTerms() const
Returns whether inertia terms should be considered.
Definition freeflow/navierstokes/momentum/problem.hh:965
Scalar effectiveViscosity(const Element &element, const FVElementGeometry &fvGeometry, const IpData &ipData, const bool isPreviousTimeStep=false) const
Returns the effective dynamic viscosity at a given position.
Definition freeflow/navierstokes/momentum/problem.hh:1030
Scalar pressureAtPos(const GlobalPosition &) const
Returns the pressure at a given position.
Definition freeflow/navierstokes/momentum/problem.hh:996
Scalar referencePressure() const
Returns a reference pressure This pressure is subtracted from the actual pressure for the momentum ba...
Definition freeflow/navierstokes/momentum/problem.hh:974
Scalar pressure(const Element &element, const FVElementGeometry &fvGeometry, const IpData &ipData, const bool isPreviousTimeStep=false) const
Returns the pressure at given interpolation point data.
Definition freeflow/navierstokes/momentum/problem.hh:982
CVFENavierStokesMomentumProblem(std::shared_ptr< const GridGeometry > gridGeometry, const std::string ¶mGroup="")
The constructor for usage without a coupling manager.
Definition freeflow/navierstokes/momentum/problem.hh:948
Scalar density(const Element &element, const FVElementGeometry &fvGeometry, const IpData &ipData, const bool isPreviousTimeStep=false) const
Returns the density at given interpolation point data.
Definition freeflow/navierstokes/momentum/problem.hh:1006
Dune::FieldVector< Scalar, ModelTraits::numEq()> InitialValues
Definition freeflow/navierstokes/momentum/problem.hh:913
Dune::FieldVector< Scalar, ModelTraits::numEq()> Sources
Definition freeflow/navierstokes/momentum/problem.hh:914
static constexpr bool isMomentumProblem()
This problem is used for the momentum balance model.
Definition freeflow/navierstokes/momentum/problem.hh:922
const GravityVector & gravity() const
Returns the acceleration due to gravity.
Definition freeflow/navierstokes/momentum/problem.hh:959
Scalar effectiveViscosityAtPos(const GlobalPosition &) const
Returns the effective dynamic viscosity at a given position.
Definition freeflow/navierstokes/momentum/problem.hh:1044
Dune::FieldVector< Scalar, dimWorld > DirichletValues
Definition freeflow/navierstokes/momentum/problem.hh:915
const std::string & paramGroup() const
The parameter group in which to retrieve runtime parameters.
Definition common/problem.hh:304
Implementation & asImp_()
Returns the implementation of the problem (i.e. static polymorphism).
Definition common/problem.hh:309
const GridDiscretization & gridGeometry() const
The grid discretization.
Definition common/problem.hh:296
Base class for all problems using spatial parameters.
Definition problemwithspatialparams.hh:29
const std::string & paramGroup() const
The parameter group in which to retrieve runtime parameters.
Definition common/fvproblem.hh:524
const PointSourceMap & pointSourceMap() const
Get the point source map. It stores the point sources per scv.
Definition common/fvproblem.hh:481
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition common/fvproblem.hh:520
FVProblemWithSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry, const std::string ¶mGroup="")
Constructor.
Definition fvproblemwithspatialparams.hh:42
Class to specify the type of a boundary condition for the Navier-Stokes model.
Definition freeflow/navierstokes/momentum/boundarytypes.hh:25
Scalar effectiveViscosity(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf) const
Returns the effective dynamic viscosity at a given sub control volume face.
Definition freeflow/navierstokes/momentum/problem.hh:783
Scalar density(const Element &element, const FVElementGeometry &fvGeometry, const IpData &ipData, const bool isPreviousTimeStep=false) const
Returns the density at a given position.
Definition freeflow/navierstokes/momentum/problem.hh:760
Dune::FieldVector< Scalar, dimWorld > Sources
Definition freeflow/navierstokes/momentum/problem.hh:510
NavierStokesMomentumProblemImpl(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< CouplingManager > couplingManager, const std::string ¶mGroup="")
The constructor.
Definition freeflow/navierstokes/momentum/problem.hh:526
Scalar pressure(const Element &element, const FVElementGeometry &fvGeometry, const IpData &ipData, const bool isPreviousTimeStep=false) const
Returns the pressure at a given position.
Definition freeflow/navierstokes/momentum/problem.hh:707
void applyInitialSolution(SolutionVector &sol) const
Applies the initial solution for all degrees of freedom of the grid.
Definition freeflow/navierstokes/momentum/problem.hh:837
Scalar pressureAtPos(const GlobalPosition &) const
Returns the pressure at a given position.
Definition freeflow/navierstokes/momentum/problem.hh:721
Scalar effectiveViscosity(const Element &element, const FVElementGeometry &fvGeometry, const IpData &ipData, const bool isPreviousTimeStep=false) const
Returns the effective dynamic viscosity at a given position.
Definition freeflow/navierstokes/momentum/problem.hh:813
Scalar pressure(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolume &scv, const bool isPreviousTimeStep=false) const
Returns the pressure at a given sub control volume.
Definition freeflow/navierstokes/momentum/problem.hh:691
static constexpr bool isMomentumProblem()
This problem is used for the momentum balance model.
Definition freeflow/navierstokes/momentum/problem.hh:518
Scalar densityAtPos(const GlobalPosition &) const
Returns the density at a given position.
Definition freeflow/navierstokes/momentum/problem.hh:774
InitialValues initial(const SubControlVolume &scv) const
Evaluate the initial value at an sub control volume.
Definition freeflow/navierstokes/momentum/problem.hh:861
Sources sourceAtPos(const GlobalPosition &globalPos) const
Evaluate the source term for all phases at a given position.
Definition freeflow/navierstokes/momentum/problem.hh:589
Sources source(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolume &scv) const
Evaluate the source term for all phases within a given sub-control-volume.
Definition freeflow/navierstokes/momentum/problem.hh:568
Scalar effectiveViscosityAtPos(const GlobalPosition &) const
Returns the effective dynamic viscosity at a given position.
Definition freeflow/navierstokes/momentum/problem.hh:827
Dune::FieldVector< Scalar, dimWorld > InitialValues
Definition freeflow/navierstokes/momentum/problem.hh:509
BoundaryTypes boundaryTypes(const Element &element, const SubControlVolumeFace &scvf) const
Specifies which kind of boundary condition should be used for which equation on a given boundary segm...
Definition freeflow/navierstokes/momentum/problem.hh:617
const GravityVector & gravity() const
Returns the acceleration due to gravity.
Definition freeflow/navierstokes/momentum/problem.hh:655
Scalar density(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf) const
Returns the density at a given sub control volume face.
Definition freeflow/navierstokes/momentum/problem.hh:730
Dune::FieldVector< Scalar, dimWorld > DirichletValues
Definition freeflow/navierstokes/momentum/problem.hh:511
DirichletValues dirichlet(const Element &element, const SubControlVolume &scv) const
Evaluate the boundary conditions for a Dirichlet control volume.
Definition freeflow/navierstokes/momentum/problem.hh:630
NavierStokesMomentumBoundaryTypes< ModelTraits::dim()> BoundaryTypes
Export the boundary types.
Definition freeflow/navierstokes/momentum/problem.hh:515
bool enableInertiaTerms() const
Returns whether inertia terms should be considered.
Definition freeflow/navierstokes/momentum/problem.hh:661
NavierStokesMomentumProblemImpl(std::shared_ptr< const GridGeometry > gridGeometry, const std::string ¶mGroup="")
The constructor for usage without a coupling manager.
Definition freeflow/navierstokes/momentum/problem.hh:544
BoundaryTypes boundaryTypes(const Element &element, const SubControlVolume &scv) const
Specifies which kind of boundary condition should be used for which equation on a given boundary segm...
Definition freeflow/navierstokes/momentum/problem.hh:603
Scalar density(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolume &scv, const bool isPreviousTimeStep=false) const
Returns the density at a given sub control volume.
Definition freeflow/navierstokes/momentum/problem.hh:744
Dune::FieldVector< Scalar, dimWorld > BoundaryFluxes
Definition freeflow/navierstokes/momentum/problem.hh:512
Scalar referencePressure() const
Returns a reference pressure This pressure is subtracted from the actual pressure for the momentum ba...
Definition freeflow/navierstokes/momentum/problem.hh:670
Scalar effectiveViscosity(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolume &scv, const bool isPreviousTimeStep=false) const
Returns the effective dynamic viscosity at a given sub control volume.
Definition freeflow/navierstokes/momentum/problem.hh:797
Scalar pressure(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf) const
Returns the pressure at a given sub control volume face.
Definition freeflow/navierstokes/momentum/problem.hh:677
DirichletValues dirichlet(const Element &element, const SubControlVolumeFace &scvf) const
Evaluate the boundary conditions for a Dirichlet control volume face.
Definition freeflow/navierstokes/momentum/problem.hh:643
Sources source(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolume &scv) const
Evaluate the source term for all phases within a given sub-control-volume.
Definition freeflow/navierstokes/momentum/problem.hh:132
NavierStokesMomentumProblemImpl(std::shared_ptr< const GridGeometry > gridGeometry, const std::string ¶mGroup="")
The constructor for usage without a coupling manager.
Definition freeflow/navierstokes/momentum/problem.hh:109
Scalar pressure(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf) const
Returns the pressure at a given sub control volume face.
Definition freeflow/navierstokes/momentum/problem.hh:249
auto boundaryTypes(const Element &element, const SubControlVolumeFace &scvf) const
Specifies which kind of boundary condition should be used for which equation on a given boundary segm...
Definition freeflow/navierstokes/momentum/problem.hh:185
Scalar pseudo3DWallFriction(const Scalar velocity, const Scalar viscosity, const Scalar height, const Scalar factor=8.0) const
An additional drag term can be included as source term for the momentum balance to mimic 3D flow beha...
Definition freeflow/navierstokes/momentum/problem.hh:424
Scalar effectiveViscosity(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf) const
Returns the effective dynamic viscosity at a given sub control volume face.
Definition freeflow/navierstokes/momentum/problem.hh:332
bool enableInertiaTerms() const
Returns whether inertia terms should be considered.
Definition freeflow/navierstokes/momentum/problem.hh:242
NavierStokesMomentumProblemImpl(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< CouplingManager > couplingManager, const std::string ¶mGroup="")
The constructor.
Definition freeflow/navierstokes/momentum/problem.hh:91
Scalar pseudo3DWallFriction(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolume &scv, const Scalar height, const Scalar factor=8.0) const
Convenience function for staggered grid implementation.
Definition freeflow/navierstokes/momentum/problem.hh:398
auto insideAndOutsideDensity(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf, const bool isPreviousTimeStep=false) const
Definition freeflow/navierstokes/momentum/problem.hh:306
Scalar effectiveViscosityAtPos(const GlobalPosition &) const
Returns the effective dynamic viscosity at a given position.
Definition freeflow/navierstokes/momentum/problem.hh:359
const CouplingManager & couplingManager() const
Definition freeflow/navierstokes/momentum/problem.hh:448
Dune::FieldVector< Scalar, dimWorld > MomentumFluxType
Definition freeflow/navierstokes/momentum/problem.hh:77
static constexpr bool isMomentumProblem()
This problem is used for the momentum balance model.
Definition freeflow/navierstokes/momentum/problem.hh:83
NavierStokesMomentumBoundaryTypes< ModelTraits::dim()> BoundaryTypes
Export the boundary types.
Definition freeflow/navierstokes/momentum/problem.hh:80
Scalar referencePressure(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf) const
Returns a reference pressure at a given sub control volume face. This pressure is subtracted from the...
Definition freeflow/navierstokes/momentum/problem.hh:273
void applyInitialSolution(SolutionVector &sol) const
Applies the initial solution for all degrees of freedom of the grid.
Definition freeflow/navierstokes/momentum/problem.hh:369
Scalar density(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf) const
Returns the density at a given sub control volume face.
Definition freeflow/navierstokes/momentum/problem.hh:282
const GravityVector & gravity() const
A default, i.e. if the user's does not overload any neumann method.
Definition freeflow/navierstokes/momentum/problem.hh:236
bool onSlipBoundary(const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf) const
Returns true if the scvf is located on a boundary with a slip condition.
Definition freeflow/navierstokes/momentum/problem.hh:438
Dune::FieldVector< Scalar, dimWorld > InitialValues
Definition freeflow/navierstokes/momentum/problem.hh:72
Scalar density(const Element &element, const SubControlVolume &scv, const bool isPreviousTimeStep=false) const
Returns the density at a given sub control volume.
Definition freeflow/navierstokes/momentum/problem.hh:296
BoundaryFluxes neumannAtPos(const GlobalPosition &globalPos) const
Returns the neumann flux at a given position.
Definition freeflow/navierstokes/momentum/problem.hh:227
InitialValues initial(const SubControlVolume &scv) const
Evaluate the initial value at a sub control volume.
Definition freeflow/navierstokes/momentum/problem.hh:392
Sources scvPointSources(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolume &scv) const
Adds contribution of point sources for a specific sub control volume to the values....
Definition freeflow/navierstokes/momentum/problem.hh:167
Scalar effectiveViscosity(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolume &scv) const
Returns the effective dynamic viscosity at a given sub control volume.
Definition freeflow/navierstokes/momentum/problem.hh:346
Scalar densityAtPos(const GlobalPosition &) const
Returns the density at a given position.
Definition freeflow/navierstokes/momentum/problem.hh:323
Dune::FieldVector< Scalar, dimWorld > BoundaryFluxes
Definition freeflow/navierstokes/momentum/problem.hh:75
DirichletValues dirichlet(const Element &element, const SubControlVolumeFace &scvf) const
Evaluate the boundary conditions for a dirichlet control volume face.
Definition freeflow/navierstokes/momentum/problem.hh:202
Dune::FieldVector< Scalar, dimWorld > DirichletValues
Definition freeflow/navierstokes/momentum/problem.hh:74
Dune::FieldVector< Scalar, dimWorld > Sources
Definition freeflow/navierstokes/momentum/problem.hh:73
BoundaryFluxes neumann(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const ElementFluxVariablesCache &elemFluxVarsCache, const SubControlVolumeFace &scvf) const
Evaluates the boundary conditions for a Neumann control volume.
Definition freeflow/navierstokes/momentum/problem.hh:217
bool onSlipBoundaryAtPos(const GlobalPosition &pos) const
Returns true if the scvf is located on a boundary with a slip condition.
Definition freeflow/navierstokes/momentum/problem.hh:445
Scalar pressureAtPos(const GlobalPosition &) const
Returns the pressure at a given position.
Definition freeflow/navierstokes/momentum/problem.hh:262
Sources sourceAtPos(const GlobalPosition &globalPos) const
Evaluate the source term for all phases within a given sub-control-volume.
Definition freeflow/navierstokes/momentum/problem.hh:154
Definition freeflow/navierstokes/momentum/problem.hh:31
Defines all properties used in Dumux.
Class to specify the type of a boundary condition for the Navier-Stokes model.
Base class for all finite volume problems that are parameterized.
GridCache::LocalView localView(const GridCache &gridCache)
Free function to get the local view of a grid cache object.
Definition localview.hh:26
NavierStokesMomentumProblemImpl< TypeTag, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod > NavierStokesMomentumProblem
Navier-Stokes momentum problem class.
Definition freeflow/navierstokes/momentum/problem.hh:1070
T getParamFromGroup(Args &&... args)
A free function to get a parameter from the parameter tree singleton with a model group.
Definition parameters.hh:149
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition propertysystem.hh:296
The available discretization methods in Dumux.
Definition interpolate.hh:27
std::ranges::range auto scvs(const FVElementGeometry &fvGeometry, const LocalDof &localDof)
Definition localdof.hh:82
A helper to deduce a vector with the same size as numbers of equations.
Base class for all problems using spatial parameters.
Quadrature rules over sub-control volumes and sub-control volume faces.