Commit 8f821b1e authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[navierstokesnc][model] Improve docu

parent 738cdd08
......@@ -46,7 +46,7 @@ namespace Dumux
// \{
///////////////////////////////////////////////////////////////////////////
// properties for the single-phase, isothermal Navier-Stokes model
// properties for the single-phase Navier-Stokes model
///////////////////////////////////////////////////////////////////////////
namespace Properties {
......@@ -80,7 +80,11 @@ SET_BOOL_PROP(NavierStokes, EnableEnergyBalance, false); //!< The model is isoth
SET_BOOL_PROP(NavierStokes, EnableInertiaTerms, true); //!< Consider inertia terms by default
SET_BOOL_PROP(NavierStokes, NormalizePressure, true); //!< Normalize the pressure term in the momentum balance by default
//! The number of equations
/*!
* \brief The number of equations.
* There are as many momentum balance equations as dimensions
* and one mass balance equation.
*/
SET_PROP(NavierStokes, NumEq)
{
private:
......
......@@ -16,13 +16,13 @@
* 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 models which use the one-phase,
* fully implicit model.
* Adaption of the fully implicit scheme to the one-phase flow model.
*/
/*!
* \file
* \ingroup NavierStokesNCModel
*
* \brief A single-phase, multi-component isothermal Navier-Stokes model
* TODO: doc me!
*/
#ifndef DUMUX_NAVIERSTOKES_NC_MODEL_HH
#define DUMUX_NAVIERSTOKES_NC_MODEL_HH
......@@ -45,128 +45,118 @@
#include <dumux/material/fluidstates/compositional.hh>
namespace Dumux
{
/*!
* \ingroup NavierStokesModel TODO: doc me properly!
* \brief A single-phase, isothermal flow model using the fully implicit scheme.
*
* Single-phase, isothermal flow model, which uses a standard Darcy approach as the
* equation for the conservation of momentum:
* \f[
v = - \frac{\textbf K}{\mu}
\left(\textbf{grad}\, p - \varrho {\textbf g} \right)
* \f]
*
* and solves the mass continuity equation:
* \f[
\phi \frac{\partial \varrho}{\partial t} + \text{div} \left\lbrace
- \varrho \frac{\textbf K}{\mu} \left( \textbf{grad}\, p -\varrho {\textbf g} \right) \right\rbrace = q,
* \f]
* All equations are discretized using a vertex-centered finite volume (box)
* or cell-centered finite volume scheme as spatial
* and the implicit Euler method as time discretization.
* The model supports compressible as well as incompressible fluids.
*/
///////////////////////////////////////////////////////////////////////////
// properties for the single-phase, multi-component Navier-Stokes model
///////////////////////////////////////////////////////////////////////////
namespace Properties {
namespace Dumux
{
///////////////////////////////////////////////////////////////////////////
// properties for the isothermal Navier-Stokes model
///////////////////////////////////////////////////////////////////////////
namespace Properties {
//////////////////////////////////////////////////////////////////
// Type tags
//////////////////////////////////////////////////////////////////
//! The type tags for the implicit single-phase problems
NEW_TYPE_TAG(NavierStokesNC, INHERITS_FROM(NavierStokes));
NEW_TYPE_TAG(NavierStokesNCNI, INHERITS_FROM(NavierStokesNC, NavierStokesNonIsothermal));
///////////////////////////////////////////////////////////////////////////
// default property values for the isothermal single phase model
///////////////////////////////////////////////////////////////////////////
//! The number of equations
SET_PROP(NavierStokesNC, NumEq)
{
private:
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
static constexpr auto dim = GridView::dimension;
using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
public:
static constexpr int value = dim + FluidSystem::numComponents;
};
SET_INT_PROP(NavierStokesNC, ReplaceCompEqIdx, 0);
/*!
* \brief Set the property for the number of components.
*
* We just forward the number from the fluid system
*
*/
SET_PROP(NavierStokesNC, NumComponents)
{
private:
using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
public:
static constexpr int value = FluidSystem::numComponents;
};
//////////////////////////////////////////////////////////////////
// Type tags
//////////////////////////////////////////////////////////////////
//! the VolumeVariables property
SET_TYPE_PROP(NavierStokesNC, VolumeVariables, NavierStokesNCVolumeVariables<TypeTag>);
SET_TYPE_PROP(NavierStokesNC, Indices, NavierStokesNCIndices<TypeTag>);
//! The type tag for the single-phase, multi-component isothermal Navier-Stokes model
NEW_TYPE_TAG(NavierStokesNC, INHERITS_FROM(NavierStokes));
SET_TYPE_PROP(NavierStokesNC, FluxVariables, NavierStokesNCFluxVariables<TypeTag>);
//! The type tag for the single-phase, multi-component non-isothermal Navier-Stokes model
NEW_TYPE_TAG(NavierStokesNCNI, INHERITS_FROM(NavierStokesNC, NavierStokesNonIsothermal));
SET_TYPE_PROP(NavierStokesNC, LocalResidual, NavierStokesNCResidual<TypeTag>);
///////////////////////////////////////////////////////////////////////////
// default property values
///////////////////////////////////////////////////////////////////////////
/*!
* \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.
*/
SET_PROP(NavierStokesNC, FluidState)
{
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
public:
using type = CompositionalFluidState<Scalar, FluidSystem>;
};
/*!
* \brief Set the property for the number of components.
*
* We just forward the number from the fluid system
*
*/
SET_PROP(NavierStokesNC, NumComponents)
{
private:
using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
public:
static constexpr int value = FluidSystem::numComponents;
};
//! The one-phase model has no molecular diffusion
SET_BOOL_PROP(NavierStokesNC, EnableMolecularDiffusion, true);
/*!
* \brief The number of equations.
* There are as many momentum balance equations as dimensions
* and as many balance equations as components.
*/
SET_PROP(NavierStokesNC, NumEq)
{
private:
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
static constexpr auto dim = GridView::dimension;
using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
public:
static constexpr int value = dim + FluidSystem::numComponents;
};
SET_TYPE_PROP(NavierStokesNC, MolecularDiffusionType, FicksLaw<TypeTag>);
SET_INT_PROP(NavierStokesNC, PhaseIdx, 0); //!< Defines the phaseIdx
SET_BOOL_PROP(NavierStokesNC, EnableMolecularDiffusion, true); //!< Enable molecular diffusion
SET_BOOL_PROP(NavierStokesNC, UseMoles, false); //!< Defines whether molar (true) or mass (false) density is used
SET_INT_PROP(NavierStokesNC, ReplaceCompEqIdx, 0); //<! Set the ReplaceCompEqIdx to 0 by default
SET_BOOL_PROP(NavierStokesNC, UseMoles, false); //!< Defines whether molar (true) or mass (false) density is used
//! The local residual
SET_TYPE_PROP(NavierStokesNC, LocalResidual, NavierStokesNCResidual<TypeTag>);
SET_INT_PROP(NavierStokesNC, PhaseIdx, 0); //!< Defines the phaseIdx
//! The volume variables
SET_TYPE_PROP(NavierStokesNC, VolumeVariables, NavierStokesNCVolumeVariables<TypeTag>);
SET_TYPE_PROP(NavierStokesNC, VtkOutputFields, NavierStokesNCVtkOutputFields<TypeTag>); //!< the vtk output fields
//! The flux variables
SET_TYPE_PROP(NavierStokesNC, FluxVariables, NavierStokesNCFluxVariables<TypeTag>);
// non-isothermal properties
SET_TYPE_PROP(NavierStokesNCNI, IsothermalIndices, NavierStokesNCIndices<TypeTag>); //!< the isothermal indices
SET_TYPE_PROP(NavierStokesNCNI, IsothermalVtkOutputFields, NavierStokesNCVtkOutputFields<TypeTag>); //!< the isothermal vtk output fields
//! The indices
SET_TYPE_PROP(NavierStokesNC, Indices, NavierStokesNCIndices<TypeTag>);
//! The number of equations
SET_PROP(NavierStokesNCNI, IsothermalNumEq)
{
private:
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
static constexpr auto dim = GridView::dimension;
using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
public:
static constexpr int value = dim + FluidSystem::numComponents;
};
//! The vtk output fields
SET_TYPE_PROP(NavierStokesNC, VtkOutputFields, NavierStokesNCVtkOutputFields<TypeTag>);
/*!
* \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.
*/
SET_PROP(NavierStokesNC, FluidState)
{
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
public:
using type = CompositionalFluidState<Scalar, FluidSystem>;
};
//! Use Fick's law for molecular diffusion per default
SET_TYPE_PROP(NavierStokesNC, MolecularDiffusionType, FicksLaw<TypeTag>);
//////////////////////////////////////////////////////////////////
// Property values for isothermal model required for the general non-isothermal model
//////////////////////////////////////////////////////////////////
//! The isothermal indices
SET_TYPE_PROP(NavierStokesNCNI, IsothermalIndices, NavierStokesNCIndices<TypeTag>);
//! The isothermal vtk output fields
SET_TYPE_PROP(NavierStokesNCNI, IsothermalVtkOutputFields, NavierStokesNCVtkOutputFields<TypeTag>);
//! The number of equations for the isothermal model
SET_PROP(NavierStokesNCNI, IsothermalNumEq)
{
private:
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
static constexpr auto dim = GridView::dimension;
using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
public:
static constexpr int value = dim + FluidSystem::numComponents;
};
// \}
} // end namespace Properties
} // end namespace Dumux
// \}
} // end namespace Properties
} // end namespace Dumux
#endif
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