Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dumux-repositories
dumux
Commits
2c9bbffd
Commit
2c9bbffd
authored
7 years ago
by
Kilian Weishaupt
Browse files
Options
Downloads
Patches
Plain Diff
[navierstokes][model] Clean-up docu
* description of equations still missing
parent
6c249461
No related branches found
No related tags found
2 merge requests
!695
Doc/freeflow
,
!617
[WIP] Next
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/freeflow/navierstokes/model.hh
+102
-112
102 additions, 112 deletions
dumux/freeflow/navierstokes/model.hh
with
102 additions
and
112 deletions
dumux/freeflow/navierstokes/model.hh
+
102
−
112
View file @
2c9bbffd
...
...
@@ -18,8 +18,10 @@
*****************************************************************************/
/*!
* \file
* \ingroup NavierStokesModel
*
* \brief Isothermal Navier-Stokes model
* \brief A single-phase, isothermal Navier-Stokes model
* TODO: doc me!
*/
#ifndef DUMUX_NAVIERSTOKES_MODEL_HH
...
...
@@ -39,120 +41,108 @@
#include
<dumux/material/fluidstates/immiscible.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 A single-phase, isothermal isothermal Navier-Stokes model
* TODO: doc me!
* \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.
*/
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
(
NavierStokes
,
INHERITS_FROM
(
FreeFlow
));
//! The type tags for the corresponding non-isothermal problems
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
//! 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
;
};
/*!
* \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
;
};
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
SET_TYPE_PROP
(
NavierStokes
,
LocalResidual
,
NavierStokesResidual
<
TypeTag
>
);
//! The volume variables
SET_TYPE_PROP
(
NavierStokes
,
VolumeVariables
,
NavierStokesVolumeVariables
<
TypeTag
>
);
//! The flux variables
SET_TYPE_PROP
(
NavierStokes
,
FluxVariables
,
NavierStokesFluxVariables
<
TypeTag
>
);
//! The flux variables cache class, by default the one for free flow
SET_TYPE_PROP
(
NavierStokes
,
FluxVariablesCache
,
FreeFlowFluxVariablesCache
<
TypeTag
>
);
//! The indices required by the isothermal single-phase model
SET_TYPE_PROP
(
NavierStokes
,
Indices
,
NavierStokesCommonIndices
<
TypeTag
>
);
//! The specific vtk output fields
SET_TYPE_PROP
(
NavierStokes
,
VtkOutputFields
,
NavierStokesVtkOutputFields
<
TypeTag
>
);
//////////////////////////////////////////////////////////////////
// Property values for isothermal model required for the general non-isothermal model
//////////////////////////////////////////////////////////////////
//! The indices required by the isothermal single-phase model
SET_TYPE_PROP
(
NavierStokesNI
,
IsothermalIndices
,
NavierStokesCommonIndices
<
TypeTag
>
);
//! The specific isothermal vtk output fields
SET_TYPE_PROP
(
NavierStokesNI
,
IsothermalVtkOutputFields
,
NavierStokesVtkOutputFields
<
TypeTag
>
);
//! The number of equations for the isothermal model
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment