Conservation of internal energy is used to model temperature dependent material
behavior. It also allows an energy balance evaluation.
However, internal energy is only calculated if it is turned on, to reduce computation time in
problems not involving heat transfer.
The conservation of energy is given by:
(1)
$$\frac{\partial \rho e}{\partial t}\left(\left({w}_{i}{v}_{i}\right)\cdot \frac{\partial \rho e}{\partial {x}_{i}}\right)+\left(\rho e+P\right)\frac{\partial {v}_{K}}{\partial {x}_{K}}=0$$
Where,
 $e$
 Internal energy in Joules (Nm)

$P$
 Fluid pressure
Applying a Galerkin variation form for the solution gives:
(2)
$$\underset{}{\overset{V}{\int}}\text{\psi}\left(\frac{\partial \rho e}{\partial t}\left(\left({w}_{i}{v}_{i}\right)\cdot \frac{\partial \rho e}{\partial {x}_{i}}\right)+\left(\rho e+P\right)\frac{\partial {v}_{K}}{\partial {x}_{K}}\right)=0$$
Making the following assumptions:
$\psi $
=1
${\rho}_{e}$
= constant over control volume
$V$
Equation 2 reduces
to:
(3)
$$\underset{V}{\overset{}{{\displaystyle \int}}}\frac{\partial \rho e}{\partial t}dV+\underset{V}{\overset{}{{\displaystyle \int}}}\left(\rho e+P\right)\frac{\partial {v}_{K}}{\partial {x}_{K}}dV=0$$
Applying the divergence theorem gives:
(4)
$$\underset{}{\overset{V}{\int}}\frac{\partial \rho e}{\partial t}dV+\underset{}{\overset{S}{\int}}\left(\rho e\left({v}_{j}\cdot {n}_{j}\right)dS\right)+\underset{}{\overset{V}{\int}}P\frac{\partial {v}_{K}}{\partial {x}_{K}}dV=0$$
Hence:
(5)
$$\frac{d}{dt}\underset{V}{\overset{}{{\displaystyle \int}}}\rho edV=\underset{S}{\overset{}{{\displaystyle \int}}}\rho e\left({w}_{j}{v}_{j}\right){n}_{j}dS\underset{V}{\overset{}{{\displaystyle \int}}}P\frac{\partial {v}_{K}}{\partial {x}_{K}}dV$$
This formula is still valid if
$e$
is not assumed uniform over volume
$V$
.
New formulation based on total energy conservation are under investigation.