Expression sources are the variables that can be used in expressions.
A subset of the Fluent postprocessing field variables are available for use in expressions. See Appendix: Supported Field Variables for a listing of all the available field variables.
Note: Some variables require additional context, which is specified in the following format:
Variable(<context>="<context value>")
. For example, to
get the species mass fraction of carbon dioxide:
MassFraction(species="co2")
.
In multiphase simulations, the phase context must be specified. For example:
MassFraction(species="co2", phase="air")
.
The context for variables requiring it is provided in the Variables (type/context) column of Appendix: Supported Field Variables.
The following solution variables are available:
Table 5.2: Solution Variables
Variable |
Description |
---|---|
|
Current time* *In steady state, time evaluates as 0, unless the case was run in transient, then switched to steady state, in which case it will evaluate as the latest time from the transient run. |
|
Current time step number* *In steady state, timestep evaluates as 0, unless the case was run in transient, then switched to steady state, in which case it will evaluate as the latest timestep from the transient run. |
|
Current time step size* *In steady state, delta time evaluates as 0, unless the case was run in transient, then switched to steady state, in which case it will evaluate as the latest delta time from the transient run. |
|
Global iteration count |
Table 5.3: Scientific Constants
Variable |
Description |
Value |
---|---|---|
|
Pi | 3.14159265358979323846 |
|
e (base of the natural logarithm) | 2.71828182845904523536 |
|
Gas constant | 8.314472 [J K^-1 mol^-1] |
|
Avogadro's number | 6.02214199e23 [mol^-1] |
|
Boltzmann constant | 1.3806503 [J K^-1] |
|
Light velocity | 2.99792458e8 [m s^-1] |
|
Electron charge | 1.60217653e-19 [A s] |
|
Acceleration due to gravity | 9.8066502 [m s^-2] |
|
Planck's constant | 6.62606876e-34 [J s] |
|
Stephan-Boltzmann constant | 5.670400e-08 [W m^-2 K^-2] |
|
Magnetic permeability | 4.0*PI*1.0e-7 [N A^-2] |
|
Electric constant | 1./(clight*clight*mupermo) |
Aliases provide simplified syntax to access frequently used variables.
Table 5.4: Variable Aliases
Alias |
Variable |
---|---|
|
Position.x |
|
Position.y |
|
Position.z |
|
Velocity.x |
|
Velocity.y |
|
Velocity.z |
|
Time* *In steady state, time evaluates as 0, unless the case was run in transient, then switched to steady state, in which case it will evaluate as the latest time from the transient run. |
|
DeltaTime* *In steady state, delta time evaluates as 0, unless the case was run in transient, then switched to steady state, in which case it will evaluate as the latest delta time from the transient run. |
|
Global iteration count |
|
StaticTemperature |
|
StaticPressure |
|
MassFraction |
|
FaceAreaMagnitude |
|
CellVolume |
|
CellVolume*Density |
You can use profiles in expressions to specify boundary and cell zone conditions, for
postprocessing, and in reduction operations. Profiles are tabular data that can be imported
into Fluent, which typically contain X
,
Y
, and Z
columns (for spatial profiles)
or Time
(for transient profiles), in addition to one or more
dependent variable columns.
Note: Radial profiles are not supported in expressions.
Prior to using profiles in an expression you must load one or more profiles. Refer to Reading and Writing Profile Files for additional information.
The profile expression requires the following inputs: profile('<profile-name>', '<field-name>', frame='<reference-frame-name>') (the reference frame argument is only for spatial profiles). Note that if specified, profile coordinates are assumed to be of the specified frame and are therefore transformed to global coordinates prior to interpolation (profile coordinates are not transformed if you specify the reference frame as frame='global').
Once the profile expression is defined, you can select it for the desired boundary condition or cell zone condition field. Refer to Expressions for Cell Zones and Boundary Conditions