{'fraction_non_alphanumeric': 0.032754046884305124, 'fraction_numerical': 0.008878782957067836, 'mean_word_length': 4.8474200696422916, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Mean-field parameters of some PrxTb(1-x)Al2 compounds found via searching for the best magnetic heat capacity fitting

Simulations of the magnetic heat capacity of some (Pr, Tb)Al2 compounds were performed using the mean-field approach. The developed routine aims to optimize the set of mean-field parameters. The proposed algorithm calculates the sum of squared differences between the experimental points and the simulated curve and then changes the parameters in order to minimize this sum. This searching leads to consistent values that can reproduce the experimental data. The parameters found in this work reproduced the heat capacities curves of the PrxTb(1−x)Al2 compounds, x=0.25, x=0.50 and x=0.75, with good agreement. The physical limitations of the mean-field approach do not preclude analysing the results. These parameters are important because they can help to understand and calculate the magnetocaloric effect these materials can present.


Introduction
The number of applications of magnetic materials in various areas is countless, ranging from traditional applications such as motors, generators and transformers, to data storage and magnetic cooling. For this reason, there has always been a search for explanations and predictions about the many physical properties that these materials may have.
The intrinsic magnetism in materials is closely linked to the ordering of their magnetic ions. The interaction between these ions directly implies whether or not the material has a certain type of magnetic ordering. This interaction is called exchange interaction and is present in materials where there is an abundance of magnetic ions. There are some aspects that influence the magnetic behavior in materials. These factors can be internal, such as the geometry of the crystal lattice, or external to the material, such as an applied magnetic field or even temperature.
The intermetallic rare earth-aluminum compounds (RAl2) have been investigated for many years, especially because of the interplay of crystal field and exchange effects, which prompt many magnetic properties. Among the set of potential applications these materials can provide are those related to elastic and magnetoelastic properties, information storage technology devices, magnetic random access memory, and magnetic field sensors and magnetocaloric refrigeration. A peculiarity of these materials is that they are ferromagnetic. However, if the rare earth ion R is partially replaced by another R', the magnetic coupling between them may be different. In case R and R' are both heavy or light rare-earths, the coupling remains ferromagnetic, but if one of them is heavy (higher atomic number) and the other light (lower atomic number), the coupling will be antiferromagnetic. An example of these materials is the (Pr,Tb)Al2 family, which are ferrimagnetic. Even with the replacement of the praseodymium ion, the light-rare earth, by the terbium ion, the heavy rare-earth, the crystalline structure of the compound remains unchanged. Furthermore, the fact that the aluminum ion, which has the same valence as the rare-earth ions, does not have unpaired electrons favors and simplifies the analysis. These peculiarities cause several physical properties to be similar. There really are not relevant changes observed in some properties of these materials, mainly those that depend only on the chemical bond, such as the melting point. Additionally, some other material characteristics of this RAl2 series seem to uphold a linear behavior as a function of the R ion, i.e. its atomic radius.
The high number of magnetic ions makes a direct approach to the interactions present in the physical system difficult, since the manipulation and solution of the system's Hamiltonian using the Heisenberg model has a high computational cost. In this way, the mean field approach becomes interesting, as it provides a simplified solution that allows a macroscopic description of the system.
In this work, the mean field approximation was applied to assemble the Hamiltonian of the system PrxTb(1-x)Al2, with x = 0.25, 0.50 and 0.75. It was solved self-consistently in order to obtain the eigenvalues and eigenstates to determine magnetization and entropy curves. From these simulations, magnetic specific heat curves were calculated and compared with experimental data. This comparison was made numerically using the sum of squared differences between these curves. The routine used to find the best set of mean field parameters looked for a set such as to reduce the absolute differences. The results obtained proved to be quite satisfactory.

Theoretical Background
Starting from the molecular field (or mean-field) approach, it can be assumed that the Pr and Tb ions arrange in two sublattices. As mentioned before, the coupling between light and heavy rare-earths in these compounds designed with Al2 is antiferromagnetic. However, these sublattices are responsible for the material being ferrimagnetic, which means the total magnetization is non-zero. In fact, if these two sublattices had the same behaviour with the temperature, there would be a fraction of Tb replacing Pr ions, in which the total magnetization would be null, making the material being antiferromagnetic. Anyhow, it is possible to describe the system into two Hamiltonians, one for each sublattice, and the physical properties considered in this work are calculated respecting the fractions of Tb and Pr in the compounds.
In the Equations (1) and (2) above, 〈 〉 and 〈 〉 are the mean thermodynamic values of the total angular momentum operators ̂ and ̂, and they characterize the mean-field. The first therms represent the interaction between the magnetic ion and its mean-field, i.e. both the same kind. The second therms are related to the interaction between the magnetic ion and the mean-field produced by the different ions, the intersublattices interaction. The molecular field parameters that provide the intensities of these interactions are , and , . Here in this work, it is considered the 〈001〉 direction, i.e. the direction, as the easy axis. The last therms are the crystal field Hamiltonians. For 3 these systems, Ĥ and Ĥ are written using fourth and sixth-order terms in the Lea-Leask-Wolf notation [1].
In Equation (3), = or . The parameter represents the influence of the crystal field, is the ratio between the fourth and sixth terms. Still in this equation, 4 0 | , 4 4 | , 6 0 | and 6 4 | are the Stevens operators and, finally, 4 and 6 are tabled constants defined by Lea-Leask-Wolf [2], again, for each sublattice. As mentioned before, the crystal structure of these compounds exhibit an interesting behavior. Rare-earths have very close atomic radius values. Furthermore, the valence of these ions is, usually, the same (3+). This helps to explain why all RAL2 compounds has the same cubic structure as the Cu2Mg compound type (space group 3 ̅ ). Thus, it is expected that there will be no significant changes in the unit cell, except for the expected variations in the values of the network parameters. In this arrangement, the rare-earth element always occupies the same atomic sites. Because of this configuration, only two parameters are needed for the crystalline field ( and ). In order to proceed solving the Equations (1) and (2), diagonalizing the matrixes, it is necessary to input the mean values 〈 〉 and 〈 〉. However, these averages of the component of the total angular momentum are calculated by the expressions below.
The Equation (5), , is called Partition Function, = 1⁄ and is the Boltzmann constant. As one can see, to calculate 〈 〉, Equation (4), it is necessary to know the eigenenergies , and the eigenstates | , ⟩. This is why the whole calculation is based on a self-consistent approach, which is performed until 〈 〉 converge.
Once found , and | , ⟩ for each sublattice, it is possible to obtain the magnetization components by = 〈 〉. Here, are the Landé factors and is the Bohr magneton. Besides, the magnetic entropy of each sublattice are obtained from the expression below [3].
The total magnetization is obtained considering the contributions of the two sublattices, such that = + (1 − ) . In the same way, the total entropy for the TbxPr1-xAl2 compounds was calculated by = + (1 − ) . The magnetization curves helps to calculate the magnetic transition temperature in order to compare to the experimental values. From entropy curve, it is possible to calculate other physical properties, as the magnetic heat capacity [4]: With the view to compare the simulated points with the experimental data, it is necessary to separate the thermal capacity components. The total entropy can be seen as the sum of the magnetic, electronic and lattice parts, i.e. = + + . The heat capacity lattice and electronic components are non-magnetic parts and can be obtained from linear functions of the data of non-magnetic compounds LaAl2 and LuAl2 data, as described in relation 103 in Ref. [3]. As stated before, several properties of this family of compounds behave in a linear shape and the most significant change in the crystal lattice is the unit cell parameter. In fact, considering the position of the rare earth in the lanthanides series (La, Ce, Pr, Nd, Pm, Sm, Eu, Gd, Tb, Dy, Ho, Er, Tm, Yb, Lu), where ranges from in 0 to 14, one can find a linear tendency of lattice parameter as a function of [5][6][7][8][9][10][11][12][13][14][15][16]. As atomic number and radius are closely related, this linear pattern is expected. Besides, the magnetic transition temperature also behaves linearly. Thus, it seems reasonable calculate + = + of a RAl2 compound using a linear regression from LaAL 2 e LuAL 2 data ( = 0 and = 14, respectively). This idea was proposed by Oliveira e Von Ranke [3]. From that, it was possible to separate the magnetic heat capacity component from the total function and use this curve to compare with simulated points.

Computational Approach
In order to perform the Hamiltonian calculations, equations (1) and (2), following the self-consistent process, and to obtain the physical quantity of interest, equation (7), it was developed a computational algorithm that aims to streamline and optimize the achievement of results. For these calculations it is necessary to adjust the molecular field parameters and the crystal field parameters. This task can be laborious if the manual adjustment of the result of each parameter is considered, visually comparing the simulated curve with the one obtained by the experimental data. Thus, optimizing this process, the algorithm starts from a set of initial parameters, and searches for the one that best fits the magnetic component of the heat capacity compared to the experimental data. Hence, this algorithm tends to seek a set of parameters that optimize the simulated curves, confronting them with the experimental data.
As a starting point, a set of input parameters is needed. From those, the algorithm performs the calculations and checks the results. The scheme that exemplifies the calculations performed in each step is organized in the pseudocode shown in Figure 1. The loop 3 is reated to the self-consisted method, which runs untill 〈 〉 converges. The verification is carried out following the criterion of the smallest average deviation in the curves and an acceptable deviation in the transition temperature , initially established. To calculate the average deviation, we use the following relationship, where is a point [ , ( )] for each temperature untill the N th point: If the result presents values within the established criteria, i.e. it is a minimal within the other previously tested sets, the algorithm takes this set as the central point of new searches and tests new values in the vicinity of this set, within a predetermined search interval. Thus, it looks for new values that can optimize the results considering the surroundings of those already found. Therefore, in each iteration, the algorithm randomly selects new parameter values within the acceptable range around the best found values and repeats the process a set number of times. To ensure there are no redundancies in the process, all tested sets are stored to avoid repeated testing. Also, there is an iteration counter, defined in advance, which limits the execution of the code and guarantees that there are no infinite loops. The stopping criterion for the algorithm was stipulated as the total number of iterations, considering that the convergence and the results were satisfactory. Figure 2 presents a flowchart of the algorithm that synthesizes these ideias. This is a process that has a fast convergence, as the search is always centered on the parameters that present the best results.  Before starting the searches, an initial set of values is necessary for the algorithm. Hence, to search for a value that best fits the experimental curve can be performed. For the first step, it was assume that the molecular field parameters have a linear trend. Families of similar compounds have linear trends in some of their characteristics [3]. Based on this, it was assumed a linear behavior between PrAl2 and TbAl2 parameters in the molecular field parameters as a starting point. To obtain these values, initially, we take the data presented in the Ref [5] for the extremes of the series, = 0.00 and = 1.00. In this process, it was firstly made a visual comparison between the simulated curves and experimental data by adjusting the parameters. After this step, we obtained three sets of parameters: the extremes of the series and for the concentration = 0.50. With these data, the algorithm can find the other parameters considered linear for the other concentrations. For the crystal field parameters, it was consider the input data to be the extremes of the series obtained in Ref [5].
This algorithm and processes were applied in two steps: initially it was searched for the molecular field parameters, keeping the crystal field parameters fixed; with the obtained results, it was kept the molecular field parameters fixed and searched for the crystalline field parameters. Data analysis and algorithm implementation were performed using MATHEMATICA Software from Wolfram Research, Inc.

Results and Discussion
It were simulated the magnetization and heat capacity curves as a function of temperature choosing the best set of parameters, listed in Table 1. The magnetization simulated points served to calculate and verify the magnetic transition temperature . The routine began with the parameters of the pure compounds PrAl2 and TbAl2 [5], then improving the simulations by changing the parameters. In Figure  3, it is possible to observe the behavior of these mean-field parameters. The coupling parameter of the sublattice designed by the ions Pr, , and the crystal field parameter, , also of the sublattice of the ions Pr, had a behavior that deviates from the linear shape. The other energy parameters exhibited a behavior with a linear trend in relation to the concentration of Tb, . The mean-field parameter also present a linear shape as funcion of concentration . However, displayed no trend. Still about the parameters values, those found for = 0.25 compound are very close to those calculated before [17]. However, Tedesco et al. used (1) and (2) related to quadrupolar interaction. They used inelastic neutron scattering technique to justify this extra therm. It can explain some differences between their values and those from the present work.

an extra interaction in Equations
It is worth mentioning that two of these pseudobinary compounds, with = 0.25 and = 0.30, had the Exchange Bias Like-Effect [18]. This effect is associated with a strong anisotropy existing in these compounds and occurs at very low temperatures. At concentrations close to = 0.26, the sublattices show large competition. In this situation, polarized conduction electrons play a very important role in the magnetization of the compounds. Starting from higher temperatures, these electrons couple with the magnetic moments of the Tb ions, which tend to order at higher temperatures than the Pr ions.    When the temperature is reduced, a compensation temperature can be observed at some point. Compensation temperature is understood as the temperature where total magnetization is null. By further reducing the temperature, some of these compounds can still show negative magnetization, another effect of the strong anisotropy presented in these compounds. The mechanism that explain this behavior is not yet fully understood. There is still a lot of information and characteristics to be extracted from this (Tb-Pr)Al2 system.
A good agreement between the experimental data and the theoretical model was obtained, as can be seen below in Figure 4. However, there are some mismatches between the simulated and experimental data, mostly in = 0.75 compound, which present a larger difference between experimental and simulation around 90 K and just after the abrutp decrease in values around 100 K. It can be happening probably due to the mean-field approximation, which does not take into account spin fluctuations. In addition, the model considers only one magnetic domain, while our compounds are multi-domain systems.

Conclusions
In this work, simulations of the magnetic component of the heat capacity of some (Pr,Tb)Al2 compounds were presented using the mean-field approach, well-known in the literature. The developed routine pursues to optimize the set of parameters present in the theoretical model necessary for provide the simulations, starting from published values for the RAl2 compounds. The proposed algorithm seeks to minimize the sum of squared differences between the experimental points and the simulated ones, leading to consistent values that reproduce the experimental data. This search algorithm can be very useful, considering that it can be extended to other simulations that require such a process.
The parameters found in this work reproduced the heat capacities curves of the PrxTb(1-x)Al2 compounds, with = 0.25, = 0.50 and = 0.75, with good agreement. Even with the physical limitations existing in the adopted model, it was possible to analyze results, proving that this model can bring numerous advantages in the analysis of the quantities explored in these compounds. These curves are of interest, as they can help to understand the magnetocaloric effect present in these materials.