INTRODUCTION

Ni–Cr-based alloys, e.g., Inconel grades, bond-coat NiCrAlY, and Ni–Cr-based multiprincipal-element alloys, are deployed in diverse applications owing to their superior thermodynamic and kinetic stabilities, mechanical properties, and resistance against environmental attack1,2,3,4,5,6,7,8,9,10,11,12. Their additional irradiation resistance makes them the preferred metals used in modern nuclear-power reactors13,14,15,16. In addition, Cr also has its special significance in light-water reactors, because the Cr coating may prohibit the catastrophic catalytic reaction between Zr-based nuclear fuel cladding and environmental water17,18,19. It is the native oxides, hydroxides, and (oxy)hydroxides spontaneously formed on alloy surfaces that offer protection to the metal components from environmental degradation. For example, the corrosion resistance of Ni–Cr alloys is mainly endowed by the passivating oxides, e.g., Cr2O3 and NiO. Furthermore, the related metals and (hydr)oxides find other versatile applications in solid-oxide fuel cells, lithium-ion batteries, catalysis, biomedicine, and resistive logic devices20,21. The stability of these materials and devices under many working environments (e.g., humid air and aqueous solutions) will determine their performance and lifetime.

Elemental partitioning in bulk alloys found after certain thermal processing cycles is a ubiquitous phenomenon that can be exploited to tune physical properties; nonetheless, it may also bring some adverse effects on the corrosion resistance of alloys if uncontrolled. The composition bipartition of a Ni–Cr alloy (xCr = 59 at%) into the Ni-rich (γ-Ni phase) and Cr-rich (α-Cr phase) regions after both casting and annealing processes (Fig. 1a) has recently been clearly characterized and controlled by Miller et al.22. The correlation between (local) alloy composition and surface corrosion resistance is well exemplified by the electrochemical measurements by Xie et al.23 on the anodic dissolution of Ni–Cr alloys (with 0–24 at% of Cr) in 0.1 M H2SO4 solution. Linear sweep voltammetry measurements show that the polarization current density decreases by two orders of magnitude when xCr reaches the critical value of 13 at% (Fig. 1b). This result has been explained with percolation theory23,24, whereby upon selective dissolution of Ni, xCr approaches the two-dimensional percolation threshold above which a well-linked “-Cr–O- network” forms and then sharply improves the surface passivation. As further indicated by Fig. 1b, the corrosion resistance of Cr2O3 is superior to that of NiO because more Cr replacing Ni (i.e., more Cr2O3 to form on alloy surface) leads to the decreased current density (i.e., enhanced corrosion resistance). Duarte et al.25 have also observed another kind of composition–corrosion correlation in the glass-forming Fe50Cr15Mo14C15B6 steel (with a glass transition temperature at 550 °C), where Fe, Cr, and Mo are distributed homogeneously in the as-quenched amorphous sample (Fig. 1c), and a conformal Cr-based passivating film provides passivity in the 0.1 M H2SO4 solution (Fig. 1d). However, this amorphous steel has the onset first and second crystalization temperatures at 602 and 641 °C, respectively, thus as the annealing temperature increases from 550 up to 800 °C (for 20–60 min), the elemental partitioning driven by the favored formation of both Cr-rich (Fe,Cr)23(C,B)6 and Cr-depleted η-Fe3Mo3C phases gradually increases. The Cr-depleted areas then exhibit preferentially higher dissolution of Fe and Mo, largely activated by the formation of Cr-poor phases that begin at a temperature of ~650 °C and continue for higher temperatures. This results in a sudden rise of polarization current density (Fig. 1d).

Fig. 1: Experimental characterizations of the thermodynamic and electrochemical behaviors of Ni–Cr alloys and Fe–Cr–Mo–C–B steel.
figure 1

a, c The characterization results by scanning electron microscopy plus energy dispersive X-ray spectroscopy (SEM-EDS) and atom probe tomography (APT) revealing the elemental partitionings in a Ni–Cr alloy (scale bar: 500 nm)22 and a Fe–Cr–Mo–C–B steel (scale bar: 20 nm)25. b, d The composition dependence of polarization current density for Ni–Cr alloys23 and annealing-temperature dependence of the polarization current density for Fe–Cr–Mo–C–B steel25. The electrochemical measurements in (b) and (d) are both carried out in 0.1 M H2SO4 solution (pH ≈ 0.88). Figures are adapted with permissions from Elsevier Limited22, Springer Nature Limited23, and the American Association for the Advancement of Science25.

To guide the precise heat-treatment process toward superior corrosion resistance of Ni–Cr alloys, it is essential to establish an accurate understanding of the driving forces for the elemental partitioning in Ni–Cr alloys and their electrochemical behaviors. In recent decades, Ni–Cr alloys have been studied using both experiment and theory, however, an accurate quantitative understanding of their thermodynamic and electrochemical behaviors is still limited. For the thermodynamic stability of Ni–Cr alloys, their free energies of formation (ΔfG) were obtained in previous theoretical studies by fitting the experimentally determined phase boundaries26,27,28,29. To establish a deeper thermodynamic understanding, it is still desirable to accurately deterimine the individual contributions of different components (e.g., electronic energy, vibrational free energy, and configurational entropy) in those fitted ΔfG values. Many first-principles calculations have also been carried out to reveal the thermodynamic properties of Ni–Cr alloys30,31,32,33,34,35. However, their systematic composition- and temperature-dependent ΔfG values are still lacking and necessitate further high-fidelity calculations to facilitate precise understanding of many thermodynamic behaviors. Furthermore, an accurate electrochemical understanding of Ni–Cr alloys remains incomplete owing to the inaccuracy or even absence of the ΔfG values for many oxidation and corrosion products36,37, as discussed next. Obtaining accurate thermodynamic and electrochemical results is also a prerequisite for reliably analyzing the correlation between composition, heat treatment, and corrosion resistance for Ni–Cr alloys.

Pourbaix diagrams can be used to efficiently map the electrochemical stabilities of metals, oxides, and (oxy)hydroxides in terms of solution pH and electrode potential36,38. Such electrochemical stability can also be compared with atmospheric stability, which can help establish a comprehensive understanding of the interaction of alloys with their environments. The construction of a Pourbaix diagram requires the ΔfG values of all the involved species (metal, compounds, and aqueous ions) as input. The ΔfG values for many oxides and (oxy)hydroxides estimated in the experiment may turn out to be inaccurate due to many unavoidable technical and physical issues (e.g., defect contamination, mass loss, uncontrollable temperature, and reaction byproducts) associated with measurement techniques based on combustion and dissolution20,36,37. In various thermodynamic databases, the experimental ΔfG values per formula unit (f.u.) for some important transition-metal oxides may exhibit large uncertainties (e.g., 0.5 eV per f.u. for NiO and 1.6 eV per f.u. for Co3O4), and the ΔfG values for some are also unavailable (e.g., Cr3O4)37. It is these complexities that have led to the disagreement between some derived Pourbaix diagrams and various direct electrochemical characterizations36,37. Alternatively, first-principles calculations based on density-functional theory (DFT) can be used to solve this long-standing problem36. High-fidelity calculations using exact nonlocal exchange potentials can be used to obtain accurate ΔfG values, from which reliable Pourbaix diagrams for transition-metal systems can be constructed and validated36,37,39,40. The first-principles Poubaix diagrams for transition metals have also been widely referred to by many recent electrochemical experiments in the fields of, e.g., corrosion41,42,43,44,45, catalysis, and energy46,47,48,49,50,51,52,53,54, where these diagrams guide the design and characterization of many related materials, and even have been applied to understand geological processes (rock weathering in acid rains) on both the ancient Earth and Mars55,56.

Here we formulate an ab initio thermodynamic model, which includes the essential vibrational entropy of the alloy, to obtain the temperature- and composition-dependent ΔfG values for Ni–Cr alloys. The thermodynamic results allow us to explain the experimentally observed elemental partitioning and phase transformations induced by different heat treatments. We show that DFT calculations using hybrid functionals are required to obtain accurate ΔfG values for Ni- and Cr-based oxides, hydroxides, and oxyhydroxides, as well as their binary-metal oxides (NiCr2O4 and NiCrO4), from which we further construct reliable Pourbaix diagrams for Ni–Cr alloys. After having individually established the highly accurate thermodynamic and electrochemical descriptions for Ni–Cr alloys, we then explain various experimental passivation and corrosion behaviors of related alloys, demonstrating a correlation between elemental partitioning and corrosion resistance, as well as the utility of the model. We conclude by describing how the thermodynamic and electrochemical mechanisms revealed from our study can rationalize the empirical design of various industrial Ni–Cr alloys.

Results and discussion

Structures and magnetism of Ni1−xCrx

Elemental Ni exhibits ferromagnetism within a face-centered-cubic structure (FM-FCC), whereas elemental Cr exhibits antiferromagnetism within a body-centered-cubic structure (AFM-BCC). With increasing Cr content (xCr) in the Ni1−xCrx solid solution, the magnetism-structure configuration will continuously transform from FM-FCC to AFM-BCC, with the intermediate configurations having distorted atomic structures and disordered spins. To capture such transformations in our DFT calculations, we need to utilize a supercell model that can accommodate both the FCC and BCC structures. To that purpose, we use the bainite transformation path, which has been proposed as the preferred BCC-FCC transformation path for many transition metals (e.g., Ni–Cr alloys and steels)30,31,57,58,59,60, to connect the BCC and FCC lattices (Fig. 2a) by using a tetragonal bainite strain61 given as

$${\varepsilon }_{{{{\rm{B}}}}}=\left(\begin{array}{ccc}\epsilon &0&0\\ 0&\epsilon &0\\ 0&0&-\frac{\epsilon (\epsilon +2)}{{(1+\epsilon )}^{2}}\end{array}\right),$$
(1)

where the parameter ϵ equals 0 and −0.109 at the BCC and FCC ends of the path, respectively, and the FCC lattice derived from the BCC one is expressed by the body-centered-tetragonal (BCT) cell (see Fig. 2a). To construct the initial atomic structures of the Ni1−xCrx solid solutions for our DFT calculations, we first generate a sufficiently large BCC supercell (4 × 4 × 4, 128 atoms) to accommodate the randomly placed Ni and Cr solutes. Then, we use the bainite strain to transform the BCC supercell into a BCT one, as plotted in Fig. 2a and Supplementary Fig. 1. This use of the bainite path is an effective structural modeling approach, because the FCC (BCT) and BCC lattices are treated equally as the initial structures at any solid-solution composition, and the spontaneous supercell distortions occurring during their DFT optimizations can help us obtain a sufficiently large ensemble of random lattice distortions in an unbiased way. The pair distribution functions of all the optimized structures (Fig. 2b) clearly show that both initial FCC and BCC supercells can lead to the correct alloy-structure variation and a common structural transition at xCr ~ 62.5 at%. Such structural transition is also simultaneously reflected by the calculated electronic energies of formation (Ef) of Ni1−xCrx (Fig. 2c), which further validates our structural modeling approach. In addition, the Ef values of Ni1−xCrx calculated using the 2 × 2 × 2, 3 × 3 × 3, and 4 × 4 × 4 supercells are compared in Supplementary Fig. 2, where the converged composition-dependent profile validates the high accuracy of a 4 × 4 × 4 supercell.

Fig. 2: The composition-dependent atomic structure and electronic energy of Ni–Cr alloys.
figure 2

a The bainite transformation path between FCC and BCC unit cells, b the pair distribution functions of the structures of Ni–Cr alloys calculated from the initial FCC (BCT) and BCC supercells, and c the calculated electronic energies of formation (Ef) and their thermal averages (\({\langle {E}_{{{{\rm{f}}}}}\rangle }_{T}\)).

For each composition in a specific initial configuration (BCC or BCT), we generate six random solute distributions in the supercell to mimic the realistic Ni1−xCrx solid solution. We also set FM and two AFM states as the initial magnetic configurations. In one AFM state, Ni atoms have the spin polarization reverse to that of the Cr atoms, and in another AFM state, the two inequivalent sites of the BCC lattice have the reverse spin polarizations. Therefore, for each composition sampled in the Ni1−xCrx space, we create 36 random magnetism-structure configurations to treat the magnetic disorder and structural distortions. When comparing the Ef values based on the random-supercell model here to the previous results based on a cluster-expansion (CE) model (in small BCC/FCC supercells ≤16 atoms, see Supplementary Fig. 2)62, it is clear that the CE Ef values exhibit larger energetic scattering than those obtained by our approach. This may be due to the difficulty of the CE model in treating the mutually coupled disordered magnetism and distorted lattices in solid solution Ni1−xCrx. Note that we focus exclusively on the solid-solution phase because it is the most relevant phase in experimental samples; the possible precipitation of ordered Ni2Cr is omitted from further consideration because of its minor chemical role and debatable stability22.

Free energies of formation for alloys and compounds

The ΔfG of a Ni1−xCrx alloy is defined as the free-energy change associated with the mixing of elemental Ni and Cr into a random alloy, as expressed by

$${{{\Delta }}}_{{{{\rm{f}}}}}G={E}_{{{{\rm{f}}}}}+{{\Delta }}{\tilde{F}}_{{{{\rm{e}}}}}+{{\Delta }}{F}_{{{{\rm{vib}}}}}-T{S}_{{{{\rm{c}}}}},$$
(2)

where the electronic energy of formation Ef is derived using the electronic energies obtained from DFT calculations; \({{\Delta }}{\tilde{F}}_{{{{\rm{e}}}}}\) is the contribution from electronic excitations at a finite temperature63,64,65; ΔFvib is the vibrational free energy contribution as calculated using a Debye model designed below; Sc is the configurational entropy for the atomic distribution in a solid solution and brings an energetic contribution of − TSc (\(={k}_{{{{\rm{B}}}}}T{\sum }_{i}{x}_{i}\cdot \ln {x}_{i}\), i = Ni and Cr)66. To better model the realistic Ni1−xCrx solid solutions with fully random magnetism-structure configurations, Ef here is replaced by its thermal average \({\langle {E}_{{{{\rm{f}}}}}\rangle }_{T}\) (see Supplementary Fig. 3 for more details) over all the 36 considered magnetism-structure configurations at each composition. The calculated temperature-dependent \({\langle {E}_{{{{\rm{f}}}}}\rangle }_{T}\)xCr curves are shown in Fig. 2c.

For a solid compound Ni\({}_{{m}_{1}}\)Cr\({}_{{m}_{2}}\)O\({}_{{n}_{1}}\)H\({}_{{n}_{2}}\), its standard ΔfG is expressed by37

$${{{\Delta }}}_{{{{\rm{f}}}}}G={E}_{{{{\rm{f}}}}}+{{\Delta }}{\tilde{F}}_{{{{\rm{e}}}}}+{{\Delta }}{F}_{{{{\rm{ph}}}}}-\frac{{n}_{1}}{2}{g}_{0}({{{{\rm{O}}}}}_{2})-\frac{{n}_{2}}{2}{g}_{0}({{{{\rm{H}}}}}_{2}),$$
(3)

where the elemental metals and standard molecular gases (i.e., O2 and H2, 1 bar) are the reference systems; ΔFph is the contribution of vibrational free energy derived from phonon spectra; g0 is the free-energy change of a reference gas from 0 K to the targeted temperature as measured by experiment67. The relevant compounds include many mono-metal oxides (NiO, NiO2, Cr2O3, and CrO2) and (oxy)hydroxides (Ni(OH)2, NiOOH, and CrOOH), as well as two binary-metal oxides (NiCr2O4 and NiCrO4).

In the calculations of alloy ΔfG values by Eq. (2), the Fvib values of Ni–Cr alloys and elemental metals (Ni and Cr) are derived by using an efficient Debye model designed here (see the next section). It is practically unfeasible to carry out computationally expensive phonon calculations for the large 4 × 4 × 4 alloy supercells. However, the phonon spectra are calculated to derive the compound ΔfG values by Eq. (3). The accuracy of the Debye model will be clearly validated (in the following two sections) by the comprehensive theory-experiment comparisons on Debye temperature, ΔfG values, xT phase diagram, and elemental segregation behaviors for Ni–Cr alloys. In addition, the Fvib values for elemental metals derived from both the Debye model and phonon spectra are further compared in the Supplementary Information (see Supplementary Fig. 5), which also indicates a very small energetic deviation (8–19 meV) at regular heat treatment temperatures (600–1500 K). Furthermore, the effects of thermal expansion and magnetic thermal excitations are both neglected in the alloy and compound ΔfG values because their calculations will demand complicated and expensive first-principles procedures64,68,69,70. Such simplifying treatment can largely upgrade the efficiency of ab initio thermodynamic and electrochemical calculations here, with the numerical accuracy for alloy and compound ΔfG values being safely guaranteed, which has also been discussed in detail in the Supplementary Information (Section C). The allowability of such simplification for a ΔfG expression benefits from the cancellation between the thermal-expansion (and magnetic-excitation) effects in an alloy/compound and its reference elements (by Eqs. (2) and (3)).

The theoretical method to construct a Pourbaix diagram using these ΔfG values as input is described in detail in the Supplementary Information (Section I). Summarily, the relative chemical potentials of all the involved species are calculated based on the reaction paths connecting them, and a Pourbaix diagram can be obtained when all the most stable species at different electrochemical phase spaces (in terms of solution pH value and electrode potential) are determined36,37.

Debye model designed for Ni1−xCrx

It is computationally challenging to calculate the Fvib (in Eq. (2)) for a large alloy supercell with random magnetic solutes. The combination of DFT and a Debye model provides an efficient option that has been widely used to study various metals, including Ni, Ti, Fe, and Ni3Al71,72,73,74,75. In the Debye model, Fvib is expressed in terms of a Debye temperature (ΘD), i.e., \({F}_{{{{\rm{vib}}}}}={k}_{{{{\rm{B}}}}}T\left[\frac{9}{8}\beta +3\ln (1-{e}^{-\beta })-D(\beta )\right]\), where β equals ΘD/T, and D(β) is the Debye integral expressed by \(D(\beta )=\frac{3}{{\beta }^{3}}\int\nolimits_{0}^{\beta }{x}^{3}/({e}^{x}-1)dx\) (see the Supplementary Fig. 4). The accuracy of a Debye model is largely determined by the value of ΘD, which is expressed as

$${{{\Theta }}}_{{{{\rm{D}}}}}=f(\nu )\cdot \frac{\hslash }{{k}_{{{{\rm{B}}}}}}{(6{\pi }^{2}{V}^{\frac{1}{2}})}^{\frac{1}{3}}\cdot \sqrt{\frac{B}{m}},$$
(4)

where V and m are the volume and mass per atom, respectively; ν and B are the Poisson’s ratio and bulk modulus, respectively. The ν in the Voigt–Reuss–Hill (VRH) approximation for polycrystalline alloys can be used to derive the coefficient f(ν)72,76 as

$$f(\nu )={\left\{3{\left[2{\left(\frac{2}{3}\frac{1+\nu }{1-2\nu }\right)}^{3/2}+{\left(\frac{1}{3}\frac{1+\nu }{1-\nu }\right)}^{3/2}\right]}^{-1}\right\}}^{1/3}.$$
(5)

To further simplify the Debye model, Moruzzi et al. have used an approximated constant of 0.617 for the coefficient f(ν) 71. We denote these two Debye models as the VRH model and Moruzzi model, respectively.

We approximate the alloy volume and bulk modulus in Eq. (4) by their equilibrium values (V0 and B0), which can bring additional computational convenience while maintaining accuracy, as shown in the following. The B0 values are derived from the equation of states (EOS) calculated by DFT, and the results for Ni1−xCrx structures optimized from both the initial BCC and BCT supercells are shown in Fig. 3a. The average of these two groups of B0 values is used to derive the ΘD at each composition. The computational challenge to obtain a well-defined EOS here is clearly shown by the inset in Fig. 3a, where the disordered and itinerant magnetism, as well as its strong coupling with the lattice, gives a large scatter to the energies. To reduce the large variance, we examine many different initial magnetic configurations and volumes. We then perform a high-quality EOS fitting after obtaining a sufficient number of electronic energies (in solid circles) exactly residing on the convex-hull line. From both Fig. 3a and Fig. 2c, we find that the average B0 has a chemical trend that generally reverses to that of Ef, i.e., the stiffness of solid-solution Ni1−xCrx tends to decrease with increasing its Ef (decreasing its phase stability). This behavior reflects a generic relationship between alloy stiffness and phase stability, which has also been observed by Maisel et al. in Ni–Ta/W/Al and Cu–Al alloys77.

Fig. 3: The calculated parameters for the designed Debye model.
figure 3

a The calculated bulk moduli (B0) using equilibrium alloy volumes and (inset) an example of EOS fitting for Ni1−xCrx with xCr = 12.5 at%. b The fne curve derived from the νne curve (inset) that is fitted based on the experimental data for Ni, Cr, Ni–Cr–Fe, Fe–Ni/Cr/Co/Mn, and Fe–Cr–Mn/Co/Ni78,79,80,81,82,83,84,85. c The calculated Debye temperatures (ΘD) from the VRH and Moruzzi models, compared with experimental data for Ni, Cr, Ni–Cr, Ni–Cr–Fe–(Mo/Cu/Mn), and Fe–Ni–Cr79,80,86,87,88.

Usually, elastic constants can be obtained by fitting the corresponding energy-strain relationships61, and then be used to derive ν and f(ν). However, as the inset in Fig. 3a shows, large energetic scattering occurs with variable strain owing to the irregular changes of disordered spins. This makes it computationally challenging to obtain a well-defined energy-strain relationship. Rather than using this approach, we collect the reported experimental ν values for various Ni–Cr and Fe-based alloys (Ni–Cr, Ni–Cr–Fe, Fe–Ni/Cr/Co/Mn, and Fe–Cr–Mn/Co/Ni) that have similar lattice structures and electronic structures78,79,80,81,82,83,84,85, and then fit the variation of ν with respect to the number of valence electrons (ne), as shown in the inset to Fig. 3b, to obtain an accurate f(ν). We then use this νne relationship to derive the fne curve (by Eq. (5)), which, as we show describes well the chemical trend in the experimental f values for elemental metals (Ni and Cr) and the Ni–Cr, Fe–Ni, and Fe–Cr alloys (Fig. 3b). The average B0 values and f coefficients obtained are then finally used to compute the ΘDxCr relationships for both VRH and Moruzzi models. From Fig. 3c, we find that the VRH ΘDxCr curve accurately agrees with many reported experimental data for Ni–Cr, Ni–Cr–Fe, and Fe–Ni–Cr alloys79,80,86,87,88. However, the Moruzzi model underestimates ΘD by 70–210 K because f = 0.617 is lower than the actual values (0.73 ≤ f ≤ 0.94). The comparison between VRH and Moruzzi ΘD values (Fig. 3c) can help us quantitatively understand the importance of composition dependence in both B0 and f for the accurate prediction of ΘD.

Thermodynamic stability of Ni1−xCrx

We now use the accurate ΘD values from the VRH model and Eq. (2) to calculate the composition- and temperature-dependent ΔfG values of the Ni1−xCrx solid solutions (Fig. 4a). We further decompose the individual energetic contributions from the electronic energy of formation (\({\langle {E}_{{{{\rm{f}}}}}\rangle }_{T}\)), electronic excitations (\({\tilde{F}}_{{{{\rm{e}}}}}\)), atomic vibrations (Fvib), and configurational entropy (−TSc) at two representative temperatures (900 K and 1500 K, Fig. 4b). Decompositions of ΔfG at other temperatures are shown in the Supplementary Fig. 6. We find that the ΔfG values are all positive at temperatures of 200 K, and the positive \({\langle {E}_{{{{\rm{f}}}}}\rangle }_{T}\) plays the deterministic role in the unfavored thermodynamic stability of Ni–Cr solid solutions at very low temperatures. Temperatures 600 K are more relevant for metallurgical processing; here, we find that the ΔfG curve shifts monotonically to lower energy upon heating (Fig. 4a), mainly due to the negative energetic contributions from configurational and vibrational entropies (Fig. 4b). The low-xCr part of the ΔfG curve (xCr ~ 10 at%) firstly becomes negative at temperatures of 200 K, and the high-xCr part (xCr ~ 75 at%) only becomes negative at temperatures of 1000 K.

Fig. 4: The composition-dependent thermodynamic energies and phase diagram of Ni–Cr alloys.
figure 4

a The free energies of formation (ΔfG) of Ni–Cr alloys with experimental data26,27 at 1500 K provided for comparison. b The ΔfG components at 900 K and 1500 K, and c the two equilibrium states at 900 K and 1500 K. d The DFT simulated Ni–Cr composition-temperature phase diagram with the two-phase boundaries calculated here compared to the corresponding two experimental boundaries27.

Two groups of experimental ΔfG values at 1500 K are also provided in Fig. 4a, which are converted from the original data at 1550 K and 1423 K26,27, respectively, using the ΔfGT relationship established here (see the Supplementary Fig. 7 and Supplementary Table 1 for details). Although the same phase transformation measurements have been referred to for the analytical fittings, these two groups of experimental ΔfG data have a difference of 40–50 meV per atom. Our first-principles ΔfG values at 1500 K reside well between these two groups of ΔfG values at xCr 40 at%, above which the elemental partitioning tends to be triggered in Ni1−xCrx and influences the accuracy of previously fitted energies. Furthermore, we can readily identify two equilibrium states from the first-principles ΔfG curves. We analyze these two equilibrium states at different temperatures by fitting the ΔfG data using parabolic curves, for which the fitted curves and corresponding convex hulls at 900 K and 1500 K are shown in Fig. 4c (see Supplementary Figs. 8 and 9 for more fitting and analysis results). We denote the major state at a lower xCr (40 at%) as State I, and the second state at a higher xCr (65–80 at%) as State II. The equilibrium ΔfG of State I becomes negative at temperatures  200 K, and its equilibrium xCr increases from 0 to 36 at.% with increasing temperature from 200 to 1800 K (see Supplementary Fig. 9 for more details). The equilibrium ΔfG of State II only becomes negative at high enough temperatures of 1000 K, and its equilibrium xCr decreases from 72 at% down to 64 at% with increasing temperature from 1000 to 1800 K (see Supplementary Fig. 9).

At high temperatures (e.g., 1500 K in Fig. 4c), the parabolic curves of both equilibrium states have tangential contacts with the convex-hull curve. In the compositional range between these two contact points, the combination of States I and II as a two-phase system have a lower ΔfG than that of either single phase defined by State I or II. At temperatures of 1330 K, the convex-hull curve only has a tangential contact with the parabolic curve of State I (Fig. 4c and Supplementary Fig. 8), i.e., State II becomes metastable below this critical temperature. If the two tangential contacts are used to define the I/I + II and I + II/II phase boundaries and are plotted in the xCrT phase diagram for Ni–Cr alloys (Fig. 4d, solid circles) together with the experimental measurement results26,27, we can find that States I and II correspond to the Ni-rich γ and Cr-rich α phases, respectively. In addition, a phase transformation in the experiment may be practically viewed as complete when a phase ratio (rp) of 97–99% is achieved, like the situation in the well-known measurement of continuous cooling transformation curves (or called time-temperature transformation curves) for alloys. This can be used to set a possible energetic uncertainty for tangential contacts (\(\delta G=-{k}_{{{{\rm{B}}}}}T\cdot \ln {r}_{p}\)), which will make the I/I + II (I + II/II) phase boundary heightened (lowered) by 6–8 at% at rp = 97%. From Fig. 4d, it can be clearly seen that the γ/γ + α and γ + α/α boundaries measured in the experiment reside between the two groups of DFT results at rp values of 97% and 100%. The metastability of State II at <1330 K revealed in our DFT calculations also agrees with the divergent experimental γ + α/α boundary at temperatures of <1400 K.

The elemental-partitioning tendency in Ni–Cr alloys and the underlying driving force can be quantitatively understood when the composition- and temperature-dependent ΔfG values (Fig. 4a–c) and the phase diagram (Fig. 4d) are jointly used for the thermodynamic analysis. The elemental partitionings in Ni-59 at%Cr after different heat treatments, as observed by Miller et al.22 (Fig. 1a), provide good use cases to demonstrate the capability and accuracy of our first-principles-based thermodynamic results. After the homogenization process at the melting state (T 1700 K), an elemental-partitioning process already appears in the as-cast Ni–Cr sample, which should be attributed to the unavoidable local bipartition of Ni-59 at%Cr into States I and II during the fast cooling step. As characterized by scanning electron microscopy and energy dispersive spectroscopy (SEM-EDS), the resultant Cr-depleted region is found to have an xCr of 48–55 at% and is a little higher than the xCr of the I + II/II boundary at 1700 K (44–52 at%, Fig. 4d). Thus, the elemental partitioning of this Cr-depleted region towards an equilibrium I + II (γ + α) state will be further activated during any cooling process or annealing process at temperatures < 1700 K. This result explains well the observed precipitation of narrow-stripe α phase within the interdentritic γ phase during the annealing process at 1173 K for 4 h. The Cr-rich region has a xCr of 67–72 at%, which is also very close to the equilibrium xCr (65–72 at%) of State II within the temperature range of 1000–1700 K. Based on the metastability of State II at temperatures of 1330 K, this Cr-rich region will tend to further separate into State I plus pure Cr, which also explains the appearance of very high xCr (80 at%) at the α/γ interfaces after a long-period (1000 h) annealing at 773 K. Furthermore, according to the relationship between ΔfG and convex-hull curves at T 1400 K (Fig. 4c and the Supplementary Fig. 8), a narrow region appears with coexisting State II and pure Cr. However, the energetic fluctuations caused by structural distortions and spins might be large enough (~10 meV per atom) to remove this weak phase bipartition tendency.

Our thermodynamic stability analysis of Ni1−xCrx provides a general and quantitative understanding for the compositions and heat treatments used by many industrial grade Ni–Cr alloys, e.g., the Inconel series, Incoloy series, Nimonic series, Udimet R41, Incotherm TD, and Waspaloy. Supplementary Table 2 shows that their xCr values reside between 14.3 and 33.5 at% and their heat-treatment temperatures for solid-solution homogenization (precipitation hardening, grain growth, and stress release) are at 1200–1500 K (900–1200 K). If we ignore the chemical complexity brought by other elements (e.g., Fe, Mo, Co, Ti, Al, and C) in these industrial Ni–Cr alloys, we find that their xCr range coincides with the equilibrium xCr of State I at 600–1600 K (see Fig. 4a and the Supplementary Figs. 8 and 9). Therefore, equilibrium State I has always been closely approached during the fabrication of these industrial alloys. This can guarantee the highest stability (the lowest ΔfG) for a Ni–Cr solid solution and then allow its grain growth, second-phase precipitation, mechanical properties, and corrosion/oxidation resistance to be tuned by other alloying elements without destroying the framework lattice. It is also understandable that the heat-treatment temperatures (900–1500 K) used in industry are intermediate within the theoretical range (600–1600 K), because a too-low temperature limits the microstructural evolutions (e.g., grain growth and precipitation) during an industrial processing time (from minutes to 24 h), and a too high temperature makes the microstructure kinetically over excited and unfavored for meticulous tuning. In thermal barrier coatings for gas turbines, the optimized compositions for bond-coat NiCrAlY and NiCrCoAlY (xCr = 16–22 at%)4,89,90,91,92,93 should also comply with such thermodynamic principles.

Stability of passivating oxides

The oxidation and dissolution trends of Ni–Cr alloys in electrochemical conditions are largely determined by the stability of native passivating oxides (e.g., NiO, Cr2O3, and NiCr2O4) formed on the alloy surfaces. To reliably understand and predict their electrochemical stability, accurate standard free energies of formation (ΔfG0) at room temperature for many candidate solid compounds (oxides, hydroxides, and oxyhydroxides) involved in passivation are required to construct ambient Pourbaix diagrams36. Figure 5a shows our calculated ΔfG0(T) curves for the two most important mono-metal oxides (NiO and Cr2O3) and two binary-metal oxides (NiCr2O4 and NiCrO4). The calculated ΔfG0s at 298.15 K for all considered solid compounds, together with the standard chemical potentials of participating aqueous ions collected from experimental databases38,94 are listed in Supplementary Table 3. The thermal contribution to ΔfG0 (see Eq. (3)) mainly comes from both the vibrational free energy of the solid compound (ΔFph) and the free-energy changes of reference gases (g0). The calculated phonon spectra and vibrational free energies of all those solid compounds and elemental Ni and Cr are shown in Supplementary Fig. 10, and the g0 values for standard O2 and H2 gases (−0.54 and −0.32 eV at 298.15 K) are from the experimental databases67.

Fig. 5: The thermodynamic and electrochemical stabilities of different oxides.
figure 5

a The calculated standard free energies of formation (ΔfG0, normalized by the total number of atoms) for Cr2O3, NiO, NiCr2O4, and NiCrO4 compared to available experimental data for Cr2O3 (from 0 to 1200 K, filled circles), NiO (at 298.15 K, empty diamonds), NiCr2O4 (at 298.15 K, empty squares), as well as the corrected experimental data for NiO and NiCr2O4 (filled diamonds and squares). b The relative chemical potentials (Δμ) of NiCr2O4, NiCrO4, and NiO2+CrO2 with respect to NiO + Cr2O3 at different atmospheric pressures and temperatures. The electrochemical Δμ values for c NiCr2O4 and NiCrO4 with respect to NiO + Cr2O3, as well as for d NiO + NiCr2O4 and NiO + [CrO4]2− with respect to NiCrO4.

From Fig. 5a, it can be seen that the calculated ΔfG0(T) curve for Cr2O3 closely agrees with the experimental data67. The experimental ΔfG0s for both NiO and NiCr2O4 are only available at 298.15 K38,94,95, and the latter is determined from the chemical potential of reaction (Δμ) for the reaction of NiO + Cr2O3 → NiCr2O4, plus the ΔfG0s for the reactants of NiO and Cr2O367. Our recent DFT calculations and experimental characterizations have proved the underestimation of conventional experimental ΔfG0 for NiO (≈−1.11 eV per atom)39,40, which has been corrected to be −1.35 eV per atom. Thus, the conventional ΔfG0 value for NiCr2O4 (−1.87 eV per atom) should be corrected to be −1.94 eV per atom. These corrected ΔfG0s for NiO and NiCr2O4 at 298.15 K then fall on the calculated ΔfG0(T) curves, as indicated by the arrows in Fig. 5a.

To further understand the relative stability of NiCr2O4 and NiCrO4, we next use NiO and Cr2O3 as the reference oxides to derive the Δμ values of NiCr2O4 and NiCrO4, which are also compared with the Δμ for NiO2 + CrO2 (phase coexistence) in Fig. 5b. The Δμ values for NiCrO4 and NiO2 + CrO2 also depend on the pressure of O2 gas owing to the higher oxidation degrees of cations therein with respect to those in NiO+Cr2O3, and we consider the range of 100 ≤ p(O2) ≤ 104 bar here. The negative Δμ(NiCr2O4) indicates the tendency of spontaneous formation of this spinel oxide through the chemical mixing of the mono-metal components, i.e., NiO and Cr2O3. The Δμ(NiCrO4) is lower than Δμ(NiO2 + CrO2), which also indicates the tendency of spontaneous chemical mixing of NiO2 and CrO2. However, the Δμ(NiCrO4) is higher than Δμ(NiCr2O4), showing the metastability of NiCrO4. This well explains the experimental observations that although NiCrO4 frequently appears under synthesis conditions with high temperatures (720–1120 K) and high oxygen pressures (2–3500 bar), it always finally transforms into NiCr2O496,97. Because the cations in NiCrO4 have higher oxidation degrees than those in NiCr2O4 (or NiO + Cr2O3), it may be possible to stabilize NiCrO4 using a high enough electrode potential U (with respect to the standard hydrogen electrode, SHE) in an electrochemical system. The feasibility can be evaluated by calculating the variations of some relative Δμ values with respect to U (Fig. 5c, d). We find that although NiCrO4 becomes more stable than NiCr2O4 when U reaches 1.50–0.67 V at pH values ranging from 0 to 14 (Fig. 5c), it never becomes the most stable electrochemical phase because other phases (e.g., NiO + NiCr2O4 and NiO + [CrO4]2−) always have lower Δμ values at any U (Fig. 5d).

Passivation of Ni1−xCrx

In order to clearly map the trends of Ni–Cr alloys towards electrochemical oxidation and corrosion, we construct their Pourbaix diagrams (see Section I in Supplementary Information for theoretical details), and then separate the components by cation-anion pairs into five subdiagrams (Fig. 6) for a clearer representation. In Fig. 6a–d, the phase domains of NiO, Ni(OH)2, Cr2O3, and CrOOH are shown, respectively. We exclude the stable NiO and CrOOH phases when calculating the metastable domains of Ni(OH)2 and Cr2O3, respectively. The phase domain of spinel NiCr2O4 in panel (e) is labeled by its boundary line (in dark blue) in panels (a–d). As pointed out above, the Ni1−xCrx solid solutions at xCr 34 at% have the most favored thermodynamic stability for the fabrication of industrial Ni–Cr alloys, and Cr can be fully consumed by the reaction with Ni toward NiCr2O4 for alloy compositions with xCr 67 at%. Thus, we explicitly show the phase domain of NiCr2O4 in the Cr Pourbaix diagram (Fig. 6e) to clearly present the formation condition of the spinel phase at the expense of Cr2O3. We consider a moderate aqueous-ion concentration ([I]) at 10−4 M because when the corrosive dissolution is active, the resultant [I] will be relatively high (10−4 M). The left-side phase boundaries of the oxides and (oxy)hydroxides will shift to more acidic pH values, e.g., by pH ≈ 1 when [I] is further increased to 10−2 M, owing to the lower stability for an aqueous ion at a higher concentration (\(\mu ={\mu }^{0}+{k}_{{{{\rm{B}}}}}T\ln [I]\))36.

Fig. 6: First-principles Pourbaix diagrams (at 298.15 K, 1 bar, and [I] = 10−4 M) for Ni–Cr alloys.
figure 6

The a Ni–O, (b) Ni-OH, (c) Cr-O, (d) Cr-OH, and (e) spinel subdiagrams present the phase domains of NiO, Ni(OH)2, Cr2O3, CrOOH, and NiCr2O4, respectively. The phase domain of NiCr2O4 is also indicated by the blue boundary boxes in panels (ae), and the equilibrium potentials for water oxidation and reduction are indicated by black lines in panel (e).

It should be noted that compared to the Δμ values for metal oxidations, the ΔfG values of Ni–Cr alloys at room temperature (0.0–0.08 eV per atom, Fig. 4a), especially those ΔfG values at the optimal xCr of 34 at% (0.0–0.02 eV per atom), actually are negligibly small. Therefore, the composition dependence of alloy ΔfG can be safely omitted in calculating the Δμ values for oxidation and corrosion reactions, and the alloy composition takes effect on the oxidation and corrosion trends through other mechanisms, e.g., the elemental partitioning process and the formation of passivating films, which can be effectively described by the calculated thermodynamic/electrochemical energies and phase diagrams here. The corrosion resistance of alloys, in part, relies on the passivating capabilities of native oxide films spontaneously grown on their surfaces because it is the passivating oxides that impart the reduced chemical reactivity and slow defect/mass transport to the alloy surfaces40. NiO and Cr2O3 are among the most important native passivating oxides for Ni–Cr alloys3,5,39,98,99,100,101,102. The large phase domains of NiO and Cr2O3 in the Ni–O and Cr–O diagrams (Fig. 6a, c) also clearly indicate their high electrochemical stability. The overlapping portion between the NiO and Cr2O3 domains tends to be replaced by the more stable NiCr2O4 (Fig. 6e).

According to the lower-potential boundaries for the NiO and Cr2O3 domains, the electrode potential for the oxidation of Cr in Ni1−xCrx is lower than that of Ni by 0.4 V, which will be considerably larger (0.9 V) if the inaccurate experimental ΔfG for NiO is used in the electrochemical calculations. Then, during the spontaneous electrochemical formation of Cr2O3 on Ni1−xCrx, the electrons released from the Cr → Cr2O3 transformation may render the alloy surface with a low-enough equilibrium electrode potential that can make the Ni element immune to oxidation. This will lead to a dealloying process on Ni1−xCrx, with the Ni content being increased beneath the Cr2O3 film, and then the metal Ni turns to be oxidized into NiO after the depletion of Cr. The spontaneous Ni → NiO transformation has a higher (by 0.4 V) equilibrium potential and the surface potential will have an upshift upon the initiation of NiO formation. This electrochemical-oxidation sequence deduced from the Pourbaix diagrams of Ni1−xCrx well explains an important layered morphology comprising Cr2O3/NiO/alloy ubiquitously observed on Ni–Cr alloys after electrochemical treatments5, as well as a similar morphology on Fe–Cr–Ni alloys (Ni-based oxide on top of Cr-based oxide)103,104,105,106. The selective formation of Cr2O3 as the top oxide layer is beneficial to the corrosion resistance because the mass transport should be reduced in the corundum Cr2O3 structure compared to the rock-salt NiO structure1,3,107,108. When a high enough exterior potential (e.g., 0.42 V) is imposed on the alloy surface to make the kinetically faster formation of NiO be electrochemically allowed, the formation of NiO layer above Cr2O3 can be observed on Ni–Cr alloys41. Similar NiO/Cr2O3/alloy morphology can also be observed on Ni–Cr and Ni–Cr–Fe alloys by oxygenating the solution102, where oxygen reduction reaction109,110 should have been stimulated, and the continuous electronic consumption will make the electrode potential sustained at a high level.

In many surface oxidation experiments under atmospheric conditions98,100,101,111,112, a NiO layer often forms faster than Cr2O3 due to the higher growth kinetics of NiO. Then the more thermodynamically favored Cr2O3 (Fig. 5a) will nucleate at some defective sites (e.g., grain boundaries), leading to a flat NiO layer with Cr2O3 nodules interspersed therein. According to the higher thermodynamic stability of NiCr2O4 than NiO + Cr2O3 (Fig. 5b), we can deduce that NiCr2O4 tends to form at the existing Cr2O3/NiO and Cr2O3/Ni interfaces, which is in good agreement with the experimental observations98,113. The kinetic mechanisms at the resultant oxide interfaces under various environments will be very important for better understanding/predicting the oxidation and corrosion behaviors and interphase dynamics, for which deeper studies are required in the future.

Apart from the passivating oxides with compact structures, the hydrated oxide products with less dense layered structures, e.g., Ni(OH)2 and CrOOH, may inevitably form on top of the oxide/alloy surfaces in electrochemical conditions, owing to their large phase domains (high electrochemical stability) in the Ni–OH and Cr–OH diagrams (Fig. 6b, d). The phase domain areas for Ni(OH)2 are just smaller than those of NiO, and those of CrOOH are even a little larger than those of Cr2O3. Such good stability makes them ubiquitously observed in various electrochemical experiments20,37,39,40, and hydrated Cr oxides and Cr (oxy)hydroxides are frequently observed as the major electrochemical products37,41,99,114,115, because of their higher stability than Cr2O3. These layered (oxy)hydroxides usually have a weak adhesion with the substrate alloys or oxide films and may even become suspended in solution. The wide interlayer openings in (oxy)hydroxide lattices are readily intercalated by environmental impurities20,37,39,40, thus they poorly inhibit the attack of aggressive environmental agents. For the purpose of long-term passivation of Ni–Cr alloy surfaces, the growth of (oxy)hydroxides should be suppressed and/or that of denser oxides promoted. The alloying elements can be tuned to chemically activate the oxide formation37,41,116,117, or to promote the nucleation of metastable Cr2O3 by providing a corundum structure template118. Some surface treatment methods can also be exploited to realize high-quality surface passivation, e.g., pre-oxidation in oxygen atmospheres100,101 and deposition of oxide coatings119.

Correlated Composition and Corrosion

The thermodynamic and electrochemical results from accurate first-principles calculations can be used to systematically understand the close relationship between composition, heat treatment, electrochemical oxidation, and dissolution for Ni–Cr alloys. The successful application of a Ni–Cr alloy should also rely on its intrinsic composition, fabrication treatments, and final interaction with working environments. Therefore, the thermodynamic and electrochemical knowledge established here can be combined to better understand the superior corrosion resistance of many existing alloys and then enable the design of improved Ni–Cr alloys with targeted stability.

We have mentioned above that the corrosion resistance of Cr2O3 is usually superior to NiO, because the former has lower defect migrations and surface reaction kinetics, which can be found from the monotonic decrease of polarization current in the passive region (U = 0.5 − 1.0 V) with increasing xCr of Ni–Cr alloys (Fig. 1b). We have also revealed above that it is the electrochemical driving force that can be controllable to induce the formation of a Cr2O3 layer on top of a NiO layer, which is an oxide-film morphology useful for the corrosion resistance of Ni–Cr alloys. According to the percolation theory established by Sieradzki et al.23,24, a xCr above the critical value of 13 at.% is required for the formation of a homogeneous Cr2O3 network on Ni–Cr surface. Our first-principles thermodynamic calculations find an optimal range of xCr (14–34 at%) for obtaining the most stable Ni–Cr solid solutions under regular heat-treatment conditions (900–1500 K), which can quantitatively explain the empirical composition design for industrial Ni–Cr alloys. From a different perspective, i.e., electrochemical oxidation of an alloy, percolation theory establishes a similar lower limit of xCr (13 at%) for corrosion resistance of Ni–Cr alloys. Therefore, a xCr of 13 at% should be employed for the design of more corrosion-resistant Ni–Cr alloys in the future, because of the simultaneously optimized thermodynamic and electrochemical stabilities required by both the fabrication treatments and realistic service.

For a Ni–Cr alloy with a high xCr (e.g., >30 at%), elemental partitioning can be initiated through a heat treatment such that the homogeneous solid solution spontaneously separates into lower-xCr (State I) and higher-xCr (State II) regions. Owing to the different work functions of pure γ-Ni (~5.2 eV) and α-Cr (~4.5 eV)120, there may be an electron transfer from a higher-xCr region (anode) to the surrounding lower-xCr region (cathode). Such electron transfer will tend to bring the detrimental galvanic-corrosion effect121 to the anodic Cr-rich regions. Fortunately, there will also be more Cr2O3 formed in the anodic regions, and the resultant higher degree of surface passivation can effectively reduce or even eliminate the galvanic corrosion. This detailed balance should naturally occur on Ni–Cr surfaces and will contribute to the high and long-standing corrosion resistance of Ni–Cr alloys. Furthermore, according to the appearance of lower-xCr regions caused by the elemental partitioning process, we expect that an upper limit for the global xCr may exist, above which the corrosion resistance may stop improving. The elemental-partitioning trends revealed here (Fig. 4c, d) can be used in part to determine the upper-limit xCr at 34 ± 3 at% (48 ± 4 at%) for the heat treatment at 900 K (1500 K).

Based on these analyses, favorable heat-treatment stability and qualified surface passivation require an xCr higher than 13–14 at%, and the minimized elemental partitioning during heat treatment at 900–1500 K prefers an average xCr lower than 34–48 at%. A stable solid-solution Ni–Cr structure allows the subsequent steady tuning of phases, grains, mechanical properties, and corrosion resistance by using other alloying additives and adopting appropriate heat treatments. The element Mo is usually added into industrial grades of Ni–Cr alloys (see Supplementary Table 2 for more details) to improve the corrosion resistance through many possible mechanisms (e.g., surface repassivation, defect transport suppression, Cr2O3-nucleation promotion, and trapping of corrosive Cl ions)5,24,41,105,106,116,122,123. From the perspective of electrochemical stability, the complex aqueous ions of Mo ([MoO4]2− and [HMoO4]) have especially low chemical potentials (−8.91 and −9.26 eV)38, which results in high dissolubility of pure Mo metal and Mo-rich phase (Fig. 1d)25. Therefore, it is an important topic for first-principles simulations in the future to discern the corrosion-resistant effects at the atomic scale for soluble Mo in many important alloys (e.g., Ni–Cr alloys and steels) under different environmental conditions. For such theoretical studies, thermodynamic and electrochemical simulations should further join with kinetic simulation to both accurately determine the material states and yield many realistic material processes (e.g., current-potential polarization curves) that can be directly compared to or validated by experimental measurements36,110,124,125,126,127.

Summary remarks

In this work, an accurate first-principles simulation method has been employed to study the thermodynamic and electrochemical behaviors of Ni–Cr solid solutions. By combining a Debye model and DFT calculations with appropriately constructed random magnetism-structure configurations, we have systematically calculated and analyzed the composition- and temperature-dependent ΔfG values of Ni–Cr alloys. This approach has led us to identify two important equilibrium states that can provide a quantitative explanation of the thermodynamic stability of Ni–Cr alloys. We have explained the thermodynamic driving force for elemental partitioning processes using these two equilibrium states and correlated many related experimental phenomena under different heat treatments. By employing a high-level DFT method that accounts for exact electronic exchange, we have calculated ΔfG values of oxides and (oxy)hydroxides to construct reliable Pourbaix diagrams, which have been used to explain various experimental observations of oxide film growth and corrosion phenomena on the alloy surfaces. We have further analyzed the correlation between elemental partitioning, heat-treatment temperature, surface passivation, and corrosion of Ni–Cr alloys based on the thermodynamic and electrochemical mechanisms established here. The thermodynamic and electrochemical principles we have identified for selecting optimal Ni–Cr alloy compositions both help us justify the conventional wisdom behind many industrial Ni–Cr alloys and further serve to guide the design of superior alloys with the desired corrosion resistance for service in other environments.

Methods

DFT parameters

The DFT calculations are carried out using the Vienna Ab Initio Simulation (VASP) package128, where the projector augmented-wave method129,130 is implemented to express the electronic wavefunction and electron-ion interaction. The planewave cutoff energy is set to 600 eV, and the reciprocal k grids are \(\gtrsim \frac{30}{{a}_{0}}\times \frac{30}{{b}_{0}}\times \frac{30}{{c}_{0}}\) for Ni–Cr alloys (a0, b0, and c0 are lattice constants) and \(\gtrsim \frac{20}{{a}_{0}}\times \frac{20}{{b}_{0}}\times \frac{20}{{c}_{0}}\) for the metal compounds (i.e., oxides, hydroxides, and oxyhydroxides), respectively. The self-consistent convergence thresholds for electronic energy, atomic force, and lattice stress are 10−7 eV, 10−3 eV Å−1, and 0.5 kbar, respectively. The Materials Project131, Open Quantum Materials132, and ICSD133 resources are used to obtain the initial atomic structures. Various magnetic configurations are screened for each structure to locate the most stable magnetic state37. The optimized structures and magnetic orders for binary-metal oxides (NiCr2O4 and NiCrO4) are described in the Supplementary Information (see Section J), and those for mono-metal oxides and (oxy)hydroxides can be found in our prior work37.

The spin-polarized semilocal PBE density functional134 in the generalized gradient approximation is used to calculate the atomic structures, electronic structures, bulk moduli, and ΔfG values of the Ni–Cr alloys. To accurately calculate the ΔfG values of the metal compounds, it is necessary to mix nonlocal exact exchange (EXX) into the semilocal density functional20,36. The HSE06 type of hybrid functional135,136, with 25% EXX replacing the PBE exchange potential (within an interaction range of 9.4 Å), is used to calculate the atomic structures and electronic energies for the metal compounds. The PBE functional is used to calculate the phonon spectra of Ni, Cr, and the considered compounds, where the atomic force constants are obtained by using the small-displacement method37,137, and then the vibrational free energies are derived from the calculated phonon frequencies63,64.