Commit 72589d16 authored by Timo Koch's avatar Timo Koch

Merge branch 'cleanup/doxygen-for-3.0-porousmediumflow' into 'master'

Cleanup/doxygen for 3.0 porousmediumflow

Closes #596

See merge request !1416
parents 2ec9a3d8 921a3b36
......@@ -109,6 +109,12 @@
* \brief Three-phase, two-component Darcy flow with water (liquid & gas) and oil
* \copydetails ./porousmediumflow/3pwateroil/model.hh
*/
/*!
* \ingroup PorousmediumflowModels
* \defgroup BoxDFMModel boxdfm
* \brief \todo
* \copydetails ./porousmediumflow/boxdfm/model.hh
*/
/*!
* \ingroup PorousmediumflowModels
* \defgroup CO2Model CO2
......@@ -131,13 +137,13 @@
*/
/*!
* \ingroup PorousmediumflowModels
* \defgroup PorousmediumNonEquilibriumModel NonEquilibrium
* \defgroup NonEquilibriumModel NonEquilibrium
* \brief Model that adds nonequilibrium equations to another porous medium flow model (only used in MPNCModel currently)
* \copydetails ./porousmediumflow/nonequilibrium/model.hh
*/
/*!
* \ingroup PorousmediumNonEquilibriumModel
* \defgroup PorousmediumThermalNonEquilibriumModel ThermalNonEquilibrium
* \ingroup NonEquilibriumModel
* \defgroup ThermalNonEquilibriumModel ThermalNonEquilibrium
* \brief Model that adapts the energy localresidual to thermal nonequilibrium
* \copydetails ./porousmediumflow/nonequilibrium/thermal/localresidual.hh
*/
......
......@@ -1837,3 +1837,12 @@ pages={271--282},
year={2013},
publisher={Elsevier}
}
@article{Binning1999,
title={Practical implementation of the fractional flow approach to multi-phase flow simulation},
author={P. Binning and M. A. Celia},
journal={Advances in water resources},
volume={22},
pages={461-478},
year={1999}
}
......@@ -22,14 +22,14 @@
* \brief Element-wise calculation of the residual and its derivatives
* for a single-phase, incompressible, test problem.
*/
#ifndef DUMUX_1P_INCOMPRESSIBLE_LOCAL_RESIDUAL_HH
#define DUMUX_1P_INCOMPRESSIBLE_LOCAL_RESIDUAL_HH
#include <dumux/discretization/method.hh>
#include <dumux/porousmediumflow/immiscible/localresidual.hh>
namespace Dumux
{
namespace Dumux {
/*!
* \ingroup OnePModel
......@@ -79,7 +79,7 @@ public:
problem.addSourceDerivatives(partialDerivatives, element, fvGeometry, curVolVars, scv);
}
//! flux derivatives for the cell-centered tpfa scheme
//! Flux derivatives for the cell-centered tpfa scheme
template<class PartialDerivativeMatrices, class T = TypeTag>
std::enable_if_t<GetPropType<T, Properties::FVGridGeometry>::discMethod == DiscretizationMethod::cctpfa, void>
addFluxDerivatives(PartialDerivativeMatrices& derivativeMatrices,
......@@ -105,7 +105,7 @@ public:
derivativeMatrices[scvf.outsideScvIdx()][conti0EqIdx][pressureIdx] -= deriv;
}
//! flux derivatives for the cell-centered mpfa scheme
//! Flux derivatives for the cell-centered mpfa scheme
template<class PartialDerivativeMatrices, class T = TypeTag>
std::enable_if_t<GetPropType<T, Properties::FVGridGeometry>::discMethod == DiscretizationMethod::ccmpfa, void>
addFluxDerivatives(PartialDerivativeMatrices& derivativeMatrices,
......@@ -142,7 +142,7 @@ public:
: tij[i]*up;
}
//! flux derivatives for the box scheme
//! Flux derivatives for the box scheme
template<class JacobianMatrix, class T = TypeTag>
std::enable_if_t<GetPropType<T, Properties::FVGridGeometry>::discMethod == DiscretizationMethod::box, void>
addFluxDerivatives(JacobianMatrix& A,
......
......@@ -21,6 +21,7 @@
* \ingroup OnePModel
* \brief Defines the indices for the one-phase fully implicit model.
*/
#ifndef DUMUX_1P_INDICES_HH
#define DUMUX_1P_INDICES_HH
......
......@@ -19,8 +19,9 @@
/*!
* \file
* \ingroup OnePModel
* \brief Adds I/O fields specific to the one phase model
* \brief Adds I/O fields specific to the one phase model.
*/
#ifndef DUMUX_ONEP_IO_FIELDS_HH
#define DUMUX_ONEP_IO_FIELDS_HH
......@@ -32,7 +33,7 @@ namespace Dumux {
/*!
* \ingroup OnePModel
* \brief Adds I/O fields specific to the one phase model
* \brief Adds I/O fields specific to the one phase model.
*/
class OnePIOFields
{
......
......@@ -115,7 +115,7 @@ struct OnePNI { using InheritsFrom = std::tuple<OneP>; };
} // end namespace TTag
///////////////////////////////////////////////////////////////////////////
// properties for the isothermal single phase model
// Properties for the isothermal single phase model
///////////////////////////////////////////////////////////////////////////
template<class TypeTag>
struct IOFields<TypeTag, TTag::OneP> { using type = OnePIOFields; }; //!< default I/O fields specific to this model
......@@ -146,9 +146,10 @@ public:
/*!
* \brief The fluid state which is used by the volume variables to
* store the thermodynamic state. This should be chosen
* appropriately for the model ((non-)isothermal, equilibrium, ...).
* This can be done in the problem.
* store the thermodynamic state.
*
* This should be chosen appropriately for the model ((non-)isothermal,
* equilibrium, ...). This can be done in the problem.
*/
template<class TypeTag>
struct FluidState<TypeTag, TTag::OneP>
......@@ -161,7 +162,7 @@ public:
};
///////////////////////////////////////////////////////////////////////////
// properties for the non-isothermal single phase model
// Properties for the non-isothermal single phase model
///////////////////////////////////////////////////////////////////////////
//! Add temperature to the output
......
......@@ -16,28 +16,30 @@
* 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
* \ingroup SequentialOnePModel
* \brief Class including data of one grid cell.
*/
#ifndef DUMUX_CELLDATA1P_HH
#define DUMUX_CELLDATA1P_HH
#include "properties.hh"
#include "fluxdata.hh"
/*!
* \file
* \ingroup SequentialOnePModel
* \brief Class including data of one grid cell.
*/
namespace Dumux
{
namespace Dumux {
template<class TypeTag>
class FluxData1P;
/*!
* \ingroup SequentialOnePModel
* Class including data of one grid cell.
* The variables of one-phase flow, which are the pressure as well as additional data assigned to
* cell-cell interfaces, so-called flux-data, are stored.
* \brief Class including data of one grid cell.
*
* The variables of one-phase flow, which are the pressure as well as
* additional data assigned to cell-cell interfaces,
* so-called flux-data, are stored.
*
* \tparam TypeTag The problem TypeTag
*/
......@@ -74,22 +76,22 @@ public:
// functions returning primary variables
////////////////////////////////////////////////////////////
//!\brief Returns the cell pressure
//! Returns the cell pressure
Scalar pressure()
{
return pressure_;
}
//!\brief Returns the cell pressure
//! Returns the cell pressure
Scalar pressure() const
{
return pressure_;
}
//!Sets the cell pressure
//! Sets the cell pressure
void setPressure(Scalar press)
{
pressure_ = press;
}
};
}
} // end namespace Dumux
#endif
......@@ -16,6 +16,12 @@
* 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
* \ingroup SequentialOnePModel
* \brief Sequential OneP Model solving the equations for pressure and velocity separately.
*/
#ifndef DUMUX_FVPRESSURE1P_HH
#define DUMUX_FVPRESSURE1P_HH
......@@ -24,17 +30,12 @@
#include <dumux/porousmediumflow/sequential/cellcentered/pressure.hh>
#include <dumux/porousmediumflow/1p/sequential/properties.hh>
/**
* \file
* \ingroup SequentialOnePModel
* \brief Sequential OneP Model solving the equations for pressure and velocity seperately.
*/
namespace Dumux
{
namespace Dumux {
/*! \ingroup SequentialOnePModel
* \brief Sequential OneP Model solving the equations for pressure and velocity seperately.
/*!
* \ingroup SequentialOnePModel
* \brief Sequential OneP Model solving the equations for pressure and velocity separately.
*
* This model solves equations of the form
* \f[
* \text{div}\, \boldsymbol v = q.
......@@ -110,7 +111,8 @@ public:
void getFluxOnBoundary(Dune::FieldVector<Scalar, 2>&,
const Intersection&, const CellData&, const bool);
/*! \brief Initializes the pressure model
/*!
* \brief Initializes the pressure model
*
* \copydetails FVPressure::initialize()
*
......@@ -130,10 +132,10 @@ public:
return;
}
/*! \brief Pressure update
/*!
* \brief Pressure update
*
* \copydetails FVPressure::update()
*
*/
void update()
{
......@@ -141,8 +143,8 @@ public:
storePressureSolution();
}
/*! \brief Globally stores the pressure solution
*
/*!
* \brief Globally stores the pressure solution
*/
void storePressureSolution()
{
......@@ -155,7 +157,8 @@ public:
}
}
/*! \brief Stores the pressure solution of a cell
/*!
* \brief Stores the pressure solution of a cell
*
* \param eIdxGlobal Global cell index
* \param cellData A CellData object
......@@ -167,13 +170,13 @@ public:
cellData.setPressure(press);
}
/*! \brief Adds pressure output to the output file
/*!
* \brief Adds pressure output to the output file
*
* Adds pressures to the output.
*
* \tparam MultiWriter Class defining the output writer
* \param writer The output writer (usually a <tt>VTKMultiWriter</tt> object)
*
*/
template<class MultiWriter>
void addOutputVtkFields(MultiWriter &writer)
......@@ -188,8 +191,9 @@ public:
return;
}
//! Constructs a FVPressure1P object
/**
/*!
* \brief Constructs a FVPressure1P object
*
* \param problem A problem class object
*/
FVPressure1P(Problem& problem) :
......@@ -212,7 +216,8 @@ private:
Scalar viscosity_;
};
/*! \brief Function which calculates the source entry
/*!
* \brief Function which calculates the source entry
*
* \copydetails FVPressure::getSource(EntryType&,const Element&,const CellData&,const bool)
*
......@@ -235,10 +240,10 @@ void FVPressure1P<TypeTag>::getSource(Dune::FieldVector<Scalar, 2>& entry, const
return;
}
/*! \brief Function which calculates the flux entry
/*!
* \brief Function which calculates the flux entry
*
* \copydetails FVPressure::getFlux(EntryType&,const Intersection&,const CellData&,const bool)
*
*/
template<class TypeTag>
void FVPressure1P<TypeTag>::getFlux(Dune::FieldVector<Scalar, 2>& entry, const Intersection& intersection
......@@ -283,7 +288,8 @@ void FVPressure1P<TypeTag>::getFlux(Dune::FieldVector<Scalar, 2>& entry, const I
return;
}
/*! \brief Function which calculates the flux entry at a boundary
/*!
* \brief Function which calculates the flux entry at a boundary
*
* \copydetails FVPressure::getFluxOnBoundary(EntryType&,const Intersection&,const CellData&,const bool)
*
......@@ -322,7 +328,7 @@ const Intersection& intersection, const CellData& cellData, const bool first)
{
problem_.dirichlet(boundValues, intersection);
//permeability vector at boundary
// permeability vector at boundary
// compute vectorized permeabilities
DimMatrix meanPermeability(0);
......@@ -334,18 +340,18 @@ const Intersection& intersection, const CellData& cellData, const bool first)
permeability/= viscosity_;
//get dirichlet pressure boundary condition
// get Dirichlet pressure boundary condition
Scalar pressBound = boundValues;
//calculate current matrix entry
// calculate current matrix entry
entry[matrix] = ((permeability * unitOuterNormal) / dist) * faceArea;
entry[rhs] = entry[matrix] * pressBound;
//calculate right hand side
// calculate right hand side
entry[rhs] -= density_ * (permeability * gravity_) * faceArea;
}
//set neumann boundary condition
// set Neumann boundary condition
else if (bcType.isNeumann(pressEqIdx))
{
problem_.neumann(boundValues, intersection);
......@@ -361,5 +367,5 @@ const Intersection& intersection, const CellData& cellData, const bool first)
return;
}
}
} // end namespace Dumux
#endif
......@@ -29,8 +29,7 @@
#include <dumux/common/properties/propertysystemmacros.hh>
#include <dumux/porousmediumflow/1p/sequential/diffusion/properties.hh>
namespace Dumux
{
namespace Dumux {
////////////////////////////////
// forward declarations
......@@ -40,8 +39,7 @@ namespace Dumux
////////////////////////////////
// properties
////////////////////////////////
namespace Properties
{
namespace Properties {
//////////////////////////////////////////////////////////////////
// Type tags
//////////////////////////////////////////////////////////////////
......@@ -53,16 +51,14 @@ NEW_TYPE_TAG(FVPressureOneP, INHERITS_FROM(PressureOneP));
// Property tags
//////////////////////////////////////////////////////////////////
}
}
} // end namespace Properties
} // end namespace Dumux
#include "velocity.hh"
#include "pressure.hh"
namespace Dumux
{
namespace Properties
{
namespace Dumux {
namespace Properties {
//////////////////////////////////////////////////////////////////
// Properties
//////////////////////////////////////////////////////////////////
......@@ -73,8 +69,7 @@ SET_TYPE_PROP(FVPressureOneP, PressureModel, FVPressure1P<TypeTag>);
//! Allow assembling algorithm for the pressure matrix to assemble only from one side of a cell-cell interface
SET_BOOL_PROP(FVPressureOneP, VisitFacesOnlyOnce, true);
// \}
}
}
} // end namespace Properties
} // end namespace Dumux
#endif
......@@ -16,26 +16,27 @@
* 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
* \ingroup SequentialOnePModel
* \brief Single Phase Finite Volume Model
*/
#ifndef DUMUX_FVPRESSUREVELOCITY1P_HH
#define DUMUX_FVPRESSUREVELOCITY1P_HH
// dumux environment
#include "pressure.hh"
#include <dumux/porousmediumflow/1p/sequential/properties.hh>
#include <dumux/porousmediumflow/sequential/cellcentered/velocity.hh>
/*!
* \file
* \ingroup SequentialOnePModel
* \brief Single Phase Finite Volume Model
*/
namespace Dumux
{
namespace Dumux {
/*! \ingroup SequentialOnePModel
/*!
* \ingroup SequentialOnePModel
* \brief Single Phase Finite Volume Model
*
* This model solves equations of the form
* \f[
* \textbf{div}\, \boldsymbol v = q.
......@@ -51,14 +52,14 @@ namespace Dumux
* on \f$ \Gamma_{Neumann} \f$.
*
* \tparam TypeTag The Type Tag
*
*/
template<class TypeTag> class FVPressureVelocity1P: public FVPressure1P<TypeTag>
{
using ParentType = FVPressure1P<TypeTag>;
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
public:
/*! \brief Initializes the pressure model
/*!
* \brief Initializes the pressure model
*
* \copydetails FVPressure::initialize()
*/
......@@ -68,10 +69,10 @@ public:
velocity_.calculateVelocity();
}
/*! \brief Pressure update
/*!
* \brief Pressure update
*
* \copydetails FVPressure::update()
*
*/
void update()
{
......@@ -79,13 +80,13 @@ public:
velocity_.calculateVelocity();
}
/*! \brief Adds velocity output to the output file
/*!
* \brief Adds velocity output to the output file
*
* Adds the velocities to the output.
*
* \tparam MultiWriter Class defining the output writer
* \param writer The output writer (usually a <tt>VTKMultiWriter</tt> object)
*
*/
template<class MultiWriter>
void addOutputVtkFields(MultiWriter &writer)
......@@ -94,7 +95,8 @@ public:
velocity_.addOutputVtkFields(writer);
}
/*! Constructs a FVPressure1P object
/*!
* Constructs a FVPressure1P object
*
* \param problem A problem class object
*/
......@@ -106,5 +108,5 @@ private:
FVVelocity<TypeTag, typename GET_PROP_TYPE(TypeTag, Velocity) > velocity_;
};
}
} // end namespace Dumux
#endif
......@@ -16,22 +16,23 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
#ifndef DUMUX_FVVELOCITY1P_HH
#define DUMUX_FVVELOCITY1P_HH
#include <dumux/porousmediumflow/1p/sequential/properties.hh>
/*!
* \file
* \ingroup SequentialOnePModel
* \brief Single phase finite volume velocity reconstruction
*/
#ifndef DUMUX_FVVELOCITY1P_HH
#define DUMUX_FVVELOCITY1P_HH
namespace Dumux
{
/*! \ingroup SequentialOnePModel
#include <dumux/porousmediumflow/1p/sequential/properties.hh>
namespace Dumux {
/*!
* \ingroup SequentialOnePModel
* \brief Single phase finite volume velocity reconstruction
*
* Calculates velocities from a known pressure field applying a finite volume discretization.
* The pressure has to be given as piecewise constant cell values.
* The velocity is calculated following Darcy's law as
......@@ -43,7 +44,6 @@ namespace Dumux
*
* \tparam TypeTag The Type Tag
*/
template<class TypeTag>
class FVVelocity1P
{
......@@ -79,8 +79,9 @@ class FVVelocity1P
using DimMatrix = Dune::FieldMatrix<Scalar, dim, dim>;
public:
//! Constructs a FVVelocity1P object
/**
/*!
* \brief Constructs a FVVelocity1P object
*
* \param problem A problem class object
*/
FVVelocity1P(Problem& problem)
......@@ -97,16 +98,16 @@ public:
// Calculates the velocity at a cell-cell interface.
void calculateVelocity(const Intersection&, CellData&);
//Calculates the velocity at a boundary.
// Calculates the velocity at a boundary.
void calculateVelocityOnBoundary(const Intersection&, CellData&);
/*! \brief Adds velocity output to the output file
/*!
* \brief Adds velocity output to the output file
*
* Adds the velocities to the output.
*
* \tparam MultiWriter Class defining the output writer
* \param writer The output writer (usually a <tt>VTKMultiWriter</tt> object)
*
*/
template<class MultiWriter>
void addOutputVtkFields(MultiWriter &writer)
......@@ -190,13 +191,15 @@ private:
Scalar viscosity_;
};
/*! \brief Calculates the velocity at a cell-cell interface.
*
* Calculates the velocity at a cell-cell interface from a given pressure field.
*
* \param intersection Intersection of two grid cells
* \param cellData Object containing all model relevant cell data
*/
/*!
* \ingroup SequentialOnePModel
* \brief Calculates the velocity at a cell-cell interface.
*
* Calculates the velocity at a cell-cell interface from a given pressure field.
*
* \param intersection Intersection of two grid cells
* \param cellData Object containing all model relevant cell data
*/
template<class TypeTag>
void FVVelocity1P<TypeTag>::calculateVelocity(const Intersection& intersection, CellData& cellData)
{
......@@ -235,16 +238,16 @@ void FVVelocity1P<TypeTag>::calculateVelocity(const Intersection& intersection,
permeability /= viscosity_;
//calculate potential gradients
// calculate potential gradients
Scalar potential = (cellData.pressure() - cellDataJ.pressure()) / dist;
potential += density_ * (unitOuterNormal * gravity_);
//store potentials for further calculations (velocity, saturation, ...)