Commit 740b7cd3 authored by Alexander Kissinger's avatar Alexander Kissinger
Browse files

Adjusted the documentation of the CO2 models and tests according to FS#209.

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@12615 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 251c3940
......@@ -468,7 +468,7 @@ protected:
const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
const int vIdx,
const int scvIdx,
bool isOldSol)
{ }
......
......@@ -115,16 +115,9 @@ protected:
}
/*!
* \brief Update all quantities for a given control volume.
*
* \param sol The solution primary variables
* \param problem The problem
* \param element The element
* \param fvGeometry The current finite volume geometry of the element
* \param scvIdx The local index of the sub-control volume
* \param isOldSol Evaluate function with solution of current or previous time step
* \copydoc ImplicitVolumeVariables::update
*/
void updateEnergy_(const PrimaryVariables &sol,
void updateEnergy_(const PrimaryVariables &priVars,
const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
......
......@@ -19,7 +19,7 @@
/*!
* \file
*
* \brief Adaption of the BOX or CC scheme to the two-phase two-component flow model without constraint solver.
* \brief Adaption of the fully implicit scheme to the CO2Model model.
*/
#ifndef DUMUX_CO2_MODEL_HH
#define DUMUX_CO2_MODEL_HH
......@@ -150,7 +150,8 @@ public:
/*!
* \brief Set the old phase of all verts state to the current one.
* \brief Performs variable switch at a vertex, returns true if a
* variable switch was performed.
*/
bool primaryVarSwitch_(SolutionVector &globalSol,
const VolumeVariables &volVars, int globalIdx,
......
......@@ -20,8 +20,7 @@
* \file
*
* \brief Contains the quantities which are constant within a
* finite volume in the non-isothermal CO2
* model.
* finite volume in the CO2 model.
*/
#ifndef DUMUX_CO2_VOLUME_VARIABLES_HH
#define DUMUX_CO2_VOLUME_VARIABLES_HH
......@@ -34,8 +33,7 @@ namespace Dumux
* \ingroup CO2Model
* \ingroup ImplicitVolumeVariables
* \brief Contains the quantities which are are constant within a
* finite volume in the isothermal CO2
* model.
* finite volume in the CO2 model.
*/
template <class TypeTag>
class CO2VolumeVariables: public TwoPTwoCVolumeVariables<TypeTag>
......@@ -103,14 +101,7 @@ public:
/*!
* \brief Update all quantities for a given control volume.
*
* \param priVars The primary variables
* \param problem The problem
* \param element The element
* \param fvGeometry The finite-volume geometry in the fully implicit scheme
* \param scvIdx The local index of the SCV (sub-control volume)
* \param isOldSol Evaluate function with solution of current or previous time step
* \copydoc ImplicitVolumeVariables::update
*/
void update(const PrimaryVariables &priVars,
const Problem &problem,
......@@ -421,6 +412,9 @@ protected:
return 0;
}
/*!
* \brief Called by update() to compute the energy related quantities
*/
void updateEnergy_(const PrimaryVariables &sol,
const Problem &problem,
const Element &element,
......
......@@ -19,7 +19,8 @@
/*!
* \file
*
* \brief Adaption of the BOX or CC scheme to the non-isothermal two-phase two-component flow model without constraint solver.
* \brief Adaption of the fully implicit scheme to the non-isothermal
* CO2 model.
*/
#ifndef DUMUX_CO2NI_MODEL_HH
#define DUMUX_CO2NI_MODEL_HH
......@@ -29,7 +30,8 @@
namespace Dumux {
/*!
* \ingroup CO2NIModel
* \brief Adaption of the BOX or CC scheme to the non-isothermal two-phase two-component flow model.
* \brief Adaption of the fully implicit scheme to the non-isothermal
* CO2 model.
*
* See TwoPTwoCNI model for reference to the equations.
* The CO2NI model is derived from the CO2 model. In the CO2 model the phase switch criterion
......
......@@ -69,7 +69,7 @@ public:
{ return this->fluidState_.internalEnergy(phaseIdx); };
/*!
* \brief Returns the total enthalpy of a phase in the sub-control
* \brief Returns the total enthalpy of a phase in the control
* volume.
*
* \param phaseIdx The phase index
......@@ -79,14 +79,14 @@ public:
/*!
* \brief Returns the total heat capacity \f$\mathrm{[J/(K*m^3]}\f$ of the rock matrix in
* the sub-control volume.
* the control volume.
*/
Scalar heatCapacity() const
{ return heatCapacity_; };
/*!
* \brief Returns the thermal conductivity \f$\mathrm{[W/(m*K)]}\f$ of the fluid phase in
* the sub-control volume.
* the control volume.
*/
Scalar thermalConductivity(const int phaseIdx) const
{ return FluidSystem::thermalConductivity(this->fluidState_, phaseIdx); };
......@@ -115,16 +115,9 @@ protected:
}
/*!
* \brief Update all quantities for a given control volume.
*
* \param sol The solution primary variables
* \param problem The problem
* \param element The element
* \param fvGeometry Evaluate function with solution of current or previous time step
* \param scvIdx The local index of the SCV (sub-control volume)
* \param isOldSol Evaluate function with solution of current or previous time step
* \copydoc ImplicitVolumeVariables::update
*/
void updateEnergy_(const PrimaryVariables &sol,
void updateEnergy_(const PrimaryVariables &priVars,
const Problem &problem,
const Element &element,
const FVElementGeometry &fvGeometry,
......
......@@ -19,8 +19,8 @@
/**
* \file
*
* \brief Provides the class with the tabulated values of CO2 for the
* benchmark3 problem
* \brief Provides the class with the tabulated values of CO2 density
* and enthalpy
*/
#ifndef DUMUX_HETEROGENEOUS_CO2TABLES_HH
#define DUMUX_HETEROGENEOUS_CO2TABLES_HH
......
......@@ -19,7 +19,7 @@
/*!
* \file
*
* \brief Definition of a problem, where CO2 is injected under a reservoir.
* \brief Definition of a problem, where CO2 is injected in a reservoir.
*/
#ifndef DUMUX_HETEROGENEOUS_PROBLEM_HH
#define DUMUX_HETEROGENEOUS_PROBLEM_HH
......@@ -97,12 +97,7 @@ SET_SCALAR_PROP(HeterogeneousProblem, ProblemSalinity, 1e-1);
SET_TYPE_PROP(HeterogeneousProblem, Model, CO2Model<TypeTag>);
SET_TYPE_PROP(HeterogeneousProblem, VolumeVariables, CO2VolumeVariables<TypeTag>);
// Enable gravity
SET_BOOL_PROP(HeterogeneousProblem, ProblemEnableGravity, true);
SET_BOOL_PROP(HeterogeneousProblem, ImplicitEnableJacobianRecycling, false);
SET_BOOL_PROP(HeterogeneousProblem, VtkAddVelocity, false);
// Use Moles
SET_BOOL_PROP(HeterogeneousProblem, UseMoles, false);
}
......@@ -110,7 +105,7 @@ SET_BOOL_PROP(HeterogeneousProblem, UseMoles, false);
/*!
* \ingroup CO2Model
* \ingroup ImplicitTestProblems
* \brief Problem where CO2 is injected under a low permeable layer in a depth of 1200m.
* \brief Definition of a problem, where CO2 is injected in a reservoir.
*
* The domain is sized 200m times 100m and consists of four layers, a
* permeable reservoir layer at the bottom, a barrier rock layer with reduced permeability, another reservoir layer
......@@ -183,6 +178,7 @@ class HeterogeneousProblem : public ImplicitPorousMediaProblem<TypeTag>
typedef Dumux::CO2<Scalar, CO2Table> CO2;
enum { isBox = GET_PROP_VALUE(TypeTag, ImplicitIsBox) };
enum { dofCodim = isBox ? dim : 0 };
//! property that defines whether mole or mass fractions are used
static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
public:
......@@ -262,7 +258,9 @@ public:
}
/*!
* \brief Called directly after the time integration.
* \brief User defined output after the time integration
*
* Will be called diretly after the time integration.
*/
void postTimeStep()
{
......@@ -278,6 +276,11 @@ public:
}
}
/*!
* \brief Append all quantities of interest which can be derived
* from the solution of the current time step to the VTK
* writer.
*/
void addOutputVtkFields()
{
typedef Dune::BlockVector<Dune::FieldVector<double, 1> > ScalarField;
......@@ -354,13 +357,11 @@ public:
}
/*!
* \brief Return the sources within the domain.
* \brief Returns the source term
*
* \param values Stores the source values, acts as return value
* \param values Stores the source values for the conservation equations in
* \f$ [ \textnormal{unit of primary variable} / (m^\textrm{dim} \cdot s )] \f$
* \param globalPos The global position
*
* Depending on whether useMoles is set on true or false, the flux has to be given either in
* kg/(m^3*s) or mole/(m^3*s) in the input file!!
*/
void sourceAtPos(PrimaryVariables &values,
const GlobalPosition &globalPos) const
......@@ -410,13 +411,12 @@ public:
}
/*!
* \brief Evaluate the boundary conditions for a dirichlet
* boundary segment.
* \brief Evaluates the boundary conditions for a Dirichlet
* boundary segment
*
* \param values The dirichlet values for the primary variables
* \param values Stores the Dirichlet values for the conservation equations in
* \f$ [ \textnormal{unit of primary variable} ] \f$
* \param globalPos The global position
*
* For this method, the \a values parameter stores primary variables.
*/
void dirichletAtPos(PrimaryVariables &values, const GlobalPosition &globalPos) const
{
......@@ -424,18 +424,19 @@ public:
}
/*!
* \brief Evaluate the boundary conditions for a neumann
* \brief Evaluate the boundary conditions for a Neumann
* boundary segment.
*
* \param values The neumann values for the conservation equations
* \param values Stores the Neumann values for the conservation equations in
* \f$ [ \textnormal{unit of conserved quantity} / (m^(dim-1) \cdot s )] \f$
* \param element The finite element
* \param fvGeometry The finite-volume geometry in the box scheme
* \param fvGeometry The finite volume geometry of the element
* \param intersection The intersection between element and boundary
* \param scvIdx The local vertex index
* \param scvIdx The local index of the sub-control volume
* \param boundaryFaceIdx The index of the boundary face
*
* For this method, the \a values parameter stores the mass flux
* in normal direction of each phase. Negative values mean influx.
* The \a values store the mass flux of each phase normal to the boundary.
* Negative values indicate an inflow.
*
* Depending on whether useMoles is set on true or false, the flux has to be given either in
* kg/(m^2*s) or mole/(m^2*s) in the input file!!
......@@ -464,13 +465,11 @@ public:
// \{
/*!
* \brief Evaluate the initial value for a control volume.
*
* \param values The initial values for the primary variables
* \param globalPos The center of the finite volume which ought to be set.
* \brief Evaluates the initial values for a control volume
*
* For this method, the \a values parameter stores primary
* variables.
* \param values Stores the initial values for the conservation equations in
* \f$ [ \textnormal{unit of primary variables} ] \f$
* \param globalPos The global position
*/
void initialAtPos(PrimaryVariables &values,
const GlobalPosition &globalPos) const
......@@ -479,10 +478,10 @@ public:
}
/*!
* \brief Return the initial phase state inside a control volume.
* \brief Returns the initial phase state for a control volume.
*
* \param vertex The vertex
* \param globalIdx The index of the global vertex
* \param globalIdx The global index of the vertex
* \param globalPos The global position
*/
int initialPhasePresence(const Vertex &vertex,
......@@ -493,7 +492,15 @@ public:
// \}
private:
// the internal method for the initial condition
/*!
* \brief Evaluates the initial values for a control volume
*
* The internal method for the initial condition
*
* \param values Stores the initial values for the conservation equations in
* \f$ [ \textnormal{unit of primary variables} ] \f$
* \param globalPos The global position
*/
void initial_(PrimaryVariables &values,
const GlobalPosition &globalPos) const
{
......
......@@ -19,8 +19,9 @@
/*!
* \file
*
* \brief Definition of the spatial parameters for the injection
* problem which uses the non-isothermal or isothermal CO2 box or cc model
* \brief Definition of the spatial parameters for the heterogeneous
* problem which uses the non-isothermal or isothermal CO2
* fully implicit model.
*/
#ifndef DUMUX_HETEROGENEOUS_SPATIAL_PARAMS_HH
......@@ -67,7 +68,9 @@ public:
/*!
* \ingroup CO2Model
* \ingroup ImplicitTestProblems
* \brief Definition of the spatial parameters for the HeterogeneousProblem and HeterogeneousNIProblem
* \brief Definition of the spatial parameters for the heterogeneous
* problem which uses the non-isothermal or isothermal CO2
* fully implicit model.
*/
template<class TypeTag>
class HeterogeneousSpatialParams : public ImplicitSpatialParams<TypeTag>
......@@ -142,6 +145,11 @@ public:
~HeterogeneousSpatialParams()
{}
/*!
* \brief Reads layer information from the grid
*
* \param gridPtr The grid pointer
*/
void setParams(GridPointer *gridPtr)
{
gridPtr_ = gridPtr;
......@@ -174,12 +182,11 @@ public:
}
/*!
* \brief Apply the intrinsic permeability tensor to a pressure
* potential gradient.
* \brief Returns the scalar intrinsic permeability \f$[m^2]\f$
*
* \param element The current finite element
* \param fvGeometry The current finite volume geometry of the element
* \param scvIdx The index of the sub-control volume
* \param element The finite element
* \param fvGeometry The finite volume geometry of the element
* \param scvIdx The local index of the sub-control volume
*/
const Scalar intrinsicPermeability(const Element &element,
const FVElementGeometry &fvGeometry,
......@@ -202,12 +209,11 @@ public:
}
/*!
* \brief Define the porosity \f$[-]\f$ of the spatial parameters
* \brief Returns the porosity \f$[-]\f$
*
* \param element The finite element
* \param fvGeometry The finite volume geometry
* \param scvIdx The local index of the sub-control volume where
* the porosity needs to be defined
* \param fvGeometry The finite volume geometry of the element
* \param scvIdx The local index of the sub-control volume
*/
Scalar porosity(const Element &element,
const FVElementGeometry &fvGeometry,
......@@ -231,12 +237,12 @@ public:
/*!
* \brief return the parameter object for the Brooks-Corey material law which depends on the position
* \brief Returns the parameter object for the Brooks-Corey material law
*
* \param element The current finite element
* \param fvGeometry The current finite volume geometry of the element
* \param scvIdx The index of the sub-control volume
*/
* \param element The finite element
* \param fvGeometry The finite volume geometry of the element
* \param scvIdx The local index of the sub-control volume
*/
const MaterialLawParams& materialLawParams(const Element &element,
const FVElementGeometry &fvGeometry,
int scvIdx) const
......@@ -246,14 +252,15 @@ public:
}
/*!
* \brief Returns the heat capacity \f$[J/m^3 K]\f$ of the rock matrix.
* \brief Returns the effective heat capacity \f$[J/m^3 K]\f$
*
* This is only required for non-isothermal models.
* This is only required for non-isothermal models. This function does not
* return the specific heat capacity, but an effective heat capacity, which is
* \f$c_\textrm{p,eff,s} = c_\textrm{p,s} \varrho_\textrm{s} \left(1 - \phi\right)\f$
*
* \param element The finite element
* \param fvGeometry The finite volume geometry
* \param scvIdx The local index of the sub-control volume where
* the heat capacity needs to be defined
* \param fvGeometry The finite volume geometry of the element
* \param scvIdx The local index of the sub-control volume
*/
double heatCapacity(const Element &element,
const FVElementGeometry &fvGeometry,
......@@ -266,12 +273,13 @@ public:
}
/*!
* \brief Returns the thermal conductivity \f$[W/m^2]\f$ of the porous material.
* \brief Returns the thermal conductivity \f$[W/m^2]\f$ of the solid
*
* This is only required for non-isothermal models.
*
* \param element The finite element
* \param fvGeometry The finite volume geometry
* \param scvIdx The local index of the sub-control volume where
* the heat capacity needs to be defined
* \param fvGeometry The finite volume geometry of the element
* \param scvIdx The local index of the sub-control volume
*/
Scalar thermalConductivitySolid(const Element &element,
const FVElementGeometry &fvGeometry,
......
......@@ -28,17 +28,26 @@ TemperatureHigh = 331.00 # [Pa] high end for tabularization of fluid propert
####################################################################
[Problem]
Name = heterogeneousbox # [-] the name of the output files
EnableGravity = TRUE
DepthBOR = 1200# [m] depth below ground surface
InjectionRate = 1e-4 # [kg/sq/s]
###################################################################
[Vtk]
AddVelocity = FALSE
####################################################################
[LinearSolver]
ResidualReduction = 1e-10
###############################################################
# Simulation restart
#
# DuMux simulations can be restarted from *.drs files
# Set restart to the value of a specific file, e.g.: 'restart = 27184.1'
# for the restart file
# name_time = 27184.1_rank = 0.drs
# Please comment in the below value, if restart is desired.
####################################################################
# restart = ...
# Set Restart to the value of a specific file,
# e.g.: 'Restart = 27184.1' for the restart file
# name_time=27184.1_rank=0.drs
# Please comment in the two lines below, if restart is desired.
###############################################################
# [TimeManager]
# Restart = ...
......@@ -28,17 +28,26 @@ TemperatureHigh = 331.00 # [Pa] high end for tabularization of fluid propert
####################################################################
[Problem]
Name = heterogeneouscc # [-] the name of the output files
EnableGravity = TRUE
DepthBOR = 1200# [m] depth below ground surface
InjectionRate = 1e-4 # [kg/sq/s]
###################################################################
[Vtk]
AddVelocity = FALSE
####################################################################
[LinearSolver]
ResidualReduction = 1e-10
###############################################################
# Simulation restart
#
# DuMux simulations can be restarted from *.drs files
# Set restart to the value of a specific file, e.g.: 'restart = 27184.1'
# for the restart file
# name_time = 27184.1_rank = 0.drs
# Please comment in the below value, if restart is desired.
####################################################################
# restart = ...
# Set Restart to the value of a specific file,
# e.g.: 'Restart = 27184.1' for the restart file
# name_time=27184.1_rank=0.drs
# Please comment in the two lines below, if restart is desired.
###############################################################
# [TimeManager]
# Restart = ...
......@@ -19,8 +19,8 @@
/**
* \file
*
* \brief Provides the class with the tabulated values of CO2 for the
* benchmark3 problem
* \brief Provides the class with the tabulated values of CO2 density
* and enthalpy
*/
#ifndef DUMUX_HETEROGENEOUS_NI_CO2TABLES_HH
#define DUMUX_HETEROGENEOUS_NI_CO2TABLES_HH
......
......@@ -19,7 +19,7 @@
/*!
* \file
*
* \brief Definition of a problem, where CO2 is injected under a reservoir.
* \brief Definition of a problem, where CO2 is injected in a reservoir.
*/
#ifndef DUMUX_HETEROGENEOUS_NI_PROBLEM_NI_HH
#define DUMUX_HETEROGENEOUS_NI_PROBLEM_NI_HH
......@@ -85,12 +85,7 @@ SET_SCALAR_PROP(HeterogeneousNIProblem, ProblemSalinity, 1e-1);
SET_TYPE_PROP(HeterogeneousNIProblem, Model, CO2NIModel<TypeTag>);
SET_TYPE_PROP(HeterogeneousNIProblem, VolumeVariables, CO2NIVolumeVariables<TypeTag>);
// Enable gravity
SET_BOOL_PROP(HeterogeneousNIProblem, ProblemEnableGravity, true);
SET_BOOL_PROP(HeterogeneousNIProblem, ImplicitEnableJacobianRecycling, false);
SET_BOOL_PROP(HeterogeneousNIProblem, VtkAddVelocity, false);
// Use Moles
SET_BOOL_PROP(HeterogeneousNIProblem, UseMoles, false);
}
......@@ -98,7 +93,7 @@ SET_BOOL_PROP(HeterogeneousNIProblem, UseMoles, false);
/*!
* \ingroup CO2NIModel
* \ingroup ImplicitTestProblems
* \brief Problem where CO2 is injected under a low permeable layer in a depth of 1200m.
* \brief Definition of a problem, where CO2 is injected in a reservoir.
*
* The domain is sized 200m times 100m and consists of four layers, a
* permeable reservoir layer at the bottom, a barrier rock layer with reduced permeability followed by another reservoir layer
......@@ -258,7 +253,9 @@ public:
}
/*!
* \brief Called directly after the time integration.
* \brief User defined output after the time integration
*
* Will be called diretly after the time integration.
*/
void postTimeStep()
{
......@@ -275,7 +272,9 @@ public:
}
/*!
* \brief Add enthalpy and peremeability to output.
* \brief Append all quantities of interest which can be derived
* from the solution of the current time step to the VTK
* writer.
*/
void addOutputVtkFields()
{
......@@ -355,13 +354,14 @@ public:
Scalar temperatureAtPos(const GlobalPosition &globalPos) const
{
return temperature_(globalPos);
};
}
#endif
/*!
* \brief Returns the sources within the domain.
* \brief Returns the source term
*
* \param values Stores the source values, acts as return value
* \param values Stores the source values for the conservation equations in
* \f$ [ \textnormal{unit of primary variable} / (m^\textrm{dim} \cdot s )] \f$
* \param globalPos The global position
*
* Depending on whether useMoles is set on true or false, the flux has to be given either in
......@@ -416,13 +416,12 @@ public:
}
/*!
* \brief Evaluate the boundary conditions for a dirichlet
* boundary segment.
* \brief Evaluates the boundary conditions for a Dirichlet
* boundary segment
*
* \param values The dirichlet values for the primary variables
* \param values Stores the Dirichlet values for the conservation equations in
* \f$ [ \textnormal{unit of primary variable} ] \f$
* \param globalPos The global position
*
* For this method, the \a values parameter stores primary variables.
*/
void dirichletAtPos(PrimaryVariables &values, const GlobalPosition &globalPos) const
{
......@@ -430,23 +429,22 @@ public: