<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "JATS-journalpublishing1-3.dtd">
<article article-type="research-article" dtd-version="1.3" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="en"><front><journal-meta><journal-id journal-id-type="publisher-id">donstu</journal-id><journal-title-group><journal-title xml:lang="en">Advanced Engineering Research (Rostov-on-Don)</journal-title><trans-title-group xml:lang="ru"><trans-title>Advanced Engineering Research (Rostov-on-Don)</trans-title></trans-title-group></journal-title-group><issn pub-type="epub">2687-1653</issn><publisher><publisher-name>Don State Technical University</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.23947/2687-1653-2023-23-4-398-409</article-id><article-id custom-type="edn" pub-id-type="custom">PDPGGO</article-id><article-id custom-type="elpub" pub-id-type="custom">donstu-2110</article-id><article-categories><subj-group subj-group-type="heading"><subject>Research Article</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="en"><subject>INFORMATION TECHNOLOGY, COMPUTER SCIENCE AND MANAGEMENT</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="ru"><subject>ИНФОРМАТИКА, ВЫЧИСЛИТЕЛЬНАЯ ТЕХНИКА И УПРАВЛЕНИЕ</subject></subj-group></article-categories><title-group><article-title>Automation of the Formation of a Mathematical Formulation of Kinetics for Multistage Chemical Reactions and Numerical Solution to a Direct Problem</article-title><trans-title-group xml:lang="ru"><trans-title>Автоматизация формирования математического описания кинетики для многостадийных химических реакций и численное решение прямой задачи</trans-title></trans-title-group></title-group><contrib-group><contrib contrib-type="author" corresp="yes"><contrib-id contrib-id-type="orcid">https://orcid.org/0000-0002-2898-0595</contrib-id><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Лысенко</surname><given-names>Н. А.</given-names></name><name name-style="western" xml:lang="en"><surname>Lysenko</surname><given-names>N. A.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Никита Андреевич Лысенко, магистрант кафедры информационные технологии и прикладная математика, <ext-link xlink:href="https://www.webofscience.com/wos/author/record/IVV-1647-2023" ext-link-type="uri">ResearcherID</ext-link></p><p>450064, г. Уфа, ул. Космонавтов, 1</p></bio><bio xml:lang="en"><p>Nikita A. Lysenko, undergraduate student of the Information Technology and Applied Mathematics Department, <ext-link xlink:href="https://www.webofscience.com/wos/author/record/IVV-1647-2023" ext-link-type="uri">ResearcherID</ext-link></p><p>1, Kosmonavtov St., Ufa, 450064</p></bio><email xlink:type="simple">nikitka_lysenko_2016@mail.ru</email><xref ref-type="aff" rid="aff-1"/></contrib><contrib contrib-type="author" corresp="yes"><contrib-id contrib-id-type="orcid">https://orcid.org/0000-0001-8555-0543</contrib-id><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Коледина</surname><given-names>К. Ф.</given-names></name><name name-style="western" xml:lang="en"><surname>Koledina</surname><given-names>K. F.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Камила Феликсовна Коледина, доктор физико-математических наук, профессор кафедры информационные технологии и прикладная математика; старший научный сотрудник лаборатории математической химии, <ext-link xlink:href="https://www.webofscience.com/wos/author/record/L-4918-2016" ext-link-type="uri">ResearcherID</ext-link>, <ext-link xlink:href="https://www.scopus.com/authid/detail.uri?authorId=56005881200" ext-link-type="uri">ScopusID</ext-link></p><p>450064, г. Уфа, ул. Космонавтов, 1</p><p>450075, г. Уфа, проспект Октября, 141</p></bio><bio xml:lang="en"><p>Kamila F. Koledina, Dr.Sci. (Phys.-Math.), Professor  of the Information Technology and Applied Mathematics Department; Senior Researcher, Laboratory of Mathematical Chemistry, <ext-link xlink:href="https://www.webofscience.com/wos/author/record/L-4918-2016" ext-link-type="uri">ResearcherID</ext-link>, <ext-link xlink:href="https://www.scopus.com/authid/detail.uri?authorId=56005881200" ext-link-type="uri">ScopusID</ext-link></p><p>1, Kosmonavtov St., Ufa, 450064</p><p>141, pr. Oktyabrya, Ufa, 450075</p></bio><email xlink:type="simple">koledinakamila@mail.ru</email><xref ref-type="aff" rid="aff-2"/></contrib></contrib-group><aff-alternatives id="aff-1"><aff xml:lang="ru"><institution>Уфимский государственный нефтяной технический университет</institution><country>Россия</country></aff><aff xml:lang="en"><institution>Ufa State Petroleum Technological University</institution><country>Russian Federation</country></aff></aff-alternatives><aff-alternatives id="aff-2"><aff xml:lang="ru"><institution>Уфимский государственный нефтяной технический университет; Институт нефтехимии и катализа УФИЦ РАН</institution><country>Россия</country></aff><aff xml:lang="en"><institution>Ufa State Petroleum Technological University; Institute of Petrochemistry and Catalysis, UFRC RAS</institution><country>Russian Federation</country></aff></aff-alternatives><pub-date pub-type="collection"><year>2023</year></pub-date><pub-date pub-type="epub"><day>27</day><month>12</month><year>2023</year></pub-date><volume>23</volume><issue>4</issue><fpage>398</fpage><lpage>409</lpage><permissions><copyright-statement>Copyright &amp;#x00A9; Lysenko N.A., Koledina K.F., 2023</copyright-statement><copyright-year>2023</copyright-year><copyright-holder xml:lang="ru">Лысенко Н.А., Коледина К.Ф.</copyright-holder><copyright-holder xml:lang="en">Lysenko N.A., Koledina K.F.</copyright-holder><license license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>This work is licensed under a Creative Commons Attribution 4.0 License.</license-p></license></permissions><self-uri xlink:href="https://www.vestnik-donstu.ru/jour/article/view/2110">https://www.vestnik-donstu.ru/jour/article/view/2110</self-uri><abstract><sec><title>Introduction</title><p>Introduction. The basis for research, analysis and mathematical optimization of any chemical process is an adequate mathematical model that takes into account the kinetics of the object. Kinetic analysis is a challenge in chemical technology, since it allows for optimizing synthesis processes and predicting their efficiency. Numerous chemical processes involve several stage reactions. For successful design and optimization, a mathematical model that describes each stage is needed. Creating such a model manually can be time-consuming and costly, since it requires processing a large amount of information. The modern level of automation makes it possible to accelerate the obtaining of a mathematical formulation of the kinetics of multistage reactions. In this case, working with data is greatly simplified, and the probability of making mistakes is reduced. The resulting mathematical model can be applied for further analysis and optimization of the process. The paper considers the industrial reaction of catalytic reforming of gasoline, which occupies an important place in the modern scheme of oil refining, since it is a source of high-octane components of commercial gasolines and individual aromatic hydrocarbons. This process is characterized by the participation of a large number (up to 300) of various hydrocarbons, a change in the number of moles, and non-isothermality in it. Mathematical modeling of such processes involves detailing the stages to the required level. The detailing of up to 173 stages is considered. In this setting, automation of the formation of a mathematical formulation of kinetics for catalytic reforming of gasoline has not been carried out before. Therefore, the presented work aimed at implementing effective numerical methods and algorithms for automating the building of a mathematical model taking into account kinetics, thermodynamics, and changes in the number of moles.</p></sec><sec><title>Materials and Methods</title><p>Materials and Methods. The mathematical formulation of the kinetics of multistage reactions was developed on the basis of the mass action law. The kinetic parameters values were taken from literary sources. The direct kinetics problem was solved using algorithms: the Gear method, the Runge-Kutta method of the 4th order, and the scipy.odeint() method of the Python language. The automation concept was implemented using the IDEF0 methodology. The software was written in the Python programming language.</p></sec><sec><title>Results</title><p>Results. A new software was created to automate the process of forming a mathematical model, taking into account the kinetics, thermodynamics, and the volume of the reaction mixture. The program results were presented by the example of catalytic reforming of gasoline. The model implemented the possibility of taking into account the intermediate heating of the mixture in the reactor cascade. Numerical values of temperature changes corresponding to industrial data were obtained.</p><p>Discussion and Conclusion. The results obtained through modeling chemical transformations in the cascade of gasoline catalytic reforming reactors confirmed the exothermic nature of the reaction. The developed software product provides displaying changes in the concentrations of reactants, as well as temperature variations in the reactor, and it can be used in scientific research organizations for the analysis of multistage catalytic processes. The results of the reaction kinetics modeling will be used in the subsequent optimization of the process conditions in production.</p></sec></abstract><trans-abstract xml:lang="ru"><sec><title>Введение</title><p>Введение. Основой для исследования, анализа и математической оптимизации любого химического процесса является адекватная математическая модель, учитывающая кинетику объекта. Кинетический анализ в химической технологии является важной задачей, поскольку позволяет оптимизировать процессы синтеза и прогнозировать их эффективность. Многие химические процессы включают в себя несколько стадийных реакций. Для успешного проектирования и оптимизации необходима математическая модель, которая описывает каждую стадию. Создание такой модели вручную может быть трудоемким и затратным процессом, требующим обработки большого объема информации. Современный уровень автоматизации позволяет ускорить получение математического описания кинетики многостадийных реакций. В этом случае значительно упрощается работа с данными и уменьшается вероятность совершения ошибок. Полученная математическая модель может быть применена для последующего анализа и оптимизации процесса. В работе рассмотрена промышленная реакция каталитического риформинга бензина, занимающая важное место в современной схеме переработки нефти, поскольку является источником высокооктановых компонентов товарных бензинов и индивидуальных ароматических углеводородов. Данный процесс характеризуется участием в нем большого числа (до 300) различных углеводородов, изменением числа молей и неизотермичностью. Математическое моделирование таких процессов предполагает детализацию стадий до необходимого уровня. Рассмотрена детализация до 173 стадий. В такой постановке задачи автоматизация формирования математического описания кинетики для каталитического риформинга бензинов ранее не проводилась. Поэтому целью представленной работы явилась реализация эффективных численных методов и алгоритмов для автоматизации формирования математической модели с учётом кинетики, термодинамики и изменения числа молей.</p></sec><sec><title>Материалы и методы</title><p>Материалы и методы. Математическое описание кинетики многостадийных реакций разрабатывается на основе закона действующих масс. Значения кинетических параметров взяты из литературных источников.  Решение прямой задачи кинетики проводилось с применением следующих алгоритмов: метод Гира, Рунге-Кутты 4 порядка и метод scipy.odeint() языка Python. Концепция автоматизации реализована с помощью методологии IDEF0. Программное обеспечение написано на языке программирования Python.</p></sec><sec><title>Результаты исследования</title><p>Результаты исследования. Создано новое программное обеспечение для автоматизации процесса формирования математической модели с учетом кинетики, термодинамики и учета объема реакционной смеси. Приведены результаты работы программы на примере каталитического риформинга бензина. Реализована возможность учета в модели промежуточного подогрева смеси в каскаде реакторов. Получены численные значения изменения температуры, соответствующие промышленным данным.</p></sec><sec><title>Обсуждение и заключение</title><p>Обсуждение и заключение. Результаты, полученные при моделировании химических превращений в каскаде реакторов каталитического риформинга бензина, подтвердили экзотермический характер реакции.</p><p>Разработанный программный продукт позволяет отобразить изменения концентраций веществ реакции, а также изменение температуры в реакторе и может быть использован в научных исследованиях организаций для анализа многостадийных каталитических процессов. Результаты моделирования кинетики реакции будут использоваться в последующей оптимизации условий проведения процесса на производстве.</p></sec></trans-abstract><kwd-group xml:lang="ru"><kwd>кинетический анализ</kwd><kwd>математическое описание</kwd><kwd>автоматизация</kwd><kwd>система дифференциальных уравнений</kwd><kwd>прямая задача</kwd><kwd>методы численного решения</kwd></kwd-group><kwd-group xml:lang="en"><kwd>kinetic analysis</kwd><kwd>mathematical formulation</kwd><kwd>automation</kwd><kwd>differential equation system</kwd><kwd>direct problem</kwd><kwd>computational methods</kwd></kwd-group><funding-group><funding-statement xml:lang="ru">Работа выполнена в рамках лидерского проекта «Разработка компьютерной системы анализа кинетики химических процессов и их многокритериальной оптимизации» Уфимского государственного нефтяного технического университета.</funding-statement><funding-statement xml:lang="en">The research was done within the framework of the leadership project “Development of a computer system for analyzing the kinetics of chemical processes and their multicriteria optimization”, Ufa State Petroleum Technological University.</funding-statement></funding-group></article-meta></front><body><p>Introduction. Studies on the kinetics of multistage chemical processes is of theoretical and practical importance, since it allows for revealing the mechanism of reactions and carrying out control. At the same time, it becomes possible to accelerate target or slow down side chemical reactions. Kinetic analysis, being an important task of chemical engineering, contributes to the optimization of synthesis processes and the prediction of their effectiveness [1–3]. A great many chemical processes are multistage reactions. For their effective design and optimization, it is required to have a mathematical model describing all stages [<xref ref-type="bibr" rid="cit4">4</xref>][<xref ref-type="bibr" rid="cit5">5</xref>]. Manual formation of such a model can be very time-consuming and costly, since it implies processing a large amount of information [<xref ref-type="bibr" rid="cit6">6</xref>].</p><p>The object of the study is the industrial process of catalytic reforming of gasoline. The target product of the reaction — reformate — provides obtaining the bulk of commercial gasoline. The remaining components are products of isomerization, catalytic cracking, and alkylation. Most oil refineries in Russia and worldwide use catalytic reforming units [<xref ref-type="bibr" rid="cit7">7</xref>][<xref ref-type="bibr" rid="cit8">8</xref>]. Catalytic reforming of gasoline makes it possible to obtain aromatic hydrocarbons (xylene, toluene, benzene), which can then be used in the petrochemical industry [<xref ref-type="bibr" rid="cit9">9</xref>][<xref ref-type="bibr" rid="cit10">10</xref>]. However, for commercial gasoline, the presence of aromatic hydrocarbons in the product is limited by environmental criteria. Therefore, detailed complex kinetics, demonstrating the step-by-step formation of components, is able to operate the process conditions to control the yield of the product and limit the content of aromatic hydrocarbons. The process of catalytic reforming of gasoline is carried out in a reactor unit consisting of three consecutive reactors, between which furnaces are installed to heat the mixture. This is a necessity since the reaction is endothermic. In the mathematical formulation of the reactor unit, it is required to take into account the variation of temperature and volume of the reaction mixture along with changes in the concentrations of the components from the conditional contact time of the catalyst and the reaction mixture.</p><p>Automation of modeling of such complex processes makes it possible to significantly speed up obtaining a mathematical formulation of the kinetics of multistage reactions, reduce the probability of errors, and simplify the process of working with data [<xref ref-type="bibr" rid="cit11">11</xref>]. In general, automation of the formation of a mathematical formulation for multistage chemical reactions is an important tool for effective process management in various industries, as well as for achieving more accurate and efficient implementation of chemical reactions in the laboratory.</p><p>Thus, the study aimed at developing a software product to help automate the formation of a mathematical formulation of multistage chemical reactions, taking into account the kinetics, thermodynamics and changes in the volume of the reaction mixture, as well as obtaining a numerical solution of the compiled mathematical model.</p><p>To achieve the research goal, the following tasks were solved in this work:</p><p>Materials and Methods. Mathematically, this process can be described by a system of ordinary nonlinear differential equations with initial data, which is a mathematical model. Considering that the catalytic reforming of gasoline is an exothermic reaction with a change in the volume of the reaction mixture, the model of multistage chemical kinetics can be considered in the following context:</p><p> (1)</p><p> (2)</p><p> (3)</p><p> (4)</p><p> (5)</p><p> (6)</p><p> (7)</p><p>with initial conditions at</p><p> [<xref ref-type="bibr" rid="cit11">11</xref>].</p><p>In this formula of reaction kinetics there are a number of variables and coefficients that determine the concentration of reagents, contact time and reaction rate. Specifically, Q and  (concentrations of reaction reagents) can be expressed in mol/l or in fractions, and variable , showing the conditional contact time of the reaction mixture with the catalyst, in kg×min/mol or kg of the catalyst. The formula also includes the following indicators: the number of stages M (173 stages) and the number of substances N (38 substances), as well as stoichiometric matrix .  — these are all negative elements of matrix  at the intersection of the -th row and the j-th column, and  — all positive elements of matrix  at the intersection of the -th row and the j-th column. The rate of the j-th reaction stage  can be expressed in 1/min or in mol/(kg×min), and the rate constants of stages  — in 1/min. In addition, the formula specifies pre-exponential factors , , expressed in 1/min, the activation energies of the forward and reverse reactions , , expressed in kcal/mol, gas constant R and temperature T, measured in Kelvins. The period of reaction t* is determined by the time required to complete it in minutes, and the enthalpy of the formation of the i-th component  is measured in J/mol. The specific heat capacity  of the i-th component, measured in J/(mol×K), can be expressed in terms of the coefficients of the temperature dependence of the heat capacity of this component, which are indicated by letters  [<xref ref-type="bibr" rid="cit12">12</xref>]. i — serial number of the substance involved in the reaction.</p><p>When modeling chemical transformations of catalytic reforming of gasoline, it is required to take into account a large number of individual hydrocarbons. Therefore, in the article, group components are used in the model for the separation of types of hydrocarbons and the number of carbon atoms in the structure of the molecule: Al — aromatic hydrocarbons; ACPl — five-membered naphthenes; ACHl — six-membered naphthenes; iPl — paraffin isomers; nPl — normal paraffins. Here, l — number of carbon atoms in the molecular structure. Table 1 shows the average coefficients of the temperature dependence of the heat capacity of the group components that are used in the calculations.</p><table-wrap id="table-1"><caption><p>Table 1</p><p>Coefficients of temperature dependence of group components</p></caption><table><tbody><tr><td>l</td><td>Hydrocarbon group</td><td></td><td></td><td></td><td></td></tr><tr><td>1</td><td>nP1</td><td>34.942</td><td>–0.03996</td><td>0.19184</td><td>–0.153</td></tr><tr><td>2</td><td>nP2</td><td>28.146</td><td>0.043447</td><td>0.18946</td><td>–0.1908</td></tr><tr><td>3</td><td>nP3</td><td>28.277</td><td>0.116</td><td>0.19597</td><td>–0.2327</td></tr><tr><td>4</td><td>nP4</td><td>20.56</td><td>0.2815</td><td>–0.013143</td><td>–0.09457</td></tr><tr><td>5</td><td>IP4</td><td>6.772</td><td>0.34147</td><td>–0.10271</td><td>–0.03685</td></tr><tr><td>6</td><td>nP5</td><td>26.671</td><td>0.32324</td><td>0.04282</td><td>–0.1664</td></tr><tr><td>7</td><td>iP5</td><td>–0.881</td><td>0.47498</td><td>–0.24797</td><td>0.06751</td></tr><tr><td>8</td><td>nP6</td><td>25.924</td><td>0.41927</td><td>–0.012491</td><td>–0.1592</td></tr><tr><td>9</td><td>iP6</td><td>–7.123</td><td>0.58327</td><td>–0.30338</td><td>0.06802</td></tr><tr><td>10</td><td>nP7</td><td>26.984</td><td>0.50387</td><td>–0.04748</td><td>–0.1684</td></tr><tr><td>11</td><td>iP7</td><td>19.245</td><td>0.55072</td><td>–0.14055</td><td>–0.08248</td></tr><tr><td>12</td><td>nP8</td><td>29.053</td><td>0.58016</td><td>–0.057103</td><td>–0.1955</td></tr><tr><td>13</td><td>iP8</td><td>–3.367</td><td>0.75824</td><td>–0.38216</td><td>0.05736</td></tr><tr><td>14</td><td>nP9</td><td>29.687</td><td>0.66821</td><td>–0.096492</td><td>–0.2001</td></tr><tr><td>15</td><td>iP9</td><td>68.581</td><td>0.44754</td><td>0.31908</td><td>–0.5118</td></tr><tr><td>16</td><td>nP10</td><td>31.78</td><td>0.74489</td><td>–0.10945</td><td>–0.2267</td></tr><tr><td>17</td><td>iP10</td><td>–46.17</td><td>1.108</td><td>–0.70316</td><td>0.1787</td></tr><tr><td>18</td><td>nP11</td><td>125.21</td><td>0.31401</td><td>0.79137</td><td>–0.9141</td></tr><tr><td>19</td><td>iP11</td><td>–8.791</td><td>1.0548</td><td>–0.5778</td><td>0.1192</td></tr><tr><td>20</td><td>ACH6</td><td>13.783</td><td>0.20742</td><td>0.53682</td><td>–0.6301</td></tr><tr><td>21</td><td>ACH7</td><td>4.296</td><td>0.42716</td><td>0.21058</td><td>–0.3999</td></tr><tr><td>22</td><td>ACH8</td><td>–51.866</td><td>0.78827</td><td>–0.35255</td><td>–0.006855</td></tr><tr><td>23</td><td>ACH9</td><td>–120.89</td><td>1.2728</td><td>–1.0794</td><td>0.4035</td></tr><tr><td>24</td><td>ACH10</td><td>90.421</td><td>0.23264</td><td>0.94595</td><td>–1.057</td></tr><tr><td>25</td><td>ACH11</td><td>–65.48</td><td>1.1809</td><td>–0.68379</td><td>0.1458</td></tr><tr><td>26</td><td>ACP6</td><td>–9.939</td><td>0.42528</td><td>0.012521</td><td>–0.1886</td></tr><tr><td>27</td><td>ACP7</td><td>–28.514</td><td>0.58607</td><td>–0.094379</td><td>–0.1644</td></tr><tr><td>28</td><td>ACP8</td><td>–69.713</td><td>0.92602</td><td>–0.62526</td><td>0.2049</td></tr><tr><td>29</td><td>ACP9</td><td>–116.73</td><td>1.3097</td><td>–1.2439</td><td>0.5292</td></tr><tr><td>30</td><td>ACP10</td><td>–67.341</td><td>1.0922</td><td>–0.704</td><td>0.1906</td></tr><tr><td>31</td><td>ACP11</td><td>–68.23</td><td>1.187</td><td>–0.7575</td><td>0.2018</td></tr><tr><td>32</td><td>A6</td><td>–31.368</td><td>0.4746</td><td>–0.31137</td><td>0.08524</td></tr><tr><td>33</td><td>A7</td><td>–24.097</td><td>0.52187</td><td>–0.29827</td><td>0.06122</td></tr><tr><td>34</td><td>A8</td><td>–17.36</td><td>0.5647</td><td>–0.26293</td><td>0.01122</td></tr><tr><td>35</td><td>A9</td><td>–10.933</td><td>0.64349</td><td>–0.27829</td><td>–0.01443</td></tr><tr><td>36</td><td>A10</td><td>–24.187</td><td>0.79716</td><td>–0.48265</td><td>0.1341</td></tr><tr><td>37</td><td>A11</td><td>–26.717</td><td>0.91044</td><td>–0.53876</td><td>0.1203</td></tr><tr><td>38</td><td>H2</td><td>29.07</td><td>–0.0836</td><td>0.1064</td><td>0.5752</td></tr></tbody></table></table-wrap><p>Equations (1), (3) and (4) describe changes in reagent concentrations in the process, and in system (2), molar fractions are used to describe changes in the molar flow rate of the mixture. In (5), the dependence of the reaction temperature change on the thermodynamic characteristics of substances is considered. In (6), (7), the dependence for calculating the enthalpy of formation of the i-th component and the specific heat capacity is given.</p><p>In this model, the direct problem (solving a system of differential equations) is both rigid and non-rigid. The Gear method used to solve the catalytic reforming model is based on backward differentiation [13–15]. To compare the results and identify the optimal method, an explicit one-step Runge-Kutta numerical integration fourth-order method and an explicit numerical integration method scipy.odeint() of the Python programming language were used.</p><p>The concept of automating the formation of a mathematical formulation of kinetics for multistage chemical reactions and a numerical solution method is illustrated using the IDEF0 methodology.</p><p>Figure 1 shows a contextual diagram of the process of automating the formation of a mathematical formulation of kinetics for multistage chemical reactions and solutions by numerical method.</p><fig id="fig-1"><caption><p>Fig. 1. Context diagram “Automation of the formation of mathematical formulation of kinetics for multistage chemical reactions and a numerical solution method”</p></caption><graphic xlink:href="donstu-23-4-g001.jpeg"><uri content-type="original_file">https://cdn.elpub.ru/assets/journals/donstu/2023/4/fMVRtMKTpTFt2tW2HOE3r5Y4PefDAM3NWFKyFTRd.jpeg</uri></graphic></fig><p>The input parameters are the stoichiometric reaction matrix and experimental data. These include initial data on the concentration of substances, temperature, pre-exponential multiplier, activation energies. The result of solving the problem is a numerical solution to the direct problem. The controls are numerical methods for comparing the results, as well as the method of forming a mathematical description. The mechanism is the developed software package for automating the mathematical formulation of the kinetics of multistage reactions and solving a direct problem. Figure 2 shows the decomposition of the process of automating the formation of a mathematical formulation of kinetics for multistage chemical reactions and solutions by numerical method into stages:</p><fig id="fig-2"><caption><p>Fig. 2. Stages of the problem solution“Automation of the formation of mathematical formulation of kinetics for multistage chemical reactions and a numerical solution method”</p></caption><graphic xlink:href="donstu-23-4-g002.jpeg"><uri content-type="original_file">https://cdn.elpub.ru/assets/journals/donstu/2023/4/rSCbAtnL5ocZFJqNBccni54ElvMkNa8cNeuLBEWf.jpeg</uri></graphic></fig><p>The developed software package capabilities are represented by the features described below.</p><p>With the help of the program, you can create a kinetic model of a multistage chemical reaction and present its solution by the previously described methods, using a given stoichiometric matrix. If the reaction is exothermic and there is a change in the volume of the reaction mixture, two complementary equations are added to the system of differential equations to describe these changes.</p><p>The mathematical model of catalytic reforming of gasoline is a system of differential equations (DES) of form (1)–(7), consisting of 40 differential equations with respect to the number of group components, temperature dependence, and the mole change equation.</p><p>The basic functionality of the program is:</p><p>Research Results. The catalytic reforming reaction took place in three reactors, between which a heating furnace was located. The initial temperature of the first reactor was 766 K (493°C). For the first 9.6 conditional hours, the reaction proceeded in the first reactor, the temperature dropped. After that, heating took place in the furnace between the two reactors to 763 K (490°C), and the chemical process passed into the second reactor. In the second reactor, the process occurred in the time interval from 9.6 to 32.3 conventional hours, the temperature decreased. Before proceeding to reactor 3, the mixture was heated in the second intermediate furnace to 768 K (495°C) and flew in this reactor in the time interval from 32.3 to 60 conventional hours.</p><p>Figures 3–5 show the kinetic curves of the hydrocarbon groups involved in the reaction and obtained using the Gear method. The intermittent transitions on the graphs indicate that the mixture is moving from one reactor to another with intermediate heating.</p><fig id="fig-3"><caption><p>Fig. 3. Kinetic curves of catalytic reforming of gasoline</p></caption><graphic xlink:href="donstu-23-4-g003.jpeg"><uri content-type="original_file">https://cdn.elpub.ru/assets/journals/donstu/2023/4/4nVEVzNAtP4TUs3dUX5Kb5VGJ6QkaV1uKu2kZDx7.jpeg</uri></graphic></fig><fig id="fig-4"><caption><p>Fig. 4. Kinetic curves of catalytic reforming of gasoline</p></caption><graphic xlink:href="donstu-23-4-g004.jpeg"><uri content-type="original_file">https://cdn.elpub.ru/assets/journals/donstu/2023/4/K7U2rh2rGk55ybiq0GqckFR7Ckyt0xD0gkkOibjU.jpeg</uri></graphic></fig><fig id="fig-5"><caption><p>Fig. 5. Kinetic curves of catalytic reforming of gasoline</p></caption><graphic xlink:href="donstu-23-4-g005.jpeg"><uri content-type="original_file">https://cdn.elpub.ru/assets/journals/donstu/2023/4/RO7xHdMCWGNxOVkkiy5VuE7sKTeTmKsSD0aDWBsZ.jpeg</uri></graphic></fig><p>The curves of changes in the concentrations of the group components are given depending on the time of contact of the reaction mixture with the catalyst (Fig. 3–5). As an example, symbol nP1 stands for normal paraffin with one carbon atom, and symbol A9 — stands for aromatic hydrocarbon with nine carbon atoms. Figures 6 and 7 show, respectively, the curves of changes in temperature and volume of the reaction mixture of the catalytic reforming reaction of gasoline.</p><fig id="fig-6"><caption><p>Fig. 6. Temperature curve</p></caption><graphic xlink:href="donstu-23-4-g006.jpeg"><uri content-type="original_file">https://cdn.elpub.ru/assets/journals/donstu/2023/4/dxYqtrLFYJaOgk4R5LPiAQcDGDUW17qowGMI7eqL.jpeg</uri></graphic></fig><fig id="fig-7"><caption><p>Fig. 7. Reaction mixture volume change curve</p></caption><graphic xlink:href="donstu-23-4-g007.jpeg"><uri content-type="original_file">https://cdn.elpub.ru/assets/journals/donstu/2023/4/GnxcPaxG0KuZgAQGpLNTM7J1J4FzxAtmfBybKAPE.jpeg</uri></graphic></fig><p>Discussion and Conclusion. In the presented work, a software module for the formation of a mathematical formulation of kinetics for complex multistage reactions has been developed. This makes it possible to analyze complex processes, including industrial, to consider various possible mechanisms in an acceptable time.</p><p>The developed software module for the numerical solution of a direct kinetic problem provides monitoring the dynamic change in the concentrations of components and the process temperatures in the case of its non-isothermality. In addition to the presented graphs of changes in component concentrations, measurements of the operating time of each of the three implemented methods were made. According to the scipy.odeint() method, the solution to the direct problem lasted 80.5 seconds; according to the Runge-Kutta fourth-order method — 111.8 seconds. The most optimal time, equal to 39.8 seconds, was shown by the Gear method. This confirms that Gear's method is optimized for working with rigid systems of differential equations.</p><p>The implemented approach was applied to modeling the industrial process of catalytic reforming of gasoline. Automation of the formation of a mathematical formulation of kinetics and the implementation of a numerical solution to a direct problem allowed us to develop a kinetic model of a detailed scheme of chemical transformations in an acceptable time, and obtain concentration and temperature profiles in the process reactors corresponding to industrial data.</p></body><back><ref-list><title>References</title><ref id="cit1"><label>1</label><citation-alternatives><mixed-citation xml:lang="ru">Нарышкин Д.Г. Компьютерная математика в курсе "Физическая химия". Современные информационные технологии и ИТ-образование. 2012;(8):430–440. URL: https://cyberleninka.ru/article/n/kompyuternaya-matematika-v-kurse-fizicheskaya-himiya/viewer (дата обращения: 15.08.2023).</mixed-citation><mixed-citation xml:lang="en">Naryshkin DG. Computer Mathematics in the Course “Physical Chemistry”. Modern Information Technologies and IT-Education. 2012;(8):430–440. (In Russ.)</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">Qi Han, Xian-Tai Zhou, Xiao-Qi He, Hong-Bing Ji. Mechanism and Kinetics of the Aerobic Oxidation of Benzyl Alcohol to Benzaldehyde Catalyzed by Cobalt Porphyrin in a Membrane Microchannel Reactor. Chemical Engineering Science. 2021;245:116847. https://doi.org/10.1016/j.ces.2021.116847</mixed-citation><mixed-citation xml:lang="en">Qi Han, Xian-Tai Zhou, Xiao-Qi He, Hong-Bing Ji. Mechanism and Kinetics of the Aerobic Oxidation of Benzyl Alcohol to Benzaldehyde Catalyzed by Cobalt Porphyrin in a Membrane Microchannel Reactor. Chemical Engineering Science. 2021;245:116847. https://doi.org/10.1016/j.ces.2021.116847</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">Gheorghe Maria. A CCM-Based Modular and Hybrid Kinetic Model to Simulate the Tryptophan Synthesis in a Fed-Batch Bioreactor Using Modified E. Coli Cells. Computers and Chemical Engineering. 2021;153:107450. https://doi.org/10.1016/j.compchemeng.2021.107450</mixed-citation><mixed-citation xml:lang="en">Gheorghe Maria. A CCM-Based Modular and Hybrid Kinetic Model to Simulate the Tryptophan Synthesis in a Fed-Batch Bioreactor Using Modified E. Coli Cells. Computers and Chemical Engineering. 2021;153:107450. https://doi.org/10.1016/j.compchemeng.2021.107450</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">Файзуллин М.Р., Балаев А.В. Автоматизированная система исследования кинетики сложных химических реакций. Вестник Башкирского университета. 2008;13(3–1):835–839.</mixed-citation><mixed-citation xml:lang="en">Fayzullin MR, Balaev AV. Computer-Aided System for Kinetic Studies of Complex Chemical Reactions. Bulletin of BSU. 2008;13(3-1):835–839.</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">Хамидуллина З.А., Исмагилова А.С., Спивак С.И. Анализ информативности кинетических параметров сложных химических реакций. Вестник Тверского государственного университета. Серия: химия. 2020;39(1):70–80. https://doi.org/10.26456/vtchem2020.1.9</mixed-citation><mixed-citation xml:lang="en">Khamidullina ZA, Ismagilova AS, Spivak SI. Analysis Informativity of Kinetic Parameters of Complex Chemical Reactions. Herald of TvSU. Series “Chemistry”. 2020;39(1):70–80. https://doi.org/10.26456/vtchem2020.1.9</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</label><citation-alternatives><mixed-citation xml:lang="ru">Koledina K.F., Gubaydullin I.M., Koledin S.N. Mathematical Modeling and Computational Aspects of Multi-Criteria Optimization of the Conditions of a Laboratory Catalytic Reaction. Numerical Analysis and Applications. 2022;15:104–111. http://doi.org/10.1134/S1995423922020033</mixed-citation><mixed-citation xml:lang="en">Koledina KF, Gubaydullin IM, Koledin SN. Mathematical Modeling and Computational Aspects of Multi-Criteria Optimization of the Conditions of a Laboratory Catalytic Reaction. Numerical Analysis and Applications. 2022;15:104–111. http://doi.org/10.1134/S1995423922020033</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">Zainullin R.Z., Koledina K.F., Akhmetov A.F., Gubaidullin I.M. Kinetics of the Catalytic Reforming of Gasoline. Kinetics and Catalysis. 2017;58(3):279–289. https://doi.org/10.1134/S0023158417030132</mixed-citation><mixed-citation xml:lang="en">Zainullin RZ, Koledina KF, Akhmetov AF, Gubaidullin IM. Kinetics of the Catalytic Reforming of Gasoline. Kinetics and Catalysis. 2017;58(3):279–289. https://doi.org/10.1134/S0023158417030132</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</label><citation-alternatives><mixed-citation xml:lang="ru">Зайнуллин Р.З., Коледина К.Ф., Ахметов А.Ф., Губайдуллин И.М. Возможные пути модернизации реакторного блока каталитического риформинга на основе кинетической модели. Electronic Scientific Journal of Oil and Gas Business. 2018;(6):78–97.</mixed-citation><mixed-citation xml:lang="en">Zainullin RZ, Koledina KF, Akhmetov AF, Gubaidullin IM. Possible Ways of Upgrading Reactor Unit of Catalytic Reforming Based on Kinetic Model. Electronic Scientific Journal of Oil and Gas Business. 2018;(6):78–97.</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">Brasseur G.P., Jacob D.J. Modeling of Atmospheric Chemistry. Cambridge: Cambridge University Press; 2017. 606 p. https://doi.org/10.1017/9781316544754</mixed-citation><mixed-citation xml:lang="en">Brasseur GP, Jacob DJ. Modeling of Atmospheric Chemistry. Cambridge: Cambridge University Press; 2017. 606 p. https://doi.org/10.1017/9781316544754</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">Gubaydullin I., Koledina K., Sayfullina L. Mathematical Modeling of Induction Period of the Olefins Hydroalumination Reaction by Diisobutylaluminiumchloride Catalyzed with Cp2ZrCl2. Engineering Journal. 2014;18(1):13 – 24. https://doi.org/10.4186/ej.2014.18.1.13</mixed-citation><mixed-citation xml:lang="en">Gubaydullin I, Koledina K, Sayfullina L. Mathematical Modeling of Induction Period of the Olefins Hydroalumination Reaction by Diisobutylaluminiumchloride Catalyzed with Cp2ZrCl2. Engineering Journal. 2014;18(1):13 – 24. https://doi.org/10.4186/ej.2014.18.1.13</mixed-citation></citation-alternatives></ref><ref id="cit11"><label>11</label><citation-alternatives><mixed-citation xml:lang="ru">Meshalkin V.P., Dovi V.G., Soboleva I.V. Method and Algorithm for Bayesian Estimation of Kinetic Parameters of Chemical Processes with Fluctuating Independent Variables. Theoretical Foundations of Chemical Engineering. 2009;43(6):861 – 868. http://doi.org/10.1134/S0040579509060037</mixed-citation><mixed-citation xml:lang="en">Meshalkin VP, Dovi VG, Soboleva IV. Method and Algorithm for Bayesian Estimation of Kinetic Parameters of Chemical Processes with Fluctuating Independent Variables. Theoretical Foundations of Chemical Engineering. 2009;43(6):861 – 868. http://doi.org/10.1134/S0040579509060037</mixed-citation></citation-alternatives></ref><ref id="cit12"><label>12</label><citation-alternatives><mixed-citation xml:lang="ru">Сафиуллина Л.Ф., Коледина К.Ф., Губайдуллин И.М., Зайнуллин Р.З. Исследование математической модели каталитического риформинга бензина методами анализа чувствительности. Вычислительные методы и программирование. 2020;21(4):440–451. https://doi.org/10.26089/NumMet.v21r435</mixed-citation><mixed-citation xml:lang="en">Safiullina LF, Koledina KF, Gubaydullin IM, Zaynullin RZ. Study of a Mathematical Model of Gasoline Catalytic Reforming by Sensitivity Analysis Methods. Numerical Methods and Programming. 2020;21(4):440–451. https://doi.org/10.26089/NumMet.v21r435 (In Russ.)</mixed-citation></citation-alternatives></ref><ref id="cit13"><label>13</label><citation-alternatives><mixed-citation xml:lang="ru">Murphy J.A. Physical Organic Chemistry. Beilstein Journal of Organic Chemistry. 2010;(6):1025. https://doi.org/10.3762/bjoc.6.116</mixed-citation><mixed-citation xml:lang="en">Murphy JA. Physical Organic Chemistry. Beilstein Journal of Organic Chemistry. 2010;(6):1025. https://doi.org/10.3762/bjoc.6.116</mixed-citation></citation-alternatives></ref><ref id="cit14"><label>14</label><citation-alternatives><mixed-citation xml:lang="ru">Zaynullin R.Z., Koledina K.F., Gubaydullin I.M., Akhmetov A.F., Koledin S.N. Kinetic Model of Catalytic Gasoline Reforming with Consideration for Changes in the Reaction Volume and Thermodynamic Parameters. Kinetics and Catalysis. 2020;61:613–622. https://doi.org/10.1134/S002315842004014X</mixed-citation><mixed-citation xml:lang="en">Zaynullin RZ, Koledina KF, Gubaydullin IM, Akhmetov AF, Koledin SN. Kinetic Model of Catalytic Gasoline Reforming with Consideration for Changes in the Reaction Volume and Thermodynamic Parameters. Kinetics and Catalysis. 2020;61:613–622. https://doi.org/10.1134/S002315842004014X</mixed-citation></citation-alternatives></ref><ref id="cit15"><label>15</label><citation-alternatives><mixed-citation xml:lang="ru">Safiullina L.F., Gubaydullin I.M., Uzyanbaev R.M., Musina A.E. Computational Aspects of Simplification of Mathematical Models of Chemical Reaction Systems. Journal of Physics: Conference Series. 2019;1368:042022. http://doi.org/10.1088/1742-6596/1368/4/042022</mixed-citation><mixed-citation xml:lang="en">Safiullina LF, Gubaydullin IM, Uzyanbaev RM, Musina AE. Computational Aspects of Simplification of Mathematical Models of Chemical Reaction Systems. Journal of Physics: Conference Series. 2019;1368:042022. http://doi.org/10.1088/1742-6596/1368/4/042022</mixed-citation></citation-alternatives></ref></ref-list><fn-group><fn fn-type="conflict"><p>The authors declare that there are no conflicts of interest present.</p></fn></fn-group></back></article>
