Calculating phase diagram for immiscible system I want to calculate the phase diagram for the Al-In system, which has an immiscible phase. As the solid elements don't have any mutual solubility, there is no excess Gibbs description for the solid mixing phase.
With the excess Gibbs parameters from here, which are given on page 67 for pure Al as $G^{liq}_{Al} - G^{fcc}_{Al} = 10711 - 11.473 T$, for pure In as $G^{liq}_{In} - G^{tet}_{In} = 3283 - 7.639 T$, and for the excess Gibbs energy as a Redlich-Kister polynomial $G_E = x_{In} x_{Al} \sum^2_{v = 0} (x_{Al} - x_{In})^v (A_v + B_v T)$ with the following parameters:
| $v$ | $A_v$ | $B_v$ |
| --- | ----- | ----- |
| $0$ | $21259.6$ | $-0.48737$ |
| $1$ | $3850.3$ | $-1.20564$ |
| $2$ | $5479.2$ | $-3.16805$ |
I get a correct liquid-liquid phase transition (by finding the common tangent for the liquid $G(x)$), but I can not get the solid↔liquid transition below $x_{In} = 0.05$, nor at above $x_{In} = 0.85$, as there is no excess Gibbs for the solid phase.
And when I set the excess Gibbs to zero, with then only the ideal mixing ($R T (x_{Al} \ln x_{Al} + x_{In} \ln x_{In})$, I get a too high equilibrium point. (finding the equilibrium by finding the common tangent between $G^{liq}(x_1)$ and $G^{sol}(x_1)$
What am I missing? How do I calculate the equilibria of the other parts than the $L_{Al} + L_{In}$ phase?


 A: Two suggestions up front - first, the accepted compilation of pure elements is AT Dinsdale, Calphad 15(4) 317-425 (1991). That gives slightly different evaluations for the liquids vs the solid phases for Al and In. Second, there are several good book on the Calphad process and either Saunders and Miodownik or Lukas, Fries and Sundman are fine.
Here, since fcc Al is considered insoluble in tetragonal In, and vice versa, the question comes down to how you want to handle those (separate) solid phases. One could either (1) consider them line compounds or (2) use a very large heat of mixing (and don't forget to use tabulated or estimated free energies for tet-Al or fcc-In).
I implemented the Al-In system using I. Ansara et al., Calphad 18(2) 177-222 (1994) (which covers many III-V and references Coughanowr's thesis for Al-In). I get:

This was obtained by setting the tetragonal phase of Al to being 15kJ above fcc (not particularly critical), and the fcc phase of In to the Dinsdale value (tet-Al is not in Dinsdale). Then I added an ad hoc mixing term of 100,000 J/mol to both the tetragonal and fcc phases. Now your mutual tangents will do the right things.
Python code for the 3 phases (fcc, tet, liquid) is:
def AlIn_tet(x): # x is Al concentration throughout
    return(Gideal(x,lambda: 15000.,In_tet)+x*(1-x)*100000.)
def AlIn_fcc(x):
    return(Gideal(x,Al_fcc,In_fcc)+x*(1-x)*100000.)
def AlIn_liq(x):
    return(Gideal(x,Al_liq,In_liq)+x*(1-x)*(
            (21259.6-0.48737*T)+
            (2*x-1)*(3850.3-1.20564*T)+
            (2*x-1)*(2*x-1)*(5479.2-3.16805*T)))

where the ideal contribution (Gideal) is the linear combination of the elemental free energies plus the entropy of mixing term. Note that all free energy equations have to use the same concentration variables, and the one you choose may lead to changing the sign of the mixing terms in odd powers of (2*x-1).
