In physics, the first law of thermodynamics is an expression of the conservation of total energy of a system. The increase of the energy of a system is equal to the sum of work done on the system and the heat added to that system:
where
*  is the total energy of a system.
*  is the work done on it.
*  is the heat added to that system.
In fluid mechanics, the first law of thermodynamics takes the following form:
where
*  is the  Cauchy stress tensor.
*  is the flow velocity.
* and  is the heat flux vector.
Because it expresses conservation of total energy, this is sometimes referred to as the energy balance equation of continuous media. The first law is used to derive the non-conservation form of the Navier–Stokes equations.