Logo of Technische Universität BerlinAt the CAPE-OPEN 2019 Annual Meeting, David KRONE, Erik ESCHE and Jens-Uwe REPKE from Technische Universität Berlin, together with Norbert ASPRION from BASF and Mirko SKIBOROWSKI from Technische Universität Dortmund will describe their experience using COBIA to make a CAPE-OPEN thermodynamic server accessible from a GAMS model.

Summary supplied by the co-authors

State-of-the-art optimization tools like GAMS facilitate the solution of highly complex systems, such as mixed-integer nonlinear programming problems (MINLP). This is especially useful for conceptual process design. However, these tools are not typically built for chemical engineering applications and do not come with a ready-to-use interface for including thermodynamics. Nevertheless, the integration of accurate thermodynamic models is, e.g., feasible in GAMS via external equations [1]. In this contribution, we show how available thermodynamic property packages can efficiently be introduced into GAMS computations using a combination of the CAPE-OPEN Binary Interop Architecture (COBIA) and models generated by MOSAICmodeling [2].

The presentation will demonstrate a workflow to solve MINLP problems in GAMS with COBIA serving as the middleware to interface thermo packages. The MINLP set-up involves the following steps: The system to be optimized and all thermo functions, e.g. for specific enthalpies or vapor-liquid distribution ratios, are defined via the modeling environment MOSAICmodeling. The subsequent code export generates two code sequences, the actual code for the GAMS program file and additional C++ code for the external module. The GAMS code consists of all system equations, variable and parameter specifications, and configurations for the solver. All thermo functions including their input and output variables are only mapped but not defined in the GAMS program file by so-called external equations.

This mapping links these equations with their body definitions in the C++ file of the externalmodule. COBIA is used in the external module to supply every external equation in GAMS with the corresponding property values and partial derivatives from the thermo package. The external module is first compiled into a DLL file and then included into the current workspace directory of GAMS, from where it is called when the MINLP is solved. The presentation will also feature the results from case studies, in which a sequence of several vapor-liquid-equilibrium stage models is used to separate the ternary mixtures n-pentane/nhexane/n-heptane, acetone/methanol/water, and acetone/isopropanol/water. All thermodynamic properties are supplied by thermo packages configured by the CAPE-OPEN property package manager TEA [3]. The results show that COBIA is highly efficient in interfacing GAMS with CAPE-OPEN thermo packages and that the implementation is quite convenient, especially when making use of the strengths of MOSAICmodeling in generating code from generically formulated models.

[1] M. Skiborowski, A. Harwardt, W. Marquardt, Comp. Chem. Eng., 2015, 72, 34-51
[2] E. Esche, C. Hoffmann, M. Illner, D. Müller, S. Fillinger, G. Tolksdorf, H. Bonart, G. Wozny, J.-U. Repke, Chem. Ing. Tech. 2017, 89, 5, 620–635
[3] https://www.amsterchem.com/coco.html, last accessed: 2019-07-30