Esempio n. 1
0
 def test_nest(self):
     min1 = minerals.Murakami_etal_2012.fe_periclase()
     min2 = minerals.SLB_2005.periclase()
     ca = burnman.composite( [(min1,1.0)] )
     c = burnman.composite( [(ca,0.4),(min2, 0.6)] )
     c.set_method("slb3")
     c.set_state(5e9,1000)
     (f,m) = c.unroll()
     mins=",".join([a.to_string() for a in m])
     self.assertArraysAlmostEqual(f,[0.4,0.6])
     self.assertEqual(mins,",".join([min1.to_string(),min2.to_string()]))
Esempio n. 2
0
 def test_nest(self):
     min1 = minerals.Murakami_etal_2012.fe_periclase()
     min2 = minerals.SLB_2005.periclase()
     ca = burnman.composite([(min1, 1.0)])
     c = burnman.composite([(ca, 0.4), (min2, 0.6)])
     c.set_method("slb3")
     c.set_state(5e9, 1000)
     (f, m) = c.unroll()
     mins = ",".join([a.to_string() for a in m])
     self.assertArraysAlmostEqual(f, [0.4, 0.6])
     self.assertEqual(mins, ",".join([min1.to_string(), min2.to_string()]))
Esempio n. 3
0
    def test_unroll(self):

        min1 = minerals.Murakami_etal_2012.fe_periclase()
        min2 = minerals.SLB_2005.periclase()

        (f,m) = burnman.composite( [(min1,1.0)] ).unroll()
        mins=",".join([a.to_string() for a in m])
        self.assertEqual(f,[1.0])
        self.assertEqual(mins,"'burnman.minerals.Murakami_etal_2012.fe_periclase'")
        (f,m) = burnman.composite( [(min1,0.4),(min2,0.6)] ).unroll()
        self.assertEqual(f,[0.4,0.6])

        c1 = burnman.composite( [(min1,1.0)] )
        c2 = burnman.composite( [(min2,1.0)] )
        c = burnman.composite( [(min1,0.1),(c1,0.4),(c2,0.5)] )
        (f,m) = c.unroll()
        mins=",".join([a.to_string() for a in m])
        self.assertEqual(f,[0.1,0.4,0.5])
        self.assertEqual(mins,min1.to_string()+','+min1.to_string()+','+min2.to_string())

        c1 = burnman.composite( [ (min1,0.1), (min2,0.9) ] )
        c2 = burnman.composite( [(min2,1.0)] )
        c = burnman.composite( [(min1,0.3),(c1,0.1),(c2,0.6)] )
        (f,m) = c.unroll()
        mins=",".join([a.to_string() for a in m])
        self.assertArraysAlmostEqual(f,[0.3,0.01,0.09,0.6])
        self.assertEqual(mins,",".join([min1.to_string(),min1.to_string(),min2.to_string(),min2.to_string()]))
Esempio n. 4
0
def calc_velocities(mg_pv_K, mg_pv_K_prime, mg_pv_G, mg_pv_G_prime, fe_pv_K,
                    fe_pv_K_prime, fe_pv_G, fe_pv_G_prime):
    method = 'slb3'  #slb3|slb2|mgd3|mgd2
    amount_perovskite = 0.95
    rock = burnman.composite([
        (minerals.SLB_2005.mg_fe_perovskite(0.1), amount_perovskite),
        (minerals.SLB_2005.ferropericlase(0.5), 1.0 - amount_perovskite)
    ])

    mg_pv = rock.staticphases[0].mineral.base_materials[0]
    fe_pv = rock.staticphases[0].mineral.base_materials[1]

    mg_pv.params['K_0'] = mg_pv_K
    mg_pv.params['Kprime_0'] = mg_pv_K_prime
    mg_pv.params['G_0'] = mg_pv_G
    mg_pv.params['Gprime_0'] = mg_pv_G_prime
    fe_pv.params['K_0'] = fe_pv_K
    fe_pv.params['Kprime_0'] = fe_pv_K_prime
    fe_pv.params['G_0'] = fe_pv_G
    fe_pv.params['Gprime_0'] = fe_pv_G_prime

    rock.set_method(method)

    mat_rho, mat_vp, mat_vs, mat_vphi, mat_K, mat_G = burnman.velocities_from_rock(
        rock, seis_p, temperature)
    return mat_vp, mat_vs, mat_rho
Esempio n. 5
0
 def test_rock(self):
     amount_perovskite = 0.3
     rock = burnman.composite( ( ( minerals.SLB_2005.mg_fe_perovskite(0.1), amount_perovskite ), 
                                 (minerals.SLB_2005.ferropericlase(0.2), 1.0-amount_perovskite) ) )
     rock.set_method('slb2')
     (fr,phases)=rock.unroll()
     self.assertAlmostEqual(fr[0], 0.3, 2)
     self.assertAlmostEqual(fr[1], 0.7, 2)
Esempio n. 6
0
 def test_rock(self):
     amount_perovskite = 0.3
     rock = burnman.composite(
         ((minerals.SLB_2005.mg_fe_perovskite(0.1), amount_perovskite),
          (minerals.SLB_2005.ferropericlase(0.2), 1.0 - amount_perovskite)))
     rock.set_method('slb2')
     (fr, phases) = rock.unroll()
     self.assertAlmostEqual(fr[0], 0.3, 2)
     self.assertAlmostEqual(fr[1], 0.7, 2)
def calc_velocities(a,b,c):
    method = 'slb3' #slb3|slb2|mgd3|mgd2
    amount_perovskite = a
    rock = burnman.composite( [ ( minerals.SLB_2005.mg_fe_perovskite(b), amount_perovskite ), 
				(minerals.SLB_2005.ferropericlase(c), 1.0-amount_perovskite) ] )

    rock.set_method(method)
    
    mat_rho, mat_vp, mat_vs, mat_vphi, mat_K, mat_G = burnman.velocities_from_rock(rock,seis_p, temperature)	
    return mat_vp, mat_vs, mat_rho
Esempio n. 8
0
    def eval(uncertain):
        rock = burnman.composite ( [ (my_perovskite(uncertain), 1.0) ])
        rock.set_method('slb3')

        temperature = burnman.geotherm.adiabatic(seis_p,1900*uncertain[8],rock)
        
        mat_rho, mat_vp, mat_vs, mat_vphi, mat_K, mat_G = \
            burnman.velocities_from_rock(rock, seis_p, temperature, burnman.averaging_schemes.voigt_reuss_hill())

        return seis_p, mat_vs, mat_vphi, mat_rho
Esempio n. 9
0
 def test_1(self):
     rock = burnman.composite ( ( (mypericlase(), 1.0),) )
     rock.set_method('slb3') 
     rho, v_p, v_s, v_phi, K_vrh, G_vrh = \
         burnman.velocities_from_rock(rock, [10e9,], [300,])
     self.assertAlmostEqual(3791.392, rho[0], 2)
     self.assertAlmostEqual(10285.368, v_p[0], 2)
     self.assertAlmostEqual(6308.811, v_s[0], 2)
     self.assertAlmostEqual(7260.900, v_phi[0], 2)
     self.assertAlmostEqual(199.884, K_vrh[0]/1.e9, 2)
     self.assertAlmostEqual(150.901, G_vrh[0]/1.e9, 2)
Esempio n. 10
0
 def test_two_different(self):
     rock = burnman.composite ( [ (minerals.SLB_2005.periclase(), 1.0), 
                                  (minerals.SLB_2005.fe_perovskite(), 0.0) ] )
     rock.set_method('slb3')
     rho, v_p, v_s, v_phi, K_vrh, G_vrh = \
         burnman.velocities_from_rock(rock,[10e9,], [300,])
     self.assertAlmostEqual(3791.392, rho[0], 2)
     self.assertAlmostEqual(10285.368, v_p[0], 2)
     self.assertAlmostEqual(6308.811, v_s[0], 2)
     self.assertAlmostEqual(7260.900, v_phi[0], 2)
     self.assertAlmostEqual(199.884, K_vrh[0]/1.e9, 2)
     self.assertAlmostEqual(150.901, G_vrh[0]/1.e9, 2)
def calc_velocities(a, b, c):
    method = 'slb3'  #slb3|slb2|mgd3|mgd2
    amount_perovskite = a
    rock = burnman.composite([
        (minerals.SLB_2005.mg_fe_perovskite(b), amount_perovskite),
        (minerals.SLB_2005.ferropericlase(c), 1.0 - amount_perovskite)
    ])

    rock.set_method(method)

    mat_rho, mat_vp, mat_vs, mat_vphi, mat_K, mat_G = burnman.velocities_from_rock(
        rock, seis_p, temperature)
    return mat_vp, mat_vs, mat_rho
def calculate_forward_problem(frac, pressures):
    print frac

    rock = burnman.composite([
        (minerals.SLB_2011.mg_perovskite(), frac[2] * frac[0]),
        (minerals.SLB_2011.fe_perovskite(), frac[2] * (1.0 - frac[0])),
        (minerals.SLB_2011.periclase(), (1.0 - frac[2])),
        (minerals.SLB_2011.wuestite(), 0.0 * (1.0 - frac[2]) * (1.0 - frac[0]))
    ])
    rock.set_method('slb3')
    temperature = burnman.geotherm.self_consistent(pressures, frac[1], rock)
    mat_rho, mat_vp, mat_vs, mat_vphi, mat_K, mat_G = burnman.velocities_from_rock(
        rock, pressures, temperature)
    return mat_rho, mat_vs, mat_vphi
Esempio n. 13
0
 def material_error(amount_perovskite):
     rock = burnman.composite ( [ (minerals.Murakami_etal_2012.fe_perovskite(), amount_perovskite),
                          (minerals.Murakami_etal_2012.fe_periclase(), 1.0 - amount_perovskite) ] )
 
     rock.set_method(method)
 
     print "Calculations are done for:"
     rock.debug_print()
 
     mat_rho, mat_vp, mat_vs, mat_vphi, mat_K, mat_G = \
         burnman.velocities_from_rock(rock, seis_p, temperature, burnman.averaging_schemes.voigt_reuss_hill())
 
    #[rho_err,vphi_err,vs_err]=burnman.compare_chifactor([mat_vs,mat_vphi,mat_rho],[seis_vs,seis_vphi,seis_rho])
     [rho_err,vphi_err,vs_err]=burnman.compare_l2(depths,[mat_vs,mat_vphi,mat_rho],[seis_vs,seis_vphi,seis_rho])
 
     return vs_err, vphi_err
Esempio n. 14
0
def calc_velocities(ref_rho, K_0, K_prime, G_0, G_prime): 

    test = burnman.minerals_base.material()

    test.params['V_0'] = 10.e-6
    test.params['molar_mass'] = ref_rho*test.params['V_0']
    test.params['K_0'] = K_0
    test.params['Kprime_0'] = K_prime
    test.params['G_0'] = G_0
    test.params['Gprime_0'] = G_prime

    rock = burnman.composite( [(test, 1.0 )] )
    rock.set_method('bm3')

    temperature = np.empty_like(seis_p)
    mat_rho, mat_vp, mat_vs, mat_vphi, mat_K, mat_G = burnman.velocities_from_rock(rock,seis_p, temperature)	

    return mat_rho, mat_vphi, mat_vs
Esempio n. 15
0
    def eval_material(amount_perovskite):
#        rock = burnman.composite ( [ (minerals.Murakami_etal_2012.fe_perovskite(), amount_perovskite),
#                             (minerals.Murakami_etal_2012.fe_periclase(), 1.0 - amount_perovskite) ] )
        rock = burnman.composite ( [ (minerals.SLB_2011_ZSB_2013.mg_fe_perovskite(0.07), amount_perovskite),
                             (minerals.SLB_2011.ferropericlase(0.2), 1.0 - amount_perovskite) ] )
#        rock = burnman.composite ( [ (minerals.SLB_2011.mg_fe_perovskite(0.), amount_perovskite),
#                             (minerals.SLB_2011.ferropericlase(1.0), 1.0 - amount_perovskite) ] )
        rock.set_method(method)
        temperature = burnman.geotherm.adiabatic(seis_p,1900,rock)
        print "Calculations are done for:"
        rock.debug_print()
    
        mat_rho, mat_vp, mat_vs, mat_vphi, mat_K, mat_G = \
            burnman.velocities_from_rock(rock, seis_p, temperature, burnman.averaging_schemes.voigt_reuss_hill())
    
        #[rho_err,vphi_err,vs_err]=burnman.compare_chifactor(mat_vs,mat_vphi,mat_rho,seis_vs,seis_vphi,seis_rho)
        
    
        return seis_p, mat_vs, mat_vphi, mat_rho
Esempio n. 16
0
    def eval_material(amount_perovskite):
        #        rock = burnman.composite ( [ (minerals.Murakami_etal_2012.fe_perovskite(), amount_perovskite),
        #                             (minerals.Murakami_etal_2012.fe_periclase(), 1.0 - amount_perovskite) ] )
        rock = burnman.composite([
            (minerals.SLB_2011.mg_fe_perovskite(0.08), amount_perovskite),
            (minerals.SLB_2011.ferropericlase(0.21), 1.0 - amount_perovskite)
        ])
        #        rock = burnman.composite ( [ (minerals.SLB_2011.mg_fe_perovskite(0.), amount_perovskite),
        #                             (minerals.SLB_2011.ferropericlase(1.0), 1.0 - amount_perovskite) ] )

        rock.set_method(method)
        temperature = burnman.geotherm.adiabatic(seis_p, 1900, rock)
        print "Calculations are done for:"
        rock.debug_print()

        mat_rho, mat_vp, mat_vs, mat_vphi, mat_K, mat_G = \
            burnman.velocities_from_rock(rock, seis_p, temperature, burnman.averaging_schemes.voigt_reuss_hill())

        #[rho_err,vphi_err,vs_err]=burnman.compare_chifactor(mat_vs,mat_vphi,mat_rho,seis_vs,seis_vphi,seis_rho)

        return seis_p, mat_vs, mat_vphi, mat_rho
def realize_pyrolite():
 
    #approximate four component pyrolite model
    x_pv = 0.67
    x_fp = 0.33
    pv_fe_num = 0.07
    fp_fe_num = 0.2 

    mg_perovskite = minerals.SLB_2011_ZSB_2013.mg_perovskite(); realize_mineral(mg_perovskite)
    fe_perovskite = minerals.SLB_2011_ZSB_2013.fe_perovskite(); realize_mineral(fe_perovskite)
    wuestite = minerals.SLB_2011_ZSB_2013.wuestite(); realize_mineral(wuestite)
    periclase = minerals.SLB_2011_ZSB_2013.periclase(); realize_mineral(periclase)

    perovskite = helper_solid_solution( [ mg_perovskite, fe_perovskite], [1.0-pv_fe_num, pv_fe_num])
    ferropericlase = helper_solid_solution( [ periclase, wuestite], [1.0-fp_fe_num, fp_fe_num])

    pyrolite = burnman.composite( [ (perovskite, x_pv), (ferropericlase, x_fp) ] )
    pyrolite.set_method('slb3')

    anchor_temperature = normal(loc = 1935.0, scale = 200.0)

    return pyrolite, anchor_temperature
Esempio n. 18
0
    def test_unroll(self):

        min1 = minerals.Murakami_etal_2012.fe_periclase()
        min2 = minerals.SLB_2005.periclase()

        (f, m) = burnman.composite([(min1, 1.0)]).unroll()
        mins = ",".join([a.to_string() for a in m])
        self.assertEqual(f, [1.0])
        self.assertEqual(mins,
                         "'burnman.minerals.Murakami_etal_2012.fe_periclase'")
        (f, m) = burnman.composite([(min1, 0.4), (min2, 0.6)]).unroll()
        self.assertEqual(f, [0.4, 0.6])

        c1 = burnman.composite([(min1, 1.0)])
        c2 = burnman.composite([(min2, 1.0)])
        c = burnman.composite([(min1, 0.1), (c1, 0.4), (c2, 0.5)])
        (f, m) = c.unroll()
        mins = ",".join([a.to_string() for a in m])
        self.assertEqual(f, [0.1, 0.4, 0.5])
        self.assertEqual(
            mins,
            min1.to_string() + ',' + min1.to_string() + ',' + min2.to_string())

        c1 = burnman.composite([(min1, 0.1), (min2, 0.9)])
        c2 = burnman.composite([(min2, 1.0)])
        c = burnman.composite([(min1, 0.3), (c1, 0.1), (c2, 0.6)])
        (f, m) = c.unroll()
        mins = ",".join([a.to_string() for a in m])
        self.assertArraysAlmostEqual(f, [0.3, 0.01, 0.09, 0.6])
        self.assertEqual(
            mins, ",".join([
                min1.to_string(),
                min1.to_string(),
                min2.to_string(),
                min2.to_string()
            ]))
Esempio n. 19
0
def make_rock():

    #approximate four component pyrolite model
    x_pv = 0.67
    x_fp = 0.33
    pv_fe_num = 0.07
    fp_fe_num = 0.2

    mg_perovskite = minerals.SLB_2011_ZSB_2013.mg_perovskite()
    fe_perovskite = minerals.SLB_2011_ZSB_2013.fe_perovskite()
    wuestite = minerals.SLB_2011_ZSB_2013.wuestite()
    periclase = minerals.SLB_2011_ZSB_2013.periclase()

    perovskite = helper_solid_solution([mg_perovskite, fe_perovskite],
                                       [1.0 - pv_fe_num, pv_fe_num])
    ferropericlase = helper_solid_solution([periclase, wuestite],
                                           [1.0 - fp_fe_num, fp_fe_num])

    pyrolite = burnman.composite([(perovskite, x_pv), (ferropericlase, x_fp)])
    pyrolite.set_method('slb3')
    anchor_temperature = 1935.0

    return pyrolite, anchor_temperature
Esempio n. 20
0
def calc_velocities(mg_pv_K,mg_pv_K_prime,mg_pv_G,mg_pv_G_prime,fe_pv_K,fe_pv_K_prime,fe_pv_G,fe_pv_G_prime):
    method = 'slb3' #slb3|slb2|mgd3|mgd2
    amount_perovskite = 0.95
    rock = burnman.composite( [ ( minerals.SLB_2005.mg_fe_perovskite(0.1), amount_perovskite ), 
				(minerals.SLB_2005.ferropericlase(0.5), 1.0-amount_perovskite) ] )


    mg_pv = rock.staticphases[0].mineral.base_materials[0]
    fe_pv = rock.staticphases[0].mineral.base_materials[1]

    mg_pv.params['K_0'] = mg_pv_K
    mg_pv.params['Kprime_0'] = mg_pv_K_prime
    mg_pv.params['G_0'] = mg_pv_G
    mg_pv.params['Gprime_0'] = mg_pv_G_prime
    fe_pv.params['K_0'] = fe_pv_K
    fe_pv.params['Kprime_0'] = fe_pv_K_prime
    fe_pv.params['G_0'] = fe_pv_G
    fe_pv.params['Gprime_0'] = fe_pv_G_prime

    rock.set_method(method)
    
    mat_rho, mat_vp, mat_vs, mat_vphi, mat_K, mat_G = burnman.velocities_from_rock(rock,seis_p, temperature)	
    return mat_vp, mat_vs, mat_rho
Esempio n. 21
0

table_brown = read_table("input_geotherm/brown_81.txt")
table_brown_depth = np.array(table_brown)[:, 0]
table_brown_temperature = np.array(table_brown)[:, 1]

table_anderson = read_table("input_geotherm/anderson_82.txt")
table_anderson_depth = np.array(table_anderson)[:, 0]
table_anderson_temperature = np.array(table_anderson)[:, 1]

# test geotherm
if __name__ == "__main__":
    p = np.arange(1.0e9, 128.0e9, 3e9)

    pyrolite = burnman.composite([
        (burnman.minerals.SLB_2011.mg_fe_perovskite(0.2), 0.8),
        (burnman.minerals.SLB_2011.ferropericlase(0.4), 0.2)
    ])
    pyrolite.set_method('slb3')
    pyrolite.set_state(40.e9, 2000)

    t1 = anderson(p)
    t2 = brown_shankland(p)
    t3 = adiabatic(p, 1600, pyrolite)

    p1, = pyplot.plot(p, t1, 'x--r')
    p2, = pyplot.plot(p, t2, '*-g')
    p3, = pyplot.plot(p, t3, '*-b')
    pyplot.legend([p1, p2, p3], ["anderson", "brown", "adiabatic"], loc=4)

    pyplot.show()
Esempio n. 22
0
    #this could also be loaded from a file, just uncomment this
    #table = tools.read_table("input_geotherm/example_geotherm.txt")

    table_pressure = np.array(table)[:,0]
    table_temperature = np.array(table)[:,1]
    
    my_geotherm_interpolate = lambda p:  [ burnman.tools.lookup_and_interpolate\
                (table_pressure, table_temperature, x) for x in p]
    temperature5 = my_geotherm_interpolate(pressures)


    #finally, we can also calculate a self consistent 
    #geotherm for an assemblage of minerals
    #based on self compression of the composite rock.  
    #First we need to define an assemblage
    pyrolite = burnman.composite( [ (minerals.SLB_2005.mg_fe_perovskite(0.1), 0.7), 
                                   (minerals.SLB_2005.ferropericlase(0.4),   0.3) ] )
    pyrolite.set_method("mgd3")
    #next, define an anchor temperature at which we are starting.  
    #Perhaps 1500 K for the upper mantle
    T0 = 1500.
    #then generate temperature values using the self consistent function. 
    # This takes more time than the above methods
    temperature6 = burnman.geotherm.adiabatic(pressures, T0, pyrolite)
    
    #you can also look at burnman/geotherm.py to see how the geotherms are implemented
    
    
    plt.plot(pressures/1e9,temperature1,'-r',label="Brown, Shankland")
    plt.plot(pressures/1e9,temperature2,'-c',label="Anderson")
    plt.plot(pressures/1e9,temperature3,'-g',label="Watson, Baxter")
    plt.plot(pressures/1e9,temperature4,'-b',label="handwritten linear")
        molar_fraction = [1. - fe_num, 0.0 + fe_num]
        mb.helper_solid_solution.__init__(self, base_materials, molar_fraction)


#define the P-T path
pressure = np.linspace(28.0e9, 129e9, 25.)
temperature_bs = burnman.geotherm.brown_shankland(pressure)
temperature_an = burnman.geotherm.anderson(pressure)

#seismic model for comparison:
seismic_model = burnman.seismic.prem() # pick from .prem() .slow() .fast() (see burnman/seismic.py)
depths = map(seismic_model.depth, pressure)
seis_p, seis_rho, seis_vp, seis_vs, seis_vphi = seismic_model.evaluate_all_at(depths)    

#pure perovskite
perovskitite = burnman.composite( ( (perovskite(0.06), 1.0),) )
perovskitite.set_method(method)
 
#pure periclase
periclasite = burnman.composite( ( (ferropericlase(0.21), 1.0),))
periclasite.set_method(method) 

#pyrolite (80% perovskite)
pyrolite = burnman.composite( ( (perovskite(0.06), 0.834),
                              (ferropericlase(0.21), 0.166) ) )
pyrolite.set_method(method) 

#preferred mixture?
amount_perovskite = 0.92
preferred_mixture = burnman.composite( ( (perovskite(0.06), amount_perovskite),
                                         (ferropericlase(0.21), 1.0-amount_perovskite) ) )
Esempio n. 24
0
    ###Input Model 1

    #INPUT for method_1
    """ choose 'slb' (finite-strain 2nd order sheer modulus, stixrude and lithgow-bertelloni, 2005)
    or 'mgd' (mie-gruneisen-debeye, matas et al. 2007)
    or 'bm' (birch-murnaghan, if you choose to ignore temperature (your choice in geotherm will not matter in this case))
    or 'slb3 (finite-strain 3rd order shear modulus, stixrude and lithgow-bertelloni, 2005)"""

    method = 'slb2'

    #Input composition of model 1. See example_composition for potential choices. We'll just choose something simple here

    amount_perovskite_1 = 1.0
    rock_1 = burnman.composite(
        ((minerals.Murakami_etal_2012.fe_perovskite(), amount_perovskite_1),
         (minerals.Murakami_etal_2012.fe_periclase(),
          1.0 - amount_perovskite_1)))
    rock_1.set_method(method)

    #input pressure range for first model. This could be from a seismic model or something you create. For this example we will create an array

    seis_p_1 = np.arange(28.5e9, 133e9, 4.75e9)
    #seismic model for comparison:
    seismic_model = burnman.seismic.prem(
    )  # pick from .prem() .slow() .fast() (see burnman/seismic.py)
    depths = map(seismic_model.depth, seis_p_1)
    seis_p, seis_rho, seis_vp, seis_vs, seis_vphi = seismic_model.evaluate_all_at(
        depths)
    temperature_bs = burnman.geotherm.brown_shankland(seis_p)
    temperature_an = burnman.geotherm.anderson(seis_p)
    ##Now onto the second model parameters
Esempio n. 25
0
    
    #INPUT for method_1
    """ choose 'slb' (finite-strain 2nd order sheer modulus, stixrude and lithgow-bertelloni, 2005)
    or 'mgd' (mie-gruneisen-debeye, matas et al. 2007)
    or 'bm' (birch-murnaghan, if you choose to ignore temperature (your choice in geotherm will not matter in this case))
    or 'slb3 (finite-strain 3rd order shear modulus, stixrude and lithgow-bertelloni, 2005)"""
    
    method = 'mgd2' 
    
    
    # Input for model M_pyrolite as defined in Matas et al. 2007 table 3. Molar proportions are converted to atomic fractions    

    #weight_percents = {'Mg':0.297882, 'Fe': 0.0489699, 'Si':0.1819, 'Ca':0.0228576, 'Al':0.0116446}
    #phase_fractions,relative_molar_percent = burnman.calculate_phase_percents(weight_percents)
    rock = burnman.composite( ( (minerals.Matas_etal_2007.mg_perovskite(),.620 ),
                            (minerals.Matas_etal_2007.fe_perovskite(), .078 ),
                            (minerals.Matas_etal_2007.periclase(), .268 ),
                            (minerals.Matas_etal_2007.wuestite(), .034 )))
    rock2 = burnman.composite( ( (minerals.Matas_etal_2007.mg_perovskite(),.62 ),
                            (minerals.Matas_etal_2007.fe_perovskite(), .078/1.46 ),
                            (minerals.Matas_etal_2007.periclase(), .268 ),
                            (minerals.Matas_etal_2007.wuestite(), .034/1.46 ))) 
    #KD is 2... doesn't match either
    #rock2 = burnman.composite( ( (minerals.Matas_mg_perovskite(),.3574 ),
    #                        (minerals.Matas_fe_perovskite(), .0536 ),
    #                        (minerals.Matas_periclase(), .1656 ),
    #                        (minerals.Matas_wuestite(), .0124 )))
    #input pressure range for first model. This could be from a seismic model or something you create. For this example we will create an array
    rock.set_method(method) 
    rock2.set_method(method)
    seis_p_1 = np.arange(28e9, 128e9, 4.8e9)
    temperature_bs = burnman.geotherm.brown_shankland(seis_p_1)
Esempio n. 26
0
    #seismic model for comparison:
    # pick from .prem() .slow() .fast() (see burnman/seismic.py)
    seismic_model = burnman.seismic.prem()
    number_of_points = 40  #set on how many depth slices the computations should be done
    # we will do our computation and comparison at the following depth values:
    depths = np.linspace(700e3, 2800e3, number_of_points)
    #alternatively, we could use the values where prem is defined:
    #depths = seismic_model.internal_depth_list()
    seis_p, seis_rho, seis_vp, seis_vs, seis_vphi = seismic_model.evaluate_all_at(
        depths)

    # here we use the Brown & Shankland geotherm
    temperature = burnman.geotherm.brown_shankland(seis_p)

    # We create one mineral that contains spin transitions
    rock = burnman.composite([(minerals.Murakami_etal_2012.fe_periclase(), 1.0)
                              ])

    # The mineral Murakami_fe_periclase is derived from minerals.helper_spin_transition
    # which contains the logic to switch between two other minerals based on the
    # current pressure. The mineral is implemented similar to the following lines:
    #
    #   class Murakami_fe_periclase(helper_spin_transition):
    #     def __init__(self):
    #       helper_spin_transition.__init__(self, 63.0e9, Murakami_fe_periclase_LS(), Murakami_fe_periclase_HS())
    #
    # Note the reference to the low spin and high spin minerals (_LS and _HS).

    # Set method, here set to 'slb2' as the shear wave moduli in
    # Murakami et al. 2012 were fit to second order
    rock.set_method('slb2')
                        	 	#at room pressure/temperature
                         'Gprime_0': 1.7, #pressure derivative of shear modulus
                         'molar_mass': .055845, #molar mass in units of [kg/mol]
                         'n': 1, #number of atoms per formula unit
                         'Debye_0': 998.85, #Debye temperature for material. 
                         	#See Stixrude & Lithgow-Bertelloni, 2005 for values 
                         'grueneisen_0': 1.368, #Gruneisen parameter for material. 
                         	#See Stixrude & Lithgow-Bertelloni, 2005 for values
                         'q_0': 0.917, #isotropic strain derivative of gruneisen
                         	#parameter. Values in Stixrude & Lithgow-Bertelloni, 2005 
    			    'eta_s_0': 3.0} #full strain derivative of gruneisen parameter
            					#parameter. Values in Stixrude & Lithgow-Bertelloni, 2005
            					
 
 
 rock = burnman.composite( [(own_material(), 1.0)] )
 
 #seismic model for comparison: (see burnman/seismic.py)
 seismic_model = burnman.seismic.prem() # pick from .prem() .slow() .fast() 
 number_of_points = 20 #set on how many depth slices the computations should be done
 depths = np.linspace(700e3,2800e3, number_of_points)
 #depths = seismic_model.internal_depth_list()
 seis_p, seis_rho, seis_vp, seis_vs, seis_vphi = seismic_model.evaluate_all_at(depths)
 
         
 temperature = burnman.geotherm.brown_shankland(seis_p)
 
 rock.set_method(method)
 
 print "Calculations are done for:"
 rock.debug_print()
"""

import os, sys, numpy as np, matplotlib.pyplot as plt
#hack to allow scripts to be placed in subdirectories next to burnman:
if not os.path.exists('burnman') and os.path.exists('../burnman'):
    sys.path.insert(1, os.path.abspath('..'))

import burnman
from burnman import minerals

if __name__ == "__main__":
    #Input composition.

    amount_perovskite = 0.95
    rock = burnman.composite([(minerals.Murakami_etal_2012.fe_perovskite(),
                               amount_perovskite),
                              (minerals.Murakami_etal_2012.fe_periclase_LS(),
                               1.0 - amount_perovskite)])

    #(min pressure, max pressure, pressure step)
    seis_p = np.arange(25e9, 125e9, 5e9)

    #Input adiabat potential temperature
    T0 = 1500.0

    #Now we'll calculate the models for each method
    """ 'slb2' (finite-strain 2nd order shear modulus, 
        stixrude and lithgow-bertelloni, 2005)
    or 'slb3 (finite-strain 3rd order shear modulus, 
   	stixrude and lithgow-bertelloni, 2005)
    or 'mgd3' (mie-gruneisen-debeye 3rd order shear modulus, 
        matas et al. 2007)
Esempio n. 29
0
    weight_percents_pyro = {
        'Mg': 0.228,
        'Fe': 0.0626,
        'Si': 0.21,
        'Ca': 0.,
        'Al': 0.
    }
    phase_fractions_pyro,relative_molar_percent_pyro = \
    burnman.calculate_phase_percents(weight_percents_pyro)
    #input initial distribution coefficent. See example_partition_coefficient.py
    #for explanation
    Kd_0 = .5
    iron_content = lambda p,t: burnman.calculate_partition_coefficient\
    (p,t,relative_molar_percent_pyro, Kd_0)
    pyrolite = burnman.composite( [ (minerals.SLB_2005.mg_fe_perovskite_pt_dependent(iron_content,0),\
            phase_fractions_pyro['pv'] ),
                                (minerals.SLB_2005.ferropericlase_pt_dependent(iron_content,1), \
                                phase_fractions_pyro['fp'] ) ] )

    #input pressure range for first model.
    seis_p_1 = np.arange(25e9, 125e9, 5e9)

    #input your geotherm.

    temperature_1 = burnman.geotherm.brown_shankland(seis_p_1)

    ##Now onto the second model parameters

    ##input second method

    #Input composition of model enstatite chondrites. See example_composition for ways of inputting composition.
Esempio n. 30
0
    #this could also be loaded from a file, just uncomment this
    #table = tools.read_table("input_geotherm/example_geotherm.txt")

    table_pressure = np.array(table)[:,0]
    table_temperature = np.array(table)[:,1]
    
    my_geotherm_interpolate = lambda p:  [ burnman.tools.lookup_and_interpolate\
                (table_pressure, table_temperature, x) for x in p]
    temperature4 = my_geotherm_interpolate(pressures)


    #finally, we can also calculate a self consistent 
    #geotherm for an assemblage of minerals
    #based on self compression of the composite rock.  
    #First we need to define an assemblage
    pyrolite = burnman.composite( [ (minerals.SLB_2005.mg_fe_perovskite(0.1), 0.7), 
                                   (minerals.SLB_2005.ferropericlase(0.4),   0.3) ] )
    pyrolite.set_method("mgd3")
    #next, define an anchor temperature at which we are starting.  
    #Perhaps 1500 K for the upper mantle
    T0 = 1500.
    #then generate temperature values using the self consistent function. 
    # This takes more time than the above methods
    temperature5 = burnman.geotherm.adiabatic(pressures, T0, pyrolite)
    
    #you can also look at burnman/geotherm.py to see how the geotherms are implemented
    
    
    plt.plot(pressures/1e9,temperature1,'-r',label="Brown, Shankland")
    plt.plot(pressures/1e9,temperature2,'-c',label="Anderson")
    plt.plot(pressures/1e9,temperature3,'-b',label="handwritten linear")
    plt.plot(pressures/1e9,temperature4,'-k',label="handwritten from table")
    (your choice in geotherm will not matter in this case))"""
    
    method = 'slb3' 
        
    
    # To compute seismic velocities and other properties, we need to supply
    # burnman with a list of minerals (phases) and their molar abundances. Minerals
    # are classes found in burnman.minerals and are derived from
    # burnman.minerals.material.
    # Here are a few ways to define phases and molar_abundances:
    
    #Example 1: two simple fixed minerals
    if True:
        amount_perovskite = 0.95
        rock = burnman.composite ( [ (minerals.SLB_2011.mg_perovskite(), amount_perovskite),
                                     (minerals.SLB_2011.periclase(), \
                                     1.0-amount_perovskite) ] )
    
    #Example 2: specify fixed iron content
    if False:
        amount_perovskite = 0.95
        rock = burnman.composite( [ (minerals.SLB_2011.mg_fe_perovskite(0.2), amount_perovskite), \
                                (minerals.SLB_2011.ferropericlase(0.2), 1.0-amount_perovskite) ] )
    
    #Example 3: input weight percentages
    #See comments in example_partition_coef.py for references to 
    #partition coefficent calculation

    if False:
        weight_percents = {'Mg':0.213, 'Fe': 0.08, 'Si':0.27, 'Ca':0., 'Al':0.}
        Kd_0 = .59 #Fig 5 Nakajima et al 2012
    or 'bm' (birch-murnaghan, if you choose to ignore temperature
    (your choice in geotherm will not matter in this case))"""

    method = 'slb3'

    # To compute seismic velocities and other properties, we need to supply
    # burnman with a list of minerals (phases) and their molar abundances. Minerals
    # are classes found in burnman.minerals and are derived from
    # burnman.minerals.material.
    # Here are a few ways to define phases and molar_abundances:

    #Example 1: two simple fixed minerals
    if True:
        amount_perovskite = 0.95
        rock = burnman.composite ( [ (minerals.SLB_2011.mg_perovskite(), amount_perovskite),
                                     (minerals.SLB_2011.periclase(), \
                                     1.0-amount_perovskite) ] )

    #Example 2: specify fixed iron content
    if False:
        amount_perovskite = 0.95
        rock = burnman.composite( [ (minerals.SLB_2011.mg_fe_perovskite(0.2), amount_perovskite), \
                                (minerals.SLB_2011.ferropericlase(0.2), 1.0-amount_perovskite) ] )

    #Example 3: input weight percentages
    #See comments in example_partition_coef.py for references to
    #partition coefficent calculation

    if False:
        weight_percents = {
            'Mg': 0.213,
Esempio n. 33
0
# the library, including the ability to make composites, and compute
# thermoelastic properties of them.  The minerals module includes
# the mineral physical parameters for the predefined minerals in
# BurnMan
import burnman
from burnman import minerals

if __name__ == "__main__":    

    # This is the first actual work done in this example.  We define
    # composite object and name it "rock".  A composite is made by
    # giving burnman.composite a list of minerals and their molar fractions.
    # Here "rock" has two constituent minerals: it is 80% Mg perovskite
    # and 20% periclase.  More minerals may be added by simply extending
    # the list given to burnman.composite
    rock = burnman.composite ( [ (minerals.SLB_2011.mg_perovskite(), 0.80),\
                                 (minerals.SLB_2011.periclase(),     0.20) ] )


    # Here we create and load the PREM seismic velocity model, which will be
    # used for comparison with the seismic velocities of the "rock" composite
    seismic_model = burnman.seismic.prem()

    # We create an array of 20 depths at which we want to evaluate PREM, and then
    # query the seismic model for the pressure, density, P wave speed, S wave
    # speed, and bulk sound velocity at those depths
    depths = np.linspace(750e3, 2800e3, 20)
    pressure, seis_rho, seis_vp, seis_vs, seis_vphi = seismic_model.evaluate_all_at(depths)


    # Now we get an array of temperatures at which will be used for computing
    # the seismic properties of the rock.  Here we use the Brown+Shankland (1981)
Esempio n. 34
0
		stixrude and lithgow-bertelloni, 2005)
	or 'slb3 (finite-strain 3rd order shear modulus,
		stixrude and lithgow-bertelloni, 2005)
	or 'mgd3' (mie-gruneisen-debeye 3rd order shear modulus,
		matas et al. 2007)
	or 'mgd2' (mie-gruneisen-debeye 2nd order shear modulus, 
		matas et al. 2007)
	or 'bm2' (birch-murnaghan 2nd order, if you choose to ignore temperature
	   (your choice in geotherm will not matter in this case))
	   or 'bm3' (birch-murnaghan 3rd order, if you choose to ignore temperature
	(your choice in geotherm will not matter in this case))"""
	
	amount_perovskite = 0.6
	method = 'slb3'

	rock = burnman.composite( [ (minerals.SLB_2005.mg_perovskite(), amount_perovskite), 
				    (minerals.SLB_2005.periclase(), 1.0-amount_perovskite) ] )
	rock.set_method(method)

	perovskitite = burnman.composite( [ (minerals.SLB_2005.mg_perovskite(), 1.0), ] )
	perovskitite.set_method(method)

	periclasite = burnman.composite( [ (minerals.SLB_2005.periclase(), 1.0), ] )
	periclasite.set_method(method)
		   
	#seismic model for comparison:
	# pick from .prem() .slow() .fast() (see burnman/seismic.py)
	seismic_model = burnman.seismic.prem() 
	#set on how many depth slices the computations should be done
	number_of_points = 20
	# we will do our computation and comparison at the following depth values:
	depths = np.linspace(700e3, 2800e3, number_of_points)
Esempio n. 35
0
# the library, including the ability to make composites, and compute
# thermoelastic properties of them.  The minerals module includes
# the mineral physical parameters for the predefined minerals in
# BurnMan
import burnman
from burnman import minerals

if __name__ == "__main__":

    # This is the first actual work done in this example.  We define
    # composite object and name it "rock".  A composite is made by
    # giving burnman.composite a list of minerals and their molar fractions.
    # Here "rock" has two constituent minerals: it is 80% Mg perovskite
    # and 20% periclase.  More minerals may be added by simply extending
    # the list given to burnman.composite
    rock = burnman.composite ( [ (minerals.SLB_2011.mg_perovskite(), 0.80),\
                                 (minerals.SLB_2011.periclase(),     0.20) ] )

    # Here we create and load the PREM seismic velocity model, which will be
    # used for comparison with the seismic velocities of the "rock" composite
    seismic_model = burnman.seismic.prem()

    # We create an array of 20 depths at which we want to evaluate PREM, and then
    # query the seismic model for the pressure, density, P wave speed, S wave
    # speed, and bulk sound velocity at those depths
    depths = np.linspace(750e3, 2800e3, 20)
    pressure, seis_rho, seis_vp, seis_vs, seis_vphi = seismic_model.evaluate_all_at(
        depths)

    # Now we get an array of temperatures at which will be used for computing
    # the seismic properties of the rock.  Here we use the Brown+Shankland (1981)
    # geotherm for mapping pressure to temperature
Esempio n. 36
0
                #at room pressure/temperature
                'Gprime_0': 1.7,  #pressure derivative of shear modulus
                'molar_mass': .055845,  #molar mass in units of [kg/mol]
                'n': 1,  #number of atoms per formula unit
                'Debye_0': 998.85,  #Debye temperature for material. 
                #See Stixrude & Lithgow-Bertelloni, 2005 for values
                'grueneisen_0': 1.368,  #Gruneisen parameter for material. 
                #See Stixrude & Lithgow-Bertelloni, 2005 for values
                'q_0': 0.917,  #isotropic strain derivative of gruneisen
                #parameter. Values in Stixrude & Lithgow-Bertelloni, 2005
                'eta_s_0': 3.0
            }  #full strain derivative of gruneisen parameter

        #parameter. Values in Stixrude & Lithgow-Bertelloni, 2005

    rock = burnman.composite([(own_material(), 1.0)])

    #seismic model for comparison: (see burnman/seismic.py)
    seismic_model = burnman.seismic.prem()  # pick from .prem() .slow() .fast()
    number_of_points = 20  #set on how many depth slices the computations should be done
    depths = np.linspace(700e3, 2800e3, number_of_points)
    #depths = seismic_model.internal_depth_list()
    seis_p, seis_rho, seis_vp, seis_vs, seis_vphi = seismic_model.evaluate_all_at(
        depths)

    temperature = burnman.geotherm.brown_shankland(seis_p)

    rock.set_method(method)

    print "Calculations are done for:"
    rock.debug_print()
- Each method for calculating velocity profiles currently included within BurnMan
"""

import os, sys, numpy as np, matplotlib.pyplot as plt
#hack to allow scripts to be placed in subdirectories next to burnman:
if not os.path.exists('burnman') and os.path.exists('../burnman'):
    sys.path.insert(1,os.path.abspath('..')) 

import burnman
from burnman import minerals

if __name__ == "__main__":
    #Input composition. 

    amount_perovskite = 0.95
    rock = burnman.composite( [ (minerals.Murakami_etal_2012.fe_perovskite(), amount_perovskite),
                            (minerals.Murakami_etal_2012.fe_periclase_LS(), 1.0-amount_perovskite) ] )

    #(min pressure, max pressure, pressure step)
    seis_p = np.arange(25e9, 125e9, 5e9)

    #Input adiabat potential temperature
    T0 = 1500.0 
    
    #Now we'll calculate the models for each method 
    """ 'slb2' (finite-strain 2nd order shear modulus, 
        stixrude and lithgow-bertelloni, 2005)
    or 'slb3 (finite-strain 3rd order shear modulus, 
   	stixrude and lithgow-bertelloni, 2005)
    or 'mgd3' (mie-gruneisen-debeye 3rd order shear modulus, 
        matas et al. 2007)
    or 'mgd2' (mie-gruneisen-debeye 2nd order shear modulus, 
Esempio n. 38
0
    
    return temperature*top/bottom


table_brown = read_table("input_geotherm/brown_81.txt")
table_brown_depth = np.array(table_brown)[:,0]
table_brown_temperature = np.array(table_brown)[:,1]

table_anderson = read_table("input_geotherm/anderson_82.txt")
table_anderson_depth = np.array(table_anderson)[:,0]
table_anderson_temperature = np.array(table_anderson)[:,1]

# test geotherm
if __name__ == "__main__":
    p = np.arange(1.0e9,128.0e9,3e9)
  
    pyrolite = burnman.composite( [ (burnman.minerals.SLB_2011.mg_fe_perovskite(0.2), 0.8), (burnman.minerals.SLB_2011.ferropericlase(0.4), 0.2) ] )
    pyrolite.set_method('slb3')
    pyrolite.set_state(40.e9, 2000)

    t1 = anderson(p)
    t2 = brown_shankland(p)
    t3 = adiabatic(p, 1600, pyrolite)

    p1,=pyplot.plot(p,t1,'x--r')
    p2,=pyplot.plot(p,t2,'*-g')
    p3,=pyplot.plot(p,t3,'*-b')
    pyplot.legend([p1,p2,p3],[ "anderson", "brown", "adiabatic"], loc=4)

    pyplot.show()
Esempio n. 39
0

#define the P-T path
pressure = np.linspace(28.0e9, 129e9, 25.)
temperature_bs = burnman.geotherm.brown_shankland(pressure)
temperature_an = burnman.geotherm.anderson(pressure)

#seismic model for comparison:
seismic_model = burnman.seismic.prem(
)  # pick from .prem() .slow() .fast() (see burnman/seismic.py)
depths = map(seismic_model.depth, pressure)
seis_p, seis_rho, seis_vp, seis_vs, seis_vphi = seismic_model.evaluate_all_at(
    depths)

#pure perovskite
perovskitite = burnman.composite(((perovskite(0.06), 1.0), ))
perovskitite.set_method(method)

#pure periclase
periclasite = burnman.composite(((ferropericlase(0.21), 1.0), ))
periclasite.set_method(method)

#pyrolite (80% perovskite)
pyrolite = burnman.composite(
    ((perovskite(0.06), 0.834), (ferropericlase(0.21), 0.166)))
pyrolite.set_method(method)

#preferred mixture?
amount_perovskite = 0.92
preferred_mixture = burnman.composite(
    ((perovskite(0.06), amount_perovskite), (ferropericlase(0.21),
    
    #input weight percentages and distribution coefficient 
    #See comments in burnman/composition.py for references to 
    #partition coefficent calculation

    weight_percents = {'Mg':0.213, 'Fe': 0.08, 'Si':0.27, 'Ca':0., 'Al':0.}
    phase_fractions,relative_molar_percent = \
    burnman.calculate_phase_percents(weight_percents)
    
    Kd_0 = .5 #Fig 5 Nakajima et al 2012
    
    iron_content = lambda p,t: \
    burnman.calculate_partition_coefficient(p,t,relative_molar_percent,Kd_0)

    rock = burnman.composite ( [ (minerals.SLB_2005.mg_fe_perovskite_pt_dependent(iron_content,1),\
    								phase_fractions['pv'] ), 
    								(minerals.SLB_2005.ferropericlase_pt_dependent(iron_content,0),\
    								phase_fractions['fp'] ) ] )
            
    #seismic model for comparison:
    seismic_model = burnman.seismic.prem() # pick from .prem() .slow() .fast() 
    #(see burnman/seismic.py)
    number_of_points = 20 #set on how many depth slices the computations should be done
    # we will do our computation and comparison at the following depth values:
    depths = np.linspace(700e3, 2800e3, number_of_points)
    #alternatively, we could use the values where prem is defined:
    #depths = seismic_model.internal_depth_list()
    seis_p, seis_rho, seis_vp, seis_vs, seis_vphi = seismic_model.evaluate_all_at(depths)
    
            
    temperature = burnman.geotherm.brown_shankland(seis_p)
Esempio n. 41
0
    #INPUT for method_1
    """ choose 'slb' (finite-strain 2nd order sheer modulus, stixrude and lithgow-bertelloni, 2005)
    or 'mgd' (mie-gruneisen-debeye, matas et al. 2007)
    or 'bm' (birch-murnaghan, if you choose to ignore temperature (your choice in geotherm will not matter in this case))
    or 'slb3 (finite-strain 3rd order shear modulus, stixrude and lithgow-bertelloni, 2005)"""

    method = 'bm3'

    # Input for model M_pyrolite as defined in Matas et al. 2007 table 3. Molar proportions are converted to atomic fractions

    #weight_percents = {'Mg':0.297882, 'Fe': 0.0489699, 'Si':0.1819, 'Ca':0.0228576, 'Al':0.0116446}
    #phase_fractions,relative_molar_percent = burnman.calculate_phase_percents(weight_percents)
    rock = burnman.composite(
        ((minerals.SLB2011_mg_perovskite(),
          0.5 * 1.00), (minerals.SLB2011_fe_perovskite(),
                        .9 * 0.0), (minerals.SLB2011_periclase(), 0.5 * 1.00),
         (minerals.SLB2011_wuestite(), 0.1 * 0.0)))
    rock2 = burnman.composite(
        ((minerals.mg_perovskite(), .62), (minerals.fe_perovskite(),
                                           .078 / 1.5),
         (minerals.periclase(), .28), (minerals.wuestite(), .034 / 1.5)))
    #KD is 2... doesn't match either
    #rock2 = burnman.composite( ( (minerals.Matas_mg_perovskite(),.3574 ),
    #                        (minerals.Matas_fe_perovskite(), .0536 ),
    #                        (minerals.Matas_periclase(), .1656 ),
    #                        (minerals.Matas_wuestite(), .0124 )))
    #input pressure range for first model. This could be from a seismic model or something you create. For this example we will create an array
    rock.set_method(method)
    rock2.set_method(method)
    seis_p_1 = np.arange(28e9, 128e9, 4.8e9)
Esempio n. 42
0
    
    #INPUT for method_1
    """ choose 'slb' (finite-strain 2nd order sheer modulus, stixrude and lithgow-bertelloni, 2005)
    or 'mgd' (mie-gruneisen-debeye, matas et al. 2007)
    or 'bm' (birch-murnaghan, if you choose to ignore temperature (your choice in geotherm will not matter in this case))
    or 'slb3 (finite-strain 3rd order shear modulus, stixrude and lithgow-bertelloni, 2005)"""
    
    method = 'bm3' 
    
    
    # Input for model M_pyrolite as defined in Matas et al. 2007 table 3. Molar proportions are converted to atomic fractions    

    #weight_percents = {'Mg':0.297882, 'Fe': 0.0489699, 'Si':0.1819, 'Ca':0.0228576, 'Al':0.0116446}
    #phase_fractions,relative_molar_percent = burnman.calculate_phase_percents(weight_percents)
    rock = burnman.composite( ( (minerals.SLB2011_mg_perovskite(),0.5*1.00),
                            (minerals.SLB2011_fe_perovskite(), .9*0.0 ),
                            (minerals.SLB2011_periclase(), 0.5*1.00 ),
                            (minerals.SLB2011_wuestite(), 0.1*0.0 )))
    rock2 = burnman.composite( ( (minerals.mg_perovskite(),.62 ),
                            (minerals.fe_perovskite(), .078/1.5 ),
                            (minerals.periclase(), .28 ),
                            (minerals.wuestite(), .034/1.5 ))) 
    #KD is 2... doesn't match either
    #rock2 = burnman.composite( ( (minerals.Matas_mg_perovskite(),.3574 ),
    #                        (minerals.Matas_fe_perovskite(), .0536 ),
    #                        (minerals.Matas_periclase(), .1656 ),
    #                        (minerals.Matas_wuestite(), .0124 )))
    #input pressure range for first model. This could be from a seismic model or something you create. For this example we will create an array
    rock.set_method(method) 
    rock2.set_method(method)
    seis_p_1 = np.arange(28e9, 128e9, 4.8e9)
    temperature_bs = burnman.geotherm.brown_shankland(seis_p_1)
Esempio n. 43
0
    #INPUT for method_1
    """ choose 'slb' (finite-strain 2nd order sheer modulus, stixrude and lithgow-bertelloni, 2005)
    or 'mgd' (mie-gruneisen-debeye, matas et al. 2007)
    or 'bm' (birch-murnaghan, if you choose to ignore temperature (your choice in geotherm will not matter in this case))
    or 'slb3 (finite-strain 3rd order shear modulus, stixrude and lithgow-bertelloni, 2005)"""

    method = 'mgd2'

    # Input for model M_pyrolite as defined in Matas et al. 2007 table 3. Molar proportions are converted to atomic fractions

    #weight_percents = {'Mg':0.297882, 'Fe': 0.0489699, 'Si':0.1819, 'Ca':0.0228576, 'Al':0.0116446}
    #phase_fractions,relative_molar_percent = burnman.calculate_phase_percents(weight_percents)
    rock = burnman.composite(
        ((minerals.Matas_etal_2007.mg_perovskite(),
          .620), (minerals.Matas_etal_2007.fe_perovskite(),
                  .078), (minerals.Matas_etal_2007.periclase(), .268),
         (minerals.Matas_etal_2007.wuestite(), .034)))
    rock2 = burnman.composite(
        ((minerals.Matas_etal_2007.mg_perovskite(),
          .62), (minerals.Matas_etal_2007.fe_perovskite(),
                 .078 / 1.46), (minerals.Matas_etal_2007.periclase(), .268),
         (minerals.Matas_etal_2007.wuestite(), .034 / 1.46)))
    #KD is 2... doesn't match either
    #rock2 = burnman.composite( ( (minerals.Matas_mg_perovskite(),.3574 ),
    #                        (minerals.Matas_fe_perovskite(), .0536 ),
    #                        (minerals.Matas_periclase(), .1656 ),
    #                        (minerals.Matas_wuestite(), .0124 )))
    #input pressure range for first model. This could be from a seismic model or something you create. For this example we will create an array
    rock.set_method(method)
    rock2.set_method(method)
    #seismic model for comparison:
    # pick from .prem() .slow() .fast() (see burnman/seismic.py)
    seismic_model = burnman.seismic.prem() 
    number_of_points = 40 #set on how many depth slices the computations should be done
    # we will do our computation and comparison at the following depth values:
    depths = np.linspace(700e3, 2800e3, number_of_points)
    #alternatively, we could use the values where prem is defined:
    #depths = seismic_model.internal_depth_list()
    seis_p, seis_rho, seis_vp, seis_vs, seis_vphi = seismic_model.evaluate_all_at(depths)

    # here we use the Brown & Shankland geotherm    
    temperature = burnman.geotherm.brown_shankland(seis_p)
    
    
    # We create one mineral that contains spin transitions
    rock = burnman.composite ( [(minerals.Murakami_etal_2012.fe_periclase(), 1.0)] )

    # The mineral Murakami_fe_periclase is derived from minerals.helper_spin_transition
    # which contains the logic to switch between two other minerals based on the
    # current pressure. The mineral is implemented similar to the following lines:
    #
    #   class Murakami_fe_periclase(helper_spin_transition):
    #     def __init__(self):
    #       helper_spin_transition.__init__(self, 63.0e9, Murakami_fe_periclase_LS(), Murakami_fe_periclase_HS())
    #
    # Note the reference to the low spin and high spin minerals (_LS and _HS).
    
    # Set method, here set to 'slb2' as the shear wave moduli in
    # Murakami et al. 2012 were fit to second order 
    rock.set_method('slb2')
    
Esempio n. 45
0
     stixrude and lithgow-bertelloni, 2005)
 or 'slb3 (finite-strain 3rd order shear modulus,
     stixrude and lithgow-bertelloni, 2005)
 or 'mgd3' (mie-gruneisen-debeye 3rd order shear modulus,
     matas et al. 2007)
 or 'mgd2' (mie-gruneisen-debeye 2nd order shear modulus,
     matas et al. 2007)
 or 'bm2' (birch-murnaghan 2nd order, if you choose to ignore temperature
    (your choice in geotherm will not matter in this case))
 or 'bm3' (birch-murnaghan 3rd order, if you choose to ignore temperature
     (your choice in geotherm will not matter in this case))"""
 method = 'mgd3' 
 
 #specify material
 amount_perovskite = 0.95
 rock = burnman.composite( [(minerals.SLB_2005.mg_fe_perovskite(0.7), amount_perovskite), 
                            (minerals.SLB_2005.ferropericlase(0.5), 1.0-amount_perovskite) ] )
 
 #define some pressure range
 pressures = np.arange(25e9,130e9,5e9)
 
 temperature = burnman.geotherm.brown_shankland(pressures)
 
 rock.set_method(method) #append method of calculation to suite of minerals chosen
 
 #Begin calculating velocities and density as depth
 print "Calculations are done for:"
 rock.debug_print()
 
 mat_rho, mat_vp, mat_vs, mat_vphi, mat_K, mat_G = \
     burnman.velocities_from_rock(rock, pressures, temperature, \
     burnman.averaging_schemes.voigt_reuss_hill())