コード例 #1
0
ファイル: eval_Pt_eos.py プロジェクト: rongzh/unbiased-pscale
def energy_Jam_mgd_powlaw( V_a, T_a, param_d ):
    # get parameter values
    theta0 = param_d['theta0']
    gamma= param_d['gamma0']*(V_a/param_d['V0'])**param_d['q']
    theta = param_d['theta0']*np.exp((-1)*(gamma-param_d['gamma0'])/param_d['q'])
    T_ref_a = 298 # here we use isothermal reference compression curve
    energy_therm_a = 0.12786*(T_a*debye_fun(theta/T_a) - T_ref_a*debye_fun(theta/T_ref_a ))
    return energy_therm_a
コード例 #2
0
def entropy(V, T, param_d): #compute the change of entropy d_s
    V0 = param_d['V0']
    gamma0 = param_d['gamma0']
    theta0 = param_d['theta0'] #unit K
    thetaV = theta0 * np.exp(gamma0*(1-V/V0))
    T0 = 300.0
    fcv = param_dic['const']['fcv']
    Cv_max_cell = param_dic['const']['Cv_max_cell']
    d_s = fcv * Cv_max_cell *(4.0/3*(debye_fun(thetaV/T) - debye_fun(theta0/T0)) - np.log((1.0-np.exp(-thetaV/T))/(1.0-np.exp(-theta0/T0))))
    return d_s
コード例 #3
0
 def energy_mgd_powlaw(  T, Eth, rho,param_dic ):
     rho0 = param_dic['Jam_ref']['rho0']#g/cm^3
     gamma0 = param_dic['Jam_ref']['gamma0']
     theta0 = param_dic['Jam_ref']['theta0'] #unit K
     thetaV = theta0 * np.exp(gamma0*(1-rho0/rho))
     T0 = 300.0
     fcv = param_dic['const']['fcv'] #the ratio of Cvmax/DP
     Cv_max_cell = param_dic['const']['Cv_max_cell'] #eV/K/unitcell
     energy_therm_a =fcv * Cv_max_cell * (T* debye_fun(thetaV/T) -T0* debye_fun(theta0/T0))
     return Eth - energy_therm_a
コード例 #4
0
ファイル: eval_Pt_eos.py プロジェクト: aswolf/unbiased-pscale
def energy_mgd_powlaw(V_a, T_a, param_d):
    # get parameter values
    theta0 = param_d['theta0']
    C_DP = param_d['const']['C_DP']
    P_factor = param_d['const']['P_factor']
    gamma = param_d['gamma0'] * (V_a / param_d['V0'])**param_d['q']
    theta = param_d['theta0'] * np.exp(
        (-1) * (gamma - param_d['gamma0']) / param_d['q'])
    T_ref_a = 300  # here we use isothermal reference compression curve
    energy_therm_a = C_DP / atompermol * param_d['const']['Natom'] * (
        T_a * debye_fun(theta / T_a) - T_ref_a * debye_fun(theta / T_ref_a))
    return energy_therm_a
コード例 #5
0
ファイル: eval_Pt_eos.py プロジェクト: rongzh/unbiased-pscale
def findT(T, Pth,rho2):
    atompermol = 6.022*(10**23) #at/mol
    rho0 = 21.4449 #unit g/cm^3
    V_0 = 195*param_d['const']['Natom']/atompermol/rho0*1e24 #unit Ang^3/unitcell
    g0 = 2.40
    thetaD = 200 #unit K
    thetaV = thetaD * np.exp(g0*(1-rho0/rho2))
    T0 = 300
    fcv = 0.12786/0.12664 #the ratio of Cvmax/DP
    kT0 = 1.0/40 #unit eV
    unit_conv = 160.217657
    return Pth - g0/V_0 * 3 * fcv * kT0 * (T/T0 * debye_fun(thetaV/T) - debye_fun(thetaV/T0)) * unit_conv
コード例 #6
0
ファイル: eval_Pt_eos.py プロジェクト: aswolf/unbiased-pscale
def energy_mgd_powlaw(V_a, T_a, param_d):
    # get parameter values
    theta0 = param_d["theta0"]
    C_DP = param_d["const"]["C_DP"]
    P_factor = param_d["const"]["P_factor"]
    gamma = param_d["gamma0"] * (V_a / param_d["V0"]) ** param_d["q"]
    theta = param_d["theta0"] * np.exp((-1) * (gamma - param_d["gamma0"]) / param_d["q"])
    T_ref_a = 300  # here we use isothermal reference compression curve
    energy_therm_a = (
        C_DP
        / atompermol
        * param_d["const"]["Natom"]
        * (T_a * debye_fun(theta / T_a) - T_ref_a * debye_fun(theta / T_ref_a))
    )
    return energy_therm_a
コード例 #7
0
ファイル: eval_Pt_eos.py プロジェクト: rongzh/unbiased-pscale
def energy_mgd_powlaw( V_a, T_a, param_d ):
    # get parameter values
    theta0 = param_d['theta0']
    C_DP = param_d['const']['C_DP']
    P_factor = param_d['const']['P_factor']
    gamma= param_d['gamma0']*(V_a/param_d['V0'])**param_d['q']
    theta = param_d['theta0']*np.exp((-1)*(gamma-param_d['gamma0'])/param_d['q'])
    T_ref_a = 300 # here we use isothermal reference compression curve
    energy_therm_a = C_DP/atompermol*param_d['const']['Natom']*(T_a*debye_fun(theta/T_a) - T_ref_a*debye_fun(theta/T_ref_a ))
    return energy_therm_a
コード例 #8
0
 def findT(T, P,rho):
     rho0 = param_dic['Jam_ref']['rho0']
     V_0 = rho_to_vol(rho0) #unit Ang^3/unitcell
     gamma0 = param_dic['Jam_ref']['gamma0']
     theta0 = param_dic['Jam_ref']['theta0'] #unit K
     thetaV = theta0 * np.exp(gamma0*(1-rho0/rho))
     T0 = 300.0
     fcv = param_dic['const']['fcv']
     kT300 = param_dic['const']['kT300'] #unit eV
     Cv_max_cell = param_dic['const']['Cv_max_cell']
     return P - gamma0/V_0 * fcv * Cv_max_cell* T0 * (T/T0 * debye_fun(thetaV/T) - debye_fun(theta0/T0)) * param_dic['const']['P_factor']
コード例 #9
0
def entropy(V, T, param_d):
    V0 = param_d['V0']
    g0 = 2.40
    thetaD = 200.0 #unit K
    thetaV = thetaD * np.exp(g0*(1-V/V0))
    T0 = 300.0
    fcv = 0.12786/0.12664 #the ratio of Cvmax/DP
    kT300 = 1.0/40 #unit eV
    #entropy = 3*fcv * kT300/300 * param_dic['const']['Natom'] *(4.0/3*debye_fun(thetaV/T) - np.log(1-np.exp(-thetaV/T)))
    d_s = 3.0*fcv * kT300/300.0*param_dic['const']['Natom'] *(4.0/3*(debye_fun(thetaV/T) - debye_fun(thetaD/T0)) - np.log((1-np.exp(-thetaV/T))/(1-np.exp(-thetaD/T0))))
    return d_s
コード例 #10
0
 def energy_mgd_powlaw(T, Eth, rho):
     rho0 = 21.4449  # unit g/cm^3
     # rho0 = param_dic['const']['rho_Pt']
     P_factor = param_dic["const"]["P_factor"]
     g0 = 2.40
     thetaD = 200.0  # unit K
     thetaV = thetaD * np.exp(g0 * (1 - rho0 / rho))
     T0 = 300.0
     fcv = 0.12786 / 0.12664  # the ratio of Cvmax/DP
     kT300 = 1.0 / 40  # unit eV
     energy_therm_a = (
         3
         * fcv
         * kT300
         / 300.0
         * param_dic["const"]["Natom"]
         * (T / T0 * debye_fun(thetaV / T) - debye_fun(thetaV / T0))
         * param_dic["const"]["P_factor"]
     )
     return Eth - energy_therm_a
コード例 #11
0
 def energy_mgd_powlaw(  T, Eth, rho ):
     rho0 = 21.4449 #unit g/cm^3
     #rho0 = param_dic['const']['rho_Pt']
     P_factor = param_dic['const']['P_factor']
     g0 = 2.40
     thetaD = 200.0 #unit K
     thetaV = thetaD * np.exp(g0*(1-rho0/rho))
     T0 = 300.0
     fcv = 0.12786/0.12664 #the ratio of Cvmax/DP
     kT300 = 1.0/40 #unit eV
     energy_therm_a =3*fcv * kT300/300.0 * param_dic['const']['Natom'] * (T/T0 * debye_fun(thetaV/T) - debye_fun(thetaV/T0)) * param_dic['const']['P_factor']
     return Eth - energy_therm_a
コード例 #12
0
def entropy(V, T, param_d):
    V0 = param_d["V0"]
    g0 = 2.40
    thetaD = 200.0  # unit K
    thetaV = thetaD * np.exp(g0 * (1 - V / V0))
    T0 = 300.0
    fcv = 0.12786 / 0.12664  # the ratio of Cvmax/DP
    kT300 = 1.0 / 40  # unit eV
    # entropy = 3*fcv * kT300/300 * param_dic['const']['Natom'] *(4.0/3*debye_fun(thetaV/T) - np.log(1-np.exp(-thetaV/T)))
    d_s = (
        3.0
        * fcv
        * kT300
        / 300.0
        * param_dic["const"]["Natom"]
        * (
            4.0 / 3 * (debye_fun(thetaV / T) - debye_fun(thetaD / T0))
            - np.log((1 - np.exp(-thetaV / T)) / (1 - np.exp(-thetaD / T0)))
        )
    )
    return d_s
コード例 #13
0
 def findT(T, P, rho):
     # rho0 = param_dic['const']['rho_Pt']
     rho0 = 21.4449  # unit g/cm^3
     V0 = rho_to_vol(rho0)  # unit Ang^3/unitcell
     g0 = 2.40
     thetaD = 200.0  # unit K
     # thetaV = thetaD * np.exp(g0*(1-rho0/rho))
     thetaV = thetaD * np.exp(g0 * (1 - rho0 / rho))
     T0 = 300.0
     fcv = 0.12786 / 0.12664  # the ratio of Cvmax/DP
     kT300 = 1.0 / 40  # unit eV
     return (
         P
         - g0
         / V0
         * 3
         * fcv
         * kT300
         / 300.0
         * param_dic["const"]["Natom"]
         * T0
         * (T / T0 * debye_fun(thetaV / T) - debye_fun(thetaV / T0))
         * param_dic["const"]["P_factor"]
     )
コード例 #14
0
 def findT(T, P,rho):
     #rho0 = param_dic['const']['rho_Pt']
     rho0 = 21.4449 #unit g/cm^3
     V0 = rho_to_vol(rho0) #unit Ang^3/unitcell
     g0 = 2.40
     thetaD = 200.0 #unit K
     #thetaV = thetaD * np.exp(g0*(1-rho0/rho))
     thetaV = thetaD * np.exp(g0*(1-rho0/rho))
     T0 = 300.0
     fcv = 0.12786/0.12664 #the ratio of Cvmax/DP
     kT300 = 1.0/40 #unit eV
     return P - g0/V0 * 3 * fcv * kT300/300.0* param_dic['const']['Natom'] * T0 * (T/T0 * debye_fun(thetaV/T) - debye_fun(thetaV/T0)) * param_dic['const']['P_factor']
コード例 #15
0
T_P = infer_mgd_temp_P(P-P300,rho,param_dic)
print T_P

#compute Vinet Energy
E300 = energy_vinet(V,param_dic['Jam_ref'],300.0)
E_test = energy_vinet(V0,param_dic['Jam_ref'],300.0)
mask_a = E > E300
T_E = infer_mgd_temp_E(E-E300,rho,param_dic)
print T_E


V0 = param_dic['Jam_ref']['V0']
K0 = param_dic['Jam_ref']['K0']
K0p = param_dic['Jam_ref']['K0p']
P_factor = param_dic['const']['P_factor']
rho0 = 21.4449 #unit g/cm^3
g0 = 2.40
thetaD = 200.0 #unit K
thetaV = thetaD * np.exp(g0*(1-rho0/rho))
T0 = 300.0
fcv = 0.12786/0.12664 #the ratio of Cvmax/DP
kT0 = 1.0/40 #unit eV
x = (V/V0)**(1.0/3)
#print 'x',x
eta = 3.0*(K0p- 1)/2.0
print 'eta', eta

energy_a = V0*K0/P_factor*9.0/(eta**2.0) * (1 + (eta*(1-x)-1) * np.exp(eta*(1-x)))/param_dic['const']['avogadro_const']
entropy = 3*fcv * kT0 *(4.0/3*(debye_fun(thetaV/300.0) - debye_fun(thetaD/T0)) - np.log((1-np.exp(-thetaV/300.0))/(1-np.exp(-thetaD/T0))))
from IPython import embed; embed(); import ipdb; ipdb.set_trace()
##########################
コード例 #16
0
x = (V / V0) ** (1.0 / 3)
# print 'x',x
eta = 3.0 * (K0p - 1) / 2.0
print "eta", eta

energy_a = (
    V0
    * K0
    / P_factor
    * 9.0
    / (eta ** 2.0)
    * (1 + (eta * (1 - x) - 1) * np.exp(eta * (1 - x)))
    / param_dic["const"]["avogadro_const"]
)
entropy = (
    3
    * fcv
    * kT0
    * (
        4.0 / 3 * (debye_fun(thetaV / 300.0) - debye_fun(thetaD / T0))
        - np.log((1 - np.exp(-thetaV / 300.0)) / (1 - np.exp(-thetaD / T0)))
    )
)
from IPython import embed

embed()
import ipdb

ipdb.set_trace()
##########################