Resources‎ > ‎


What is it?

Grand Canonical Linear Programming is a technique for predicting the phase equilibria in a mixed system by breaking the problem down into a system of linear equations, which can then be solved analytically.
G()=stuff goes here

How does it work?

The program as I have written it, in Python, takes command line arguments + a datafile, and produces output files as requested. 

sjk648@palestrina intermetalic_anodes $ --help

        This code takes an input data file named: data.gclp and formatted as:
        Li -.18945007E+01 20.18 Li 1 7.010 
        Al1Li1Si1 -.11746097E+02 52.40 Al Li Si 1 1 1 26.982 7.010 28.085 
        Al3Li8Si5 -.54028843E+02 244.63 Al Li Si 3 8 5 26.982 7.010 28.085 
        Co -.69751263E+01 10.92 Co 1 58.933 
        Co2N -.44513830E+02 55.39 Co N 4 2 58.933 14.001 
        Co2P -.83933255E+02 128.21 Co P 8 4 58.933 30.974 
        The first line must correspond to the unconstrained element in your system. 
        If the first element is not Li, some modifications will need to be made to 
        accomodate a different reference energy. 
        Usage as follows: 
        -A|--all)               Scans across a wide range of checimcal potentials for an initial 
                                composition matching every compound in the input file. 
        -C|--compound)          Takes a composition as a string formatted as 'X,# Y,# Z,# ... ' 
                                A wide range of chemical potentials are considered for this initial composition. 
        -I|--initial)           For calcualtions which use a range of chemical potentials, set the initial mu
        -S|--step)              chemical potential step size
        -F|--final)             Final chemical potential
        -U|--unconstrained)     Unconstrained element
        -P|--phase)             Phase diagram - a.k.a no unconstrained element. 
        -H|--help)              Returns usage inforamtion, exits. 

What can it do?

Currently, it is tuned for predicting the Li capacity and performance of Li-ion battery anode materials, outputting things like: volume expansion, cell potential vs composition and specific capacity.

It is obviously limited to predicting phases for which you have the relevant thermodynamic data for, a pool of candidate structures.

There are two primary modes of operation:

Specifying composition

At a given composition, the stable phases are given by the combination with the lowest energy. To obtain more useful information from this, all that is required is coming up with efficient and useful ways to loop over composition and tabulate the results. With this in mind, I have written functions which output binary and ternary phase diagrams as a list of data points. As an example, if I ask for the binary phase diagram of Si-Fe, I would get the following:

 Si1.0 Fe1.0 Si1.0Fe1.0 Si2.0Fe1.0
0.0 0.0 1.0 -0.0 -0.0
0.04 -0.0 0.92 0.04 0.0
0.08 -0.0 0.84 0.08 0.0
0.12 0.0 0.76 0.12 0.0
0.16 -0.0 0.68 0.16 -0.0
0.2 0.0 0.6 0.2 -0.0
0.24 -0.0 0.52 0.24 0.0
0.28 -0.0 0.44 0.28 0.0

Here, each column is a single phase, and at a given Si-Fe ratio. For a ternary phase diagram, the compositions are specified by the amount of two of the three pure phases. At the moment, this only works for elemental alloys, but expanded functionality should be complete shortly.

Specifying chemical potential

In order to predict the cell potential of a Li-ion battery anode material, or the pressure at which H2 will go into a complex hydride, or the partial pressure of O2 required to form a particular phase, etc... it is necessary to define the chemical potential of a compound rather than the composition. This permits you to scan over pressure of gases, or electrical potentials of charge carrying species, to find useful and interesting properties.

What might it do?

There is no fundamental limit to the terms which can be included in the free energy. Entropic effects, magnetic moments, even mechanical strain could be incorporated. This is an incredibly powerful principle and these additional features are currently under development.

Can I use it?

Absolutely! The attached version is likely already out of date, but I will try to keep it current, and feel free to ask me!
Especially if you want it to be adapted to a new problem, I would love to work with you to make it more robust and broadly applicable.
James Saal,
Feb 4, 2011, 11:13 AM