So let's discuss how the user will specify this "given mineral" in the software interface. Will the user select a mineral species from a drop down list, or will they specify a "a set number of cation positions for a set number of oxygen atoms". How does your code expect this specification?
Hello,
Attached is an example Excel spreadsheet of how this charge-balance calculation could work.
In this spreadsheet, the user inputs the desired
# of cations,
# of oxygen, and the
weight-percentages of nine common oxides: Na2O MgO Al2O3 SiO2 CaO TiO2 Cr2O3 MnO FeO
totalThe spreadsheet calculates:
- the sum of these oxides
- the molar amounts of the elements, including oxygen, assuming only ferrous iron
- the atomic proportions of the elements, including oxygen, assuming only ferrous iron, based on the input # of cations
- the charge-balanced proportions of the elements, based on the input # of cations and # of oxygen
The atomic ratio of ferric iron to total iron (Fe3+/ΣFe) is given, as are the recalculated weight percentages of FeO and Fe2O3, along with a revised sum of the oxides.
There are 6 analyses in this example file:
1) The augite from Giaramita and Day (1990), based on 4 cations and 6 oxygen.
2) The augite from Giaramita and Day (1990), based on 8 cations and 12 oxygen.
3) A magnetite-spinel-ulvospinel solid solution, based on 3 cations and 4 oxygen.
4) The garnet from Knowles (1987), based on 8 cations and 12 oxygen.
5) A mostly grossular garnet (#5) from Table 58 of volume 1A of the second edition of Deer, Howie and Zussman.
6) A mostly almandine garnet (#12) from Table 55 of volume 1A of the second edition of Deer, Howie and Zussman.
For the augite examples, the proportions of ferric iron are identical, as the ratios of cations to oxygen are identical.
The magnetite etc. solid solution is a hypothetical (fictive) composition, and so the total is exactly 100.00%.
For the garnet of Knowles (1987), charge balance is achieved with 0.59 wt% Fe2O3, and the final sum is 100.57 wt%.
For the mostly grossular garnet, all of the iron is recalculated as ferric iron, and exact charge balance is still not achieved; the oxygen remains as 11.973 atoms per 8 cations.
For the mostly almandine garnet, all of the iron remains as ferrous iron, and exact charge balance is still not achieved; the oxygen remains as 12.085 atoms per 8 cations.
In these latter two cases, the compositions do NOT achieve charge balance (indeed, they cannot). This is probably because of errors and uncertainties in the analyses.
The key formula in this Excel spreadsheet is the calculation of the proportion of ferric iron, which is handled with a nested IF formula:
IF(AI3<B3,IF(2*(B3-AI3)<=AH3,2*(B3-AI3),AH3),0)
If (the atomic proportion of oxygen is Less Than the input # of oxygen,
If (two times (the input # of oxygen Minus the atomic proportion of oxygen) is Less Than or Equal To the atomic proportion of ferrous iron,
then Calculate two times (the input # of oxygen Minus the atomic proportion of oxygen),
Otherwise use the atomic proportion of ferrous iron,
Otherwise report zero.
I hope that this spreadsheet and explanation will prove useful.
Regards,
Andrew