Thermal Field¶
Introduction¶
Thermal fields, an extension of the scalar field framework, are used to describe the time evolution of temperature throughout the flow domain. When defining a thermal field, users specify the initial fluid temperature, thermal diffusivity, and specific heat, along with optional inputs such as the fluid expansion coefficient.
Thermal diffusivity and specific heat govern the rate of heat transport and the temperature response to energy input (e.g., viscous dissipation). The fluid expansion coefficient defines the relationship between temperature and density, enabling modeling of buoyancy-driven flow (natural convection).
The thermal field evolves according to the advection–diffusion–reaction equation,
where \(T\) is temperature, \(t\) is time, \(𝐮\) is the local fluid velocity vector, \(𝛼\) is the thermal diffusivity, and \(\dot{q}.\) is a volumetric heat source term.
This equation describes how temperature changes over time due to advection, diffusion, and internal heat generation or removal. In practice, the evolution of the thermal field is governed by the combination of initial conditions, boundary conditions, and internal heat sources. A clear understanding of these physical mechanisms is key to building an accurate model.
Initial Conditions¶
Every thermal field begins with the initial temperature field. This defines the starting state of the system.
The initial condition may be specified as a constant (uniform) temperature applied across the entire domain.
The initial condition may also be defined using a region-based approach, where different zones of the domain are assigned distinct initial temperatures.
Alternatively, the initial temperature field may be prescribed using a user-defined function (UDF) to represent spatially varying temperature distributions.
Boundary Conditions¶
Boundary conditions define how heat enters, leaves, or interacts with the system. M-Star supports a wide range of thermal boundary conditions to match real-world scenarios.
At inlets, temperature can be specified independently for each incoming stream. As fluid exits the domain, temperature is typically carried out through convection.
For static bodies, such as tank walls or internal structures, thermal boundary conditions can be imposed directly on surfaces. These may represent insulating behavior or fixed-temperature boundaries, depending on the physical setup.
Thermal boundary conditions can also be applied at free surfaces and two-fluid interfaces, enabling heat transfer between phases in multiphase systems.
In addition, localized regions of heat input or removal can be defined within the domain. These are useful for modeling heaters, cooling zones, or other spatially confined thermal effects.
Internal Heat Sources¶
Beyond boundary-driven heat transfer, several physical mechanisms can drive temperature evolution within the domain.
Heat may be generated or consumed through chemical reactions, depending on whether those reactions are exothermic or endothermic.
Temperature can evolve through interactions with particles, where heat is exchanged between phases.
Additional effects, such as viscous dissipation, may also contribute depending on the system.
Property Grid¶
Thermal Properties¶
- Thermal Properties Option
This setting specifies how density, heat capacity, and thermal conductivity are defined in the simulation. Properties may be treated as constant, prescribed using the ideal gas relationship, or defined using user-defined functions (UDFs).
- Constant
Fluid properties are constant across space and time.
- Heat Capacity
J/(kg·K) | This is the heat capacity of the fluid. The heat capacity is a measure of how much energy is required to raise the temperature of a material.
- Conductivity
W/(m·k) | This is the thermal conductivity of the fluid. The thermal conductivity is a measure of how easily heat flows through a material due to temperature differences.
Note
In this model, density is constant and equal to the fluid density.
- Ideal Gas
Thermal properties are computed using ideal gas relationships, allowing properties to vary with temperature. At each time step and location, the solver evaluates temperature-dependent properties using the local temperature, with the reference temperature providing a baseline for initialization and property correlations.
- Heat Capacity
J/(kg·K) | This is the specific heat capacity of the fluid. It defines the amount of energy required to raise the temperature of the fluid. Under the ideal gas option, the heat capacity is assumed constant and remains equal to the value specified here.
- Conductivity
W/(m·k) | This is the thermal conductivity of the fluid. It defines how readily heat is conducted through the fluid. Under the ideal gas option, thermal conductivity may vary with temperature. For ideal gases, the local conductivity is computed as
\[\kappa = \kappa_o \sqrt{\frac{T}{T_o}}\]where \(T_o\) is the reference temperature and \(\kappa_o\) is the conductivity specified here.
- Reference Temperature
K | This is the reference temperature for initialization and property evaluation. It defines the baseline temperature used to initialize the fluid and anchor temperature-dependent property relationships.
Note
Under the ideal gas option, density may vary with temperature. For ideal gases, the local density is computed as
\[\rho = \rho_o \left(\frac{T_o}{T}\right)\]where \(T_o\) is the reference temperature and \(𝜌_o\) is the density specified here.
- UDF
Thermal properties are defined via local UDF. These properties include user-defined expressions thermal diffusivity, local volumetric heat capacity, and local fluid density. The density defined here will overwrite the density defined on the fluid panel.
- Thermal Properties UDF
m 2 /s and J/m 3 K | This UDF defines the local thermal diffusivity and local volumetric heat capacity of the fluid. Two outputs must be defined within the UDF: floating point variables
alphaandcpv, which define the local thermal diffusivity and local volumetric specific heat. This is a local UDF, calculated on a voxel-by-voxel basis using the local fluid properties.
Download Sample File:
Thermal Properties
Initial Conditions¶
- Initialization Option
This specifies how the temperature field is initialized across the fluid domain. The initial temperature may be defined as a constant value or specified using a user-defined function (UDF).
- Constant
This indicates that the initial temperature is uniform throughout the fluid.
- Initial Temperature
K | This is the initial temperature of the fluid. It defines the uniform temperature applied when the constant option is selected.
- UDF
This indicates the initial temperature is defined using a user-defined function, allowing for spatially varying temperature fields.
- Initial Temperature UDF
K | This UDF defines the initial temperature field across the fluid. One output must be defined within the UDF: a floating-point variable named
T. This output variable defines the local initial temperature across the fluid. This is a voxel-based local UDF, calculated on a voxel-by-voxel basis. However, only the voxel position, lattice spacing, and simulation time step are available as input variables.Download Sample File:
Initial Temperature
General¶
- Minimum Temperature
K | This setting defines the minimum expected temperature in the simulation. It is used internally to scale and non-dimensionalize the thermal field when solving the advection–diffusion–reaction equation. Exact values are not required—however, reasonable estimates can improve numerical precision.
- Maximum Temperature
K | This setting defines the maximum expected temperature in the simulation. It is used internally to scale and non-dimensionalize the thermal field when solving the advection–diffusion–reaction equation. Exact values are not required—however, reasonable estimates can improve numerical precision.
If the fluid is set to Immiscible Two Fluid, the following option will launch:
- Phase Containment
This setting specifies which fluid hosts the thermal field. Unless Interfacial Thermal Transfer is active, the thermal field will remain contained within the selected fluid phase throughout any advection and diffusion processes. Users can select either Fluid 1 or Fluid 2 as the host fluid for the thermal field.
- Off
No phase containment.
- Fluid 1
If selected, this fluid hosts the scalar field.
- Fluid 2
If selected, this fluid hosts the scalar field.
Volumetric Heat Sources¶
- Dissipation Heating
This setting determines whether the local energy dissipation rate (EDR) is included as a heat source. When enabled, temperature increases locally due to viscous dissipation. This capability closes the energy conservation loop—energy introduced into the system (e.g., by an impeller) is dissipated through shear in the fluid and converted into thermal energy, increasing the local temperature.
- On
Track dissipation heating.
- Off
Do not track dissipation heating.
Note
Under steady-state operating conditions, users can verify that the rate of increase in the fluid’s thermal energy matches the impeller power input. For an insulated system, this assumes no other heat transfer occurs.
- Specified Heating
Defines a user-specified volumetric heat source applied throughout the fluid. This allows custom definition of the heat generation rate within the domain.
- Of
Do not apply a specified heating rate.
- On
Apply a specified heating rate.
- Specified Heating UDF
W/ \(m^3\) | This UDF defines the local volumetric heating rate. It requires a single output: a floating-point variable named
qDot, which represents the local heat generation rate. Positive values indicate heat is added to the fluid, while negative values indicate heat is removed from the fluid. This is a voxel-based local UDF, calculated on a voxel-by-voxel basis using the local fluid properties.Download Sample File:
Specified Heating
If the fluid configuration is set to Free Surface or Immiscible Two Fluid, the following section will launch
Interface Flux¶
This models local heat transfer across a fluid-free surface or two-fluid interface using local fluid properties. This formulation is not coupled to any other scalar field and does not enforce energy conservation between phases. The specified flux is applied directly at the interface, meaning energy is added to or removed from the system externally rather than exchanged between fluids.
Note
When using an immiscible two-fluid model, it is generally not appropriate to use this Interface Flux feature in tandem with the Interface Thermal Transport feature. The Interface Thermal Transport model captures interfacial energy exchange between phases and enforces conservation of total energy. In most cases, the Interface Thermal Transport is the more physically consistent approach.
- Interface Flux Option
This controls whether interfacial heat transfer is applied.
- Off
No interfacial heat flux is applied.
- On
Interfacial heat transfer is applied using the selected interface-flux model.
- Surface Flux UDF
W/ \(m^2\) | This UDF defines the thermal flux rate along the free surface or two-fluid immiscible interface. One output must be defined within the UDF: a floating-point variable named
qDot. This output variable defines the local thermal transport rate. Positive values imply energy entering the fluid. Negative values imply energy leaving the fluid. This is a voxel-based local UDF, calculated on a voxel-by-voxel basis using the local fluid properties. The flux specified in this UDF will only be applied along voxels interacting with the free surface interface.Download Sample File:
Surface Flux
If there is a static inlet or outlet boundary condition, the following section will launch:
{Static Inlet/Outlet} Boundary Condition¶
- Thermal Boundary Condition
This defines the thermal boundary condition applied at the inlet or outlet boundary.
- Zero Gradient
Applies a zero-gradient thermal boundary condition. This option is typically used for outlets and allows the temperature to leave the domain without imposing an additional constraint.
- Specified Temperature
Applies a fixed temperature at the boundary. This option is typically used for inlets where the incoming fluid temperature is known.
- Fluid Temperature UDF
K | This UDF defines the temperature of the fluid entering or leaving along the boundary condition surface. This is a System UDF.
Download Sample File:
Fluid Temperature UDF
If there is a moving inlet or outlet boundary condition, the following section will launch:
{Moving Inlet/Outlet} Boundary Condition¶
- Thermal Boundary Condition
This defines the thermal boundary condition applied at the inlet or outlet boundary.
- Zero Gradient
This applies a zero-gradient thermal boundary condition. This option is typically used for outlets and allows the temperature to leave the domain without imposing an additional constraint.
- Specified Temperature
This applies a fixed temperature at the boundary. This option is typically used for inlets where the incoming fluid temperature is known.
- Fluid Temperature UDF
K | This UDF defines the temperature of the fluid entering or leaving along the boundary condition surface. This is a System UDF.
Download Sample File:
Fluid Temperature UDF
{Static Body} Fluid¶
- Thermal Boundary Condition
This setting defines the thermal field boundary condition along the surface of the static body.
- Adiabatic
This a no-heat-flux boundary condition at the fluid–solid interface. This represents a fully insulating wall.
- Uniform Heating
This applies a uniform heat input over the entire static body surface. The heating can be specified either as a total heat flow rate or as an areal heat flux.
- Heating Specification
This defines how the uniform heating rate is specified.
- Total
This specifies the total heat flow rate applied to the static body. At runtime, this value is divided by the computed static-body surface area to determine the equivalent uniform heat flux.
- Areal
This specifies the heat flux directly. This value is applied uniformly over the static-body surface.
- System Thermal Flux UDF
W or W/m 2 | This UDF defines the heat flux along the surface of a static body. One output must be defined within the UDF: a floating point variable named
flux. This output variable defines the heat flux at the solid/liquid interface. This value can be specified as either a total flux (flow) or aeral flux (per unit surface area).If the Custom Flux Specification is set to Areal, this value will be used directly in the code to define a local flux field boundary condition along the solid surface. If the Flux Specification is set to Total, this value will be divided by the local solid surface area to define a local flux field boundary condition along the solid surface. This is a local UDF, calculated on a voxel-by-voxel basis using the local fluid properties. The UDF is only applied to cells adjacent to the solid surface.
Download Sample File:
System Thermal Flux
- Local Heat Flux
This defines a spatially varying heat flux along the static body surface. Unlike Uniform Heating, this option allows the local heat flux to vary as a function of local fluid conditions and position along the wall.
This capability is useful for implementing custom convective heat transfer models where the local heating or cooling rate depends on nearby fluid properties, such as temperature, velocity, turbulence, species concentration, or other user-defined quantities.
- Local Thermal Flux UDF
This UDF defines the local heat flux along the surface of a static body. One output must be defined within the UDF: a floating point variable named
qDot. This output variable defines the heat flux at the solid/liquid interface. This is a local UDF, calculated on a voxel-by-voxel basis using the local fluid properties. The UDF is only applied to cells adjacent to the solid surface.Download Sample File:
Local Thermal Flux
- General Correlation
Uses the generalized turbulent convective heat transfer model proposed by Thomas et al. to predict the local heat transfer coefficient from local fluid properties and the local turbulent energy dissipation rate (EDR).
The model relates the local convective heat transfer coefficient to the local turbulence intensity near the wall using
\[h = 0.134\, \mathrm{Pr}^{-2/3} (\epsilon \nu)^{1/4},\]where \(h\) is the local convective heat transfer coefficient, \(Pr\) is the Prandtl number, \(ε\) is the local energy dissipation rate, and :math:`nu`is the kinematic viscosity.
The local heat flux is then computed from
\[q'' = h (T_w - T_f)\]where \(q''\) is the local wall heat flux, math:T_w is the wall temperature, and \(T_f\) is the local fluid temperature adjacent to the wall.
This calculation is performed locally on a voxel-by-voxel basis along the wall surface, allowing the model to naturally capture spatial variations in convective heat transfer caused by local flow behavior and turbulence intensity.
- Wall Temperature UDF
K | This UDF defines the wall temperature used to evaluate heat flux. The wall temperature is assumed to be uniform. The difference One output must be defined within the UDF: a floating point variable named
value. This output variable defines the wall temperature at the solid/liquid interface. This is a System UDF.Download Sample File:
Wall Temperature
Advanced¶
- Update Frequency
This setting defines the interval, relative to the simulation time step, at which the advection-diffusion equation is solved. An update interval of 1 implies that the thermal field is updated every simulation time step. (Likewise, an update interval of 8 implies that the thermal field is updated every eight simulation time steps, etc.)
This setting can be tuned to balance simulation fidelity with simulation speed. In principle, thermal advection should be linked directly to fluid velocity. In practice, however, the fluid velocity field changes very slowly relative to the simulation time step. As such, solving the advection-diffusion equation every two to eight time steps has the same net effect on thermal transport as solving the advection-diffusion equation every time step. A value between 2 and 8 is recommended to balance simulation speed and physical fidelity.
A decrease in the update interval is associated with a decrease in computational burden modeling thermal field advection. An increase in the update interval tends to increase overall simulation speed. A larger interval will also reduce the effects of numerical diffusion. See Application of flux limiters to passive scalar advection for the lattice Boltzmann method.
- Limiter
Flux limiters are used to reduce the effects of numerical diffusion when modeling advection-diffusion processes. Flux limiters address this issue by adaptively blending high-order (accurate but oscillation-prone) and low-order (stable but diffusive) schemes, which controls the numerical flux between voxels to ensure the solution remains bounded and physically realistic.
Flux limiters can be classified into both first-order and second-order schemes, each offering advantages depending on the balance needed between accuracy and stability. First-order limiters prioritize stability, introducing more numerical diffusion but remaining reliable in challenging simulations. Second-order limiters increase accuracy, particularly in smooth flow regions, though they may require adjustments to handle oscillations. In most species advection cases, a second-order scheme should be selected.
- Van Leer
This blends between first-order upwind and higher-order schemes based on the gradient. Second-order accurate.
- Min Mod
This uses a limited slope to prevent oscillations. Good for systems with highly oscillating concentration gradients. Second-order accurate.
- MUSCL (Monotonic Upstream-centered Schemes for Conservation Laws)
This captures shocks and discontinuities in concentration fields. Adaptively adjusts the flux to prevent oscillations while retaining detail in smooth regions of the flow. Second-order accurate.
- Super Bee
This captures steep gradients while maintaining stability. Achieves second-order accuracy in regions where the solution is smooth, but reduces to first-order near steep transitions.
- Lax Wendroff
This achieves accuracy by using a Taylor series expansion in time, combined with spatial derivatives calculated from species fluxes. Second-order accurate.
- Donor Cell
This determines fluxes based on the direction of flow using values from the upwind cell. Inherently stable and simple to implement, but introduces substantial numerical diffusion. Only valid for systems with a Peclet number greater than two. First-order accurate.
If Free Surface or Immiscible Two Fluid is selected, the following option will launch:
- Enforce Conservation
This option activates an algorithm to correct any conservation error. Because the thermal advection algorithm is not conservative near the free surface, the thermal field throughout the system is adjusted so that the total amount of thermal energy matches the initial amount plus or minus any injection or removal.
- On
This activates algorithm to correct conservation error.
- Off
The algorithm is deactivated.
Thermal Output Data¶
Thermal Field output data are saved to the Thermal Field Statistics file. They are saved as ASCII text files at the statistics output frequency.
Thermal Toolbar¶
Context-Specific Toolbar Options |
Description |
|---|---|
|
The Add Thermal Preset tool defines the initial temperature in a region of a simulation. |
|
The Help command launches the M-Star reference documentation in your web browser. |
See also Child Geometry Context Specific Toolbar.
For a full description of each selection on the Context-Specific Toolbar, see Toolbar Selections.
Add Thermal Preset
Help