For our balance, we will choose an **arbitrary** fixed (in
space) control volume. Thus, it is an *open* system (i.e.,
one through which mass may flow). Accounting for *heat*
within that control volume (and exchanged with its surroundings),
we get:

rate of accumulation of
heat in CV |
= | net rate of
heat transport into CV (by flow) |
+ | net rate of
heat transferred to material in CV |
+ | net rate of
heat "generation" in CV |

It is useful to discuss why we must now include a "generation"
term. This term originates from the fact that heat can be "made"
from other forms of energy (friction, chemical reactions,
electrical resistance, etc.). A very important point therefore is
that *heat is not conserved*!

In writing this mathematically, we use *cT* to represent
the thermal energy per unit mass, where *c* is the *heat
capacity* of the material. We then get:

$\displaystyle{\frac{\partial}{\partial t}\int\int\int_{CV} \rho c T dV = - \int\int_{CS} \rho c T (\mathbf{v}\cdot \mathbf{n}) dA - \int\int_{CS} (\mathbf{\frac{q}{A}}\cdot \mathbf{n})dA + \int\int\int_{CV} \dot q dV}$

- -
**Q**is the*flux*of heat to or from the material within the CV (the sign is chosen such that heat flowing*into*the material is positive. - $\displaystyle{\dot q}$ is the volumetric rate of thermal energy generation.

Now for a little bit of math wizardry...

There is a theorem attributed to Gauss which states that a surface integral of a quantity can be written as a volume integral of the derivative of that quantity. Using this idea (and rearranging a little), we can write the heat balance instead as:

$\displaystyle{\int\int\int_{CV} \left \{ \frac{\partial}{\partial t}(\rho c T) + \nabla \cdot (\rho c T \mathbf{v}) +\nabla \cdot (\mathbf{\frac{q}{A}}) - \dot q \right \} dV = 0}$

As we chose an **arbitrary** control volume, in order for
this integral to be equal to zero for *any* choice of CV,
the integrand must be zero. So, we now have a differential heat
balance equation:

$\displaystyle{ \frac{\partial}{\partial t}(\rho c T) = - \nabla \cdot (\rho c T \mathbf{v}) -\nabla \cdot (\mathbf{\frac{q}{A}}) + \dot q }$

The best way to prove this "zero" thing to you is by contradiction:

At the simplest level there are four assumptions that we can make that effect the terms within the General Thermal Energy Balance (GTEB) Equation:

**Steady State**-- this assumption clearly affects the first term on the left-hand side (d/dt = 0); if it is*not*true we should try the Biot number to see if "lumped" is a more appropriate equation to solve**No Flow**-- this assumption is valid for solids or for truly stagnant fluids, it makes the first term on the right-hand side of the GTEB become zero**No Generation**-- this assumption requires that we have no chemical reactions, electrical current, frictional or mechanical work, etc. that might be turned into thermal energy, if true it makes the last term on the right-hand side become zero**Constant Properties**-- this is the trickiest assumption because it requires that we envision having only a small-to-moderate overall temperature*span*within our material of interest (particularly difficult to assess when we have generation), if it holds true we pull the density, heat capacity, and conductivity (in the function Q) out of all derivatives

Simplify the general thermal energy balance equation (identifying assumptions)

In order to "set up the equation", one needs to not only write and simplify the appropriate form of this differential equation, but also include the relevant boundary conditions!