# In[21]: help(eos.constq_debyetemp) # In[22]: eos.constq_debyetemp(v_u, v0, 1.5, 2., 1000.) # You can get thermal pressures with error bars. # In[23]: help(eos.constq_pth) # In[24]: p_th = eos.constq_pth( v_u, unp.uarray(np.ones_like(v) * 2000., np.ones_like(v) * 100), v0, 1.5, 2., 1000., 5, 4) p_th # In[25]: plt.errorbar(unp.nominal_values(v_u), unp.nominal_values(p_th), xerr=unp.std_devs(v_u), yerr=unp.std_devs(p_th)) plt.xlabel('Unit-cell volume ($\mathrm{\AA}^3$)') plt.ylabel('Thermal pressure (GPa)')
# In[16]: gamma0 = uct.ufloat(1.45, 0.02) q = uct.ufloat(0.8, 0.3) theta0 = uct.ufloat(800., 0.) # We will use `constq_pth` for calculating thermal pressure part of the EOS. Below, I demonstrate how to get help for the function. # In[17]: help(eos.constq_pth) # We calculate total pressure at 2000 K below. `eos.constq_pth` requires input of volume and temperature with the same number of elements. For 2000-K isotherm, we generate a temperature array with 2000 for all elements. # In[18]: p_hT = eos.bm3_p(v, v0, k0, k0p) + eos.constq_pth(v, np.ones_like(v) * 2000., v0, gamma0, q, theta0, 2, 4) # In[19]: df = pd.DataFrame() df['unit-cell volume'] = v df['pressure@300K'] = p df['pressure@2000K'] = p_hT print(df.to_string(index=False)) # In[ ]:
help(eos.dorogokupets2007_pth) # In[19]: n = 2; z = 4 temp = np.ones_like(v) * 2000. # In[20]: pth_de = eos.constq_pth(v, temp, v0, 1.45, 0.8, 800, n, z) pth_sp = eos.speziale_pth(v, temp, v0, uct.ufloat(1.49, 0.03), uct.ufloat(1.65, 0.4), uct.ufloat(11.8, 0.2), 773, n, z) pth_do = eos.dorogokupets2007_pth(v, temp, v0, 1.50, 0.75, 2.96, 760, n, z) # In[21]: plt.plot(v, pth_de, label='Dewaele2000') plt.errorbar(v, unp.nominal_values(pth_sp), yerr=unp.std_devs(pth_sp), label='Speziale2001') plt.plot(v, pth_do, label='Dorogokupets2007') plt.xlabel('Unit-cell volume ($\mathrm{\AA}^3$)') plt.ylabel("Thermal pressure (GPa)") plt.legend();