Under these conditions, the first law of thermodynamics for a flow process states: the increase in the internal energy of a system is equal to the amount of energy added to the system by matter flowing in and by heating, minus the amount lost by matter flowing out and in the form of work done by the system. Under these conditions, the first law for a flow process is written: