ИНТЕГРИРОВАНИЕ В EXCEL БЕЗ МАКРОСОВ НА ПРИМЕРЕ ИНТЕГРАЛА АРРЕНИУСА
ИНТЕГРИРОВАНИЕ В EXCEL БЕЗ МАКРОСОВ НА ПРИМЕРЕ ИНТЕГРАЛА АРРЕНИУСА
Научная статья
Бондарчук И.С.1, Бондарчук С.С.2, *
1 ORCID: 0000-0001-6995-0547;
2 ORCID: 0000-0001-6842-9143;
1 Томский государственный университет, Томск, Россия;
2 Томский государственный педагогический университет, Томск, Россия;
2 Институт проблем химико-энергетических технологий СО РАН, Бийск, Россия
* Корреспондирующий автор (isbs[at]mail.ru)
АннотацияВ статье предлагается эффективный (достаточно точный, простой и интуитивно понятный быстро исполняемый и имеющий короткий программный код) алгоритм, опирающийся на широкие вычислительные возможности Excel без использования макросов VBA. В качестве примера приводится реализация вычисление интеграла Аррениуса в одной ячейке Excel. Точность вычислений анализируется сравнением с часто используемыми в химической кинетике аппроксимациями расчета интеграла для диапазона значений, имеющих место при протекании газо- и твердофазных реакций.
Данный алгоритм может быть использован для численного интегрирования других "неберущихся" интегралов, встречающихся при решении практических задач и обработке данных.
Иллюстрирующие текст примеры (скриншоты листов электронных таблиц) содержат комментарии и допускают быстрое воспроизведение и проверку.
Ключевые слова: численное интегрирование, интеграл Аррениуса, электронные таблицы, Excel.
INTEGRATION IN EXCEL WITHOUT MACROS ON THE EXAMPLE OF ARRHENIUS INTEGRAL
Research article
Bondarchuk I.S.1, Bondarchuk S.S.2, *
1 ORCID: 0000-0001-6995-0547;
2 ORCID: 0000-0001-6842-9143;
1 Tomsk State University, Tomsk, Russia;
2 Tomsk State Pedagogical University, Tomsk, Russia;
2 Institute for Problems in Chemical and Energetic Technologies SB RAS, Russia
* Corresponding author (isbs[at]mail.ru)
AbstractThe article proposes an efficient (accurate, simple and intuitively clear, fast executable and having a short program code) algorithm based on the broad computing capabilities of Excel without using VBA macros. As an example, the implementation of the calculation of the Arrhenius integral in one Excel cell is given. The accuracy of the calculations is analyzed by comparison with the often-used approximations in chemical kinetics for calculating the integral for the range of values that occur during gas and solid-phase reactions. This algorithm can be used for the numerical integration of other nonelementary integrals encountered in solving practical problems and data processing. Illustrative examples (screenshots of a spreadsheet) contain comments and can be quickly reproduced and checked.
Keywords: numerical integration, Arrhenius integral, spreadsheets, Excel.
Introduction
One of the most accessible computational tools for data processing [1], [3], [5], [6] and solutions to relatively simple engineering problems [7], [8], [9] for researchers who are not professional programmers in their field are Excel spreadsheets.
A large number of mathematical models include terms describing any processes associated with the rate of chemical reactions [10], [11], [14], [15]. The most important parameter on which the rate constant of a chemical reaction k depends is the temperature T. To describe the dependence , the empirical formula (function, law) of Arrhenius [16], which has the form
(1)where E is the activation energy (J mol-1), and A=const is the pre-exponential factor (also known as frequency factor) whose dimension determines the dimension of the reaction rate constant.
Although the Arrhenius eq 1 is most often used to describe the temperature dependence , it is not always the best approximation of the experimental data [17, 18]. In particular, the "extended" empirical equation [18]
(2)depends on three parameters can more accurately approximate the experimental data than the traditionally used eq 1.
In the process of implementing models in many methods, it must calculate (or estimate the value) of the integral of the Arrhenius function.
The simplest and most accessible computing environment for researchers is spreadsheets, in particular, Excel with its sufficiently developed apparatus for computational and statistical functions. This is evidenced by several monographs and publications on solving problems of chemical kinetics using Excel tools [2], [3], [4], [6]. The use of spreadsheets does not require a special study of programming disciplines and is a convenient tool for automating calculations. An important circumstance is that Excel allows you to implement a short and "transparent" program code (in the proposed algorithm, the integral value is calculated in one cell of the spreadsheet), when the problem is solved without using VBA macros.
Theory and algorithm
When solving many problems of chemical kinetics, it must calculate the value of the integral of the Arrhenius function, which is called the Arrhenius integral in the literature. This integral is nonelementary, i. e., it cannot be expressed via elementary functions.
To estimate the value of the integral a large number of approximate solutions [17] have been published to this day; they vary in complexity and precision. The approximation data are based on the expansion (or the rational and the exponential approximations) of Arrhenius function via the dimensionless parameter
However, many of these approximations are gross or even inaccurate, especially for low values of the parameter x[17]. So, for example, for the Coats-Redfern formula [19]
(3)the error reaches tens of percentage for small values of x<10.
For the range of values of the complex x∈[5; 100] realized during gas and solid-phase reactions, one of the most accurate for calculating the Arrhenius integral is the Junmeng approximation [17]
(4)Using approximate formulas eq 3, 4, the estimated value of the Arrhenius integral with a change in temperature in the range from is determined by the relation
So, for example, according to the most accurate approximation eq 4 for = 4000 K, the value of the Arrhenius integral isBut if we bear in mind the simplicity and accuracy of calculations for the important range of variation of the complex , then it is more expedient to use the numerical calculation of the integral, the effective algorithm for which is presented below. Moreover, the numerical calculation, in addition to the higher accuracy for the entire interesting range of variation of the values are implemented by a shorter spreadsheet program code.
Known quadrature formulas can be obtained directly from the definition of the integral and its geometric interpretation as the area of a curvilinear trapezoid for function . For the problem in question, the midpoint rule [20] is the best solution in terms of precision and implementation complexity. According to this rule, the value of the integral is determined by the sum m of the areas of rectangles of equal width , a subinterval integration limits interval. The height of each rectangle is determined by the value of the function for the average in each subinterval of
(5)The approximation error of eq 5 is proportional to .
As an example, the following is an algorithm and the result of calculating the Arrhenius integral for the parameter =4000 K in the temperature range from
Following the eq 5 of the middle rectangles, the current temperature value for 10000 nodes of integration at each node (middle of the subinterval) within the limits of integration from is determined by the relation
The value of the integral is determined via the sum
To generate a sequence of numbers (1, 2, …, 10000) MS Excel ROW(A1:A10000) function is used in the CSE format (Ctrl + Shift + Enter) of an array formula [21].
Figure 1 shows the program code in MS Excel and the results of the calculation of the Arrhenius integral for = 4000 K in the temperature range from 500 K to 600 K both for the proposed "single-cell" implementation for 10000 integration subintervals and the most precise approximation formula [17]. Copying formulas by dragging the fill handle is shown with bold arrows.
Fig. 1 – Worksheet of the Arrhenius integral calculation
The table below is the difference (%) of the calculated values of the Arrhenius integral for an interesting range of variations of the complex compared with the values obtained using the Simpson method with an accuracy of 10-10.
Table 1 – Relative errors of Arrhenius integral approximations in percentages
It is easy to increase if required, the accuracy of calculations in the region of large values of E⁄R> 30000 K for eq 6 by increasing the number of integration intervals.
The most accurate formula found by the authors for calculating the extended Arrhenius integral is the approximation Lei [18]
Figure 2 shows a screenshot of the Excel sheet for calculating the value of the extended integral of the extended Arrhenius function (2), from which it can be seen that the proposed approach is 6 orders of magnitude more accurate than the best approximation [18].
Fig. 2 – Worksheet of the modified Arrhenius integral calculation
A comparative analysis of the numerical estimates of the Arrhenius integral shows that for the range of values implemented in practical studies, the accuracy of the proposed calculation algorithm is several orders of magnitude higher than any used approximations.
ConclusionThe algorithm allows calculating with high accuracy the value of the Arrhenius integral (in one Excel cell) for the entire interesting range of values of the complex instead of using any of its approximations. The algorithm is easily generalized to the integral of the extended Arrhenius function.
The algorithm is implemented by a simple short program code, does not require programming experience in high-level languages, and can be easily mastered by researchers. The code and calculation results are illustrated with screenshots of Excel worksheets – the most common software for analyzing numerical data. The code is annotated showing all the formulas used and provides complete instructions for numerical integration.
Конфликт интересов Не указан. | Conflict of Interest None declared. |
Список литературы / References
- De Levie R. How to use Excel® in Analytical Chemistry and in General Scientific Data Analysis / R. De Levie. – Cambridge: Cambridge University Press, 2004. – 487 p.
- Бондарчук С.С. Статобработка экспериментальных данных в MS Excel: учебное пособие / С.С. Бондарчук, И.С. Бондарчук. – Томск: Изд-во Томского гос. пед. ун-та, 2018. – 431 с.
- Liengme B.V. A guide to Microsoft Excel 2013 for scientists and engineers / B.V. Liengme. –Amsterdam: Academic Press, 2016. pp. 273–287.
- Бондарчук И.С. Кинетика гомогенных химических реакций: методы решения в Excel / И.С. Бондарчук, С.С. Бондарчук. – Томск: Изд-во Томского гос. пед. ун-та, 2019. – 263 с.
- Бондарчук И.С. Методология решения задач физической химии инструментом Solver MS Excel / И.С. Бондарчук, И.А. Курзина, С.С. Бондарчук // Высшее образование сегодня. – 2014. – №9. – С. 22-24.
- Бондарчук И.С. Идентификация кинетических параметров процесса десорбции / И.С. Бондарчук, И.А. Жуков и др. // Перспективы развития фундаментальных наук: сб. труд. XII Межд. конф / Томск: Изд-во Томского политех. ун-та, 2015. – С. 380–382.
- Бондарчук И.С. Критерий формообразования частиц в процессе плазмохимического синтеза порошков / И.С. Бондарчук, А.С. Жуков // Химическая физика и актуальные проблемы энергетики: сб. докл. и ст. Всерос. молод. конф. / Томск: Изд-во Томского политехн. ун-та, 2012. – С. 34-38.
- Bondarchuk I.S. Identification of kinetic triplets by results of derivatographic analysis / I.S. Bondarchuk, S.S. Bondarchuk, B.V. Borisov // Heat and Mass Transfer in the Thermal Control System of Technical and Technological Energy Equipment. MATEC Web of Conferences. – 2018, – P. 01010(1)-01010(4).
- Бондарчук И.С. Идентификация кинетических параметров твердофазных реакций / И.С. Бондарчук, И.А. Жуков и др. // Полифункциональные химические материалы и технологии. Мат-лы межд. науч. конф. / Томск: Издательский Дом ТГУ, 2015. – Т. 2. – С. 34-37.
- Zhukov A. Energetic borides: combustion synthesis and properties / A. Zhukov, M. Ziatdinov, I. Bondarchuk et al. // Proc. of the 46th Int. Ann. Conf. of the Fraunhofer ICT. – 2015. – P. P75(1)–P75(5).
- Vorozhtsov A. The mutual Influence of nanometal additives on heat release rate in energetic condensed systems / A. Vorozhtsov, N. Rodkevich, I. Bondarchuk et al. // Int. J. Energetic Materials Chem. Prop. – 2017. – V. 16 (4). – P. 329–336.
- Bondarchuk I. Modeling the evolution of the aerosol cloud of toxicants in the atmosphere / I. Bondarchuk, S. Bondarchuk, B. Borisov // MATEC Web of Conferences. – 2017. – V. 141: Smart Grids 2017: The Fifth Int. Youth Forum, 9-13 October, 2017, Tomsk, Russia. – P. 01013(1) – P. 01013(6).
- Vorozhtsov A. Ballistic characteristics of solid propellants containing dual oxidizer/ A. Vorozhtsov, V. Arkhipov, S. Bondarchuk et al. // Proc. European Conference for Aerospace Sciences EUCASS. 2005. – P. 5.03.01(1)-P. 5.03.01(8).
- Vorozhtsov A. Thermokinetic investigation of the aluminum nanoparticles oxidation / A. Vorozhtsov, N. Rodkevich, I. Bondarchuk et al. // Int. J. Energetic Materials Chem. Prop. – 2017. – V. 16 (4). – P. 309–320.
- Zhukov I. Plasma-chemical method for producing metal oxide powders and their application / I. Zhukov., S. Vorozhtsov, V. Promakhov et al. // Journal of Physics: Conference Series. – 2015. – V. 652. – P. 012027(1)-012027(5). 16. Arrhenius S. About the reaction rate in the inversion of cane sugar/ S. Arrhenius // Z. Phys. Chem. – 1889. 4. – P. 226–248.
- Arrhenius S. About the reaction rate in the inversion of cane sugar / S. Arrhenius // Z. Phys. Chem. – 1889. 4, – P. 226–248.
- Junmeng C. A new formula approximating the Arrhenius integral to perform the non-isothermal kinetics / C. Junmeng, H. Fang et al. // Chem. Eng. J. – 2006. – V. 124 (1‑3). – P. 15‑18.
- Lei X.-W. New analytical approximate solution of the generalised temperature integral for kinetic reactions / X.-W. Lei, J.-B. Liu et al. // Materials Science and Technology. – 2020. – V. 36. – P. 1655-1662.
- Coats A.W. Kinetic Parameters from Thermogravimetric Data / A.W. Coats, J. P. Redfern // Nature. – 1964. – V. 201. – P. 68–69.
- Burden R.L. Numerical Analysis / R.L. Burden, J.D. Faires. – Boston: Cengage Learning, 2011. – 888 p.
- Microsoft support. [Electronic resource]. URL: https://support.microsoft.com/en-us/office/video-array-formulas-8ff8257a-b28e-4e81-b4f8-30f793412dfa (accessed 21.08.2020).
Список литературы на английском языке / References in English
- De Levie R. How to use Excel® in Analytical Chemistry and in General Scientific Data Analysis / R. De Levie. – Cambridge: Cambridge University Press, 2004. – 487 p.
- Bondarchuk S.S. Statobrabotka ehksperimental'nykh dannykh v MS Excel: uchebnoe posobie [Statistical processing of experimental data in MS Excel: a tutorial] / S.S. Bondarchuk, I.S. Bondarchuk. – Tomsk: Publishing house of Tomsk state ped. un-ty, 2018. – 431 p [in Russian].
- Liengme B.V. A guide to Microsoft Excel 2013 for scientists and engineers / B.V. Liengme. –Amsterdam: Academic Press, 2016. pp. 273–287.
- Bondarchuk I.S. Kinetika gomogennykh khimicheskikh reaktsij: metody resheniya v Excel [Kinetics of Homogeneous Chemical Reactions: Methods of Solution in Excel] / I.S. Bondarchuk, S.S. Bondarchuk. – Tomsk: Publishing house of Tomsk state ped. un-ty, 2018. – 263 p [in Russian].
- Bondarchuk I.S. Metodologiya resheniya zadach fizicheskoj khimii instrumentom Solver MS Excel [Methodology for solving problems of physical chemistry using the Solver MS Excel tool] / I.S. Bondarchuk, I.А. Kurzina, S.S. Bondarchuk // Vysshee obrazovanie segodnya [Higher education today]. – 2014. – № 9. – P. 22-24 [in Russian].
- Bondarchuk I.S. Identifikatsiya kineticheskikh parametrov protsessa desorbtsii [Identification of the kinetic parameters of the desorption process] / I.S. Bondarchuk, I.А. Zhukov, V.V. Promakhov // Perspektivy razvitiya fundamental'nykh nauk: sb. trud. XII Mezhd. konf. [Prospects for the development of fundamental sciences: collection of articles XII International Conference / Tomsk: Publishing House of Tomsk Polytechnic University, 2015. – pp 380–382 [in Russian].
- Bondarchuk I.S. Kriterij formoobrazovaniya chastits v protsesse plazmokhimicheskogo sinteza poroshkov [The criterion for the particles formation in the process of plasma-chemical synthesis of powders] / I.S. Bondarchuk, А.S. Zhukov // Khimicheskaya fizika i aktual'nye problemy ehnergetiki: sb. dokl. I-st. Vseros. konf. [Chemical physics and current problem of power engineering: collection of reports and articles All-Russian] / Tomsk Polytechnic University. – Tomsk: Publishing House of Tomsk Polytechnic. University, 2012. – 34-38 pp [in Russian].
- Bondarchuk I.S. Identification of kinetic triplets by results of derivatographic analysis / I.S. Bondarchuk, S.S. Bondarchuk, B.V. Borisov // Heat and Mass Transfer in the Thermal Control System of Technical and Technological Energy Equipment. MATEC Web of Conferences. – 2018, – P. 01010(1)-01010(4).
- Bondarchuk I.S. Identifikatsiya kineticheskikh parametrov tverdofaznykh reaktsij [Identification of kinetic parameters of solid-phase reactions] / I.S. Bondarchuk, I.А. Zhukov et al. // Polifunktsional'nye khimicheskie materialy i tekhnologii [Multifunctional chemical materials and technologies] / Tomsk: TSU Publishing House, 2015. – Vol. 2. – 34-37 pp [in Russian].
- Zhukov A. Energetic borides: combustion synthesis and properties / A. Zhukov, M. Ziatdinov, I. Bondarchuk et al. // Proc. of the 46th Int. Ann. Conf. of the Fraunhofer ICT. – 2015. – P. P75(1)–P75(5).
- Vorozhtsov A. The mutual Influence of nanometal additives on heat release rate in energetic condensed systems / A. Vorozhtsov, N. Rodkevich, I. Bondarchuk et al. // Int. J. Energetic Materials Chem. Prop. – 2017. – V. 16 (4). – P. 329–336.
- Bondarchuk I. Modeling the evolution of the aerosol cloud of toxicants in the atmosphere / I. Bondarchuk, S. Bondarchuk, B. Borisov // MATEC Web of Conferences. – 2017. – V. 141: Smart Grids 2017: The Fifth Int. Youth Forum, 9-13 October, 2017, Tomsk, Russia. – P. 01013(1) – P. 01013(6)
- Vorozhtsov A. Ballistic characteristics of solid propellants containing dual oxidizer/ A. Vorozhtsov, V. Arkhipov, S. Bondarchuk et al. // Proc. European Conference for Aerospace Sciences EUCASS. 2005. – P. 5.03.01(1)-P. 5.03.01(8).
- Vorozhtsov A. Thermokinetic investigation of the aluminum nanoparticles oxidation / A. Vorozhtsov, N. Rodkevich, I. Bondarchuk et al. // Int. J. Energetic Materials Chem. Prop. – 2017. – V. 16 (4). – P. 309–320.
- Zhukov I. Plasma-chemical method for producing metal oxide powders and their application / I. Zhukov., S. Vorozhtsov, V. Promakhov, I. Bondarchuk et al. // Journal of Physics: Conference Series. – 2015. – V. 652. – P. 012027(1)-012027(5).
- Arrhenius S. About the reaction rate in the inversion of cane sugar / S. Arrhenius // Z. Phys. Chem. – 1889. 4, – P. 226–248.
- Junmeng C. A new formula approximating the Arrhenius integral to perform the non-isothermal kinetics / C. Junmeng, H. Fang et al. // Chem. Eng. J. – 2006. – V. 124 (1 3). – P. 15‑18.
- Lei X.-W. New analytical approximate solution of the generalised temperature integral for kinetic reactions / X.-W. Lei, J.-B. Liu et al. // Materials Science and Technology. – 2020. – V. 36. – P. 1655-1662.
- Coats A.W. Kinetic Parameters from Thermogravimetric Data / A.W. Coats, J. P. Redfern // Nature. – 1964. – V. 201. – P. 68–69.
- Burden R.L. Numerical Analysis / R.L. Burden, J.D. Faires. – Boston: Cengage Learning, 2011. – 888 p.
- Microsoft support. [Electronic resource]. URL: https://support.microsoft. com/en-us/office/video-array-formulas-8ff8257a-b28e-4e81-b4f8-30f793412dfa (accessed: 21.08.2020).