From 5a20e65ddb3bcc4c7efd875350ee00dc3083b0e1 Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de> Date: Thu, 20 Oct 2016 11:16:25 +0200 Subject: [PATCH] [stokes] Add wall friction property --- dumux/freeflow/stokes/localresidual.hh | 14 +++++++++----- dumux/freeflow/stokes/properties.hh | 1 + dumux/freeflow/stokes/propertydefaults.hh | 3 +++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/dumux/freeflow/stokes/localresidual.hh b/dumux/freeflow/stokes/localresidual.hh index 8793f46f6c..2f58393c5c 100644 --- a/dumux/freeflow/stokes/localresidual.hh +++ b/dumux/freeflow/stokes/localresidual.hh @@ -82,6 +82,7 @@ protected: static const bool enableUnsymmetrizedVelocityGradient = GET_PROP_VALUE(TypeTag, EnableUnsymmetrizedVelocityGradient); static const bool calculateNavierStokes = GET_PROP_VALUE(TypeTag, EnableNavierStokes); static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles); + static const bool enablePseudo3dWallFriction = GET_PROP_VALUE(TypeTag, EnablePseudoThreeDWallFriction); public: /*! @@ -331,11 +332,14 @@ protected: source[momentumXIdx + dimIdx] -= pressureGradAtSCVCenter[dimIdx]; source[momentumXIdx + dimIdx] += volVars.density()*this->problem_().gravity()[dimIdx]; - // add a wall friction term to account for a dimensional reduction from 3d to 2d - const auto pos = this->element_().geometry().corner(scvIdx); - const Scalar height = this->problem_().extrusionFactorAtPos(pos); - const Scalar wallFriction = 12*volVars.velocity()[dimIdx]*volVars.dynamicViscosity()/(height*height); - source[momentumXIdx + dimIdx] -= wallFriction; + if(enablePseudo3dWallFriction) + { + // add a wall friction term to account for a dimensional reduction from 3d to 2d + const auto pos = this->element_().geometry().corner(scvIdx); + const Scalar height = this->problem_().extrusionFactorAtPos(pos); + const Scalar wallFriction = 12*volVars.velocity()[dimIdx]*volVars.dynamicViscosity()/(height*height); + source[momentumXIdx + dimIdx] -= wallFriction; + } } } diff --git a/dumux/freeflow/stokes/properties.hh b/dumux/freeflow/stokes/properties.hh index 14471f6608..25829a8df5 100644 --- a/dumux/freeflow/stokes/properties.hh +++ b/dumux/freeflow/stokes/properties.hh @@ -57,6 +57,7 @@ NEW_PROP_TAG(StokesStabilizationAlpha); //!< The parameter for the stabilization NEW_PROP_TAG(StokesStabilizationBeta); //!< The parameter for the stabilization at boundaries NEW_PROP_TAG(EnableUnsymmetrizedVelocityGradient); //!< Returns whether unsymmetrized velocity gradient for viscous term is used NEW_PROP_TAG(EnableNavierStokes); //!< Returns whether Navier-Stokes should be solved instead of plain Stokes +NEW_PROP_TAG(EnablePseudoThreeDWallFriction); //!< Returns whether an additional wall friction term should be considered to mimic 3D behavior NEW_PROP_TAG(UseMoles); //!< Defines whether molar (true) or mass (false) density is used NEW_PROP_TAG(PhaseIdx); //!< A phase index in case that a two-phase fluidsystem is used diff --git a/dumux/freeflow/stokes/propertydefaults.hh b/dumux/freeflow/stokes/propertydefaults.hh index 10014fb585..0a39ccb5b5 100644 --- a/dumux/freeflow/stokes/propertydefaults.hh +++ b/dumux/freeflow/stokes/propertydefaults.hh @@ -135,6 +135,9 @@ SET_INT_PROP(BoxStokes, PhaseIdx, 0); //! Use symmetrizedVelocityGradient by default SET_BOOL_PROP(BoxStokes, EnableUnsymmetrizedVelocityGradient, false); +//! Disbale additional wall friction term by default +SET_BOOL_PROP(BoxStokes, EnablePseudoThreeDWallFriction, false); + //! Set calculation to Stokes, not Navier-Stokes SET_BOOL_PROP(BoxStokes, EnableNavierStokes, false); -- GitLab