Question originally from Stan Roozen (solution model with vacancies, Fe2+ and Fe3+ and site partitioning · Issue #525 · geodynamics/burnman · GitHub):

I am currently working on fitting a solid solution model of tourmaline with 14 endmembers to thermodynamic measurements obtained from natural solid solutions (where I know the site occupancies via XRD). I have used your polytope script to construct a set of independent endmembers that describe the solution. However, when I fit my natural compositions to this set of independent endmembers many of the indep endmembers’ fractions are negative. I want to do a multiple linear regression to get endmember thermodynamic properties (endmember and if significant W parameters). However, I am still unsure about the validity of using negative independent endmember fractions directly in the fitting of the thermodynamic properties.

So far I have not found a paper that uses the (negative) indep endmember fractions directly in the fitting. I can see how it can turn into problems, for example:

The mineral composition F-dravite would be a linear combination of independent endmembers F-uvite-uvite+dravite. F-dravite would weigh in the regression of uvite by -1 although it has no uvite at all in its formula. Also, the margules parameters would get different meanings when you take for example the interaction parameter wuvite-dravite in case of the f dravite composition would weight in the regression of w by w*-1*1.

I think therefore (correct me if I am wrong or if there is an alternative way) that I should do the data fitting of endmember and W parameters using a set of positive independent endmembers.

I am trying to use the example_polytopetools.py to generate a polytope with independent endmembers which all have positive endmember fractions based on a given input bulk composition of the solid solution (one of my natural samples)

However, my solid solution has vacancies, Fe2+ /Fe3+, and site partitioning of elements between different sites. I could not really find an example of a mineral solid solution class with vacancies, different valence, and site partitioning to use as an example.

so far I have ignored the partitioning of the elements among the different sites and used the following code to try to get the set of independent endmembers whose endmember fractions are all positive.

tm_model2_burnman_template.txt

However, It keeps complaining about my user-defined element names like Vc (vacancy) and Fe_f (ferric iron), especially during ordering in the IUPAC order. Could you please let me know what I have to change in the code so I can use user-defined elements?

Additionally, in my extended model, I have to work with site partitioning and site fractions with user-defined names like Fe_X , Fe_Y, Mg_X, Mg_Y, Fef_X, Fef_Y ect. How do I set up a solution model class which allows for the partitioning of elements? Is there an example somewhere?

I would like to do the composite fitting to positive indep endmembers also with a model with site fractions. Also, I would like to do composition fitting like:

composition_fitting.txt

but with a solution model with site fractions.