Научная статья на тему 'Software application for solving some typical problems of chemical technology'

Software application for solving some typical problems of chemical technology Текст научной статьи по специальности «Автоматика. Вычислительная техника»

CC BY
23
3
Поделиться
Ключевые слова
OFTWARE PACKAGE / NUMERICAL METHODS / DIRECT PROBLEM OF KINETIC / EQUATIONS / C #

Аннотация научной статьи по автоматике и вычислительной технике, автор научной работы — Manafov M.R.

The software package for solution of a wide range of tasks of the chemical and petrochemical industry described. The existing programs are analyzed and their advantages and shortcomings are specified. The shortcomings of these works have been taken into account at creation of the software package. Along with numerical methods for the solution of various tasks (calculation of integral, numerical methods for solving equations etc.), class for the solution of the direct and inverse problem of kinetics, calculation and a choice of the equipment from the Access database has been defined. The generated package can be used by schoolchildren, students, engineers and scientists

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Текст научной работы на тему «Software application for solving some typical problems of chemical technology»

UDC 002.6:004.3;002.6:022.9

SOFTWARE APPLICATION FOR SOLVING SOME TYPICAL PROBLEMS

OF CHEMICAL TECHNOLOGY

M.R.Manafov

M.Nagiyev Institute of Catalysis and Inorganic Chemistry, NAS of Azerbaijan

mmanafov@gmail.com Received 21.06.2016

The software package for solution of a wide range of tasks of the chemical and petrochemical industry described. The existing programs are analyzed and their advantages and shortcomings are specified. The shortcomings of these works have been taken into account at creation of the software package. Along with numerical methods for the solution of various tasks (calculation of integral, numerical methods for solving equations etc.), class for the solution of the direct and inverse problem of kinetics, calculation and a choice of the equipment from the Access database has been defined. The generated package can be used by schoolchildren, students, engineers and scientists.

Keywords: software package, numerical methods, direct problem of kinetic, equations, C #.

Introduction

One of the main directions of scientific activities of the Institute of Catalysis and Inorganic Chemistry, National Academy of Sciences of Azerbaijan is the study of the kinetics and mechanism of chemical processes, their modeling and optimization. In the Department "Modeling and technology of chemical and eco-logic processes" of the Institute complex chemical reactions are studied using a software package OptimMe, including the methods of constructing mathematical models of the chemical reactions [1], as well as methods for solving direct and inverse kinetic problems. The development of information technology has opened up access to a huge, everincreasing volume of information about the catalytic reactions, technology processes. The emergence of the multiprocessor computers made possible to simulate the tasks which are not subject to direct experimental solution, such as, for example, research problems of the fast and limiting processes. The need for the numerical solution of chemical kinetics problems for reactions with a large number of steps is caused by modern requirements of the industry. Solution of tasks on improvement of oil and gas processing, improvement of chemical reactors are actual. For each of these tasks mathematical modeling should be carried out and before changing production processes, it is necessary to improve chemical schemes at various stages of production. However,

analytically solving such problems practically does not work out because of the huge size of the systems of ordinary nonlinear differential equations corresponding to schemes of chemical reactions. The efficiency of the use of modern computer technology is an important criterion for the competitiveness of modern software application. Thus, the application software is relevant if it meets the requirements of the task and as much as possible uses the available computing resources [2]. In this regard the problem of search of kinetic constants of a chemical reaction - a complex multi-parameter computing task, which decision is directly dependent on the performance of the computing environment, and on the used algorithms. Creating a computer system [1], including the parameters of natural and computational experiments, mathematical modeling of reactions, processes and information and computer system with an ever-growing database of kinetic studies, would reduce the development time of kinetic models of complex reactions that, in turn, lead to acceleration of research and development of the new processes.

The mathematical formulation of the problem

The equations of chemical kinetics is a system of ordinary differential equations [3]

dx

— = f (x, k), x(0) = x0, t e[0, tk ],

where x, x0 - current vectors and the initial concentrations of the reactants, f - vector function of the kinetic dependences which are built in accordance with the mechanism of chemical reactions, k - vector of the rate constants of elementary reactions.

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Statement of the inverse and direct problems of chemical kinetics

Inverse task of chemical kinetics. As part of constants and often the entire vector k is unknown, there is a problem of identification of the mathematical model and the inverse kinetic problem, which is a problem of minimizing the functional deviations between the calculated and experimental data:

xe _ xc _

F = max je j ^ min, j = 1, N ,

xe

where xc - the calculated values of the observed concentrations of substances (mole fractions); xe

- experimental values of the observed concentrations of substances (mole fractions); N - the number of points of the experiment. In other words, the task is to determine the kinetic parameters corresponding to the minimum value of the difference calculated (the direct problem solution) and natural chemical data. Kinetic parameters are the values of the kinetic rate constants and activation energies of stages: i.e. to determine the kinetic parameters, to find the kinetic parameters should be put and direct and inverse kinetic problem solved.

Direct problems of chemical kinetics -is to calculate the composition of a multicom-ponent reaction mixture (concentration) and the reaction rate based on the mathematical description of the known kinetic parameters. At the same time solving the system of ordinary differential equations with given initial conditions with fixed and unknown, that is, the Cauchy problem. The solution of such systems is carried out by methods of Euler, Euler-Cauchy, Runge-Kutta, Kutta-Merson et al., depending on the required accuracy.

Software for determination of kinetic parameters

The problem of finding the kinetic constants of a chemical reaction - a complex com-

puting task, which is directly dependent on the performance of the computing environment, and the used algorithms. The analysis of the existing programs for the calculation of the kinetic constants of chemical reactions is carried out. As the closest analogues are the following system (in parentheses indicate the software company): 1) ChemCAD; 2) Chemical Kinetics Simulator (IBM); 3) Chempak; 4) MATLAB (Math Works); 5) Dynafit (BioKin); 6) Freefem Free-fem3d; 7) Other programs.

ChemCAD [4] - Chemical Process Simulation Software - Includes database of chemical components, thermodynamic methods, and unit operations to allow steady state simulation of continuous chemical processes from lab scale to full scale. ChemCAD allows to create, analyze and optimize various options for technological design of production processes, evaluate their effectiveness and to choose the best of them. The complex research using ChemCAD makes it possible to achieve a satisfactory agreement of the results of calculations with the data of industrial experiments that can solve the problem of automatic process control and improve the efficiency of existing production, determination of optimum operating and structural parameters of the processes in the individual devices from a position of total production as a whole.

Chemical Kinetics Simulator (CKS) [5], was created by IBM in 1996 (PC) CKS is, on the one hand, quite limited means for modeling of chemical reactions, and on the other hand, the program including an intuitive input system of stages of chemical reactions. The main purpose of PC CKS is mathematical modeling of chemical reaction, the solution of the direct problem of chemical kinetics. The rate constants of reaction steps can be dependent or independent of the temperature, and stage-direct and inverse, but in any case the kinetic constants are set manually. However, despite the convenient input and visualization of solving the direct problem by using PC CKS, can not solve the inverse problem of chemical kinetics. In addition, parallelization of a direct task that affects the time of construction of the kinetic model isn't provided. The absence of the

АЗЕРБАЙДЖАНСКИЙ ХИМИЧЕСКИЙ ЖУРНАЛ № 4 2016

possibility of solving the inverse kinetic problem limits the use of CKS PC in combination with other software products (including in the framework of a unified information-analytical system solutions of multiparameter inverse problems of chemical kinetics, described in this paper).

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Chempak [6]. Software package for the optimization of kinetic schemes of chemical reactions. The algorithm - the system of ordinary differential equations (ODE) is generated from the system of chemical reactions. To solve the obtained ODE systems there are used third-party software codes freely

- distributable formats, adapted to work in the software package. Functionality - The generation of systems of ODE of the systems of chemical reactions, in a unified storage network database systems of chemical reactions and initial data, decision of the ODE systems using the proposed solvers, obtaining of the output data (changing concentrations of chemicals in the time) in a form convenient for drawing freely distributed graphic packages.

Creation tools - DBMS Interbase, Borland C ++ Builder.

To install the software package and database of chemical reactions necessary configuration author solvers ODE systems under existing user Fortran compiler.

MatLab [7, 8] of the company MathWorks

- one of the oldest, well-developed and proven automation of mathematical calculations, based on the extended presentation and use of matrix operations. Among the shortcomings of the system MatLab one can note a low integration environment (lots of windows, which is better to work on two monitors), is not very coherent reference system (and yet the amount of firm documentation is big, which makes it difficult foreseeable) and specific MatLab-code editor programs (M-file). Today the system MatLab widely used in engineering, science and education, but all the same it is more suitable for data analysis and algorithms, rather than for purely mathematical calculations. As a simple, but ideologically close alternatives MatLab program packages can be noted such as Octave (www. octave.org), KOctave (bubben.homelinux. net/~

matti/koctave/) and Genius (www.jirka.org/genius. html). The advantages of MATLAB compared with the packages MathCAD, MAPLE, SciLab, FreeMath. these are extensive help system, a large number of reference books, including the Russian-speaking, relatively comfortable programming environment, the availability of versions for the operating systems Linux and Windows, and means for the effective parallelism. The main disadvantage of MATLAB is its high cost.

Dynafit [9] - the program for the calculation of kinetic constants - designed by BioKin. The interface is divided into two parts: Input and Output. In the Input tab is made entering the reaction scheme, the designation of the kinetic constants and the building of the time axis with the experimental data. The main objective of Dynafit is the search for the initial values of kinetic constants of the least squares method. As the format of input data using a symbolic notation, while the circuit parameters and not conversions are given graphically in a tabular format, according to certain rules. The program has a good help system.

In order to solve partial differential equations by finite element method and visualization solutions have freeware packages Freefem and Freefem3d [10], which in its capabilities are not inferior to the module solutions of the equations of mathematical physics package Matlab.

To solve problems of chemical kinetics with a large dimension requires advanced software that meets certain requirements. Among them one should indicate the presence of an ergonomic interface and extensible library of computational methods, the ability to work with modern database physico-chemical data (GRIMECH, NIST, NASA, and others.) and the ability to work in conjunction PC -supercomputers. Recently a number of the software products focused on the tasks described above were developed. There are major software products for a wide range of modeling tasks FLUENT, CHEMKIN, StarCD, HYSYS and others. There are small software packages (CKS, Kintecus, AcuChem, ChemMathS et al.). In addition to these

commercially distributed software packages, there is also a number of specialized libraries of subroutine NAG, Numerical recipes developed over the years. The disadvantages of specialized libraries routines are the high complexity of the data structure, the lack of an ergonomic interface, as well as difficulties associated with the library architecture. Thus, today there are software products, specializing not only in solving a wide range of problems of the chemical industry (ChemOffice, Chemkin, Khimera, MATLAB), but also specialized programs for the calculation of kinetic constants (Dynafit, CKS, KINET). These programs are generally easy to solve a specific range of tasks. The main drawback of the programs is that they do not use existing information technology fully, which in turn affects the speed of calculation, reliability and ease of visualization.

The structure of the software package optimum for solution of some typical problems of chemical technology General characteristics of SP OptimMe.

The developed software package OptimMe differs: 1. The presence of readily expandable database of chemical reactions and chemical auxiliary data. 2. The presence of an open architecture for replenishment of package with uniprocessor and multiprocessor computing modules. 3. Availability of software interface

for searching chemical reactions in the database on a template with the possibility of entering of retrieval system in a new system of chemical reactions within the common programming interface of package. 4. Availability of the software interface of interaction with databases of third-party developers. 5. The presence of various formats input and output files of the package for working with different types of computing modules 6. The presence of parallel code generator for the numerical solution of direct problems of chemical kinetics on a parallel supercomputer. The main interface of the package shown in Figure 1.

Classes of solved tasks

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

As you can see from the picture all solved tasks are distributed on classes. So class codes in short form are as shown below.

Class "Methods of approximate solutions of equations F(x) = 0 ". In this class implemented methods: bisection method, method of chords, iteration method, Newton's method.

Class "Differential equations". In this class implemented methods: Euler method (simple), Improved Euler method, The specified Euler's method, Runge-Kutta method.

Class "Calculations of the integral".

Within this class implemented methods: Chebyshev's method, Simpson's Rule, the midpoint rule, the trapezoidal rule.

The main interface of the software package.

A3EPEAH#^AHCKHH XHMHHECKHH ^YPHAH № 4 2016

Class "Nonlinear equations". Within this class implemented methods: bisection method , chord method, Newton's method, secant method.

Class "Optimization Techniques".

Within this class implemented methods: golden section, Brentopt's method.

Class "Kinetics of chemical reactions"

includes modules for determining the order and constant individual reaction, the temperature dependence of the reaction rate constant and the activation energy, and numerical methods for solving direct and inverse task of kinetics. For definition of the activation energy of elementary stages traditionally find the rate constants by separate solution of the inverse problems of chemical kinetics for different experimental temperatures, with further approximation of the integral form of the Arrhenius equation, method of least squares (OLS). This approach leads to additional error under experimental and calculated values observed concentrations of substances and does not always determine the kinetic parameters of the reaction stages, but it is the express method.

Class "Calculation and selection of equipments" includes a module for the heat exchanger and absorber with the Access database.

Discussion of the results of development of sp "OptimMe"

As a result of the analysis of the differential equations in the solution of the major classes of problems of chemical and petrochemical industry, it was decided to realize the Runge-Kutta method, golden section, Brentopt, Piyavsky methods and others. The reason for this is that these methods are universal to the main tasks of chemistry and petrochemistry. Advantages of the method of golden section and Brentopt's method lies in the fact that they are quite simple, do not require large computing resources, and do not require the derivative of the objective function. Use the Piyavsky method, is justified by the fact it has a simple convergence condition and can be

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

applied to a broad class of functions. Runge-Kutta method shows high accuracy compared to study methods. Good results are obtained when applying the 4-th order of this method. Analysis of programming languages and computer industry and the current state of computer resources of the country, confirm the benefits in C #. This language does not impose a limitation when choosing an operating system. A large number of implemented mathematical methods allows depending on required accuracy to choose one or the other method and reduce the calculation time. The practical significance of the work: Designed PP for the solution of inverse problems of chemical kinetics tested for solvent extraction separation of contaminated water, the study of the kinetics of vapor phase ammoxidation, and is used to improve the efficiency of numerical experiments [1, 11-13].

Conclusion

Within the carried-out work the following results were received:

• the analysis of existing software systems for the determination of kinetic parameters;

• developed a software package for solving problems of chemical and petrochemical industries, which increases the efficiency of computing experiments;

• developed application "OptimME" allows solving several tasks of entering and changing of the large system of equations, over 1000, of chemical reactions in the conventional chemistry notation.

References

1. Manafov M.R., Mammadov E.M., Aliyev G.S. Application of Software Package "OptimMe" for the Study of the Process of Partial Oxidation of Propane // Am. J. Chem. Appl. 2015. V. 2. No. 4. P. 47-51.

2. Holodnov V.A., Borovynskaya E.S., Andreeva V.P., Cheremisin V.I. The solution of problems of nonlinear programming on the basis of gradient methods with use of system of computer mathematics of MathCAD: methodical instructions, SPSTI(TU). 2010. 69 p.

3. Polak L.S., Goldenberg M. Ya., Levitsky A.A. Computing methods in chemical kinetics. Russian. Nauka. Moscow, 1984. 280 p.

4. CHEMCAD and CC-BATCH. User Manual and Training Guide. Chemstations Inc. 2005. 115 p.

5. Lide D.R. (ed.), CRC handbook of chemistry and physics, 84th ed., 2003-2004. Boca Raton: CRC Press, 2003. 2475 p.

6. Igor Chernykh, Olga Stoyanovskaya, Olga Zasypkina. ChemPAK Software Package as an Environment for Kinetics Scheme Evaluation // Chem. Product Process Modeling. June 2009. Volume 4. Issue 4. ISSN (Online) 1934-2659, DOI: 10.2202/1934-2659.1288. P. 93-102.

7. Ferreira, A.J.M. (2009). Matlab Codes For Finite Element Analysis. Springer, 235 p.

8. Gilat, Amos (2004). Matlab: An Introduction with Applications 2nd Edition. John Wiley & Sons. 416 p.

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

9. Petr Kuzmic. Program Dynafit For The Analysis Of Enzyme Kinetic Data: Application To Hiv

Proteinase // Analytical Biochemistry. 1996. V. 237. Issue 2. P. 260-273.

10. Hecht F. New Development In Freefem++ // J. Numer. Math. 2012. V. 20. No 3-4. P. 251-265.

11. Bagirzade G.A., Tagiyev D.B., Manafov M.R. Vapor Phase Ammoxidation of 4-Phenyl-o-Xylene into 4-Phenylphthalonitrile on V-Sb-Bi-Zr/y-A^Os Oxide Catalyst // Modern Res. Catal. 2015. V. 4. No 3. P. 59-67.

12. Manafov M.R., Rustamova J.T., Aliyev G.S., Melikova I.G., Aliyeva A.M. Study of Modified Forms of Natural Zeolites as Catalysts for Methanol Oxidation // Am. J. Chem. Appl. 2015. V. 2. No 6. P. 75-78.

13. Manafov M.R. Development of a Software Application for Solving of Problems of Chemical Kinetics and its Implementation in a C # //Int. J. Eng. Appl. Sci. 2015. V. 2. Issue 10. P. 33- 37.

KIMYA TEXNOLOGIYASININ BIR SIRA TIPIK PROBLEMLORININ HOLLI UÇUN

PROQRAM TOMiNATI

M.R.Manafov

Kimya va neft kimyasi sanayesinin proses va aparatlannin hesablanmasi va optimallaçdirilmasi ûçûn içlanilmiç proqramlar paketi tasvir edilir. Mövcud proqram mahsullannin analizi aparilrniç, onlarin üstünlük va çatiçmazliqlari proqramlar paketinin hazirlanmasi zamani nazara alinmiçdir. Bir çox riyazi masalalarin halli ûçûn (inteqralin hesablanmasi, müxtalif tipli tanliklarin adadi ûsullarla halli va s.) hazirlanmiç adadi ûsullarla yanaçi, kinetikamn dûz masalasi va bir neça qurgunun hesablanmasi va Accses bazasindan uygun tipli aparatin seçilmasi içlari tamin olunmuçdur. içlanmiç proqramlar paketi maktablilar, talabalar, mûhandis va elmi iççilarin qarçilaçdiqlari tipik problemlarin halli ûçûn effektiv bir vasita olub, sada interfeysinin va süratinin yüksak olmasi digarlarindan ûstûndûr.

Açar sözlar: proqramlar paketi, 3d3di üsulla, kinetikamn düz m3S3Ï3si, tsnliklsr, C #.

ПРОГРАММНОЕ СРЕДСТВО ДЛЯ РЕШЕНИЯ ТИПОВЫХ ЗАДАЧ ХИМИЧЕСКОЙ ТЕХНОЛОГИИ

М.Р.Манафов

Представлен разработанный пакет программ для решения типовых задач химии и нефтехимии. Проведён анализ существующих программ, их недостатки и преимущества были учтены при разработке нового пакета программ. Разработанный пакет отличается от существующих простотой интерфейса и скоростью выполнения операций. Он является эффективным инструментом для студентов, научных работников и инженеров при решении типовых проблем химической и нефтехимической технологии.

Ключевые слова: пакет программ, численные методы, прямая задача кинетики, уравнения, С #.

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

АЗЕРБАЙДЖАНСКИЙ ХИМИЧЕСКИЙ ЖУРНАЛ № 4 2016