5.22 Solving for energy
Examples with energy conservation in this chapter assume is constant to produce the transport equation for in Eq. (2.65 ). When cannot be assumed to be constant, it is common to solve an equation for internal energy instead, e.g. Eq. (2.60 ) with the material derivative replaced using Eq. (2.14 )

(5.39) 
To improve convergence, an implicit term is introduced which is similar in form and scale to the problem term. For energy Eq. (5.39 ), we use , where the diﬀusivity is calculated from the function of .
The extra term is both “added and subtracted” in implicit and explicit form. This has the eﬀect of increasing the contributions to matrix coeﬃcients, while cancelling out a large part of the explicit contribution from , as illustrated below

If is expressed as a polynomial function of , Eq. (2.64 ), then is converted to using the analytical integral of Eq. (2.62 )

(5.40) 
From temperature to energy
The conversion from to is more complex because cannot be made the subject of Eq. (5.40). Instead, it can be “inverted” using an iterative scheme such as the NewtonRaphson method,^{8} which for this problem is:

(5.41) 
Boundary conditions
The boundary conditions for the energy equation are generally speciﬁed in terms of . But since they must be applied to the variable being solved, they must be reposed in terms of . A ﬁxed value condition is converted to an equivalent condition , e.g. by Eq. (5.40 ). A ﬁxed gradient condition for is converted to a ﬁxed gradient for by

(5.42) 