Highly integrated energy systems are on the rise due to increasing global demand. To capture the underlying physics of such interdisciplinary systems, we need a modern framework that unifies all forms of energy. Here, we apply modified Lagrangian mechanics to the description of multi-energy systems. Based on the minimum entropy production principle, we revisit fluid mechanics in the presence of both mechanical and thermal dissipations and propose using exergy flow as the unifying Lagrangian across different forms of energy. We illustrate our theoretical framework by modeling a one-dimensional system with coupled electricity and heat. We map the exergy loss rate in real space and obtain the total exergy changes. Under steady-state conditions, our theory agrees with the traditional formula but incorporates more physical considerations such as viscous dissipation. The integral form of our theory also allows us to go beyond steady-state calculations and visualize the local, time-dependent exergy flow density everywhere in the system. Expandable to a wide range of applications, our theoretical framework provides the basis for developing versatile models in integrated energy systems.
Keywords: Lagrangian fluid mechanics; exergy flow; integrated energy systems.