Calculation of Equilibrium Composition of Complex Thermodynamic Systems using Julia Language and Ipopt Library

Author(s):  
G.V. Belov

The article considers the possibility of using the Ipopt optimization package for the calculating the phase and equilibrium compositions of a multicomponent heterogeneous thermodynamic system. Two functions are presented for calculating the equilibrium composition and properties of complex thermodynamic systems, written in the Julia programming language. These functions are the key ones in the program integrated with the IVTANTERMO database on thermodynamic properties of individual substances and used for conducting test calculations. The test calculations showed that Ipopt package allows determining the phase and chemical compositions of simple and complex thermodynamic systems with a fairly high speed. Using the JuMP modeling language significantly simplifies the preparation of the initial data for the Ipopt package, therefore the functions presented in this article are very compact. It is shown how the Ipopt package can be used when the temperature of the thermodynamic system is unknown. The approach proposed in this work is applicable both for analyzing the equilibrium of individual chemical reactions and for calculating the equilibrium composition of complex chemically reacting systems. The simplicity of the proposed functions allows their easy integrating into application programs, embedding them into more complex applications, using them in combination with more complex models (real gas, nonideal solutions, constrained equilibria), and, if necessary, modifying them. It should be noted that the versatility of the JuMP modeling language makes it possible to replace the Ipopt package with another one without significant modification of the program text

Sign in / Sign up

Export Citation Format

Share Document