Introduction

A crystallization process leads to a formation of a solid phase with long-range structural order. Crystallization is a transition from a stochastic system dominated by thermal fluctuations to a deterministic system in which growth is thermodynamically characterized [1]. This process is the result of non-separable phenomena: nucleation and crystal growth, which are determined by the equilibrium between thermodynamic and kinetic factors. Nucleation initiates crystallization, starting with the formation of a nucleus consisting of a small number of molecules, which then grows from microscopic to macroscopic dimensions [2]. Each substance has a specific temperature range where optimal conditions for nucleation and nuclei growth occur. Usually, the nucleation curve N(T) has its maximum at a lower temperature than the maximum of the crystal growth curve G(T). If N(T) and G(T) have no temperature range in common, no crystallization process is observed during cooling, and instead, a glass transition occurs, even at a slow cooling rate. A crystallization is then expected during heating [3]. The crystallization process observed during heating of material under isothermal or non-isothermal conditions is called cold crystallization. Knowledge of the tendency to cold crystallization is crucial in determining the material’s usefulness for industrial applications [4,5,6].

In literature, numerous models describe the phenomenon of cold crystallization [7,8,9,10,11,12,13]. At the very beginning of the cold crystallization study, one needs to calculate the degree of crystallinity, D(t) [14,15,16,17]. The results of the differential scanning calorimetry (DSC) experiment can be used to obtain values of the degree of crystallinity D(t):

$$ D\left( t \right) = \frac{{\mathop \smallint \nolimits_{{t_{0} }}^{t} \varphi \left( t \right)\text{d}t}}{\Delta H}, $$
(1)

where φ is the heat flow after the subtraction of the baseline, t0 is the time when the crystallization process began, and ΔH is the enthalpy change of the crystallization. DSC measurement is a powerful technique used to study phase transitions, and it can distinguish between the first-order and the second-order phase transitions. First-order phase transitions are characterized by well-defined anomalies on DSC curves, while second-order phase transitions result in variations in the flow curve. Additionally, a slight change in the slope of the curve is observed at the transition temperature to the glassy state. However, the correct interpretation of complex thermal events can be challenging when multiple thermal events occur within a narrow temperature range [18, 19].

The degree of crystallinity D(t) obtained from polarizing optical microscope (POM) data is given by Eq. (2):

$$ D\left( t \right) = \frac{{S_{{{\text{Cr}}}} \left( t \right)}}{S}, $$
(2)

where SCr is the area of the texture related to the crystal phase in time t, and S is the total surface area of the texture. POM method is commonly used to observe and identify textures (in other words, changes in material birefringence) caused by external factors such as temperature. In addition, a phase transition temperatures between phases can be obtained. One advantage of the POM method is that it does not require a high sample mass and provides direct access to ongoing changes in the sample. Nevertheless, the identification of features corresponding to the phase transitions on the texture relies on the experience of the researcher and is limited by the capabilities of the human eye [20].

Usually, the degree of crystallinity obtained from observation with polarized optical microscopy is determined by manually analyzing textures. If the crystal growth is spherical, the degree of crystallinity may be calculated by measuring the nuclei radius versus time at different crystallization temperatures [21]. Another approach involves the manual analysis of textures using graphics application software such as the GNU Image Manipulation Program (GIMP) [2, 3]. In this approach, the growing crystalline phase regions are marked in black, while the remaining parts of the texture are marked using the white color [16]. Both approaches are time-consuming and are easy to obtain for crystallization processes, where the nucleus growths symmetrically. However, determining the degree of crystallinity for texture with several nuclei growing asymmetrically is not an easy task. For this reason, studies of cold crystallization using polarized optical microscope observations are often skipped [14, 22,23,24].

Any image is a two-dimensional representation of visible light. Images can be stored in various digital forms/formats. The most commonly used one is BGR (format), and each pixel is a combination of the brightness of blue, green and red, ranging from 0 to 255. The black pixel has a value of 0, while the white pixel is associated with a value of 255. The grayscale image is represented by a matrix with values ranging from 0 to 255 [25]. TOApy software [26] transforms colored images of texture to a grayscale image and adds the values of pixels. The values obtained during the such procedure are collected as a function of temperature or time [26].

The aim of this publication is to demonstrate, using the example of the cold crystallization process of aripiprazole (AZP), how the degree of crystallization can be determined using thermo-optical analysis. AZP is an antipsychotic drug, and has plenty of polymorphs/forms [27,28,29,30].

Experimental

Aripiprazole, with a purity of an analytical standard higher than 99%, was supplied by Sigma-Aldrich Company. Polarized optical microscope observations have been performed using Leica DM 2700P polarizing light microscope. The temperature has been stabilized using Linkam T96-S temperature controller. The sample has been placed between two glass plates at a temperature above the AZP melting point. In the next step, the sample was cooled to 173 K at a rate of 10 K min−1. Then the sample has been heated (with a rate of 10 K min−1) to one of the chosen temperatures: 333 K, 338 K or 343 K. The collected textures have been analyzed using TOApy software [26] and the Canny edge detector algorithm from the OpenCv package [31].

The DSC curves were performed with DSC 2500 (TA Instruments) calorimeter. The curves were registered according to the following steps: 1/the sample was heated above the melting temperature; 2/cooled down below the glass transition temperature at a rate of 10 K min−1; 3/heated with a rate of 10 K/min to the chosen temperature (339 K, 343 K, or 347 K) and held at isothermal conditions; 4/heated with a rate of 10 K min−1 above the melting temperature afterward.

Results and discussion

The phase transition from the isotropic liquid phase (IL) phase to the crystal phase is indicated by an increase in the values of intensity in the TOA curve. IL phase or its glass do not have optical properties such as birefringence, therefore the texture of this phase observed under a polarizing microscope appears as a black image. It consists of pixels with low intensity values. When a crystal phase occurs, the pixel values associated with the crystal texture increase. The end of crystallization is marked on the TOA plot as a constant value of intensity. This information can be used to obtain the degree of crystallinity by normalizing the TOA data in the region wherein crystallization occurs. The normalization procedure is described by the following equation:

$$ D\left( t \right) = \frac{{I\left( t \right) - I_{0} }}{{I_{{\text{f}}} - I_{0} }}, $$
(3)

where I(t) is the intensity on the TOA curve in time t, I0 is the intensity on the TOA curve before the crystallization starts, and If is the intensity on the TOA curve after the crystallinity process ends. The scheme of the above procedure is presented in Fig. 1.

Fig. 1
figure 1

Scheme for calculating the degree of crystallinity from thermo-optical analysis. The black/gray rectangles represent change of pixels value in texture image during crystallization, and the straight yellow lines are borders between each pixel

The Canny edge detector algorithm may be used to detect the border of objects in a picture [32]. This approach was used to estimate the surface area of the AZP crystal, see Fig. 2. The degree of crystallinity was calculated using normalized data from thermo-optical analysis Eq. (3) and the Canny edge detector algorithm. The results of both methods are presented in Fig. 3, and they overlapped. This observations demonstrates that when the crystallization occurs from the supercooled liquids, the degree of crystallinity can be estimated from the results of the thermo-optical analysis after the normalization procedure.

Fig. 2
figure 2

Comparison of AZP textures (yellow-black picture) obtained during annealing sample in 70 °C with the results of the Canny edge detection algorithm (white-black picture)

Fig. 3
figure 3

AZP degree of crystallinity obtained with TOA method and the Canny edge detection algorithm

The crystallization process lasts longer in lower temperatures (see Fig. 3). The crystallization process of AZP lasted 31 min, 56 min, and 162 min at temperatures of 343 K, 338 K and 333 K, respectively. One way to analyze the conversion degree from the liquid phase to the solid phase is by applying the Avrami equation [8]:

$$ D\left( t \right) = 1 - \exp \left( { - K\left( {t - t_{0} } \right)^{\rm n} } \right), $$
(4)

where n is the Avrami exponent (its value depends on the nucleation rate and dimensionality of the crystal growth), t0 is the induction time of crystallization, and K is constant, which depends on nucleation and crystal growth rate. The parameter n from Avrami Eq. (4) is dependent on the mechanisms of nucleation and crystal growth. For that reason, it reveals helpful information on the nature of the crystallization. Equation (4) can be given in the following form:

$$ \log ( - \ln \left( {1 - D\left( t \right)} \right) = \log K + n\log \left( {t - t_{0} } \right). $$
(5)

Then the parameters n and K can be determined from the slope and the intercept of the corresponding linear dependencies of log(− ln(1 − D(t))) vs. log(t − t0) from Eq. (5) (see Fig. 4). The details of Avrami equation fit to AZP degree of crystallinity are presented in Table 1. The values of n are about 2. The value of n is described by d-1, where d is the number of dimension [33]. This information suggests that the crystal growth is three-dimensional. The characteristic time of crystallization τCr is defined as the root of \(\mathrm{log}(-\mathrm{ln}\left(1-D(t)\right)\), i.e. \(\mathrm{log}(-\mathrm{ln}\left(1-D\left(t\right)\right)=0\), and, in other words, it is time needed to achieve 63% of crystallinity (for each temperature). One can see that the values of τCr decrease and parameter K increase with increasing temperature, which informs that the kinetics of cold crystallization of AZP depends primarily on diffusion rates [34, 35].

Fig. 4
figure 4

Avrami plots for AZP obtained with POM method in several temperature (343 K, 338 K and 333 K)

Table 1 Parameters estimated by Avrami model for isothermal cold crystallization of AZP at several temperatures obtained with POM data

Parameters from Avrami equation fitted to POM data have been compared to results of Avrami equation fit to AZP degree of crystallinity obtained from DSC measurements (see Figs. 57 and Table 2). Both methods show similar results. The differences, mainly, in the characteristic time of crystallization τCr of the same systems measured by various experimental techniques, i.e., POM (TOA) or DSC—result from the differences existing between their sample environments (for example, geometry and thickness – the samples for POM measurements are much thinner than for DSC).

Fig. 5
figure 5

DSC curves of AZP recorded in 347 K, 343 K and 339 K

Fig. 6
figure 6

AZP degree of crystallinity obtained with DCS method

Fig. 7
figure 7

Avrami plots for AZP obtained with DSC method in several temperature (347 K, 343 K and 339 K)

Table 2 Parameters estimated by Avrami model for isothermal cold crystallization of AZP at several temperatures

Conclusions

The crystallization time of aripiprazole depends on the temperature at which it occurs. The results of the degree of crystallization obtain from the thermos-optical analysis methods, Canny edge detection algorithm, and differential scanning calorimetry experiment are the same. Fitting the Avrami equation to data from polarized optical microscopy and differential scanning calorimetry yields similar values for the parameters n and K. The dimensionality of aripiprazole crystal growth is three-dimensional. The main difference between the TOA/POM and DSC methods is the time of the crystallization process, which is shorter in the calorimetric method.