Prescribing Constant Temperature in Fluid Cells
In modeling some applications, such as air conditioning units, it may be desirable to impose the temperature distribution within a range of fluid cells. This section describes a procedure that uses the discretized form of the energy equation to fix a target temperature that you specify.
The steps are as follows:
-
Create a cell set containing the cells for which the temperature is to be fixed.
This cell set has a corresponding field function with a default name. Here, the field function is CellSetVar_1.
-
Create a field function,
GREAT, that contains a number sufficiently large to mask the contribution from the usual energy fluxes in the designated cells, but not too high to cause a floating point exception.
For example, you could use 1000 times the maximum local value of or , where is the mass flow rate into the cell, is the specific heat, is the cell volume, is the thermal conductivity, and is some characteristic cell length. In this example, GREAT is set to 1e20.
-
Create a field function for the user-defined temperature field.
Here, for example, T_target is set to:
293 + 40 *$$Centroid[1] * (1 - $$Centroid[1])
-
Using these three field functions, it is possible to define a further field function for the Volumetric Heat Source, Q, that applies to cells in the cell set:
($CellSetVar_1) ? $GREAT*($T_target - $Temperature) : 0
-
The differential of this field function with respect to temperature is also required as a field function.
Here, it is defined as dQdT, with the formula:
($CellSetVar_1) ? -$GREAT : 0
Having created the necessary field functions, the final step is to apply them to the relevant region values:
- Set the Volumetric Heat Source of the region to the field function Q:
-
-
Set the
Energy Source Temperature Derivative to the field function
dQdT: