Ewoms::StokesModel< TypeTag > Class Template Reference

A model for the Navier-Stokes equations. More...

#include <stokesmodel.hh>

Inheritance diagram for Ewoms::StokesModel< TypeTag >:
Inheritance graph

Public Member Functions

 StokesModel (Simulator &simulator)
 
bool phaseIsConsidered (int phaseIdxQueried) const
 Returns true iff a fluid phase is used by the model. More...
 
std::string primaryVarName (int pvIdx) const
 Given an primary variable index, return a human readable name. More...
 
std::string eqName (int eqIdx) const
 Given an equation index, return a human readable name. More...
 
Scalar primaryVarWeight (int globalDofIdx, int pvIdx) const
 Returns the relative weight of a primary variable for calculating relative errors. More...
 
void prepareOutputFields () const
 Prepare the quantities relevant for the current solution to be appended to the output writers. More...
 
void appendOutputFields (BaseOutputWriter &writer) const
 Append the quantities relevant for the current solution to an output writer. More...
 

Detailed Description

template<class TypeTag>
class Ewoms::StokesModel< TypeTag >

A model for the Navier-Stokes equations.

This model implements Navier-Stokes flow of a single fluid. By default, it solves the momentum balance of the time-dependent Stokes equations, i.e.

\[ \frac{\partial \left(\varrho\,\mathbf{v}\right)} {\partial t} + \boldsymbol{\nabla} p - \nabla \cdot \left( \mu \left(\boldsymbol{\nabla} \mathbf{v} + \boldsymbol{\nabla} *\mathbf{v}^T\right) \right) - \varrho\,\mathbf{g} = 0\;, \]

and the mass balance equation

\[ \frac{\partial \varrho}{\partial t} + \nabla \cdot\left(\varrho\,\mathbf{v}\right) - q = 0 \;. \]

If the property EnableNavierStokes is set to true, an additional convective momentum flux term (Navier term) gets included into the momentum conservation equations which allows to capture turbolent flow regimes. This additional term is given by

\[ \varrho \left(\mathbf{v} \cdot \boldsymbol{\nabla} \right) \mathbf{v} \;. \]

These equations are discretized by a fully-coupled vertex-centered finite volume scheme in space and using the implicit Euler method in time. Be aware, that this discretization scheme is quite unstable for the Navier-Stokes equations and quickly leads to unphysical oscillations in the calculated solution. We intend to use a more appropriate discretization scheme in the future, though.

Constructor & Destructor Documentation

template<class TypeTag >
Ewoms::StokesModel< TypeTag >::StokesModel ( Simulator simulator)
inline

Member Function Documentation

template<class TypeTag >
std::string Ewoms::StokesModel< TypeTag >::eqName ( int  eqIdx) const
inline

Given an equation index, return a human readable name.

Parameters
eqIdxThe index of the conservation equation of interest.
template<class TypeTag >
bool Ewoms::StokesModel< TypeTag >::phaseIsConsidered ( int  phaseIdxQueried) const
inline

Returns true iff a fluid phase is used by the model.

Parameters
phaseIdxQueriedThe index of the fluid phase in question
template<class TypeTag >
void Ewoms::StokesModel< TypeTag >::prepareOutputFields ( ) const
inline

Prepare the quantities relevant for the current solution to be appended to the output writers.

template<class TypeTag >
std::string Ewoms::StokesModel< TypeTag >::primaryVarName ( int  pvIdx) const
inline

Given an primary variable index, return a human readable name.

Parameters
pvIdxThe index of the primary variable of interest.
template<class TypeTag >
Scalar Ewoms::StokesModel< TypeTag >::primaryVarWeight ( int  globalDofIdx,
int  pvIdx 
) const
inline

Returns the relative weight of a primary variable for calculating relative errors.

Parameters
globalDofIdxThe global index of the degree of freedom
pvIdxThe index of the primary variable

The documentation for this class was generated from the following file: