Commit ce1ec043 authored by Klaus Mosthaf's avatar Klaus Mosthaf
Browse files

mainly worked on documentation of stokes models

removed stokes2c(ni)newtoncontroller and stokes2c(ni)problem, they are
not neccessary


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7495 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent ece678bd
......@@ -22,10 +22,9 @@
* \file
*
* \brief This file contains the data which is required to calculate
* all fluxes of the fluid phase over a face of a finite volume.
* the fluxes of the fluid phase over a face of a finite volume.
*
* This means pressure and temperature gradients, phase densities at
* the integration point, etc.
* This means pressure gradients, phase densities at the integration point, etc.
*/
#ifndef DUMUX_STOKES_FLUX_VARIABLES_HH
#define DUMUX_STOKES_FLUX_VARIABLES_HH
......@@ -36,10 +35,11 @@ namespace Dumux
{
/*!
* \ingroup StokesModel
* \ingroup BoxStokesModel
* \ingroup BoxFluxVariables
* \brief This template class contains the data which is required to
* calculate the fluxes of the fluid phases over a face of a
* finite volume for the stokes model.
* calculate the fluxes of the fluid phase over a face of a
* finite volume for the Stokes model.
*
* This means pressure and concentration gradients, phase densities at
* the intergration point, etc.
......
......@@ -32,6 +32,8 @@ namespace Dumux
// \{
/*!
* \ingroup BoxStokesModel
* \ingroup BoxIndices
* \brief The common indices for the isothermal stokes model.
*
* \tparam PVOffset The first index in a primary variable vector.
......
......@@ -32,14 +32,12 @@
#include <dune/istl/matrix.hh>
//#include "boxelementboundarytypes.hh"
namespace Dumux
{
/*!
* \ingroup StokesModel
* \ingroup BoxStokesModel
* \brief Element-wise calculation of the jacobian matrix for models
* based on the box scheme .
* based on the box scheme.
*
* \todo Please doc me more!
*/
......@@ -57,15 +55,7 @@ private:
};
public:
/*!
* \brief Returns the epsilon value which is added and removed
* from the current solution.
*
* \param elemSol The current solution on the element
* \param scvIdx The local index of the element's vertex for
* which the local derivative ought to be calculated.
* \param pvIdx The index of the primary variable which gets varied
*/
//! \copydoc BoxLocalJacobian::numericEpsilon_()
Scalar numericEpsilon_(int scvIdx,
int pvIdx) const
{
......
......@@ -44,7 +44,8 @@
namespace Dumux
{
/*!
* \ingroup StokesModel
* \ingroup BoxStokesModel
* \ingroup BoxLocalResidual
* \brief Element-wise calculation of the Jacobian matrix for problems
* using the stokes box model.
*
......
......@@ -27,31 +27,34 @@
#define DUMUX_STOKES_MODEL_HH
#include "stokeslocalresidual.hh"
#include "stokesnewtoncontroller.hh"
#include "stokeslocaljacobian.hh"
#include "stokesproblem.hh"
#include "stokesproperties.hh"
namespace Dumux
{
/*!
* \ingroup BoxProblems
* \defgroup StokesBoxProblems Stokes box problems
*/
/*!
* \ingroup BoxModels
* \defgroup StokesModel Stokes box model
*/
/*!
* \ingroup StokesModel
* \ingroup BoxStokesModel
* \brief Adaption of the BOX scheme to the stokes flow model.
*
* This model implements stokes flow of a single fluid
* discretized by a fully-coupled vertex
* centered finite volume (box) scheme as spatial and
* the implicit Euler method as time discretization.
* This model implements laminar Stokes flow of a single fluid, solving a momentum balance:
* \f[
\frac{\partial \left(\varrho_g {\boldsymbol{v}}_g\right)}{\partial t}
+ \boldsymbol{\nabla} \boldsymbol{\cdot} \left(p_g {\bf {I}}
- \mu_g \left(\boldsymbol{\nabla} \boldsymbol{v}_g
+ \boldsymbol{\nabla} \boldsymbol{v}_g^T\right)\right)
- \varrho_g {\bf g} = 0,
* \f]
*
* and the mass balance equation:
* \f[
\frac{\partial \varrho_g}{\partial t} + \boldsymbol{\nabla}\boldsymbol{\cdot}\left(\varrho_g {\boldsymbol{v}}_g\right) - q_g = 0
* \f]
*
* This is discretized by a fully-coupled vertex- centered finite volume
* (box) scheme as spatial and the implicit Euler method
* as temporal discretization.
*/
template<class TypeTag >
class StokesModel : public BoxModel<TypeTag>
......
......@@ -29,7 +29,9 @@
namespace Dumux {
/*!
* \brief A Stokes specific controller for the newton solver.
* \ingroup BoxStokesModel
* \ingroup Newton
* \brief A Stokes-specific controller for the newton solver.
*/
template <class TypeTag>
class StokesNewtonController : public NewtonController<TypeTag>
......@@ -43,9 +45,9 @@ public:
{
Dune::FMatrixPrecision<>::set_singular_limit(1e-35);
this->setRelTolerance(1e-4);
this->setTargetSteps(15);
this->setMaxSteps(23);
this->setRelTolerance(1e-6);
this->setTargetSteps(10);
this->setMaxSteps(18);
};
};
}
......
......@@ -25,15 +25,13 @@
#ifndef DUMUX_STOKES_PROBLEM_HH
#define DUMUX_STOKES_PROBLEM_HH
#include "dumux/freeflow/stokes/stokesnewtoncontroller.hh"
#include <dumux/boxmodels/common/boxproblem.hh>
namespace Dumux
{
/*!
* \ingroup StokesProblems
* \ingroup BoxStokesProblems
* \brief Base class for all problems which use the stokes box model
*
* \todo Please doc me more!
......
......@@ -19,6 +19,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \ingroup Properties
* \ingroup BoxProperties
* \ingroup BoxStokesModel
*
* \file
*
* \brief Defines the properties required for the Stokes BOX model.
......@@ -30,7 +34,8 @@
#include "stokesindices.hh"
#include <dumux/boxmodels/common/boxproperties.hh>
#include <dumux/freeflow/stokes/stokeslocaljacobian.hh>
#include "stokeslocaljacobian.hh"
#include "stokesnewtoncontroller.hh"
#include <dumux/material/fluidsystems/gasphase.hh>
#include <dumux/material/fluidsystems/liquidphase.hh>
......@@ -43,10 +48,6 @@
namespace Dumux
{
/*!
* \addtogroup StokesModel
*/
// \{
////////////////////////////////
// forward declarations
......@@ -75,7 +76,7 @@ namespace Properties
{
/*!
* \addtogroup StokesModel
* \addtogroup BoxStokesModel
*/
// \{
......@@ -181,15 +182,6 @@ SET_INT_PROP(BoxStokes, PhaseIndex, 0);
// \}
//// enable jacobian matrix recycling by default
//SET_BOOL_PROP(BoxStokes, EnableJacobianRecycling, false);
//// enable partial reassembling by default
//SET_BOOL_PROP(BoxStokes, EnablePartialReassemble, false);
//// set some Newton properties deviating from the default ones
//
//SET_SCALAR_PROP(BoxStokes, NewtonRelTolerance, 1e-4);
//SET_INT_PROP(BoxStokes, NewtonTargetSteps, 10);
}
}
......
......@@ -22,7 +22,7 @@
* \file
*
* \brief Contains the quantities which are constant within a
* finite volume in the stokes model.
* finite volume in the Stokes model.
*/
#ifndef DUMUX_STOKES_VOLUME_VARIABLES_HH
#define DUMUX_STOKES_VOLUME_VARIABLES_HH
......@@ -32,15 +32,11 @@
#include <dumux/material/fluidstates/immisciblefluidstate.hh>
//#include <dumux/material/fluidstates/compositionalfluidstate.hh>
//#include <dumux/material/constraintsolvers/computefromreferencephase.hh>
//#include <dumux/material/constraintsolvers/misciblemultiphasecomposition.hh>
namespace Dumux
{
/*!
* \ingroup StokesModel
* \ingroup BoxStokesModel
* \ingroup BoxVolumeVariables
* \brief Contains the quantities which are are constant within a
* finite volume in the Stokes model.
......
......@@ -31,6 +31,7 @@
#define DUMUX_STOKES2C_FLUX_VARIABLES_HH
#include <dumux/common/math.hh>
#include <dumux/freeflow/stokes/stokesfluxvariables.hh>
namespace Dumux
{
......@@ -41,10 +42,11 @@ NEW_PROP_TAG(Stokes2cIndices); //!< Enumerations for the compositional stokes mo
}
/*!
* \ingroup Stokes2cModel
* \ingroup BoxStokes2cModel
* \ingroup BoxFluxVariables
* \brief This template class contains data which is required to
* calculate the component fluxes over a face of a finite
* volume for the compositional stokes model.
* volume for the compositional Stokes model.
*
* This means concentration gradients, diffusion coefficients, mass fractions, etc.
* at the integration point.
......
......@@ -34,6 +34,8 @@ namespace Dumux
// \{
/*!
* \ingroup BoxStokes2cModel
* \ingroup BoxIndices
* \brief The common indices for the compositional stokes model.
*
* \tparam PVOffset The first index in a primary variable vector.
......
......@@ -32,12 +32,12 @@
#include <dumux/freeflow/stokes2c/stokes2cvolumevariables.hh>
#include <dumux/freeflow/stokes2c/stokes2cfluxvariables.hh>
#include <dumux/freeflow/stokes2c/stokes2cproperties.hh>
namespace Dumux
{
/*!
* \ingroup Stokes2cModel
* \ingroup BoxStokes2cModel
* \ingroup BoxLocalResidual
* \brief Element-wise calculation of the Jacobian matrix for problems
* using the compositional stokes box model. This is derived
* from the stokes box model.
......
......@@ -30,38 +30,37 @@
#include "stokes2clocalresidual.hh"
#include "stokes2cproperties.hh"
#include "stokes2cproblem.hh"
namespace Dumux {
/*!
* \ingroup BoxProblems
* \defgroup Stokes2cBoxProblems Compositional stokes problems
*/
/*!
* \ingroup BoxModels
* \defgroup Stokes2cModel Compositional box stokes model
*/
/*!
* \ingroup Stokes2cModel
* \ingroup BoxStokes2cModel
* \brief Adaption of the BOX scheme to the compositional stokes model.
*
* This model implements a non-isothermal flow of a fluid
* \f$\alpha \in \{ w, n \}\f$.
* Using the standard Stokes approach a mass balance equation is
* solved:
* \f{eqnarray*}
&& \phi \frac{\partial (\sum_\alpha \varrho_\alpha X_\alpha^\kappa S_\alpha )}{\partial t}
- \sum_\alpha \text{div} \left\{ \varrho_\alpha X_\alpha^\kappa
\frac{k_{r\alpha}}{\mu_\alpha} \mbox{\bf K}
(\text{grad} p_\alpha - \varrho_{\alpha} \mbox{\bf g}) \right\}\\
&-& \sum_\alpha \text{div} \left\{{\bf D_{\alpha, pm}^\kappa} \varrho_{\alpha} \text{grad} X^\kappa_{\alpha} \right\}
- \sum_\alpha q_\alpha^\kappa = \quad 0 \qquad \kappa \in \{w, a\} \, ,
\alpha \in \{w, n\}
* \f}
\f}
* This model implements a non-isothermal two-component Stokes flow of a fluid
* solving a momentum balance, a mass balance, a conservation equation for one component,
* and one balance quation for the energy.
*
* Momentum Balance:
* \f[
\frac{\partial \left(\varrho_g {\boldsymbol{v}}_g\right)}{\partial t}
+ \boldsymbol{\nabla} \boldsymbol{\cdot} \left(p_g {\bf {I}}
- \mu_g \left(\boldsymbol{\nabla} \boldsymbol{v}_g
+ \boldsymbol{\nabla} \boldsymbol{v}_g^T\right)\right)
- \varrho_g {\bf g} = 0,
* \f]
*
* Mass balance equation:
* \f[
\frac{\partial \varrho_g}{\partial t} + \boldsymbol{\nabla}\boldsymbol{\cdot}\left(\varrho_g {\boldsymbol{v}}_g\right) - q_g = 0
* \f]
*
* Component mass balance equation:
* \f[
\frac{\partial \left(\varrho_g X_g^\kappa\right)}{\partial t}
+ \boldsymbol{\nabla} \boldsymbol{\cdot} \left( \varrho_g {\boldsymbol{v}}_g X_g^\kappa
- D^\kappa_g \varrho_g \boldsymbol{\nabla} X_g^\kappa \right)
- q_g^\kappa = 0
* \f]
*
* This is discretized using a fully-coupled vertex
* centered finite volume (box) scheme as spatial and
......
/*****************************************************************************
* Copyright (C) 2010 by Katherina Baber, Klaus Mosthaf *
* Copyright (C) 2008-2009 by Bernd Flemisch, Andreas Lauser *
* Institute of Hydraulic Engineering *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
* \brief A stokes2c specific controller for the newton solver.
*/
#ifndef DUMUX_STOKES2C_NEWTON_CONTROLLER_HH
#define DUMUX_STOKES2C_NEWTON_CONTROLLER_HH
#include <dumux/nonlinear/newtoncontroller.hh>
namespace Dumux {
/*!
* \brief A Stokes2c specific controller for the newton solver.
*
* This controller 'knows' what a 'physically meaningful' solution is
* which allows the newton method to abort quicker if the solution is
* way out of bounds.
*/
template <class TypeTag>
class Stokes2cNewtonController : public NewtonController<TypeTag>
{
typedef NewtonController<TypeTag> ParentType;
typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem;
public:
Stokes2cNewtonController(const Problem &problem)
: ParentType(problem)
{
Dune::FMatrixPrecision<>::set_singular_limit(1e-35);
this->setRelTolerance(1e-4);
this->setTargetSteps(15);
this->setMaxSteps(23);
};
};
}
#endif
/*****************************************************************************
* Copyright (C) 2009 by Andreas Lauser *
* Institute of Hydraulic Engineering *
* University of Stuttgart, Germany *
* email: <givenname>.<name>@iws.uni-stuttgart.de *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
*
* \brief Base class for all problems which use the stokes transport model.
*/
#ifndef DUMUX_STOKESTRANSPORT_PROBLEM_HH
#define DUMUX_STOKESTRANSPORT_PROBLEM_HH
#include "dumux/freeflow/stokes2c/stokes2cnewtoncontroller.hh"
#include <dumux/freeflow/stokes/stokesproblem.hh>
namespace Dumux
{
/*!
* \ingroup Stokes2cProblems
* \brief Base class for all problems which use the
* stokes transport box model.
*
* \todo Please doc me more!
*/
template<class TypeTag>
class Stokes2cProblem : public StokesProblem<TypeTag>
{
typedef StokesProblem<TypeTag> ParentType;
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
public:
Stokes2cProblem(TimeManager &timeManager, const GridView &gridView)
: ParentType(timeManager, gridView)
{
}
/*!
* \name Problem parameters
*/
// \{
};
}
#endif
......@@ -18,6 +18,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \ingroup Properties
* \ingroup BoxProperties
* \ingroup BoxStokes2cModel
*
* \file
*
* \brief Defines the properties required for the compositional
......@@ -29,15 +33,14 @@
#include "stokes2cindices.hh"
#include <dumux/freeflow/stokes/stokesproperties.hh>
#include "stokes2cvolumevariables.hh"
#include "stokes2cfluxvariables.hh"
#include <dumux/material/fluidstates/compositionalfluidstate.hh>
#include "stokes2clocalresidual.hh"
namespace Dumux
{
/*!
* \addtogroup Stokes2cModel
* \addtogroup BoxStokes2cModel
*/
// \{
////////////////////////////////
......@@ -55,10 +58,6 @@ class Stokes2cVolumeVariables;
template <class TypeTag>
class Stokes2cFluxVariables;
template <class TypeTag>
class Stokes2cNewtonController;
////////////////////////////////
// properties
////////////////////////////////
......@@ -96,12 +95,6 @@ SET_TYPE_PROP(BoxStokes2c,
LocalResidual,
Stokes2cLocalResidual<TypeTag>);
//! Use the stokes2c specific newton controller for the compositional stokes model
SET_PROP(BoxStokes2c, NewtonController)
{public:
typedef Stokes2cNewtonController<TypeTag> type;
};
//! the Model property
SET_TYPE_PROP(BoxStokes2c, Model, Stokes2cModel<TypeTag>);
......
......@@ -33,9 +33,10 @@ namespace Dumux
{
/*!
* \ingroup Stokes2cModel
* \ingroup BoxStokes2cModel
* \ingroup BoxVolumeVariables
* \brief Contains the quantities which are are constant within a
* finite volume in the compositional Stokes model.
* finite volume in the two-component Stokes model.
*/
template <class TypeTag>
class Stokes2cVolumeVariables : public StokesVolumeVariables<TypeTag>
......
......@@ -31,12 +31,14 @@
#define DUMUX_STOKES2CNI_FLUX_VARIABLES_HH
#include <dumux/common/math.hh>
#include <dumux/freeflow/stokes2c/stokes2cfluxvariables.hh>
namespace Dumux
{
/*!
* \ingroup Stokes2cniModel
* \ingroup BoxStokes2cniModel
* \ingroup BoxFluxVariables
* \brief This template class contains data which is required to
* calculate the energy fluxes over a face of a finite
* volume for the non-isothermal compositional stokes model.
......
......@@ -34,6 +34,8 @@ namespace Dumux
// \{
/*!
* \ingroup BoxStokes2cniModel
* \ingroup BoxIndices
* \brief Enumerations for the non-isothermal compositional stokes model
*/
template <class TypeTag, int PVOffset=0>
......
......@@ -30,13 +30,14 @@
#include <dumux/freeflow/stokes2c/stokes2clocalresidual.hh>
#include <dumux/freeflow/stokes2cni/stokes2cnivolumevariables.hh>
#include <dumux/freeflow/stokes2cni/stokes2cnifluxvariables.hh>
#include "stokes2cnivolumevariables.hh"
#include "stokes2cnifluxvariables.hh"
namespace Dumux
{
/*!
* \ingroup Stokes2cniModel
* \ingroup BoxStokes2cniModel
* \ingroup BoxLocalResidual
* \brief Element-wise calculation of the Jacobian matrix for problems
* using the non-isothermal compositional stokes box model. This is derived
* from the stokes2c box model.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment