From 4096ee2fbf8b21477a3e7b5d29489c9b384bb43c Mon Sep 17 00:00:00 2001 From: Klaus Mosthaf <klmos@env.dtu.dk> Date: Wed, 8 Feb 2012 16:43:00 +0000 Subject: [PATCH] furhter work on docu, enabled gravity again in the stokesproblem (base class) git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7675 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/freeflow/stokes/stokeslocalresidual.hh | 56 ++++++++++++------- dumux/freeflow/stokes/stokesmodel.hh | 7 +-- .../freeflow/stokes/stokesnewtoncontroller.hh | 4 +- dumux/freeflow/stokes/stokesproblem.hh | 4 +- dumux/freeflow/stokes/stokesproperties.hh | 20 +------ .../freeflow/stokes/stokespropertydefaults.hh | 35 +----------- dumux/freeflow/stokes2c/stokes2cmodel.hh | 2 +- dumux/freeflow/stokes2c/stokes2cproperties.hh | 4 -- .../stokes2c/stokes2cpropertydefaults.hh | 22 -------- .../stokes2cni/stokes2cnipropertydefaults.hh | 21 ------- 10 files changed, 49 insertions(+), 126 deletions(-) diff --git a/dumux/freeflow/stokes/stokeslocalresidual.hh b/dumux/freeflow/stokes/stokeslocalresidual.hh index d1f7df6018..7056b1a34f 100644 --- a/dumux/freeflow/stokes/stokeslocalresidual.hh +++ b/dumux/freeflow/stokes/stokeslocalresidual.hh @@ -49,9 +49,9 @@ namespace Dumux * \ingroup BoxStokesModel * \ingroup BoxLocalResidual * \brief Element-wise calculation of the local Jacobian matrix for problems - * using the stokes box model. + * using the Stokes box model. * - * This class is also used for the non-isothermal and the compositional stokes + * This class is also used for the non-isothermal and the two-component Stokes * model, which means that it uses static polymorphism. */ template<class TypeTag> @@ -142,11 +142,15 @@ protected: /*! * \brief Evaluates the total flux of all conservation quantities - * over a face of a sub-control volume. + * over a face of a sub-control volume. The face may be within + * an element (SCV face) or on the boundary. The advective and + * the diffusive fluxes are computed. * * \param flux The flux over the SCV (sub-control-volume) face - * \param faceIdx The index of the SCV face - * \param onBoundary Indicates, if the flux is evaluated on a boundary face + * \param faceIdx The index of the SCV face (may also be a boundary face) + * \param onBoundary Indicates, if the flux is evaluated on a boundary face. If it is true, + * the created fluxVars object cotains boundary variables evaluated at the IP of the + * boundary face */ void computeFlux(PrimaryVariables &flux, int faceIdx, bool onBoundary=false) const { @@ -169,7 +173,7 @@ protected: * a face of a sub-control volume. * * \param flux The advective flux over the sub-control-volume face for each component - * \param fluxVars The flux variables at the current SCV + * \param fluxVars The flux variables at the current SCV face */ void computeAdvectiveFlux(PrimaryVariables &flux, const FluxVariables &fluxVars) const @@ -260,9 +264,9 @@ protected: { } /*! - * \brief Calculates the source term of the equation, - * computes the pressure gradient at the center of a SCV - * and evaluates the gravity term + * \brief Calculate the source term of all equations. + * The pressure gradient at the center of a SCV is computed + * and the gravity term evaluated. * * \param q The source/sink in the sub control volume for each component * \param localVertexIdx The index of the sub-control volume @@ -309,7 +313,10 @@ protected: } } - // the stokes model needs a modified treatment of the BCs + /*! + * \brief The Stokes model needs a modified treatment of the boundary conditions as + * the common box models + */ void evalBoundary_() { assert(this->residual_.size() == this->fvElemGeom_().numVertices); @@ -520,8 +527,8 @@ protected: } } - /* - * \brief removes the alpha stabilization at boundaries + /*! + * \brief Remove the alpha stabilization at boundaries. */ void removeStabilizationAtBoundary_(const int vertexIdx) { @@ -567,9 +574,9 @@ protected: } } - /* - * \brief Interpolates the pressure at corner points of the grid, i.e. it takes - * the degree of freedom there + /*! + * \brief Interpolate the pressure at corner points of the grid, thus taking the degree of freedom there. + * This is required due to stability reasons.s */ void interpolateCornerPoints_(const BoundaryTypes &bcTypes, const int vertexIdx) { @@ -592,9 +599,9 @@ protected: } } - /* - * \brief Replace the residual of the mass balance with the sum of the - * residuals of the momentum balance equation + /*! + * \brief Replace the local residual of the mass balance equation by + * the sum of the residuals of the momentum balance equation */ void replaceMassbalanceResidual_(const FieldVector& momentumResidual, FieldVector& averagedNormal, @@ -608,7 +615,10 @@ protected: this->residual_[vertexIdx][massBalanceIdx] = momentumResidual*averagedNormal; } - // returns true, if all conditions for the momentum balance are dirichlet + /*! + * \brief Returns true, if all boundary conditions for the momentum balance + * at the considered vertex are dirichlet + */ bool momentumBalanceDirichlet_(const BoundaryTypes& bcTypes) const { for (int momentumIdx=momentumXIdx; momentumIdx<=lastMomentumIdx; ++momentumIdx) @@ -617,7 +627,9 @@ protected: return true; } - // returns true, if one condition of the momentum balance is neumann + /*! + * \brief Returns true, if at least one boundary condition of the momentum balance is neumann + */ bool momentumBalanceHasNeumann_(const BoundaryTypes& bcTypes) const { for (int momentumIdx=momentumXIdx; momentumIdx<=lastMomentumIdx; ++momentumIdx) @@ -626,7 +638,9 @@ protected: return false; } - // returns true, if all conditions for the momentum balance are outlow + /*! + * \brief Returns true, if all boundary conditions for the momentum balance are outlow + */ bool momentumBalanceOutflow_(const BoundaryTypes& bcTypes) const { for (int momentumIdx=momentumXIdx; momentumIdx<=lastMomentumIdx; ++momentumIdx) diff --git a/dumux/freeflow/stokes/stokesmodel.hh b/dumux/freeflow/stokes/stokesmodel.hh index ec9fdd4927..c5e0269cf1 100644 --- a/dumux/freeflow/stokes/stokesmodel.hh +++ b/dumux/freeflow/stokes/stokesmodel.hh @@ -38,7 +38,7 @@ namespace Dumux { /*! * \ingroup BoxStokesModel - * \brief Adaption of the BOX scheme to the stokes box model. + * \brief Adaption of the box scheme to the stokes model. * * This model implements laminar Stokes flow of a single fluid, solving a momentum balance: * \f[ @@ -55,10 +55,9 @@ namespace Dumux * \f] * * This is discretized by a fully-coupled vertex-centered finite volume - * (box) scheme as spatial and the implicit Euler method - * as temporal discretization. + * (box) scheme in space and by the implicit Euler method in time. */ -template<class TypeTag > +template<class TypeTag> class StokesModel : public BoxModel<TypeTag> { typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; diff --git a/dumux/freeflow/stokes/stokesnewtoncontroller.hh b/dumux/freeflow/stokes/stokesnewtoncontroller.hh index 105d025161..4b7e46a31d 100644 --- a/dumux/freeflow/stokes/stokesnewtoncontroller.hh +++ b/dumux/freeflow/stokes/stokesnewtoncontroller.hh @@ -22,7 +22,7 @@ *****************************************************************************/ /*! * \file - * \brief A stokes specific controller for the newton solver. + * \brief A Stokes specific controller for the newton solver. */ #ifndef DUMUX_STOKES_NEWTON_CONTROLLER_HH #define DUMUX_STOKES_NEWTON_CONTROLLER_HH @@ -34,7 +34,7 @@ namespace Dumux { * \ingroup BoxStokesModel * \ingroup Newton * \brief A Stokes-specific controller for the newton solver, which sets - * a different newton parameters. + * different parameters for the relative tolerance, target steps and maximum steps. */ template <class TypeTag> class StokesNewtonController : public NewtonController<TypeTag> diff --git a/dumux/freeflow/stokes/stokesproblem.hh b/dumux/freeflow/stokes/stokesproblem.hh index f2f154df44..6bc9d483ca 100644 --- a/dumux/freeflow/stokes/stokesproblem.hh +++ b/dumux/freeflow/stokes/stokesproblem.hh @@ -66,8 +66,8 @@ public: : ParentType(timeManager, gridView), gravity_(0) { -// if (GET_PARAM(TypeTag, bool, EnableGravity)) -// gravity_[dim-1] = -9.81; + if (GET_PARAM(TypeTag, bool, EnableGravity)) + gravity_[dim-1] = -9.81; } /*! diff --git a/dumux/freeflow/stokes/stokesproperties.hh b/dumux/freeflow/stokes/stokesproperties.hh index bb33bec803..daab9762d0 100644 --- a/dumux/freeflow/stokes/stokesproperties.hh +++ b/dumux/freeflow/stokes/stokesproperties.hh @@ -38,17 +38,8 @@ namespace Dumux { -//////////////////////////////// -// properties -//////////////////////////////// namespace Properties { - -/*! - * \addtogroup BoxStokesModel - */ -// \{ - ////////////////////////////////////////////////////////////////// // Type tags ////////////////////////////////////////////////////////////////// @@ -67,17 +58,12 @@ NEW_PROP_TAG(StokesIndices); //!< Enumerations for the Stokes models NEW_PROP_TAG(Fluid); NEW_PROP_TAG(FluidSystem); NEW_PROP_TAG(FluidState); -NEW_PROP_TAG(StabilizationAlpha); -NEW_PROP_TAG(StabilizationBeta); +NEW_PROP_TAG(StabilizationAlpha); //!< The parameter for the stabilization +NEW_PROP_TAG(StabilizationBeta); //!< The parameter for the stabilization at boundaries NEW_PROP_TAG(PhaseIndex); - -NEW_PROP_TAG(SpatialParameters); - +NEW_PROP_TAG(SpatialParameters); //!< The type of the spatial parameters NEW_PROP_TAG(Scaling); //!Defines Scaling of the model - -// \} - } } diff --git a/dumux/freeflow/stokes/stokespropertydefaults.hh b/dumux/freeflow/stokes/stokespropertydefaults.hh index 021fc18c47..f2dac60e7e 100644 --- a/dumux/freeflow/stokes/stokespropertydefaults.hh +++ b/dumux/freeflow/stokes/stokespropertydefaults.hh @@ -27,7 +27,7 @@ * * \file * - * \brief Defines the properties required for the Stokes BOX model. + * \brief Defines the properties required for the Stokes box model. */ #ifndef DUMUX_STOKES_PROPERTY_DEFAULTS_HH @@ -48,37 +48,8 @@ namespace Dumux { -//////////////////////////////// -// forward declarations -//////////////////////////////// -template<class TypeTag> -class StokesModel; - -template<class TypeTag> -class StokesLocalResidual; - -template <class TypeTag> -class StokesVolumeVariables; - -template <class TypeTag> -class StokesFluxVariables; - -template <class TypeTag> -class StokesNewtonController; - -// \} - -//////////////////////////////// -// properties -//////////////////////////////// namespace Properties { - -/*! - * \addtogroup BoxStokesModel - */ -// \{ - ////////////////////////////////////////////////////////////////// // Properties ////////////////////////////////////////////////////////////////// @@ -153,9 +124,9 @@ public: SET_INT_PROP(BoxStokes, PhaseIndex, 0); -// \} - +// } + } #endif diff --git a/dumux/freeflow/stokes2c/stokes2cmodel.hh b/dumux/freeflow/stokes2c/stokes2cmodel.hh index 866f25e418..7b9e9aab6f 100644 --- a/dumux/freeflow/stokes2c/stokes2cmodel.hh +++ b/dumux/freeflow/stokes2c/stokes2cmodel.hh @@ -23,7 +23,7 @@ /*! * \file * - * \brief Adaptation of the BOX scheme to the compositional stokes model (with two components). + * \brief Adaptation of the box scheme to the compositional Stokes model (with two components). */ #ifndef DUMUX_STOKES2C_MODEL_HH #define DUMUX_STOKES2C_MODEL_HH diff --git a/dumux/freeflow/stokes2c/stokes2cproperties.hh b/dumux/freeflow/stokes2c/stokes2cproperties.hh index 640915119a..faf29290ee 100644 --- a/dumux/freeflow/stokes2c/stokes2cproperties.hh +++ b/dumux/freeflow/stokes2c/stokes2cproperties.hh @@ -36,10 +36,6 @@ namespace Dumux { -/*! - * \addtogroup BoxStokes2cModel - */ -// \{ namespace Properties { diff --git a/dumux/freeflow/stokes2c/stokes2cpropertydefaults.hh b/dumux/freeflow/stokes2c/stokes2cpropertydefaults.hh index d7fe04f2bc..f147944df0 100644 --- a/dumux/freeflow/stokes2c/stokes2cpropertydefaults.hh +++ b/dumux/freeflow/stokes2c/stokes2cpropertydefaults.hh @@ -40,28 +40,6 @@ namespace Dumux { -/*! - * \addtogroup BoxStokes2cModel - */ -// \{ -//////////////////////////////// -// forward declarations -//////////////////////////////// -template<class TypeTag> -class Stokes2cModel; - -template<class TypeTag> -class Stokes2cLocalResidual; - -template <class TypeTag> -class Stokes2cVolumeVariables; - -template <class TypeTag> -class Stokes2cFluxVariables; - -//////////////////////////////// -// properties -//////////////////////////////// namespace Properties { diff --git a/dumux/freeflow/stokes2cni/stokes2cnipropertydefaults.hh b/dumux/freeflow/stokes2cni/stokes2cnipropertydefaults.hh index c949dafe46..5b8bc8f3a0 100644 --- a/dumux/freeflow/stokes2cni/stokes2cnipropertydefaults.hh +++ b/dumux/freeflow/stokes2cni/stokes2cnipropertydefaults.hh @@ -40,27 +40,6 @@ namespace Dumux { -/*! - * \addtogroup BoxStokes2cniModel - */ -// \{ -//////////////////////////////// -// forward declarations -//////////////////////////////// -template<class TypeTag> -class Stokes2cniModel; - -template<class TypeTag> -class Stokes2cniLocalResidual; - -template <class TypeTag> -class Stokes2cniVolumeVariables; - -template <class TypeTag> -class Stokes2cniFluxVariables; - -template <class TypeTag> -class Stokes2cniIndices; namespace Properties { -- GitLab