Pourbaix Diagram for Aluminium

[1]:
import pyPourbaix as pb

We now have all the basics to get cracking with some more compilcated diagrams. In this tuturial, we will generate that for the element aluminium. To start off, lets copy over the previously defined list of species needed to plot the hydrogen evolution reaction (HER) and oxygen evolution reaction (OER).

[2]:
species = ('H|+1|,      state=aq,   dGf=0,              dHf=0,              Sm=0',
           'H2,         state=g,    dGf=0,              dHf=0,              Sm=0',
           'e|-1|,      state=e,    dGf=0,              dHf=0,              Sm=0',
           'H2O,        state=l,    dGf=-2.37140E+05,   dHf=-2.85830E+05,   Sm=69.95',
           'O2,         state=g,    dGf=0,              dHf=0,              Sm=205.137'
           )

The Pourbaix diagram for Aluminium commonly features two solid phases, crystalline \(\text{Al}^{0}(\text{s})\) and aluminum oxide \(\text{Al}_2\text{O}_3(\text{s})\). They are added to the list of species below:

[3]:
species = ('H|+1|,      state=aq,   dGf=0,              dHf=0,              Sm=0',
           'H2,         state=g,    dGf=0,              dHf=0,              Sm=0',
           'e|-1|,      state=e,    dGf=0,              dHf=0,              Sm=0',
           'H2O,        state=l,    dGf=-2.37140E+05,   dHf=-2.85830E+05,   Sm=69.95',
           'O2,         state=g,    dGf=0,              dHf=0,              Sm=205.137',
           'Al|0|,      state=s,    dGf=0,              dHf=0,              Sm=28.3',
           'Al2O3|0|,   state=s,    dGf=-1608.9E+03,    dHf=0,              Sm=0'
           )


In addition, two aquous species, \(\text{Al}^{3+}\) and \(\text{AlO}_2^{-}\) are considered.

[4]:
species = ('H|+1|,      state=aq,   dGf=0,              dHf=0,              Sm=0',
           'H2,         state=g,    dGf=0,              dHf=0,              Sm=0',
           'e|-1|,      state=e,    dGf=0,              dHf=0,              Sm=0',
           'H2O,        state=l,    dGf=-2.37140E+05,   dHf=-2.85830E+05,   Sm=69.95',
           'O2,         state=g,    dGf=0,              dHf=0,              Sm=205.137',
           'Al|0|,      state=s,    dGf=0,              dHf=0,              Sm=28.3',
           'Al2O3|0|,   state=s,    dGf=-1608.9E+03,    dHf=0,              Sm=0',
           'Al|+3|,     state=aq,   dGf=-483708,        dHf=-530630,        Sm=-325.097',
           'AlO2|-1|,   state=aq,   dGf=-827479,        dHf=-925571,        Sm=-30.209'
           )

As previous, we can deposit all input species in a database:

[5]:
db = pb.Database.from_default(species)

Just like before, we can now proceed to define reactions from the species we have just created. Let’s first implement various \(\text{Al}^{0}(\text{s})\) oxidation reactions to form \(\text{Al}^{3+}\) ad acidic, \(\text{Al}_2\text{O}_3(\text{s})\) mildly acidic to mildly alkaline and \(\text{AlO}_2^{-}\) at alkaline \(\text{pH}\). All of these transitions involve the exchange of electrons and will thus appear as horizontal or tilted lines on the Pourbaix diagram.

[6]:
reactions = ('2H|+1| + 2e|-1| -> H2',
             'O2 + 4H|+1| + 4e|-1| -> 2H2O',
             'Al|+3| + 3e|-1| -> Al|0|',
             'Al2O3|0| + 6H|+1| + 6e|-1| -> 2Al|0| + 3H2O',
             'AlO2|-1| + 4H|+1| + 3e|-1| -> Al|0| + 2H2O'
             )

The oxidised \(\text{Al}(\text{III})\) species can furthermore transform into one another through two pH-independent reactions that will appear as vertical lines on the Pourbaix diagram:

[7]:
reactions = ('2H|+1| + 2e|-1| -> H2',
            'O2 + 4H|+1| + 4e|-1| -> 2H2O',
            'Al|0| -> Al|+3| + 3e|-1|',
            '2Al|0| + 3H2O -> Al2O3|0| + 6H|+1| + 6e|-1|',
            'Al|0| + 2H2O -> AlO2|-1| + 5H|+1| + 3e|-1|',
            'Al2O3|0| + H2O -> AlO2|-1| + 2H|+1|',
            '2Al|+3| + 3H2O -> Al2O3|0| + 6H|+1|'
            )


reactions = ('2H|+1| + 2e|-1| -> H2',
             'O2 + 4H|+1| + 4e|-1| -> 2H2O',
             'Al|+3| + 3e|-1| -> Al|0|',
             'Al2O3|0| + 6H|+1| + 6e|-1| -> 2Al|0| + 3H2O',
             'AlO2|-1| + 4H|+1| + 3e|-1| -> Al|0| + 2H2O',
             '2AlO2|-1| + 2H|+1| -> Al2O3|0| + H2O',
             'Al2O3|0| + 6H|+1| -> 2Al|+3| + 3H2O'
             )

We will now create a new system called Al_system, featuring all required reactions and physiochemical parameters. Since we want to draw the diagram at the default temperature of \(\text{T} = 298.15 \ \text{K}\) and pressure of \(\text{P} = 1.00\) bar, we will skip modifying both parameters. Instead, we set the pH limits to the interval \([0, \ 13]\), define the SHE as our reference electrode and set the system database to the databse of species previously created:

[14]:
Al_system = pb.System()
Al_system.set_database(db)
Al_system.pHs = (0, 13)
Al_system.reference_electrode = ("SHE",0.00)

As the oxidation of \(\text{Al}^{0}(\text{s})\) proceeds at comparatively low potentials, we will choose a slightly larger potential interval of \([-2.50, \ 2.00]\):

[15]:
Al_system.electrode_potentials = (-2.5, 2)

Before resuming to generate the diagram, we first have to add the elements we would like to include in the Pourbaix diagram. This is done via the function .add_elemends().

[16]:
Al_system.add_elements(["O","H","Al"])

The diagram now features aqueous species, whose activity is, for the first time, not implicitly changed by changing the pH. Let’s quickly modify the activity of both \(\text{Al}^{3+}\) and \(\text{AlO}_2^{-}\) to \(\{\text{Al}\}_{\text{aq}} = 1\times10^{-5}\) by modifying the aquous activity of all species of the element \(\text{Al}\) in the system with the command .set_aqueous_activity.

[17]:
Al_system.set_aqueous_activity("Al",1e-5)

All that is left to do now is to add above reactions to the existing Al_system, create a diagram and plot it. As illustrated previously, we will include plots of the HER and OER by specifying the appropriate keyword arguments in the PourbaixDiagram as True.

[18]:
Al_system.add_reactions(reactions)
Al_diagram = pb.PourbaixDiagram(Al_system,HER=True,OER=True)
Al_diagram.solve()
Al_diagram.show(backend='matplotlib',plot_regions=True)
../_images/manual_aluminium_23_0.png

As we can see, all species added to the chemical system appear at their designated positions in the potential-pH diagram, where the 3 oxidised forms of \(\text{Al}\), i.e. \(\text{Al}^{3+}\), \(\text{Al}_2\text{O}_3(s)\) and \(\text{AlO}_2^-\) are separated by vertical, pH-independent lines. In the next tutorial, we will generate the Pourbaix diagram for copper.