# In[4]: import numpy as np from uncertainties import unumpy as unp import pytheos as eos # # 2. Setup pressure scale and starting values # Setup dictionaries for pressure standard `(au_eos)` and equation to use `(fit_model)`. This allows for eos fits with a wide range of different pressure scales. # In[5]: au_eos = {'Fei2007': eos.gold.Fei2007bm3(), 'Dorogokupets2007': eos.gold.Dorogokupets2007(), 'Yokoo2009': eos.gold.Yokoo2009(), 'Ye2017': eos.gold.Ye2017()} fit_model = {'Fei2007': eos.BM3Model(), 'Dorogokupets2007': eos.VinetModel(), 'Yokoo2009': eos.BM3Model(), 'Ye2017': eos.VinetModel()} # Lundin et al. (2007) used the gold scale by Tsuchiya (2003). Since then many updates have been made by a few different authors. # In[6]: au_org = eos.gold.Tsuchiya2003() # Uncomment the following line to get some help. # In[7]: #help(eos.gold.Yokoo2009)
# # 2. Setup pressure scale and starting values # Setup dictionaries for pressure standard `(au_eos)` and equation to use `(fit_model)`. This allows for eos fits with a wide range of different pressure scales. # In[5]: au_eos = { 'Fei2007': eos.gold.Fei2007bm3(), 'Dorogokupets2007': eos.gold.Dorogokupets2007(), 'Yokoo2009': eos.gold.Yokoo2009(), 'Ye2017': eos.gold.Ye2017() } fit_model = { 'Fei2007': eos.BM3Model(), 'Dorogokupets2007': eos.VinetModel(), 'Yokoo2009': eos.BM3Model(), 'Ye2017': eos.VinetModel() } # Lundin et al. (2007) used the gold scale by Tsuchiya (2003). Since then many updates have been made by a few different authors. # In[6]: au_org = eos.gold.Tsuchiya2003() # Uncomment the following line to get some help. # In[7]: #help(eos.gold.Yokoo2009)
# # 2. Setup fitting models # Using MgO, we create models for three equations for static EOS. Volume can be either in unit-cell volume or molar volume. But `v` and `v0` should be in the same unit. # In[5]: v0 = 11.244 k0 = 160. k0p = 4.0 # Three different equations for static EOS of MgO. # In[6]: exp_bm3 = eos.BM3Model() exp_vinet = eos.VinetModel() exp_kunc = eos.KuncModel(order=5) # this way I can handle order # Assign initial values to the parameters. # In[7]: params = exp_bm3.make_params(v0=v0, k0=k0, k0p=k0p) # # 3. Synthesize data # We make data with random noise. # In[8]: v_data = v0 * np.linspace(0.99, 0.6, 20)