From 593acef644012a1ad8b9479e19fb3dd6f2084a9e Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt Date: Tue, 18 Oct 2016 14:28:46 +0200 Subject: [PATCH 1/3] [stokes][localResidual] Add a wall friction term *To account for a dimensional reduction from 3d to 2d --- dumux/freeflow/stokes/localresidual.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dumux/freeflow/stokes/localresidual.hh b/dumux/freeflow/stokes/localresidual.hh index 7951945fc9..5c9bfb4e85 100644 --- a/dumux/freeflow/stokes/localresidual.hh +++ b/dumux/freeflow/stokes/localresidual.hh @@ -328,6 +328,12 @@ 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; } } -- GitLab From 66e355c47efe62772aa3e23e151506184fd7d2aa Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt Date: Thu, 20 Oct 2016 11:07:58 +0200 Subject: [PATCH 2/3] [doc] Add citation --- doc/handbook/dumux-handbook.bib | 17 +++++++++++++++++ dumux/freeflow/stokes/localresidual.hh | 2 ++ 2 files changed, 19 insertions(+) diff --git a/doc/handbook/dumux-handbook.bib b/doc/handbook/dumux-handbook.bib index 5f22927928..982fc19040 100644 --- a/doc/handbook/dumux-handbook.bib +++ b/doc/handbook/dumux-handbook.bib @@ -784,6 +784,23 @@ url = {http://www.sciencedirect.com/science/article/pii/S0169772204001160} pages = {255--293} } +@Article{Kunz2016, +author={{Kunz, P. +and Zarikos, I. M. +and Karadimitriou, N. K. +and Huber, M. +and Nieken, U. +and Hassanizadeh, S. M.}}, +title={{Study of Multi-phase Flow in Porous Media: Comparison of SPH Simulations with Micro-model Experiments}}, +journal={{Transport in Porous Media}}, +year={2016}, +volume={114}, +number={2}, +pages={581--600}, +doi={10.1007/s11242-015-0599-1}, +url={http://dx.doi.org/10.1007/s11242-015-0599-1} +} + @BOOK{A3:lancaster:1969, title = {{Theory of Matrices}}, publisher = {Academic Press, Inc.\ (London) Ltd.}, diff --git a/dumux/freeflow/stokes/localresidual.hh b/dumux/freeflow/stokes/localresidual.hh index 5c9bfb4e85..8793f46f6c 100644 --- a/dumux/freeflow/stokes/localresidual.hh +++ b/dumux/freeflow/stokes/localresidual.hh @@ -171,6 +171,8 @@ protected: * * \param flux The advective flux over the sub-control-volume face for each component * \param fluxVars The flux variables at the current SCV/boundary face + * + * An additional wall friction term can be added to account for a dimensional reduction from 3d to 2d (Kunz et al., 2016) \cite Kunz2016
*/ void computeAdvectiveFlux(PrimaryVariables &flux, const FluxVariables &fluxVars) const -- GitLab From 5a20e65ddb3bcc4c7efd875350ee00dc3083b0e1 Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt Date: Thu, 20 Oct 2016 11:16:25 +0200 Subject: [PATCH 3/3] [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