In thermodynamics, the internal energy (U) is the function of the volume (V) and temperature (T), U = U (T).
Therefore, according to the mathematics, dU = π dV + Cv dT, where π is internal pressure and Cv is the constant volume heat capacity.
Meanwhile, according to the 1st law, dU = δ w + δq...