Creation of Rate Constant, Isoconversion, and Isothermal Data from Kinetic Analysis Results Using PYTHON

Keywords: DSC, Kinetics, PYTHON

TB114

Abstract

This technical brief discusses the generation of rate constant, isoconversion, and isothermal predictive data from derived kinetic analysis parameters. It builds on TB113, the technical brief detailing the kinetic analysis of reaction data using the Borchardt and Daniels method [1] but it is not limited to that data. PYTHON™ Programming Language and its associated libraries have been used to generate and plot the resultant data.

The PYTHON Script (in JUPYTER™ Notebook format) can be downloaded here.

Introduction

Kinetic parameters are used to describe and quantify the rates and mechanisms of chemical or biochemical reactions. They provide insight into the rate of a reaction and what might affect that rate or into the relative stability of materials or help with prediction of extent of reaction under given conditions or the lifetime of a material.

Derivation of the kinetic parameters usually follows some defined rate equations and temperature dependant response (for example Arrhenius behaviour). One example of this is the Borchardt and Daniels kinetic analysis, which is often used for following cure reactions.

The Borchardt and Daniels approach [2] [3] assumes that the reaction follows nth order kinetics and obeys the general rate equation:

TB114 Equation 01

where:

d𝛼/dt = reaction rate (1/sec)
𝛼 = fractional conversion
k(T) = specific rate constant at temperature T
n = reaction order

It also assumes Arrhenius behavior which defines the rate constant as a function of temperature:

TB114 Equation 02

where:

Ea = Activation energy (J/mol)
Z = pre-exponential factor (1/sec)
R = gas constant = 8.314 J/mol K

Substituting Equation 2 into Equation 1 yields:

TB114 Equation 03

Taking the natural logarithms of this equation yields Equation 4, which is Method B in ASTM E2041:

TB114 Equation 04

This has the linear form z = a + bx +cy, which can be solved using multivariate linear regression.

In the case of the Borchardt and Daniels method, the values for 𝛼, T, and d𝛼/dt are obtained from a single linear heating rate experiment. However, some approaches will use multiple heating rates or, in the case of isothermal studies, multiple temperature points.

The end condition of the kinetic analysis is usually the derivation of the activation energy (Ea), reaction order (n), and pre-exponential factor (Z). While the derivation of the activation energy and reaction order might be the end goal, these parameters can be used to make predictions as to the progression of a reaction as a function of temperature or time.

Experimental

TB113 [1] discussed the derivation of kinetic parameters from the cure reaction data of a simple commercial two-part epoxy adhesive. That analysis resulted in the following kinetic parameters:

Activation Energy (Ea) = 72.5772 kJ/mol
Reaction Order (n) = 1.8047
Ln Pre-Exponential Factor (ln Z) = 18.3079 1/s

The goodness of fit as R2 was reported at 0.997.

Rate Constant Plot

With the definition of rate constants, the primary use will be in the generation of the isoconversion and isothermal plots. However, a general plot of the rate constant as a function of time can also be generated.

Equation 2 allows the definition of the rate constants over a range of temperatures. In the PYTHON Script, the libraries for data visualization, numerical actions, and dataframe handling are first imported.

TB114 Code 01

The kinetic parameters are then set as constants. If a complete script including the kinetic analysis were being created, then the values required are generated during the analysis.

TB114 Code 02

To calculate the rate constants and generate the plot, a dataframe can be created that will include the temperature range of interest in degrees Celsius, the equivalent in Kelvin, and the rate constant. Normally, the rate constant is expressed in reciprocal seconds; however, if the conversion plots are in minutes, then the rate constant could be expressed in reciprocal minutes. The more robust approach would be to make all the calculations in seconds and convert that to minutes. This is reflected in the code snippets used in this technical brief.

The code snippet below creates a dataframe (rate_df), populates this with temperature (in °C) using 100 linearly-spaced entries from 18 to 200 °C, and creates another column converting this to Kelvin. This latter column of data is used with the kinetic parameters to generate the rate constants in reciprocal seconds, and this is finally converted to reciprocal minutes. All the data is saved in the rate_df dataframe.

TB114 Code 03

This can then be plotted as required.

TB114 Code 04

The resulting plot is shown in Figure 1.

Figure 1. Plot of rate constant (1/min) as a function of temperature
Figure 1. Plot of rate constant (1/min) as a function of temperature

The data is also contained in the dataframe so it can be extracted numerically as required.

Isoconversion Plots

The isoconversion plots allow the user to predict time required to reach a specific conversion level at a specific temperature.

Equation 3 describes the rate of conversion (d𝛼/dt) as a function of the kinetic parameters at a specific temperature. Taking the inverse of this would describe the time required for a unit change in conversion. Taking the definite integral from zero conversion to a specific conversion level at a defined temperature would give the time required to achieve that conversion at that temperature.

TB114 Equation 05

Where:

dt/d𝛼 = time to unit conversion (sec)
Z = pre-exponential factor (1/sec)
Ea = Activation energy (J/mol)
T = temperature (K)
𝛼 = fractional conversion
n = reaction order
R = gas constant = 8.314 J/mol K

As before, the PYTHON Script starts with the import of the required libraries:

TB114 Code 05

The scipy.integrate option is included for the definite integral. The next step is the definition of a function to find a specific index position and value in the dataframe. This is not required in the production of the isoconversion plots but is useful in finding a test parameter. When carrying out kinetic analysis it is often useful to test the parameters derived. One approach for this is the sixty minute half-life. This is basically the temperature at which 50% conversion would be achieved in 60 minutes.

TB114 Code 06

The kinetic parameters are then set as constants.

TB114 Code 07

The next code snippet is the generation of the isoconversion data. The first line is just a list of the conversion levels to be used. The actual data generation will work its way through each of the entries present. An empty dataframe is then created to hold all the data generated. As before, temperature (in °C) is added using 100 linearly-spaced entries from 18 to 200 °C, and another column is created converting this to Kelvin. It is this latter column of data that will be required to produce the isoconversion data.

The integrand function is defined next. This is essentially the expression in Equation 4. In addition to the kinetic parameters, it will also take a conversion level (alpha) and a temperature (temp).

For each target conversion level, at each temperature entry in the data frame, the definite integration of the function is carried out to give the time required to reach the target conversion level.

The code cycles through each of the target conversion levels, creates a column for each in the data frame, and then, at each temperature, works out the time required to reach the specified conversion level by carrying out the definite integral. Given that the kinetics constants here are in reciprocal seconds, the resultant time will be in seconds; the division by 60 is converting to minutes.

TB114 Code 08

Then can then be plotted as required:

TB114 Code 09

This results in the plot shown in Figure 2.

The final part of this code will report the 60-minute half-life. The 50% isoconversion data has been obtained and the analysis function defined earlier can look for the temperature at which the conversion time is 60 minutes.

Figure 2. Plot of conversion time against temperature for the specified conversion levels
Figure 2. Plot of conversion time against temperature for the specified conversion levels
TB114 Code 10

In this case here, this will report as the 60-minute half-life temperature at 54.77 °C. This could be used as a test of the kinetic parameters. A sample held at 54.77 °C should progress to 50% of conversion.

Isothermal Plots

Isothermal plots allow the prediction of the degree of conversion as a function of time at specific temperatures, which are useful in the process optimization or if a staged process is being undertaken in which the reaction is taken to a certain conversion and then stopped for other manufacturing processes to take place. The generation of these prediction curves is like the approach used for the isoconversion curves. Equation 3 is basically used for the generation of the plots.

If the reaction order were 1, then a simplified approach can be used. If you consider the general rate equation given in Equation 1, for a first order reaction (n=1), then it can be written:

TB114 Equation 06

Rearranging to bring the alpha terms together and integrating both sides (noting that at t = 0, 𝛼 = 0), this will give the analytical solution:

TB114 Equation 07

For any given temperature, the rate constant can be found through the Arrhenius behavior and the conversion over time can be calculated.

The script starts with the import of the required libraries. Since this is an analytical solution, the integration option is not required.

TB114 Code 11

The same constants have been used as the kinetic parameters:

TB114 Code 12

The temperatures required are then set up in a list, the dataframe for the analysis is created, and then each of the required temperatures is iterated over and conversion as a function of time is obtained for each temperature. As before, care should be taken over the units, and time in seconds is taken for the calculation. A new column is created in the dataframe for each temperature, allowing the data to be plotted or interrogated as required.

TB114 Code 13

The resultant data can then be plotted. Here, the time has been taken in minutes. The plot range has also been limited from zero to 100 minutes using the set_xlim function; if this were absent, the full data range would be plotted. The resultant plot is shown in Figure 3.

TB114 Code 14
Figure 3. Isothermal conversion plot assuming first order reaction
Figure 3. Isothermal conversion plot assuming first order reaction

For reaction orders not equal to one, a different approach must be taken, although it should be noted that this alternative approach can also be applied to a reaction order = 1.

Since degree of conversion at time zero is zero, there is an initial value problem. Within the scipy.integrate library there is a numerical solver, solve_ivp, which can be used for ordinary differential equations (ODE) such as the rate equation given in Equation 3. This will allow conversion to be found as a function of time and is useful if the rate equation is not explicitly integrable as is the case here.

As with previous scripts, the first steps are to import the required libraries, set up the kinetic constants, define the isothermal temperatures of interest, and create the dataframe.

TB114 Code 15

Within PYTHON Programming Language and its libraries there are often several approaches that can be used to reach the same endgoal. In general, a function will be defined before its use and called as required. However, it is possible to use a lambda or anonymous function directly in the code where it is required.

This first code snippet shows the function being defined initially and the numerical solver is then iterated through for the different temperatures. As before, for each temperature, a new column is created in the dataframe. The code defines the range and resolution over which this numerical analysis will be carried out. The t_span is the time span and the t_eval defines the data points over which the analysis will take place. In this case here, the point steps match those of the dataframe setup to receive the analysis results. Y0 is the starting point and, as mentioned, at time zero the conversion was zero. The code returns several parameters; however, sol.y[0] is the important parameter as this is the degree of conversion at each time point. This is saved into the created dataframe in columns expressed as a function of temperature.

TB114 Code 16

The results of this data can then be plotted, shown in Figure 4.

TB114 Code 17

A visual comparison of Figures 3 and 4 shows the slower rate of conversion where the reaction order is higher than 1.

Figure 4. Isothermal conversion plot where reaction order equals 1.8047. Ordinary differential equation generated separate from the numerical iteration loop.
Figure 4. Isothermal conversion plot where reaction order equals 1.8047. Ordinary differential equation generated separate from the numerical iteration loop.

With the lambda function, the function is essentially defined in the script block in which it is being used, so in this case, the numerical integration loop. This option is shown here. The initial setup for the import of the required libraries, set up the kinetic constants, define the isothermal temperatures of interest, and creation of the dataframe are the same as above.

TB114 Code 18

The code looks similar with the exception that the definition of the function is contained within the iteration loop.

The final plot is generated in the same way, and the resultant plot is shown in Figure 5.

TB114 Code 19
Figure 5. Isothermal conversion plot where reaction order equals 1.8047. Ordinary differential equation generated separate from the numerical iteration loop.
Figure 5. Isothermal conversion plot where reaction order equals 1.8047. Ordinary differential equation generated separate from the numerical iteration loop.

A visual comparison of the isothermal conversion plots from the two function approaches shows these to be calculating the same result.

Conclusions

The ability to generate predictive plots from kinetic data is useful in a wide range of areas from processing predictions in curing through to lifetime predictions in material performance. This application note presents routes to generate isothermal and isoconversion data from derived activation energy, pre-exponential factors and rate constants using PYTHON Programming Language.

References

  1. P. Davies, “TB114 Creation of Rate Constant, Isoconversion and Isothermal Data From Kinetic Analysis Results Using Python,” TA Instruments, New Castle, DE, 2026.
  2. ASTM International, “ASTM E2041-13 Standard Test Method for Estimating Kinetic Parameters by Differential Scanning Calorimeter Using the Borchardt and Daniels Method,” ASTM International, West Conshohocken, PA, 2018.
  3. TA Instruments, “TA073 A Review of DSC Kinetic Methods,” TA Instruments, New Castle, DE.

Acknowledgement

For more information or to request a product quote, please visit www.tainstruments.com to locate your local sales office information.

This paper was written by Philip Davies, Principal Applications Scientist, TA Instruments.

PYTHON is a trademark of Python Software Foundation. JUPYTER is a trademark of LF Charities, Inc.

Click here to download the printable version of this application note.

Contact us to learn more about our instrumentation and how it can benefit your research.