mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
DOC: scalarTransport/energyTransport: improve header file documentation
This commit is contained in:
committed by
Andrew Heather
parent
fd77d7d9b5
commit
559f13d450
@ -30,152 +30,180 @@ 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 (solverFunctionObjects);
|
||||||
libs (energyTransportFunctionObjects);
|
|
||||||
|
|
||||||
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>;
|
||||||
|
|
||||||
field T;
|
// Inherited entries
|
||||||
|
...
|
||||||
// volumetric Flux
|
|
||||||
phi phi;
|
|
||||||
|
|
||||||
// Thermal properties
|
|
||||||
Cp Cp [J/kg/K] 1e3;
|
|
||||||
kappa kappa [W/m/K] 0.0257;
|
|
||||||
rhoInf rho [kg/m^3] 1.2;
|
|
||||||
|
|
||||||
write true;
|
|
||||||
|
|
||||||
fvOptions
|
|
||||||
{
|
|
||||||
viscousDissipation
|
|
||||||
{
|
|
||||||
type viscousDissipation;
|
|
||||||
enabled true;
|
|
||||||
|
|
||||||
viscousDissipationCoeffs
|
|
||||||
{
|
|
||||||
fields (T);
|
|
||||||
rhoInf $....rhoInf;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
Example of function object specification to solve a energy transport
|
where:
|
||||||
equation for a multiphase phase flow plus a source term
|
|
||||||
|
|
||||||
equation:
|
|
||||||
\verbatim
|
|
||||||
functions
|
|
||||||
{
|
|
||||||
energy
|
|
||||||
{
|
|
||||||
type energyTransport;
|
|
||||||
libs (energyTransportFunctionObjects);
|
|
||||||
|
|
||||||
enabled true;
|
|
||||||
writeControl writeTime;
|
|
||||||
writeInterval 1;
|
|
||||||
|
|
||||||
field T;
|
|
||||||
|
|
||||||
// rho field name
|
|
||||||
rho rho;
|
|
||||||
// mass flux for multiphase
|
|
||||||
phi rhoPhi;
|
|
||||||
|
|
||||||
write true;
|
|
||||||
|
|
||||||
// Thermal properties of the phases
|
|
||||||
phaseThermos
|
|
||||||
{
|
|
||||||
alpha.air
|
|
||||||
{
|
|
||||||
Cp 1e3;
|
|
||||||
kappa 0.0243;
|
|
||||||
}
|
|
||||||
alpha.mercury
|
|
||||||
{
|
|
||||||
Cp 140;
|
|
||||||
kappa 8.2;
|
|
||||||
}
|
|
||||||
alpha.oil
|
|
||||||
{
|
|
||||||
Cp 2e3;
|
|
||||||
kappa 0.2;
|
|
||||||
}
|
|
||||||
alpha.water
|
|
||||||
{
|
|
||||||
Cp 4e3;
|
|
||||||
kappa 0.6;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fvOptions
|
|
||||||
{
|
|
||||||
viscousDissipation
|
|
||||||
{
|
|
||||||
type viscousDissipation;
|
|
||||||
enabled true;
|
|
||||||
|
|
||||||
viscousDissipationCoeffs
|
|
||||||
{
|
|
||||||
fields (T);
|
|
||||||
rho rho; //rho Field
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
\endverbatim
|
|
||||||
|
|
||||||
Where the entries comprise:
|
|
||||||
\table
|
\table
|
||||||
Property | Description | Required | Default value
|
Property | Description | Type | Reqd | Deflt
|
||||||
type | Type name: energyTransport | yes |
|
type | Type name: energyTransport | word | yes | -
|
||||||
field | Name of the scalar field | no | T
|
libs | Library name: solverFunctionObjects | word | yes | -
|
||||||
phi | Name of flux field | no | phi
|
field | Name of the passive-scalar field | word | no | s
|
||||||
rho | Name of density field | no | rho
|
phi | Name of flux field | word | no | phi
|
||||||
nCorr | Number of correctors | no | 0
|
rho | Name of density field | word | no | rho
|
||||||
tolerance | Outer-loop initial-residual tolerance | no | 1
|
Cp | Specific heat capacity at constant pressure | scalar | no | 0
|
||||||
schemesField | Name of field to specify schemes | no | field name
|
kappa | Thermal conductivity | scalar | no | 0
|
||||||
fvOptions | List of scalar sources | no |
|
rhoInf | Fluid density | scalar | no | 0
|
||||||
Cp | Heat capacity for single phase | no | 0
|
Prt | Turbulent Prandtl number | scalar | no | 1
|
||||||
rhoInf | Density for single phase | no | 0
|
schemesField | Name of field to specify schemes | word | no | field
|
||||||
kappa | Thermal conductivity for single phase | no | 0
|
tolerance | Outer-loop initial-residual tolerance | scalar | no | 1
|
||||||
Prt | Turbulent Prandlt number | no | 1.0
|
nCorr | Number of outer-loop correctors | label | no | 0
|
||||||
phaseThermos | Dictionary for multi-phase thermo |no | null
|
fvOptions | List of finite-volume options | dict | no | -
|
||||||
fvOptions | Opotional extra sources | no | null
|
phaseThermos | Dictionary for multi-phase thermo | dict | no | null
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
See also
|
The inherited entries are elaborated in:
|
||||||
Foam::functionObjects::fvMeshFunctionObject
|
- \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;
|
||||||
|
phi phi;
|
||||||
|
Cp Cp [J/kg/K] 1e3;
|
||||||
|
kappa kappa [W/m/K] 0.0257;
|
||||||
|
rhoInf rho [kg/m^3] 1.2;
|
||||||
|
fvOptions
|
||||||
|
{
|
||||||
|
viscousDissipation
|
||||||
|
{
|
||||||
|
type viscousDissipation;
|
||||||
|
enabled true;
|
||||||
|
|
||||||
|
viscousDissipationCoeffs
|
||||||
|
{
|
||||||
|
fields (T);
|
||||||
|
rhoInf $....rhoInf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Inherited entries
|
||||||
|
enabled true;
|
||||||
|
writeControl writeTime;
|
||||||
|
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;
|
||||||
|
rho rho;
|
||||||
|
phi rhoPhi;
|
||||||
|
|
||||||
|
// Thermal properties of the phases
|
||||||
|
phaseThermos
|
||||||
|
{
|
||||||
|
alpha.air
|
||||||
|
{
|
||||||
|
Cp 1e3;
|
||||||
|
kappa 0.0243;
|
||||||
|
}
|
||||||
|
alpha.mercury
|
||||||
|
{
|
||||||
|
Cp 140;
|
||||||
|
kappa 8.2;
|
||||||
|
}
|
||||||
|
alpha.oil
|
||||||
|
{
|
||||||
|
Cp 2e3;
|
||||||
|
kappa 0.2;
|
||||||
|
}
|
||||||
|
alpha.water
|
||||||
|
{
|
||||||
|
Cp 4e3;
|
||||||
|
kappa 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fvOptions
|
||||||
|
{
|
||||||
|
viscousDissipation
|
||||||
|
{
|
||||||
|
type viscousDissipation;
|
||||||
|
enabled true;
|
||||||
|
|
||||||
|
viscousDissipationCoeffs
|
||||||
|
{
|
||||||
|
fields (T);
|
||||||
|
rho rho;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Inherited entries
|
||||||
|
enabled true;
|
||||||
|
writeControl writeTime;
|
||||||
|
writeInterval 1;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
Note
|
||||||
|
- The field name must be temperature and its boundary conditions
|
||||||
|
specified in the time directory.
|
||||||
|
- The turbulence model should be incompressible.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
energyTransport.C
|
energyTransport.C
|
||||||
|
|||||||
@ -31,112 +31,134 @@ 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:
|
|
||||||
equation:
|
|
||||||
\verbatim
|
|
||||||
functions
|
|
||||||
{
|
|
||||||
sTransport
|
|
||||||
{
|
|
||||||
type scalarTransport;
|
|
||||||
libs (solverFunctionObjects);
|
|
||||||
|
|
||||||
enabled true;
|
|
||||||
writeControl writeTime;
|
|
||||||
writeInterval 1;
|
|
||||||
|
|
||||||
field s;
|
|
||||||
bounded01 false;
|
|
||||||
phase alpha.water;
|
|
||||||
tolerance 1e-5;
|
|
||||||
|
|
||||||
write true;
|
|
||||||
|
|
||||||
fvOptions
|
|
||||||
{
|
|
||||||
unitySource
|
|
||||||
{
|
|
||||||
type scalarSemiImplicitSource;
|
|
||||||
enabled true;
|
|
||||||
|
|
||||||
selectionMode all;
|
|
||||||
volumeMode specific;
|
|
||||||
|
|
||||||
sources
|
|
||||||
{
|
|
||||||
s (1 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
resetOnStartUp false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
\endverbatim
|
|
||||||
|
|
||||||
Where the entries comprise:
|
|
||||||
\table
|
\table
|
||||||
Property | Description | Required | Default value
|
Property | Description | Type | Reqd | Deflt
|
||||||
type | Type name: scalarTransport | yes |
|
type | Type name: scalarTransport | word | yes | -
|
||||||
field | Name of the scalar field | no | s
|
libs | Library name: solverFunctionObjects | word | yes | -
|
||||||
phi | Name of flux field | no | phi
|
field | Name of the passive-scalar field | word | no | s
|
||||||
rho | Name of density field | no | rho
|
phi | Name of flux field | word | no | phi
|
||||||
phase | Name of the phase | no | none
|
rho | Name of density field | word | no | rho
|
||||||
tolerance | Outer-loop initial-residual tolerance | no | 1
|
nut | Name of the turbulence viscosity | word | no | none
|
||||||
nut | Name of the turbulence viscosity | no | none
|
phase | Name of the phase | word | no | none
|
||||||
D | Diffusion coefficient | no | auto generated
|
phasePhiCompressed | Name of compressed VOF flux | word | no | alphaPhiUn
|
||||||
nCorr | Number of correctors | no | 0
|
schemesField | Name of field to specify schemes | word | no | field
|
||||||
resetOnStartUp | Reset scalar to zero on start-up | no | no
|
bounded01 | Bounds scalar between 0-1 for multiphase | bool | no | true
|
||||||
schemesField | Name of field to specify schemes | no | field name
|
D | Diffusion coefficient | scalar | no | -
|
||||||
fvOptions | List of scalar sources | no |
|
alphaD | Laminar diffusivity coefficient | scalar | no | 1
|
||||||
bounded01 | Bounds scalar between 0-1 for multiphase | no | true
|
alphaDt | Turbulent diffusivity coefficient | scalar | no | 1
|
||||||
phasePhiCompressed | Compressed flux for VOF | no | alphaPhiUn
|
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
|
\endtable
|
||||||
|
|
||||||
See also
|
The inherited entries are elaborated in:
|
||||||
Foam::functionObjects::fvMeshFunctionObject
|
- \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
|
||||||
|
scalarTransport1
|
||||||
|
{
|
||||||
|
// Mandatory entries
|
||||||
|
type scalarTransport;
|
||||||
|
libs (solverFunctionObjects);
|
||||||
|
|
||||||
|
// Optional entries
|
||||||
|
field s;
|
||||||
|
bounded01 false;
|
||||||
|
phase alpha.water;
|
||||||
|
tolerance 1e-5;
|
||||||
|
resetOnStartUp false;
|
||||||
|
fvOptions
|
||||||
|
{
|
||||||
|
unitySource
|
||||||
|
{
|
||||||
|
type scalarSemiImplicitSource;
|
||||||
|
enabled true;
|
||||||
|
|
||||||
|
selectionMode all;
|
||||||
|
volumeMode specific;
|
||||||
|
|
||||||
|
sources
|
||||||
|
{
|
||||||
|
s (1 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Inherited entries
|
||||||
|
enabled true;
|
||||||
|
writeControl writeTime;
|
||||||
|
writeInterval 1;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
Note
|
||||||
|
- To use the same numerical schemes as another field,
|
||||||
|
set the \c schemesField entry.
|
||||||
|
- The diffusivity can be set manually using the \c D entry, obtained
|
||||||
|
from the turbulence model or specified as `nut`.
|
||||||
|
- Alternatively, if a turbulence model is available, turbulent diffusivity
|
||||||
|
can be constructed from the laminar and turbulent viscosities using the
|
||||||
|
optional diffusivity coefficients \c alphaD and \c alphaDt
|
||||||
|
(which default to 1):
|
||||||
|
|
||||||
|
\f[
|
||||||
|
D = \alpha_D \, \nu + \alpha_{Dt} \, \nu_t
|
||||||
|
\f]
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
scalarTransport.C
|
scalarTransport.C
|
||||||
|
|||||||
Reference in New Issue
Block a user