Application of the first law of thermodynamics for closed systems using a graphical user interface