DOC: scalarTransport/energyTransport: improve header file documentation

This commit is contained in:
Kutalmis Bercin
2024-07-25 10:05:31 +01:00
committed by Andrew Heather
parent fd77d7d9b5
commit 559f13d450
2 changed files with 276 additions and 226 deletions

View File

@ -30,44 +30,93 @@ Group
grpSolversFunctionObjects grpSolversFunctionObjects
Description Description
Evolves a simplified energy transport equation for incompressible flows. Computes the simplified energy transport equation in single-phase or
It takes into account the inertia, conduction and convection terms plus two-phase flow, considering incompressible cases:
a source.
- The field name must be temperature and its BC's specified in the time \f[
directory. \frac{\partial \rho \, C_p \, T}{\partial t}
- The turbulence model should be incompressible + \nabla \cdot \left(\rho \, C_p \, \phi \, T \right)
- In order to use in a incompressible multi phase a list of thermal - \nabla \cdot \left(\rho \, C_p \, \phi \right) \, T
properties are needed. See below - \nabla \cdot \left(\kappa_{eff} \, \nabla T \right)
= S_T
\f]
where:
\vartable
T | Scalar field
\rho | (Generic) Fluid density which is unity when not specified
C_p | Specific heat capacity at constant pressure
\phi | (Generic) Flux field
\kappa_{eff} | Effective thermal conductivity
S_T | Scalar field source term
\endvartable
Usage Usage
Example of function object specification to solve a energy transport Minimal example in \c system/controlDict.functions:
equation for a single phase flow plus a source term
\verbatim \verbatim
functions energyTransport1
{
energy
{ {
// Mandatory entries
type energyTransport; type energyTransport;
libs (energyTransportFunctionObjects); libs (solverFunctionObjects);
enabled true; // Optional entries
writeControl writeTime; field <word>;
writeInterval 1; phi <word>;
rho <word>;
Cp <scalar>;
kappa <scalar>;
rhoInf <scalar>;
Prt <scalar>;
schemesField <word>;
tolerance <scalar>;
nCorr <label>;
fvOptions <dict>;
phaseThermos <dict>;
// Inherited entries
...
}
\endverbatim
where:
\table
Property | Description | Type | Reqd | Deflt
type | Type name: energyTransport | word | yes | -
libs | Library name: solverFunctionObjects | word | yes | -
field | Name of the passive-scalar field | word | no | s
phi | Name of flux field | word | no | phi
rho | Name of density field | word | no | rho
Cp | Specific heat capacity at constant pressure | scalar | no | 0
kappa | Thermal conductivity | scalar | no | 0
rhoInf | Fluid density | scalar | no | 0
Prt | Turbulent Prandtl number | scalar | no | 1
schemesField | Name of field to specify schemes | word | no | field
tolerance | Outer-loop initial-residual tolerance | scalar | no | 1
nCorr | Number of outer-loop correctors | label | no | 0
fvOptions | List of finite-volume options | dict | no | -
phaseThermos | Dictionary for multi-phase thermo | dict | no | null
\endtable
The inherited entries are elaborated in:
- \link fvMeshFunctionObject.H \endlink
- \link fvOption.H \endlink
An example of function object specification to solve a energy transport
equation for a single phase flow plus a source term:
\verbatim
energyTransport1
{
// Mandatory entries
type energyTransport;
libs (solverFunctionObjects);
// Optional entries
field T; field T;
// volumetric Flux
phi phi; phi phi;
// Thermal properties
Cp Cp [J/kg/K] 1e3; Cp Cp [J/kg/K] 1e3;
kappa kappa [W/m/K] 0.0257; kappa kappa [W/m/K] 0.0257;
rhoInf rho [kg/m^3] 1.2; rhoInf rho [kg/m^3] 1.2;
write true;
fvOptions fvOptions
{ {
viscousDissipation viscousDissipation
@ -82,35 +131,28 @@ Usage
} }
} }
} }
}
}
\endverbatim
Example of function object specification to solve a energy transport
equation for a multiphase phase flow plus a source term
equation:
\verbatim
functions
{
energy
{
type energyTransport;
libs (energyTransportFunctionObjects);
// Inherited entries
enabled true; enabled true;
writeControl writeTime; writeControl writeTime;
writeInterval 1; writeInterval 1;
}
\endverbatim
An example of function object specification to solve a energy transport
equation for a multiphase phase flow plus a source term:
\verbatim
energyTransport1
{
// Mandatory entries
type energyTransport;
libs (solverFunctionObjects);
// Optional entries
field T; field T;
// rho field name
rho rho; rho rho;
// mass flux for multiphase
phi rhoPhi; phi rhoPhi;
write true;
// Thermal properties of the phases // Thermal properties of the phases
phaseThermos phaseThermos
{ {
@ -136,7 +178,6 @@ Usage
} }
} }
fvOptions fvOptions
{ {
viscousDissipation viscousDissipation
@ -147,35 +188,22 @@ Usage
viscousDissipationCoeffs viscousDissipationCoeffs
{ {
fields (T); fields (T);
rho rho; //rho Field rho rho;
}
} }
} }
} }
// Inherited entries
enabled true;
writeControl writeTime;
writeInterval 1;
} }
\endverbatim \endverbatim
Where the entries comprise: Note
\table - The field name must be temperature and its boundary conditions
Property | Description | Required | Default value specified in the time directory.
type | Type name: energyTransport | yes | - The turbulence model should be incompressible.
field | Name of the scalar field | no | T
phi | Name of flux field | no | phi
rho | Name of density field | no | rho
nCorr | Number of correctors | no | 0
tolerance | Outer-loop initial-residual tolerance | no | 1
schemesField | Name of field to specify schemes | no | field name
fvOptions | List of scalar sources | no |
Cp | Heat capacity for single phase | no | 0
rhoInf | Density for single phase | no | 0
kappa | Thermal conductivity for single phase | no | 0
Prt | Turbulent Prandlt number | no | 1.0
phaseThermos | Dictionary for multi-phase thermo |no | null
fvOptions | Opotional extra sources | no | null
\endtable
See also
Foam::functionObjects::fvMeshFunctionObject
SourceFiles SourceFiles
energyTransport.C energyTransport.C

View File

@ -31,69 +31,97 @@ Group
grpSolversFunctionObjects grpSolversFunctionObjects
Description Description
Evolves a passive scalar transport equation. Computes the transport equation for a passive scalar in single-phase or
two-phase flow, considering both incompressible and compressible cases:
- To specify the field name set the \c field entry \f[
- To employ the same numerical schemes as another field set \frac{\partial \rho \, T}{\partial t}
the \c schemesField entry, + \nabla \cdot \left( \phi_\alpha \, T \right)
- The diffusivity can be set manually using the 'D' entry, retrieved - \nabla \cdot (D_T \, \nabla T)
from the turbulence model or specified nut = \alpha \, S_T
- Alternatively if a turbulence model is available a turbulent diffusivity \f]
may be constructed from the laminar and turbulent viscosities using the
optional diffusivity coefficients \c alphaD and \c alphaDt (which default where:
to 1): \vartable
\verbatim T | Passive scalar field
D = alphaD*nu + alphaDt*nut \rho | (Generic) Fluid density which is unity when not specified
\endverbatim \phi_\alpha | (Generic) Flux field
- To specify a transport quantity within a phase enter phase. \alpha | Phase fraction which is unity for single-phase flows
- bounded01 bounds the transported scalar within 0 and 1. D_T | Diffusivity representing the diffusive transport of T
S_T | Passive-scalar field source term
\endvartable
Usage Usage
Example of function object specification to solve a scalar transport Minimal example in \c system/controlDict.functions:
equation:
\verbatim \verbatim
functions scalarTransport1
{
scalar1
{ {
// Mandatory entries
type scalarTransport; type scalarTransport;
libs (solverFunctionObjects); libs (solverFunctionObjects);
resetOnStartUp no; // Optional entries
region cabin; field <word>;
field H2O; phi <word>;
rho <word>;
nut <word>;
phase <word>;
phasePhiCompressed <word>;
schemesField <word>;
bounded01 <bool>;
D <scalar>;
alphaD <scalar>;
alphaDt <scalar>;
tolerance <scalar>;
nCorr <label>;
resetOnStartUp <bool>;
fvOptions <dict>;
// Inherited entries
fvOptions
{
... ...
} }
}
}
\endverbatim
Example of function object specification to solve a residence time where:
in a two phase flow: \table
equation: Property | Description | Type | Reqd | Deflt
type | Type name: scalarTransport | word | yes | -
libs | Library name: solverFunctionObjects | word | yes | -
field | Name of the passive-scalar field | word | no | s
phi | Name of flux field | word | no | phi
rho | Name of density field | word | no | rho
nut | Name of the turbulence viscosity | word | no | none
phase | Name of the phase | word | no | none
phasePhiCompressed | Name of compressed VOF flux | word | no | alphaPhiUn
schemesField | Name of field to specify schemes | word | no | field
bounded01 | Bounds scalar between 0-1 for multiphase | bool | no | true
D | Diffusion coefficient | scalar | no | -
alphaD | Laminar diffusivity coefficient | scalar | no | 1
alphaDt | Turbulent diffusivity coefficient | scalar | no | 1
tolerance | Outer-loop initial-residual tolerance | scalar | no | 1
nCorr | Number of outer-loop correctors | label | no | 0
resetOnStartUp | Flag to reset field to zero on start-up | bool | no | no
fvOptions | List of finite-volume options | dict | no | -
\endtable
The inherited entries are elaborated in:
- \link fvMeshFunctionObject.H \endlink
- \link fvOption.H \endlink
An example of function object specification to solve a residence time
in a two-phase flow:
\verbatim \verbatim
functions scalarTransport1
{
sTransport
{ {
// Mandatory entries
type scalarTransport; type scalarTransport;
libs (solverFunctionObjects); libs (solverFunctionObjects);
enabled true; // Optional entries
writeControl writeTime;
writeInterval 1;
field s; field s;
bounded01 false; bounded01 false;
phase alpha.water; phase alpha.water;
tolerance 1e-5; tolerance 1e-5;
resetOnStartUp false;
write true;
fvOptions fvOptions
{ {
unitySource unitySource
@ -111,32 +139,26 @@ Usage
} }
} }
resetOnStartUp false; // Inherited entries
} enabled true;
writeControl writeTime;
writeInterval 1;
} }
\endverbatim \endverbatim
Where the entries comprise: Note
\table - To use the same numerical schemes as another field,
Property | Description | Required | Default value set the \c schemesField entry.
type | Type name: scalarTransport | yes | - The diffusivity can be set manually using the \c D entry, obtained
field | Name of the scalar field | no | s from the turbulence model or specified as `nut`.
phi | Name of flux field | no | phi - Alternatively, if a turbulence model is available, turbulent diffusivity
rho | Name of density field | no | rho can be constructed from the laminar and turbulent viscosities using the
phase | Name of the phase | no | none optional diffusivity coefficients \c alphaD and \c alphaDt
tolerance | Outer-loop initial-residual tolerance | no | 1 (which default to 1):
nut | Name of the turbulence viscosity | no | none
D | Diffusion coefficient | no | auto generated
nCorr | Number of correctors | no | 0
resetOnStartUp | Reset scalar to zero on start-up | no | no
schemesField | Name of field to specify schemes | no | field name
fvOptions | List of scalar sources | no |
bounded01 | Bounds scalar between 0-1 for multiphase | no | true
phasePhiCompressed | Compressed flux for VOF | no | alphaPhiUn
\endtable
See also \f[
Foam::functionObjects::fvMeshFunctionObject D = \alpha_D \, \nu + \alpha_{Dt} \, \nu_t
\f]
SourceFiles SourceFiles
scalarTransport.C scalarTransport.C