Exemple #1
0
import burnman
from burnman import equilibrate
from burnman.minerals import HP_2011_ds62, SLB_2011, JH_2015
from burnman.tools.polytope import simplify_composite_with_composition

run_aluminosilicates = True
run_ordering = True
run_gt_solvus = True
run_fper_ol = True
run_fixed_ol_composition = True
run_upper_mantle = True
run_lower_mantle = True
run_olivine_polymorphs = True

gt = SLB_2011.garnet()
ol = SLB_2011.mg_fe_olivine()
wad = SLB_2011.mg_fe_wadsleyite()
rw = SLB_2011.mg_fe_ringwoodite()
bdg = SLB_2011.mg_fe_bridgmanite()
ppv = SLB_2011.post_perovskite()
fper = SLB_2011.ferropericlase()
opx = SLB_2011.orthopyroxene()
stv = SLB_2011.stishovite()
coe = SLB_2011.coesite()
cpv = SLB_2011.ca_perovskite()

if __name__ == "__main__" and run_aluminosilicates:
    """
    Creates the classic aluminosilicate diagram involving
    univariate reactions between andalusite, sillimanite and kyanite.
Exemple #2
0
    print('Formulae corresponding to these independent endmember '
          'occupancies:')
    print(
        site_occupancies_to_strings([['Mg', 'Al', 'Si'], ['Mg', 'Al', 'Si']],
                                    [1, 1], ind_occupancies))

    print('The complete set of endmembers expressed as proportions of the '
          'independent endmember set:')
    print(py_maj_poly.endmembers_as_independent_endmember_amounts)

    print('\nWe can also create a polytope using the site-species occupancies '
          'of a set of independent endmembers of a solution. '
          'Here we do this for the garnet solid solution provided in the '
          'Stixrude and Lithgow-Bertelloni database.')

    gt = SLB_2011.garnet()

    print('Endmember compositions:')
    for f in gt.endmember_formulae:
        print(formula_to_string(f))

    gt_poly = solution_polytope_from_endmember_occupancies(
        gt.solution_model.endmember_occupancies, return_fractions=True)

    assert np.all(
        np.abs(gt.solution_model.endmember_occupancies -
               gt_poly.independent_endmember_occupancies) < 1.e-5)

    print('Endmembers as independent endmember amounts:')
    print(gt_poly.endmembers_as_independent_endmember_amounts)