1
$\begingroup$

I want to calculate the phase diagram of $\rm Al$-$\rm Cu$ "by hand" in Python. The "regular" LIQ, FCC and BCC phases are all good (using the excess Gibbs energies from COST-507), where I find e.g. the LIQ-FCC boundary as such:

def AlCuLIQ(xAl, T):
    pureTerm = xAl * AlG0LIQ(T) + (1 - xAl) * CuG0LIQ(T) # AlG0LIQ and CuG0LIQ defined as functions from Dinsdale1991.
    idealTerm = R * T * (xAl * np.log(xAl) + (1 - xAl) * np.log(1 - xAl)
    
    excessSum = 0
    for v in range(numTerms):
        excessSum += (xAl - (1 - xAl))**v * (A[v] + B[v] * T) # have implemented Redlich-Kister polynoms as arrays A and B of length numTerms.

    excessTerm = xAl * (1 - xAl) * excessSum
    return pureTerm + idealTerm + excessTerm

# Same for FCC and BCC phases with corresponding parameters.
# Also defined functions for their derivatives w.r.t. xAl, defined as dAlCuLIQ, etc.
# ...

for x1 in concentrations:
    def commonTangent(z):
        x2, T = z
        return [dAlCuLIQ(T, x1) - dAlCuFCC(T, x2),
                dAlCuLIQ(T, x1) * (x2 - x1) - (AlCuFCC(T, x2) - AlCuFCC(T, x1))]
    solution = scipy.optimize.least_squares(commonTangent, # function to be solved
                                            [0.9, AlMeltingPoint], # initial guess, is not important what the guess is
                                            bounds=myBounds) # bounds of x to [0, 1] and T to [700 K, 1400 K] 

This gives the following plot for the LIQ-FCC and LIQ-BCC transitions (plotted over the COST 507 database phase diagram): my datapoints plotted over background phase diagram from COST 507 database We can see that the FCC and BCC phase transitions to LIQ are properly calculated in the regions where they appear (FCC: xCu=[0, 0.18] and xCu=[0.82, 1]. BCC: xCu=[0.52, 0.60] and xCu=[0.68, 0.82]).

The problem comes to what is the sublattice phases (if I understand correctly). I have never seen those before, and also searching around on how to implement them, I must say I am confused.

Take for example the theta phase given in the COST 507 database (page 29 in document, page 45 in PDF), which is listed as

Phase AlCu-θ

$$G^0 (T) - 3 H^{0,fcc-A1}_{Al}(298.15 K) = G(Al:Al) = 3 GBCC_{Al}$$

$$G^0 (T) - 2 H^{0,fcc-A1}_{Al}(298.15 K) - H^{0,fcc-A1}_{Cu}(298.15 K)= G(Al:Cu) = -47406 + 6.75 T + 2 GHSER_{Al} + GHSER_{Cu}$$

$$L^{0,AlCu-\theta}_{Al:Al:Cu} = 2211$$

I implemented it in Python as such:

def AlCuTheta(xAl, T):
    pureTerm = xAl * (-47406.0 + 6.75 * T + 2 * AlG0FCC(T) + 1 * CuG0FCC(T)) + (1 - xAl) * (3 * AlG0BCC(T)) # from COST-507, with AlG0FCC, CuG0FCC and CuG0BCC defined as functions from Dinsdale1991.
    idealTerm = R * T * (xAl * np.log(xAl) + (1 - xAl) * np.log(1 - xAl)
    
    excessSum = 0
    # numTerms = 1; A = [2211]; B = [0];
    for v in range(numTerms):
        excessSum += (xAl - (1 - xAl))**v * (A[v] + B[v] * T) # have implemented Redlich-Kister polynoms as arrays A and B of length numTerms.

    excessTerm = xAl * (1 - xAl) * excessSum
    return pureTerm + idealTerm + excessTerm

Trying to find points in the phase diagram by finding the common tangent between the two phases theta and LIQ does not succeed, which makes sense if I plot the two Gibbs functions, which simply don't share any common tangent, as seen in the figure below.

The Gibbs energy functions for the LIQ and theta phases

So with the phase information models from the COST-507, how do I implement it to calculate the phase transitions for these sublattice phases?

$\endgroup$

1 Answer 1

2
$\begingroup$

Indeed, you are not implementing the sublattice model properly here. Having either Saunders and Modowink or Lukas, Fries, and Sundman books would be good.

The phase here is modeled as (Al)$_{2}$(Al,Cu). For a given $x_{Al}$ you end up with a specific fraction (often called $y$) of aluminum on the second sublattice. This fraction applies both to the ideal solution terms ($G_{Al:Al}$ and $G_{Al:Cu}$) as well as the entropy of mixing term on the second sublattice.

So, you should have something more like:

    def AlCu_theta(x):
       # Modeled as (Al)2 (Al,Cu)1
       gAlAl = 30249.0-14.439*T
       gAlCu = -47046.0+6.75*T
       L0AlAlCu = 2211.0
       y = 3.0*x-2.0 # Al occupancy on the (Al,Cu) sublattice
       g = (y*gAlAl+(1-y)*gAlCu+Gmix(y)+y*(1-y)*L0AlAlCu)/3.0
       return(g)

here Gmix(x) is the standard entropy of mixing. Note that this is referenced to the fcc phases of Al and Cu (so GHSER$_{\rm Al}$ and GHSER$_{\rm Cu}$ are both zero, Dinsdale has the Gibbs energies relative to the phase stable at STP as well as the absolute energies listed).

Using that I get (in my custom Python phase diagram calculator):

enter image description here

Note that the sublattice model listed in the COST-507 report is incorrect. Under the "Modelling" section the report states it uses (Al)(Al,Cu)$_{\rm 2}$. However, the actual parameters listed under "Phase AlCu-$\theta$" are for a (Al)$_{\rm 2}$(Al,Cu) model of the phase. This is further supported by downloading the COST-507 TDB (Thermodynamic Data Base) and seeing:

$PHASE ALCU_THETA
$
PARAMETER G(ALCU_THETA,AL:AL;0)  298.15 +3.0*GBCCAL; 6000.00 N !
PARAMETER G(ALCU_THETA,AL:CU;0)  298.15 -47406+6.75*T
                                        +2.0*GHSERAL+1.0*GHSERCU; 6000.00 N !
PARAMETER G(ALCU_THETA,AL:AL,CU;0)  298.15 2211; 6000.00 N !

The fact that the G$_{\rm Al,Cu}$ term has 2 GHSERAL and only 1 GHSERCU tells you the model has to be (Al)$_{\rm 2}$(Al,Cu).

As for $y$, the fraction of Al on the second sublattice, the least atomic fraction of Al possible is 2/3 as Al$_{\rm2}$Cu, where the fraction $y$ on the second sublattice (Al,Cu) is zero - it is all Cu. Adding more Al to the mix puts it on the second sublattice at the expense of Cu, in theory all the way up to having it all Al. So, $y=0$ for $x_{\rm Al} = 2/3$ and $y=1$ for $x_{\rm Al} = 1$.

Again, it would be worthwhile to borrow a copy of one of the various texts covering Calphad modeling.

$\endgroup$
12
  • 1
    $\begingroup$ The lack of pep8 is jarring. $\endgroup$
    – Kyle Kanos
    Commented Apr 18, 2023 at 20:13
  • 1
    $\begingroup$ Well, I tried to upload some punch cards but could not figure out how to do that successfully. I'm severely disappointed at the inability of SE to handle them... (fully tongue in cheek). $\endgroup$
    – Jon Custer
    Commented Apr 18, 2023 at 21:05
  • $\begingroup$ Well at least the punch cards would probably be formatted appropriately :D $\endgroup$
    – Kyle Kanos
    Commented Apr 18, 2023 at 22:03
  • $\begingroup$ Thank you for your reply! In COST-507 the AlCu-theta phase is modeled as $(Al)(Al,Cu)_2$, while you use $(Al)_2 (Al,Cu)$. Is it a typo in COST-507 or your side? Could you also elucidate how you get the $y_{Al}$ value? I understand that the site fraction $y_i^{(s)} = n_i^{(s)} / N^{(s)}$, or "the number of atoms of component $i$ on sublattice $s$" divided by the "total number of sites on sublattice $s$". But then it is not dependent on $x_{Al}$? If I understand correctly (assuming $(Al)_2(Al,Cu)$): $y_{Al}^{(Al)_2} = 1$, $N^{(Al)_2} = 1$, $y_{Al}^{(Al,Cu)} = 1$, and $N^{(Al,Cu)} = 2$ $\endgroup$
    – asbjos
    Commented Apr 19, 2023 at 12:33
  • $\begingroup$ @KyleKanos - maybe if I send my punch cards in they will pin them to the bulletin board. But, more seriously, Physics doesn't implement the language-aware highlighting that SO does. I'm not sure I really want us to since we don't want to be debugging code generally (and this answer is mostly about appropriate phase models, at least to me). $\endgroup$
    – Jon Custer
    Commented Apr 19, 2023 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.