Description
Evolves a passive scalar transport equation.
- To specify the field name set the \c field entry
- To employ the same numerical schemes as another field set
the \c schemesField entry,
- The \c diffusivity entry can be set to \c none, \c constant, \c viscosity
- A constant diffusivity is specified with the \c D entry,
- If a momentum transport model is available and the \c viscosity
diffusivety option specified an effective diffusivity may be constructed
from the laminar and turbulent viscosities using the diffusivity
coefficients \c alphal and \c alphat:
\verbatim
D = alphal*nu + alphat*nut
\endverbatim
Example:
\verbatim
#includeFunc scalarTransport(T, alphaD=1, alphaDt=1)
\endverbatim
For incompressible flow the passive scalar may optionally be solved with the
MULES limiter and sub-cycling or semi-implicit in order to maintain
boundedness, particularly if a compressive, PLIC or MPLIC convection
scheme is used.
Example:
\verbatim
#includeFunc scalarTransport(tracer, diffusion=none)
with scheme specification:
div(phi,tracer) Gauss interfaceCompression vanLeer 1;
and solver specification:
tracer
{
nCorr 1;
nSubCycles 3;
MULESCorr no;
nLimiterIter 5;
applyPrevCorr yes;
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-8;
relTol 0;
diffusion
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-8;
relTol 0;
}
}
\endverbatim
30 lines
1.3 KiB
C++
30 lines
1.3 KiB
C++
/*--------------------------------*- C++ -*----------------------------------*\
|
|
========= |
|
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
\\ / O peration | Website: https://openfoam.org
|
|
\\ / A nd | Version: dev
|
|
\\/ M anipulation |
|
|
-------------------------------------------------------------------------------
|
|
Description
|
|
Solves a transport equation for a scalar field.
|
|
|
|
The name of the scalar field is specified in this file. A field file of
|
|
this name will also be required, typically in the 0 directory. Scheme and
|
|
solver settings will also be needed. Alternatively, if there is another
|
|
field which already has appropriate fvSchemes and fvSolution entries, these
|
|
settings can be reused by naming the field as the schemesField.
|
|
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
#includeEtc "caseDicts/postProcessing/solvers/scalarTransport.cfg"
|
|
|
|
field <fieldName>; // Name of the transported scalar
|
|
schemesField $field; // Name of the field from which to use schemes
|
|
// and solvers settings
|
|
diffusion viscosity;
|
|
|
|
alphal 1;
|
|
alphat 1;
|
|
|
|
// ************************************************************************* //
|