Computational Aspects of the UV Flash Problem for Dynamic Optimization and Nonlinear Model Predictive Control

J. B. Jørgensen,Andrea Capolei,T. Ritschel
Abstract:The UV flash problem is ubiquitous in process engineering for both dynamic simulation and dynamic optimization of vapor-liquid equilibrium processes. Such vapor-liquid equilibrium governed processes include flash separators, distillation columns, as well as enhanced oil recovery strategies for production of oil from an oil reservoir. A core modeling element in all these applications is the UV flash problem which describes equilibrium between the phases of a mixture. Coupling the flash equilibrium conditions with conservation of mass and energy results in a differential-algebraic model. We present an adjoint gradient-based single shooting algorithm for dynamic optimization of processes that involve UV flash constraints. This algorithm is relevant for nonlinear model predictive control of vapor-liquid equilibrium governed processes. We test the algorithm using two different approaches for numerical integration of the differential-algebraic equations. In one approach, the equilibrium equations obtained from the flash problem are solved separately from the conservation equations resulting in a set of nested loops. In the alternative approach, the equilibrium and conservation equations are solved simultaneously, thus in general reducing the total number of loops. Numerical integration of the differential-algebraic system is a key computational part of the dynamic optimization algorithm and the efficiency relies heavily on the underlying linear solver and thermodynamic library. Depending on the size of the system, evaluating thermodynamic properties may be significantly more time-consuming than solving the linear systems and thus becomes the bottleneck with regard to performance. We consider a numerical example involving dynamical UV flash constraints. The UV flash is considered particularly difficult as none of the intensive variables, such as pressure or temperature, are specified. This example illustrates that simultaneous numerical integration is faster than nested numerical integration and that the computation time of the underlying thermodynamic library is more than an order of magnitude higher than that of solving the linear systems arising in the numerical integration. The algorithm is implemented in Matlab for both types of numerical integration and in C using simultaneous numerical integration together with a thermodynamic library implemented in Fortran. The single shooting algorithm transforms the infinitedimensional dynamic optimization problem into a nonlinear program which may be solved using appropriate software libraries. The efficiency of the dynamic optimization algorithm is directly related to the efficiency of the optimization algorithm with respect to convergence, since every iteration will require up to several integrations of the differential-algebraic equations and computation of corresponding gradients. There exists a large number of commercial and noncommercial optimization libraries for nonlinear programs. We compare the efficiency of Matlabs fmincon, the open-source IPOPT library as well as the commercial libraries, KNITRO and NPSOL. We consider various combinations of using Intel and GNU compilers for the C and Fortran code as well as using Netlibs LAPACK library and Intels MKL for solving the linear systems. The performance tests show that the commercial software yields the best performance. More specifically a combination of using NPSOL together with Intel compilers and Intel MKL gives an improvement in performance of around sixty compared to a pure Matlab implementation.
Engineering,Computer Science
What problem does this paper attempt to address?