Role of external magnetic fields in determining the thermodynamic properties of iron carbides in steel