from burnman import AnisotropicMineral
from burnman.minerals import SLB_2011
from burnman.tools.eos import check_anisotropic_eos_consistency
from burnman.tools.plot import plot_projected_elastic_properties

if __name__ == "__main__":

    # Let's create a first approximation to an olivine mineral.
    # Olivine is orthorhombic.
    # BurnMan has an AnisotropicMineral class, which requires as input:
    # 1) An isotropic mineral (from which it gets the V-P-T relations)
    # 2) A standard state cell parameters vector
    # 3) A 4D numpy array containing constants describing the
    #    anisotropic tensor state function.

    fo = SLB_2011.forsterite()
    cell_lengths = np.array([4.7646, 10.2296, 5.9942])
    cell_lengths *= np.cbrt(fo.params['V_0'] / np.prod(cell_lengths))

    cell_parameters = np.array(
        [cell_lengths[0], cell_lengths[1], cell_lengths[2], 90, 90, 90])

    # The constants function is given as an expansion in ln(V/V0) and
    # thermal pressure (see paper). Here we are only interested in a single
    # 6x6 block with indexing constants[:, :, 1, 0], which corresponds to
    # S_{Tpq} / beta_RT, where S_{Tpq} is the isothermal compliance tensor
    # in Voigt form (values in the off-diagonal blocks and lower diagonal block
    # are multiplied by factors of 2 and 4 respectively, and beta_RT is
    # the Reuss isothermal compressibility,
    # both measured at the reference state.
    # This block is the most important; the other blocks are pressure and
Пример #2
0
                         'G_0': 81599990000.0,
                         'Gprime_0': 1.46257,
                         'eta_s_0': 2.29972,
                         'n': sum(forsterite_formula.values()),
                         'molar_mass': formula_mass(forsterite_formula)}

    forsterite = burnman.Mineral(params=forsterite_params)


    """
    BurnMan also contains the Stixrude and Lithgow-Bertelloni (2011)
    dataset, so we can also create an object corresponding to this mineral
    directly.
    """

    forsterite = SLB_2011.forsterite()

    """
    In petrology, we are often interested in phases for which we have little
    experimental or theoretical information.
    One common example is when we want to approximate the properties
    of an ordered phase relative to its disordered counterparts.
    In many cases, a reasonable procedure is to make a mechanical mixture
    of the known phases, such that they are the correct composition of
    the unknown phase, and then apply a linear correction to the Gibbs
    energy of the phase (i.e. Delta G = Delta E - T Delta S + P Delta V).
    In BurnMan, we do this using the CombinedMineral class.
    In the lines below, we create an ordered orthopyroxene with composition
    MgFeSi2O6 from a 50:50 mixture of enstatite and ferrosilite.
    We make this compound 6 kJ/mol more stable than the mechanical mixture.
    """