Global energy balance for unsteady conduction problem
It is desired to evaluate the global energy balance for an unsteady conduction problem. This can not be done correctly using only the Flux Reports panel, which only includes surface terms in the energy balance.
For a conserved variable, Phi, in an unsteady calculation with the first order implicit time advancement scheme, we can write the change in Phi in a control volume between time step N and time step N+1 as follows
(1) Phi_N+1 - Phi_N = delta_t * [ F(Phi_N+1) + S(Phi_N+1) ], where delta_t is the current time step size, F represents fluxes and S represents sources
We can also write
(2) Phi_N - Phi_N-1 = delta_t * [ F(Phi_N) + S(Phi_N) ]
This is true whether the control volume is a single cell, or the entire domain.
The global energy balance should be evaluated by
(3) Energy_in - Energy_out = Change_in_Energy
The left hand side of (3) can be obtained from the right hand side of (2). The right hand side of (3) can be obtained from the left hand side of (2).
In this example, Phi is the energy of the system. Neglecting all forms of energy except internal energy, which should be valid for a conduction problem, we can say
(4) Phi_N - Phi_N-1 = (density * specific heat * temperature)_N - (density * specific heat * temperature)_N-1
The right hand side of (4) can be evaluated by defining a custom field function equal to density * specific heat * temperature and using the Volume Integrals panel to perform a Volume Integral over all the zones. Therefore, the final balance will be
(5) Net imbalance = delta_t * (Energy_In - Energy_Out)_N + delta_t*S(Phi_N) - [ Volume integral of (density * specific heat * temperature)_N - Volume integral of (density * specific heat * temperature)_N-1 ]
The Energy_In - Energy_Out term must be evaluated from Total Heat Transfer Rate in the Flux Reports panel. This evaluation should be performed over all exterior boundaries of the domain.
The remainder of the terms must be evaluated by the user, as described above.
If the source is a constant value, evaluating its contribution to (5) is straightforward. If a UDF is used to create custom source terms, it is probably easiest to access the values of the volumetric source terms by storing them in a User Defined Memory (UDM) variable, and using the Volume Integrals panel to perform a Volume Integral of the UDM, then multiplyling it by the time step size, delta_t.
If the second order implicit time advancement scheme is used, the left hand sides of (1) and (2) must be modified according to Equation 22.2.15 of the FLUENT 6.0 User's Guide, and (4) must also be modified in a corresponding manner.
When using explicit time integration, (1) (2) and (4) must be modified in accordance with the scheme that has been selected. It should be noted that explicit time integration is only available with the Coupled Explicit solver, which is not recommended for the solution of conduction problems.