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): 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.
So with the phase information models from the COST-507, how do I implement it to calculate the phase transitions for these sublattice phases?