Skip to content
Snippets Groups Projects
Commit 2c9bbffd authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[navierstokes][model] Clean-up docu

* description of equations still missing
parent 6c249461
No related branches found
No related tags found
2 merge requests!695Doc/freeflow,!617[WIP] Next
...@@ -18,8 +18,10 @@ ...@@ -18,8 +18,10 @@
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \file * \file
* \ingroup NavierStokesModel
* *
* \brief Isothermal Navier-Stokes model * \brief A single-phase, isothermal Navier-Stokes model
* TODO: doc me!
*/ */
#ifndef DUMUX_NAVIERSTOKES_MODEL_HH #ifndef DUMUX_NAVIERSTOKES_MODEL_HH
...@@ -39,120 +41,108 @@ ...@@ -39,120 +41,108 @@
#include <dumux/material/fluidstates/immiscible.hh> #include <dumux/material/fluidstates/immiscible.hh>
#include <dumux/discretization/methods.hh> #include <dumux/discretization/methods.hh>
namespace Dumux
{
// \{
///////////////////////////////////////////////////////////////////////////
// properties for the single-phase, isothermal Navier-Stokes model
///////////////////////////////////////////////////////////////////////////
namespace Properties {
//////////////////////////////////////////////////////////////////
// Type tags
//////////////////////////////////////////////////////////////////
//! The type tag for the single-phase, isothermal Navier-Stokes model
NEW_TYPE_TAG(NavierStokes, INHERITS_FROM(FreeFlow));
//! The type tag for the corresponding non-isothermal model
NEW_TYPE_TAG(NavierStokesNI, INHERITS_FROM(NavierStokes, NavierStokesNonIsothermal));
//////////////////////////////////////////////////////////////////
// Property tags
//////////////////////////////////////////////////////////////////
NEW_PROP_TAG(EnableInertiaTerms); //!< Returns whether to include inertia terms in the momentum balance eq or not (Stokes / Navier-Stokes)
NEW_PROP_TAG(NormalizePressure); //!< Returns whether to normalize the pressure term in the momentum balance or not
///////////////////////////////////////////////////////////////////////////
// default property values for the isothermal single phase model
///////////////////////////////////////////////////////////////////////////
SET_INT_PROP(NavierStokes, NumPhases, 1); //!< The number of phases in the 1p model is 1
SET_INT_PROP(NavierStokes, NumComponents, 1); //!< The number of components in the 1p model is 1
SET_INT_PROP(NavierStokes, PhaseIdx, 0); //!< The default phase index
SET_BOOL_PROP(NavierStokes, EnableAdvection, true); //!< Enable advection
SET_BOOL_PROP(NavierStokes, EnableMolecularDiffusion, false); //!< The one-phase model has no molecular diffusion
SET_BOOL_PROP(NavierStokes, EnableEnergyBalance, false); //!< The model is isothermal
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
SET_PROP(NavierStokes, NumEq)
{
private:
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
static constexpr auto dim = GridView::dimension;
public:
static constexpr int value = dim + 1;
};
/*! /*!
* \ingroup NavierStokesModel * \brief The fluid state which is used by the volume variables to
* \brief A single-phase, isothermal isothermal Navier-Stokes model * store the thermodynamic state. This should be chosen
* TODO: doc me! * appropriately for the model ((non-)isothermal, equilibrium, ...).
* This can be done in the problem.
*/ */
SET_PROP(NavierStokes, FluidState){
namespace Dumux private:
{ using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
// \{ public:
/////////////////////////////////////////////////////////////////////////// using type = Dumux::ImmiscibleFluidState<Scalar, FluidSystem>;
// properties for the isothermal Navier-Stokes model };
///////////////////////////////////////////////////////////////////////////
namespace Properties { //! The local residual
SET_TYPE_PROP(NavierStokes, LocalResidual, NavierStokesResidual<TypeTag>);
//////////////////////////////////////////////////////////////////
// Type tags //! The volume variables
////////////////////////////////////////////////////////////////// SET_TYPE_PROP(NavierStokes, VolumeVariables, NavierStokesVolumeVariables<TypeTag>);
//! The type tags for the implicit single-phase problems //! The flux variables
NEW_TYPE_TAG(NavierStokes, INHERITS_FROM(FreeFlow)); SET_TYPE_PROP(NavierStokes, FluxVariables, NavierStokesFluxVariables<TypeTag>);
//! The type tags for the corresponding non-isothermal problems //! The flux variables cache class, by default the one for free flow
NEW_TYPE_TAG(NavierStokesNI, INHERITS_FROM(NavierStokes, NavierStokesNonIsothermal)); SET_TYPE_PROP(NavierStokes, FluxVariablesCache, FreeFlowFluxVariablesCache<TypeTag>);
////////////////////////////////////////////////////////////////// //! The indices required by the isothermal single-phase model
// Property tags SET_TYPE_PROP(NavierStokes, Indices, NavierStokesCommonIndices<TypeTag>);
//////////////////////////////////////////////////////////////////
//! The specific vtk output fields
NEW_PROP_TAG(EnableInertiaTerms); //!< Returns whether to include inertia terms in the momentum balance eq or not (Stokes / Navier-Stokes) SET_TYPE_PROP(NavierStokes, VtkOutputFields, NavierStokesVtkOutputFields<TypeTag>);
NEW_PROP_TAG(NormalizePressure); //!< Returns whether to normalize the pressure term in the momentum balance or not
//////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////// // Property values for isothermal model required for the general non-isothermal model
// default property values for the isothermal single phase model //////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////// //! The indices required by the isothermal single-phase model
SET_INT_PROP(NavierStokes, NumPhases, 1); //!< The number of phases in the 1p model is 1 SET_TYPE_PROP(NavierStokesNI, IsothermalIndices, NavierStokesCommonIndices<TypeTag>);
SET_INT_PROP(NavierStokes, NumComponents, 1); //!< The number of components in the 1p model is 1
SET_INT_PROP(NavierStokes, PhaseIdx, 0); //!< The default phase index //! The specific isothermal vtk output fields
SET_TYPE_PROP(NavierStokesNI, IsothermalVtkOutputFields, NavierStokesVtkOutputFields<TypeTag>);
//! The number of equations
SET_PROP(NavierStokes, NumEq) //! The number of equations for the isothermal model
{ SET_PROP(NavierStokesNI, IsothermalNumEq)
private: {
using GridView = typename GET_PROP_TYPE(TypeTag, GridView); private:
static constexpr auto dim = GridView::dimension; using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
public: static constexpr auto dim = GridView::dimension;
static constexpr int value = dim + 1; public:
}; static constexpr int value = dim + 1;
};
/*!
* \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(NavierStokes, FluidState){
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
public:
using type = Dumux::ImmiscibleFluidState<Scalar, FluidSystem>;
};
//! The local residual function
SET_TYPE_PROP(NavierStokes, LocalResidual, NavierStokesResidual<TypeTag>);
//! the VolumeVariables property
SET_TYPE_PROP(NavierStokes, VolumeVariables, NavierStokesVolumeVariables<TypeTag>);
//! The NavierStokes FluxVariables
SET_TYPE_PROP(NavierStokes, FluxVariables, NavierStokesFluxVariables<TypeTag>);
//! The flux variables cache class, by default the one for porous media
SET_TYPE_PROP(NavierStokes, FluxVariablesCache, FreeFlowFluxVariablesCache<TypeTag>);
//! Enable advection
SET_BOOL_PROP(NavierStokes, EnableAdvection, true);
//! The one-phase model has no molecular diffusion
SET_BOOL_PROP(NavierStokes, EnableMolecularDiffusion, false);
//! The indices required by the isothermal single-phase model
SET_TYPE_PROP(NavierStokes, Indices, NavierStokesCommonIndices<TypeTag>);
SET_BOOL_PROP(NavierStokes, EnableEnergyBalance, false);
SET_TYPE_PROP(NavierStokes, VtkOutputFields, NavierStokesVtkOutputFields<TypeTag>);
SET_BOOL_PROP(NavierStokes, EnableInertiaTerms, true);
//! Normalize the pressure term in the momentum balance or not
SET_BOOL_PROP(NavierStokes, NormalizePressure, true);
//////////////////////////////////////////////////////////////////
// Property values for isothermal model required for the general non-isothermal model
//////////////////////////////////////////////////////////////////
//set isothermal Indices
SET_TYPE_PROP(NavierStokesNI, IsothermalIndices, NavierStokesCommonIndices<TypeTag>);
SET_TYPE_PROP(NavierStokesNI, IsothermalVtkOutputFields, NavierStokesVtkOutputFields<TypeTag>);
//set isothermal NumEq
SET_PROP(NavierStokesNI, IsothermalNumEq)
{
private:
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
static constexpr auto dim = GridView::dimension;
public:
static constexpr int value = dim + 1;
};
// \} // \}
} }
} // end namespace } // end namespace
#endif // DUMUX_NAVIERSTOKES_MODEL_HH #endif // DUMUX_NAVIERSTOKES_MODEL_HH
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment