First law of thermodynamics (fluid mechanics)

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 In fluid mechanics, the first law of thermodynamics takes the following form:[1][2] where 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.

For a compressible fluid the left hand side of equation becomes: because in general That is, the change in the internal energy of the substance within a volume is the negative of the amount carried out of the volume by the flow of material across the boundary plus the work done compressing the material on the boundary minus the flow of heat out through the boundary.

i.e. stress times divergence of material flow equals deviatoric stress tensor times divergence of material flow minus pressure times material flow.