24#ifndef DUMUX_NAVIERSTOKES_MOMENTUM_PROBLEM_HH
25#define DUMUX_NAVIERSTOKES_MOMENTUM_PROBLEM_HH
27#include <dune/common/exceptions.hh>
28#include <dune/common/typetraits.hh>
37template<
class TypeTag,
class DiscretizationMethod>
40template<
class TypeTag>
48 using GridView =
typename GridGeometry::GridView;
49 using Element =
typename GridView::template Codim<0>::Entity;
52 using GridVolumeVariables =
typename GridVariables::GridVolumeVariables;
53 using ElementVolumeVariables =
typename GridVolumeVariables::LocalView;
56 using FVElementGeometry =
typename GridGeometry::LocalView;
57 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
58 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
62 dim = GridView::dimension,
63 dimWorld = GridView::dimensionworld
66 using GlobalPosition =
typename SubControlVolumeFace::GlobalPosition;
67 using VelocityVector = Dune::FieldVector<Scalar, dimWorld>;
68 using GravityVector = Dune::FieldVector<Scalar, dimWorld>;
72 static constexpr bool isCoupled_ = !std::is_empty_v<CouplingManager>;
80 using Sources = Dune::FieldVector<Scalar, dimWorld>;
99 std::shared_ptr<CouplingManager> couplingManager,
100 const std::string& paramGroup =
"")
103 , couplingManager_(couplingManager)
105 if (getParamFromGroup<bool>(paramGroup,
"Problem.EnableGravity"))
106 gravity_[dim-1] = -9.81;
108 enableInertiaTerms_ = getParamFromGroup<bool>(paramGroup,
"Problem.EnableInertiaTerms");
117 const std::string& paramGroup =
"")
140 const FVElementGeometry& fvGeometry,
141 const ElementVolumeVariables& elemVolVars,
142 const SubControlVolume& scv)
const
145 return asImp_().sourceAtPos(scv.dofPosition());
176 const SubControlVolumeFace& scvf)
const
181 return asImp_().boundaryTypesAtPos(scvf.center());
194 return asImp_().dirichletAtPos(scvf.ipGlobal());
206 template<
class ElementFluxVariablesCache>
208 const FVElementGeometry& fvGeometry,
209 const ElementVolumeVariables& elemVolVars,
210 const ElementFluxVariablesCache& elemFluxVarsCache,
211 const SubControlVolumeFace& scvf)
const
212 {
return asImp_().neumannAtPos(scvf.ipGlobal()); }
233 {
return enableInertiaTerms_; }
240 const FVElementGeometry& fvGeometry,
241 const SubControlVolumeFace& scvf)
const
243 if constexpr (isCoupled_)
244 return couplingManager_->pressure(element, fvGeometry, scvf);
246 return asImp_().pressureAtPos(scvf.ipGlobal());
254 DUNE_THROW(Dune::NotImplemented,
"pressureAtPos not implemented");
264 const FVElementGeometry& fvGeometry,
265 const SubControlVolumeFace& scvf)
const
273 const FVElementGeometry& fvGeometry,
274 const SubControlVolumeFace& scvf)
const
276 if constexpr (isCoupled_)
277 return couplingManager_->density(element, fvGeometry, scvf);
279 return asImp_().densityAtPos(scvf.ipGlobal());
287 const SubControlVolume& scv,
288 const bool isPreviousTimeStep =
false)
const
290 if constexpr (isCoupled_)
291 return couplingManager_->density(element, scv, isPreviousTimeStep);
293 return asImp_().densityAtPos(scv.dofPosition());
297 const FVElementGeometry& fvGeometry,
298 const SubControlVolumeFace& scvf,
299 const bool isPreviousTimeStep =
false)
const
301 if constexpr (isCoupled_)
302 return couplingManager_->insideAndOutsideDensity(element, fvGeometry, scvf, isPreviousTimeStep);
305 const auto rho = asImp_().densityAtPos(scvf.ipGlobal());
306 return std::make_pair(rho, rho);
315 DUNE_THROW(Dune::NotImplemented,
"densityAtPos not implemented");
323 const FVElementGeometry& fvGeometry,
324 const SubControlVolumeFace& scvf)
const
326 if constexpr (isCoupled_)
327 return couplingManager_->effectiveViscosity(element, fvGeometry, scvf);
329 return asImp_().effectiveViscosityAtPos(scvf.ipGlobal());
337 DUNE_THROW(Dune::NotImplemented,
"effectiveViscosityAtPos not implemented");
344 template<
class SolutionVector>
347 sol.resize(this->gridGeometry().numDofs());
348 std::vector<bool> dofHandled(this->gridGeometry().numDofs(),
false);
349 auto fvGeometry =
localView(this->gridGeometry());
350 for (
const auto& element : elements(this->gridGeometry().gridView()))
352 fvGeometry.bindElement(element);
353 for (
const auto& scv : scvs(fvGeometry))
355 const auto dofIdx = scv.dofIndex();
356 if (!dofHandled[dofIdx])
358 dofHandled[dofIdx] =
true;
359 sol[dofIdx] = asImp_().initial(scv)[scv.dofAxis()];
370 return asImp_().initialAtPos(scv.dofPosition());
375 const FVElementGeometry& fvGeometry,
376 const ElementVolumeVariables& elemVolVars,
377 const SubControlVolume& scv,
379 const Scalar factor = 8.0)
const
381 const Scalar velocity = elemVolVars[scv].velocity();
382 const auto scvf = scvfs(fvGeometry, scv).begin();
383 const Scalar
viscosity = effectiveViscosity(element, fvGeometry, *scvf);
384 return pseudo3DWallFriction(velocity,
viscosity, height, factor);
403 const Scalar factor = 8.0)
const
405 static_assert(dim == 2,
"Pseudo 3D wall friction may only be used in 2D");
406 return -factor * velocity *
viscosity / (height*height);
414 bool onSlipBoundary(
const FVElementGeometry& fvGeometry,
const SubControlVolumeFace& scvf)
const
415 {
return asImp_().onSlipBoundaryAtPos(scvf.center()); }
428 Scalar
permeability(
const FVElementGeometry& fvGeometry,
const SubControlVolumeFace& scvf)
const
430 DUNE_THROW(Dune::NotImplemented,
431 "When using the Beavers-Joseph-Saffman boundary condition, "
432 "the permeability must be returned in the actual problem"
440 Scalar
alphaBJ(
const FVElementGeometry& fvGeometry,
const SubControlVolumeFace& scvf)
const
442 DUNE_THROW(Dune::NotImplemented,
443 "When using the Beavers-Joseph-Saffman boundary condition, "
444 "the alpha value must be returned in the actual problem"
451 Scalar
betaBJ(
const FVElementGeometry& fvGeometry,
const SubControlVolumeFace& scvf,
const GlobalPosition& tangentialVector)
const
453 const Scalar interfacePermeability = interfacePermeability_(fvGeometry, scvf, tangentialVector);
455 return asImp_().alphaBJ(fvGeometry, scvf) / sqrt(interfacePermeability);
461 VelocityVector
porousMediumVelocity(
const FVElementGeometry& fvGeometry,
const SubControlVolumeFace& scvf)
const
463 return VelocityVector(0.0);
471 const SubControlVolumeFace& scvf,
472 const ElementVolumeVariables& elemVolVars,
473 Scalar tangentialVelocityGradient)
const
475 assert(scvf.isLateral());
476 assert(scvf.boundary());
478 const auto& scv = fvGeometry.scv(scvf.insideScvIdx());
481 GlobalPosition orientation(0.0);
482 orientation[scv.dofAxis()] = 1.0;
486 const Scalar betaBJ = asImp_().betaBJ(fvGeometry, scvf, orientation);
487 const Scalar distanceNormalToBoundary = (scvf.ipGlobal() - scv.dofPosition()).two_norm();
489 static const bool onlyNormalGradient = getParamFromGroup<bool>(this->paramGroup(),
"FreeFlow.EnableUnsymmetrizedVelocityGradientForBeaversJoseph",
false);
490 if (onlyNormalGradient)
491 tangentialVelocityGradient = 0.0;
493 const Scalar scalarSlipVelocity = (tangentialVelocityGradient*distanceNormalToBoundary
494 + asImp_().porousMediumVelocity(fvGeometry, scvf) * orientation * betaBJ * distanceNormalToBoundary
495 + elemVolVars[scv].velocity()) / (betaBJ*distanceNormalToBoundary + 1.0);
497 orientation *= scalarSlipVelocity;
503 if constexpr (isCoupled_)
504 return *couplingManager_;
506 DUNE_THROW(Dune::InvalidStateException,
507 "Accessing coupling manager of an uncoupled problem is not possible."
514 Scalar interfacePermeability_(
const FVElementGeometry& fvGeometry,
const Scvf& scvf,
const GlobalPosition& tangentialVector)
const
516 const auto& K = asImp_().permeability(fvGeometry, scvf);
519 if constexpr (Dune::IsNumber<std::decay_t<
decltype(K)>>::value)
522 return vtmv(tangentialVector, K, tangentialVector);
526 Implementation& asImp_()
527 {
return *
static_cast<Implementation *
>(
this); }
530 const Implementation& asImp_()
const
531 {
return *
static_cast<const Implementation *
>(
this); }
533 GravityVector gravity_;
534 bool enableInertiaTerms_;
535 std::shared_ptr<CouplingManager> couplingManager_;
541template<
class TypeTag,
class DM>
549 using GridView =
typename GridGeometry::GridView;
550 using Element =
typename GridView::template Codim<0>::Entity;
553 using GridVolumeVariables =
typename GridVariables::GridVolumeVariables;
554 using ElementVolumeVariables =
typename GridVolumeVariables::LocalView;
557 using FVElementGeometry =
typename GridGeometry::LocalView;
558 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
559 using SubControlVolumeFace =
typename FVElementGeometry::SubControlVolumeFace;
562 static constexpr int dim = GridView::dimension;
563 static constexpr int dimWorld = GridView::dimensionworld;
565 using GlobalPosition =
typename SubControlVolumeFace::GlobalPosition;
566 using VelocityVector = Dune::FieldVector<Scalar, dimWorld>;
567 using GravityVector = Dune::FieldVector<Scalar, dimWorld>;
571 static constexpr bool isVertexCentered
580 using Sources = Dune::FieldVector<Scalar, dimWorld>;
597 std::shared_ptr<CouplingManager> couplingManager,
598 const std::string& paramGroup =
"")
601 , couplingManager_(couplingManager)
603 if (getParamFromGroup<bool>(paramGroup,
"Problem.EnableGravity"))
604 gravity_[dim-1] = -9.81;
606 enableInertiaTerms_ = getParamFromGroup<bool>(paramGroup,
"Problem.EnableInertiaTerms");
615 const std::string& paramGroup =
"")
637 template<
class ElementVolumeVariables>
639 const FVElementGeometry& fvGeometry,
640 const ElementVolumeVariables& elemVolVars,
641 const SubControlVolume &scv)
const
644 return asImp_().sourceAtPos(scv.center());
675 const SubControlVolume& scv)
const
677 if (!isVertexCentered)
678 DUNE_THROW(Dune::InvalidStateException,
679 "boundaryTypes(..., scv) called for for a non vertex-centered method.");
682 return asImp_().boundaryTypesAtPos(scv.dofPosition());
693 const SubControlVolumeFace& scvf)
const
695 if (isVertexCentered)
696 DUNE_THROW(Dune::InvalidStateException,
697 "boundaryTypes(..., scvf) called for a vertex-centered method.");
700 return asImp_().boundaryTypesAtPos(scvf.ipGlobal());
713 if (!isVertexCentered)
714 DUNE_THROW(Dune::InvalidStateException,
"dirichlet(scv) called for a non vertex-centered method.");
716 return asImp_().dirichletAtPos(scv.dofPosition());
729 if (isVertexCentered)
730 DUNE_THROW(Dune::InvalidStateException,
"dirichlet(scvf) called for vertex-centered method.");
732 return asImp_().dirichletAtPos(scvf.ipGlobal());
748 {
return enableInertiaTerms_; }
764 const FVElementGeometry& fvGeometry,
765 const SubControlVolumeFace& scvf)
const
767 if constexpr (std::is_empty_v<CouplingManager>)
768 return asImp_().pressureAtPos(scvf.ipGlobal());
770 return couplingManager_->pressure(element, fvGeometry, scvf);
778 const FVElementGeometry& fvGeometry,
779 const SubControlVolume& scv,
780 const bool isPreviousTimeStep =
false)
const
782 if constexpr (std::is_empty_v<CouplingManager>)
783 return asImp_().pressureAtPos(scv.dofPosition());
785 return couplingManager_->pressure(element, fvGeometry, scv, isPreviousTimeStep);
793 DUNE_THROW(Dune::NotImplemented,
"pressureAtPos not implemented");
801 const FVElementGeometry& fvGeometry,
802 const SubControlVolumeFace& scvf)
const
804 if constexpr (std::is_empty_v<CouplingManager>)
805 return asImp_().densityAtPos(scvf.ipGlobal());
807 return couplingManager_->density(element, fvGeometry, scvf);
815 const FVElementGeometry& fvGeometry,
816 const SubControlVolume& scv,
817 const bool isPreviousTimeStep =
false)
const
819 if constexpr (std::is_empty_v<CouplingManager>)
820 return asImp_().densityAtPos(scv.dofPosition());
822 return couplingManager_->density(element, fvGeometry, scv, isPreviousTimeStep);
831 DUNE_THROW(Dune::NotImplemented,
"densityAtPos not implemented");
839 const FVElementGeometry& fvGeometry,
840 const SubControlVolumeFace& scvf)
const
842 if constexpr (std::is_empty_v<CouplingManager>)
843 return asImp_().effectiveViscosityAtPos(scvf.ipGlobal());
845 return couplingManager_->effectiveViscosity(element, fvGeometry, scvf);
853 const FVElementGeometry& fvGeometry,
854 const SubControlVolume& scv)
const
856 if constexpr (std::is_empty_v<CouplingManager>)
857 return asImp_().effectiveViscosityAtPos(scv.dofPosition());
859 return couplingManager_->effectiveViscosity(element, fvGeometry, scv);
867 DUNE_THROW(Dune::NotImplemented,
"effectiveViscosityAtPos not implemented");
874 template<
class SolutionVector>
878 sol.resize(this->gridGeometry().numDofs());
879 std::vector<bool> dofHandled(this->gridGeometry().numDofs(),
false);
880 auto fvGeometry =
localView(this->gridGeometry());
881 for (
const auto& element : elements(this->gridGeometry().gridView()))
883 fvGeometry.bindElement(element);
884 for (
const auto& scv : scvs(fvGeometry))
886 const auto dofIdx = scv.dofIndex();
887 if (!dofHandled[dofIdx])
889 dofHandled[dofIdx] =
true;
890 sol[dofIdx] = asImp_().initial(scv);
902 return asImp_().initialAtPos(scv.dofPosition());
907 Implementation &asImp_()
908 {
return *
static_cast<Implementation *
>(
this); }
911 const Implementation &asImp_()
const
912 {
return *
static_cast<const Implementation *
>(
this); }
914 GravityVector gravity_;
915 bool enableInertiaTerms_;
916 std::shared_ptr<CouplingManager> couplingManager_ = {};
925template<
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.
GridCache::LocalView localView(const GridCache &gridCache)
Free function to get the local view of a grid cache object.
Definition: localview.hh:38
Dune::DenseMatrix< MAT >::value_type vtmv(const Dune::DenseVector< V1 > &v1, const Dune::DenseMatrix< MAT > &M, const Dune::DenseVector< V2 > &v2)
Evaluates the scalar product of a vector v2, projected by a matrix M, with a vector v1.
Definition: math.hh:863
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
constexpr Box box
Definition: method.hh:136
constexpr PQ1Bubble pq1bubble
Definition: method.hh:137
std::string viscosity(int phaseIdx) noexcept
I/O name of viscosity for multiphase systems.
Definition: name.hh:74
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
Base class for all finite-volume problems using spatial parameters.
Definition: fvproblemwithspatialparams.hh:41
Class to specify the type of a boundary condition for the Navier-Stokes model.
Definition: freeflow/navierstokes/momentum/boundarytypes.hh:37
Definition: freeflow/navierstokes/momentum/problem.hh:38
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:139
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:116
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:239
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:175
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:400
const VelocityVector beaversJosephVelocity(const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf, const ElementVolumeVariables &elemVolVars, Scalar tangentialVelocityGradient) const
Returns the slip velocity at a porous boundary based on the Beavers-Joseph(-Saffman) condition.
Definition: freeflow/navierstokes/momentum/problem.hh:470
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:322
bool enableInertiaTerms() const
Returns whether inertia terms should be considered.
Definition: freeflow/navierstokes/momentum/problem.hh:232
Scalar permeability(const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf) const
Returns the intrinsic permeability of required as input parameter for the Beavers-Joseph-Saffman boun...
Definition: freeflow/navierstokes/momentum/problem.hh:428
NavierStokesMomentumProblemImpl(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< CouplingManager > couplingManager, const std::string ¶mGroup="")
The constructor.
Definition: freeflow/navierstokes/momentum/problem.hh:98
Scalar betaBJ(const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf, const GlobalPosition &tangentialVector) const
Returns the beta value which is the alpha value divided by the square root of the (scalar-valued) int...
Definition: freeflow/navierstokes/momentum/problem.hh:451
VelocityVector porousMediumVelocity(const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf) const
Returns the velocity in the porous medium (which is 0 by default according to Saffmann).
Definition: freeflow/navierstokes/momentum/problem.hh:461
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:374
auto insideAndOutsideDensity(const Element &element, const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf, const bool isPreviousTimeStep=false) const
Definition: freeflow/navierstokes/momentum/problem.hh:296
Scalar effectiveViscosityAtPos(const GlobalPosition &) const
Returns the effective dynamic viscosity at a given position.
Definition: freeflow/navierstokes/momentum/problem.hh:335
const CouplingManager & couplingManager() const
Definition: freeflow/navierstokes/momentum/problem.hh:501
Dune::FieldVector< Scalar, dimWorld > MomentumFluxType
Definition: freeflow/navierstokes/momentum/problem.hh:84
static constexpr bool isMomentumProblem()
This problem is used for the momentum balance model.
Definition: freeflow/navierstokes/momentum/problem.hh:90
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:263
void applyInitialSolution(SolutionVector &sol) const
Applies the initial solution for all degrees of freedom of the grid.
Definition: freeflow/navierstokes/momentum/problem.hh:345
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:272
const GravityVector & gravity() const
A default, i.e. if the user's does not overload any neumann method.
Definition: freeflow/navierstokes/momentum/problem.hh:226
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:414
Dune::FieldVector< Scalar, dimWorld > InitialValues
Definition: freeflow/navierstokes/momentum/problem.hh:79
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:286
BoundaryFluxes neumannAtPos(const GlobalPosition &globalPos) const
Returns the neumann flux at a given position.
Definition: freeflow/navierstokes/momentum/problem.hh:217
InitialValues initial(const SubControlVolume &scv) const
Evaluate the initial value at an sub control volume.
Definition: freeflow/navierstokes/momentum/problem.hh:368
Scalar alphaBJ(const FVElementGeometry &fvGeometry, const SubControlVolumeFace &scvf) const
Returns the alpha value required as input parameter for the Beavers-Joseph-Saffman boundary condition...
Definition: freeflow/navierstokes/momentum/problem.hh:440
Scalar densityAtPos(const GlobalPosition &) const
Returns the density at a given position.
Definition: freeflow/navierstokes/momentum/problem.hh:313
Dune::FieldVector< Scalar, dimWorld > BoundaryFluxes
Definition: freeflow/navierstokes/momentum/problem.hh:82
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:192
Dune::FieldVector< Scalar, dimWorld > DirichletValues
Definition: freeflow/navierstokes/momentum/problem.hh:81
Dune::FieldVector< Scalar, dimWorld > Sources
Definition: freeflow/navierstokes/momentum/problem.hh:80
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:207
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:421
Scalar pressureAtPos(const GlobalPosition &) const
Returns the pressure at a given position.
Definition: freeflow/navierstokes/momentum/problem.hh:252
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:161
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:838
Dune::FieldVector< Scalar, dimWorld > Sources
Definition: freeflow/navierstokes/momentum/problem.hh:580
NavierStokesMomentumProblemImpl(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< CouplingManager > couplingManager, const std::string ¶mGroup="")
The constructor.
Definition: freeflow/navierstokes/momentum/problem.hh:596
void applyInitialSolution(SolutionVector &sol) const
Applies the initial solution for all degrees of freedom of the grid.
Definition: freeflow/navierstokes/momentum/problem.hh:875
Scalar pressureAtPos(const GlobalPosition &) const
Returns the pressure at a given position.
Definition: freeflow/navierstokes/momentum/problem.hh:791
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:777
static constexpr bool isMomentumProblem()
This problem is used for the momentum balance model.
Definition: freeflow/navierstokes/momentum/problem.hh:588
Scalar densityAtPos(const GlobalPosition &) const
Returns the density at a given position.
Definition: freeflow/navierstokes/momentum/problem.hh:829
InitialValues initial(const SubControlVolume &scv) const
Evaluate the initial value at an sub control volume.
Definition: freeflow/navierstokes/momentum/problem.hh:899
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:660
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:638
Scalar effectiveViscosityAtPos(const GlobalPosition &) const
Returns the effective dynamic viscosity at a given position.
Definition: freeflow/navierstokes/momentum/problem.hh:865
Dune::FieldVector< Scalar, dimWorld > InitialValues
Definition: freeflow/navierstokes/momentum/problem.hh:579
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:692
const GravityVector & gravity() const
Returns the acceleration due to gravity.
Definition: freeflow/navierstokes/momentum/problem.hh:741
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:800
Dune::FieldVector< Scalar, dimWorld > DirichletValues
Definition: freeflow/navierstokes/momentum/problem.hh:581
DirichletValues dirichlet(const Element &element, const SubControlVolume &scv) const
Evaluate the boundary conditions for a Dirichlet control volume.
Definition: freeflow/navierstokes/momentum/problem.hh:710
bool enableInertiaTerms() const
Returns whether inertia terms should be considered.
Definition: freeflow/navierstokes/momentum/problem.hh:747
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:852
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:614
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:674
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:814
Dune::FieldVector< Scalar, dimWorld > BoundaryFluxes
Definition: freeflow/navierstokes/momentum/problem.hh:582
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:756
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:763
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:726
Declares all properties used in Dumux.