2-aryl-5-pyrrolecarboxylic acid methyl ester synthesis modeling and optimization based on kinetic model

. In this work, a kinetic model of the 2-aryl-5-pyrrolecarboxylic acid methyl ester synthesis is constructed. Computational experiments to optimize the reaction have been carried out. The reaction conditions for obtaining the maximum yield of the target product were determined.


Introduction
Pyrrolecarboxylic acids (PAC) are subject of great interest as primary compounds for porphyrins and drugs synthesis [1,2].
There are very few publications in the literature about pyrrolecarboxylic acids synthesis and about such important substances as 5-acetyl-2-pyrrolecarboxylic acid compounds synthesis in particular. The difficulty of 5-acetyl-2-pyrrolecarboxylic acid synthesis is due to the fact that the strong electron-withdrawing substituents (COOH, COOCH3 and COCH3) located in α-position of pyrrole ring change the inherent regiolation of the pyrrole regioselectivity in the electrophilic substitution reactions. Thus reaction proceeds at position 4, rather than at free α position [5][6]. 5-chloro-2-pyrrolecarboxylic acid was received only in reaction with tert-butyl hypochlorite (it was radical type reaction, very rare case for pyrrhols) [7].
Mathematical modeling of complex processes which involve metal complex catalysts is in demand and it is used to provide large-scale transition from laboratory facilities to pilot and pilot-demonstration reactors [8]. Kinetic model which contains necessary information about main laws of chemical transformations is fundamental bases of chemical reactor mathematical model. Therefore, kinetic model development issue which describes the transformation of reagents for a wide range of temperatures becomes question of actual interest.

Chemical reaction scheme
Kinetic model development which is represented in this paper is based on experimental data obtained in Laboratory of hydrocarbon chemistry at Institute of Petrochemistry and Catalysis of Russian Academy of Sciences. New method for introducing a carboxyl group into pyrrole compounds was developed using an original technique based on the interaction between pyrroles and CCl4-CH3OH-catalyst system during experiments.

Mathematical model
Kinetic equations of reaction scheme (2) are analyzed within the framework of the law of acting masses. A correct description of the laboratory reactor with a stirrer is the ideal mixing model [12].
Total balance of ideal mixing isothermal reactor for the i-th component in the reactor volume element (V) in case when molar density of gas or liquid (or total concentration C, kmol / m 3 ) varies with time, i.e. when the reaction proceeds with a change in moles number, is determined by change: was in time (t):Сi(t)V=С(t)Xi(t)V become in time (t+t):Сi(t+t)V=С(t+t)Xi(t+t)V has changed over time (t) due to chemical reactions: Then material balance of the isothermal ideal mixing reactor is described by equation: On condition that t value tends to zero we recieve differentail equations system: with such initial conditionst = 0: (3) is closed by normalization condition for components of reaction medium: In kinetic studies, experimental data usually is obtained under isothermal conditions at constant pressure. For gas-phase reactions Molar gas density (Co) can be calculated for gasphase reactions from the equation of state, for example, the Mendeleev-Clapeyron equation for ideal gases: Initial molar density of liquid (Cо) is constant at any temperature. Thus, after dividing (3) on Cо we have differential equation: where N =C/Corelative change of number of moles in reaction medium, j=Wj /Coreduced rates of chemical reactions. After summing equations (4) and taking normalization condition in to account we receive: After differentiation of equations (5), we receive: Multiple (5) on Xi and subtract it from (6). Thus, due to right side of equation (5) we receive differential equations system of material balance for ideal batch mixing reactor (7)-(8): where N = C/Co -relative change in the number of moles of reaction mixture; C and Cо molar density and its initial value, mole/l; Xi=Сi/Ccomponents concentrations, mole fraction; Voreaction space volume, l; ωj=Wj/Coreduced reactions rates, h -1 ;Jnumber of stages of chemical transformations; Inumber of components.
Inequality to zero of at least one of the j coefficients is the consequence of the fact that reaction proceeds with a change in number of moles.
All catalytic reactions goes occur with reaction volume and mole change practically. This fact is usually ignored by science sources. This leads to necessity to adjust or introduce some conditional parameters of the model during exact reactions kinetic models development. Thus, new function is introducedreduced amount of moles and this function using makes calculations results balance. Correct kinetic model which abides law of conservation of matter will be received as a result.
The numerical values of found steps rate constants and activation energies for of 5-acetyl-2-pyrrolecarboxylic acid methyl ester synthesis are represented in Table 1. Summary of stages 2, 3 and 4 turned out to be imitational. First stage, which is 2-acetylpyrrole alkylation is the most energy-intensive.
There are constants values presented in table 1 in accordance to some fixed temperature points (Тf). Тf=105 о С or 378 К is chosen as one of them. Formula below (9) is used for constants recalculation in order to find constant value at any temperature. Chosen fixed temperature is used here: (9)

Experimental and calculated data comparison
Calculation experiment for target product yield (methyl ester of 5-acetyl-2-pyrrolecarboxylic acid) determination was done based on the developed kinetic model (2) with help of mathematical model (7)-(8) with temperature and initial reagents ration variation.
It is impossible to study any object only with experimental research. So after setting tasks of investigation and identification of the most essential object qualities researches often use modeling approach [13][14][15]. Model must be usable for study and simple as possible, but also must contain all object qualities needed to study, in order to complete tasks. So there may be whole complex of different models of one object, each model refers to different research task.
Comparison of calculated (obtained on the basis of observed substances molar ratio: initial reagent 2-acetylpyrrole and the final product methyl ester of 5-acetyl-2pyrrolecarboxylic acid) and the experimental data for the synthesis reaction of 5-acetyl-2pyrrolecarboxylic acid methyl ester synthesis is shown on Figure 1, Figure 2 and in Table 2.    As can be seen from presented data, developed kinetic model describes adequately experimental observations: discrepancy between the calculated data and the experimental concentrations changes over time does not exceed the error of quantitative analysis.

Optimal conditions for chemical reactions
Chemical reactor optimization task is related to determination of optimal working regime, i.e. such regime which gives best value of chosen process criterion and thus gives the best output of the whole process. The solution of this problem includes following main steps [18,19]: 1) optimization criterion or objective function selection; 2) describing variables and their limitations; 3) mathematical description of the process; 4) choosing the method of calculating of optimal regimes.
In this paper, the search for the optimal regime is carried out using an algorithm for solving optimization problems, based on methods of statistical experiment planning [20]. N controls, some central point (control reference values), and control variation intervals are selected. Then a computational experiment is performed on the computer with the help of a mathematical model of the process in accordance with the requirements of a rotational plan of the second order for N variables [21] and the numerical values of the optimization criterion and all phase variables are calculated. Based on the calculations performed, we obtain regression equations for the optimization criterion (Fo) and M phase variables (Fk, k = 1 ... M), which are constrained: where Znormalized control parameters. Finally, optimum Fo with limitations on Fk is determined by using method of Lagrange multipliers, i.e. extremum of function At the end we have simple equations system with (N+M) amount of equations for N unknown Zi and М unknown k: System of nonlinear algebraic equations solution (11) is found by Newton-Raphson method. Obtained solution is verified by a direct calculation of mathematical description equations system [22].
Considered algorithm of the solution is quite simple, free from the choice of arbitrary parameters and requires relatively simple and short computations to find coefficients of regression equations (10) and solution of the system (12) [23].
Concentration of components are phase variables for studied chemical reaction, and temperature and initial composition are control parameters.
The mathematical description of reactions in the laboratory reactor is based on equations of material balance (7) - (8). Regression analysis is used for kinetic constants and optimal regimes searching.
Minimum time to achieve 95% conversion of 2-acetylpyrrole (Х1) is chosen as the control parameter for 5-acetyl-2-pyrrolcarboxylic acid methyl ester synthesis reaction.
A computational experiment was carried out for three temperatures at which the experiments were also carried out: 105 ° C, 110 ° C and 115 ° C.
Calculations results (based on the ratio of the number of moles of reacted substances to the initial number of moles of this substance from the change in time) of carbon tetrachloride, methanol and 2-acetylpyrrole conversions are shown in Figure 3-Figure 5, respectively.
Analysis of the stages rates change ( Figure 6-Figure 8), conversion of 2-acetylpyrrole (see Figure 5) and the yield of the desired product depending on the initial product at temperatures of 80 ° C, 90 ° C, 105 ° C, 110 ° C, 115 ° C, 120 ° C, 125 ° C (Figure 9- Figure  10) showed that the optimal condition for conducting the experiment is 3 hours at a temperature of 115 ° C (at higher temperatures, the sample becomes contained with resins).   The nature of stages rates change of chemical transformation (1) is shown on Figure 6- Figure  8.     Calculated data about changes in MEAPCK yield at five temperatures and variable ratio of the initial components: 2-acetylpyrrolocarycarbonyl chloride and methanol, are given in Table 3-Table 7. Table 3. The dependence of the yield of the target product on the ratio of the initial substances at a temperature 105 ° C.    Table 6. The dependence of the yield of the target product on the ratio of the initial substances at a temperature 120 ° C. As can be seen from all presented data, optimum reaction conditions for 5-acetyl-2pyrrolecarboxylic acid methyl ester synthesis are: reaction temperature is 115 ° C, the ratio of the starting components 2-acetylpyrrole: carbon tetrachloride: methanol is 0.1: 0.4: 0.5.

2-acetylpyrrole (X1), mole fraction
With such values of the control parameters time to reach 95% conversion of 2-acetylpyrrole (X1) is 3 hours. During this time rate of target product formation (w5) has practically reached its asymptotic value, so increasing the reaction time by 2.5-3 times is hardly advisable, although the conversion of x1 will increase to 99%. More economical is the Option with 95% conversion of 2-acetylpyrrole and recycle of unreacted starting reagents is more preferable from economic point of view.

Conclusion
The reaction scheme of 5-acetyl-2-pyrrolecarboxylic acid methyl ester synthesis is presented in this paper and its mathematical model is studied. The mathematical model equations derivation for the ideal mixing model is presented. The kinetic model for 5-acetyl-2-pyrrolecarboxylic acid methyl ester synthesis reaction has been developed.
The dependence of the yield of the target product on the ratio of the initial reagents is shown and it is shown that the convergence of the calculated and experimental data for studied reaction is within the error of the quantitative analysis.
The computational experiment was carried out and dependences of target product maximum yields with the variation of the reaction temperature and the composition of the feedstock were determined.
It is shown that developed kinetic model developed adequately describes experimental data in the wide ranges of reaction temperature and the molar ratio of initial reagents.
The optimum reaction time for the preparation of 5-acetyl-2-pyrrolecarboxylic acid methyl ester synthesis with 95% conversion of 2-acetylpyrrole is 3 hours.
It was found that in order to obtain the maximum yield of benzylidene-benzylamine, the best molar concentration ratio of the initial reagents benzylamine: carbon tetrachloride is 1: 9.