Scientific paper Development of a Mathematical Model for the Dynamic Optimization of Batch Reactors, and MINLP Synthesis of Plug-flow Reactors in Complex Networks Marcel Ropotar,ab* Zdravko Kravanjab a Tanin Sevnica kemicna industrija d.d., Hermanova cesta 1, 8290 Sevnica, Slovenia b Faculty of Chemistry and Chemical Engineering, University of Maribor, P.O. Box 219, Maribor, Slovenia * Corresponding author: E-mail: marcel.ropotar@uni-mb.si Received: 28-08-2007 Dedicated to the memory of professor Vojko Ozim Abstract This paper describes the development of a robust and efficient reactor model suitable for representing batch and plug-flow reactors (PFRs) in different applications. These would range from the nonlinear (NLP) dynamic optimization of a stand-alone batch reactor up to the mixed-integer nonlinear (MINLP) synthesis of a complex reactor network in overall process schemes. Different schemes for the Orthogonal Collocation on Finite Element (OCFE) and various model formulations, in the case of MINLP model, were studied in order to increase the robustness and efficiency of the model. A deterministic model for known kinetics was obtained for batch and PFR reactors and extended for uncertainties in process parameters and reaction kinetics when the kinetics is unknown. Different variations of the developed model were applied to certain problems, as examples. The first motivating example was the dynamic optimization of batch reactor and the second the MINLP synthesis of a process scheme for the production of allyl chloride. The NLP version of the model with moving finite elements was found to be the most efficient for representing a batch reactor in the dynamic optimization example, and PFR trains in the process synthesis example. Keywords: Batch reactor, PFR reactor, orthogonal collocation, NLP, MINLP, process synthesis 1. Introduction Kinetics in batch and PFR reactors is described using differential equations with time as independent variable in the case of batch reactors and retention time, reactor length or volume in the case of PFRs. These equations represent complex optimization problems, even in small and simple examples, because equation-oriented solvers cannot handle differential equations. The use of OCFE in optimization models of batch or PFR reactors has become a well-established numerical method. It is used to convert and approximate differential equations into a set of nonlinear algebraic equations in a variety of applications, ranging from dynamic optimization of a single stand-alone batch reactor up to MINLP synthesis of complex reactor networks in overall process schemes. Over the last decade modelling, dynamic optimization, and on-line optimization have been the main research categories regarding the optimization of batch reactors. The modeling category is usually oriented towards a more realistic description of a batch reactor1 and towards the use of special modeling techniques and strategies in cases of imperfect knowledge of kinetic studies involved, e.g. the use of tendency models2 or a sequential experiment design strategy based on reinforcement lear-ning.3 The second category is related to more advanced aspects of dynamic optimization in respect of batch reactors, e.g. robust optimization of models, characterization by parametric uncertainty,4 or stochastic optimization of multimodal batch reactors.5 Finally in work relating to online optimization, which is currently the prevailing activity, different control schemes have been proposed, e.g. feedforward/state feedback laws in the presence of disturbances and nonlinear state feedback laws for batch processes with multiple manipulated inputs have been developed.6'7 Due to the complexity involved, dynamic optimization problems are regarded as difficult research tasks. On the other hand, the synthesis of reactor networks in overall process schemes is even more complex because we are dealing with discrete (selection of units, connectivity, etc.) and continuous (temperatures, flows, pressures, etc.) decisions simultaneously, which give rise to complex high-combinatorial mixed-integer nonlinear problems. Several methods have been developed for solving MINLP problems and one of the more efficient is the outer approximation (OA) algorithm8 and its extensions. It is also possible to solve MINLP reactor network synthesis problems using the geometrical approach,9 based on the attainable region (AR) theory or even by more efficient hybrid approaches which combine both methods.10 The geometrical approach, based on the AR theory, was first used for constructing an attainable region in the concentration space for 2-dimensional problems,11 and then for multi-D problems.12 Recently a novel concept of time-dependent Economic Regions (ERs) was incorporated into the MINLP synthesis of reactor networks within the overall process scheme.13 ER is obtained when economic criteria (e.g. annual profit, cost) are plotted vs. volume, residence time, or some other variable in contrast to the Concentration Attainable Region (CAR), which is constructed using technological criteria (e.g. conversion, selectivity, yield). A very important objective when optimizing reactor systems is to obtain reliable and feasible solutions, even in the presence of uncertain parameters. A lot of work has been carried out so far in design under uncertainty. For example, a novel approach was developed for the evaluation of design feasibility/flexibility, based on the principles of the deterministic global optimization algorithm a-BB14 and a two-stage algorithm for design under uncertainty and variability was proposed.15 Efficiency when solving the above-mentioned reactor optimization problems depends significantly on the method applied to solve the embedded differential-algebraic systems of equation. From among different variations of OCFE methods, the one with fixed finite elements is the most straightforward and easiest for modeling batch and PFR reactors. However, when using fixed finite elements directly it is impossible to explicitly model the optimal retention times of the batch reactors nor the optimal outlet concentrations and conditions. Consequently, the use of flexible finite elements or moving finite elements is regarded as a conventional approach for overcoming these difficulties16. This model, however, seems to be more nonlinear because the length of the final element is converted into a variable. The aim of this paper is to present the development of mathematical models suitable for optimization of batch and PFR reactors, which may either stand alone or be combined in complex reactor networks embedded within overall process flowsheets. Different schemes and strategies are applied to modelling and solving these dynamic and synthesis problems. The objective is to identify the most robust and efficient solution procedure. 2. Experimental - Numerical Procedure The following four-step procedure was proposed for solving optimization problems that contain differential-algebraic systems of equation: Simulation: During the first, optional step, simulation was performed using the MATHCAD professional package. The simulation is useful for preliminary analysis of a given kinetic system's behaviour, and to provide a good initial point for NLP or MINLP. Model formulation: During the second step, a differential-algebraic optimization problem (DAOP) model was converted into an NLP or MINLP model. Differential equations were approximated into a set of nonlinear algebraic equations by the use of OCFE, and an integral term in the objective function was approximated by the Gaussian integration formula. Solution: During the next step, either NLP or MINLP optimization was performed for the developed model. Analysis: During the last step, sensitivity analysis was carried out by one-parametric NLP or MINLP optimization with production rate (demand) as a varying (uncertain) parameter. Sensitivity analysis can be upgraded for flexible dynamic optimization where uncertain parameters are included directly in the optimization. When process synthesis is carried out, ER can be constructed during this step, with reactor volume as varying parameter. 2. 1. Dynamic Optimization of Batch Reactor Motivating example: NLP and MINLP models for the optimization of batch and PFR reactors were developed, based on a motivating example of a batch reactor (Fig. 1), where consecutive reaction A ^ B ^ C is carried out and B is the desired product. Since the reaction is endothermic, the system can be heated and/or preheated. Whenever the optimal inlet temperature is higher than defined by the user the inlet must be preheated. The kinetics of this reaction is the following: Steam Figure 1: Batch reactor. where cA, cB and cC are concentrations of A, B, and C, respectively, k0 is a pre-exponential constant, R universal gas constant, T reaction temperature, t time, and EaA and EaB are activation energies of both consecutive reactions. The corresponding (DAOP) is given as follows: (1) AtHp ^ | df pcprní\ p e P V p cP