the part of the universe being studied, arbitrarily defined to any size desired
A thermodynamic system can be any physical system with a well-defined volume in space. The outer edge of the system is referred to as its boundary, which often separates the system from the surroundings. Exchanges of work, heat, or matter between the system and surroundings generally take place across the boundary.
In thermodynamics, the total energy contained by a given thermodynamic system is referred to the internal energy (U). It includes the energy needed to create the system, but excludes the energy needed to displace the system's surrounding or energy displacement due to external forces. Internal energy encompasses both potential and kinetic energy. Internal energy is a state function, meaning its value is dependent only on the current state of the system.
Internal energy is generally represented as the sum of work and heat done by or to the system. It can be represented as:
where w represents work and q represents heat. From a thermodynamic perspective, work can be done on or by the system; similarly, heat can be lost or gained by a particular system. Hence, -q means the system loses heat, while +q means a system gains heat. Similarly, +w means work is done on the system, while -w means work is done by the system. Therefore a positive $\Delta U$ value means there is a net gain of energy by the system, while a negative $\Delta U$ value means there is a net loss of energy in the system.
Because the internal energy encompasses only the energy contained within a thermodynamic system, the internal energy of isolated systems cannot change. In contrast, the internal energies of both open and closed systems can change because they can exchange heat and work with their surroundings.
Enthalpy (H) encompasses both the internal energy of a system and the energy associated with displacing the system's surroundings. Simply put, enthalpy accounts for heat flow within a system.
Sometimes, measuring the internal energy of a system may be an inaccurate gauge of the change in energy. For example, if a reaction is held at constant volume, no work is performed and therefore $\Delta U=q$. However, in an open system some gas may escape or enter the system; effectively, work is being performed. So, even if the heat change can be measured, $\Delta U\neq q$ because some work has been performed. However, in open systems, the pressure of the system and the surroundings has stayed constant. Therefore, to account for both the possible volume change at constant pressure and the internal energy, enthalpy is used.