In [1]:
import numpy as np
import matplotlib.pyplot as plt
In [2]:
### Defining constants and arrays needed for calculation
AA = 1.06036
B = 0.15610
C = 0.19300
D = 0.47635
EE = 1.03587
F = 1.52996
G = 1.76474
H = 3.89411
T_ij=np.linspace(.1,200,(200/0.05)-1)
In [41]:
O11_2=np.empty_like(T_ij)
O11_1 = (AA/T_ij**B)+(C/exp(D*T_ij))+(EE/exp(F*T_ij))+(G/exp(H*T_ij))
In [42]:
plot(T_ij, O11_1)
plt.figsize(15,10)
In [6]:
## Noble Gages: T_ij < 1.0
a1_noble=np.array([0.18,0,-1.20407,-9.86374,16.6295,-6.73805])
a2_noble=np.array([0,0,-0.195866,20.2221,-31.3613,12.6611])
b1_noble=np.array([0,0,10.0161,-40.0394,44.3202,-15.2912])
b2_noble=np.array([0,0,-10.5395,46.0048,-53.0817,18.8125])
In [7]:
## Noble Gages and poliatomic Gases: 1.0<= T_ij <= 10.0
a_lt10=np.array([0.46641,-0.56991,0.19591,-0.03879,0.00259])
b1_lt10=np.array([0.357588,-0.472513,0.0700902,0.016574,-0.00592022])
b2_lt10=np.array([0.295402,-0.510069,0.189395,-0.045427,0.0037928])
In [8]:
## Noble Gages and poliatomic Gases: T_ij > 10.0
a1_gt10=np.array([-33.0838,101.571,-87.7036])
a2_gt10=np.array([20.0862,56.4472,46.3130])
a3_gt10=np.array([72.1052,286.393,277.146])
a4_gt10=np.array([8.27648,17.7610,19.0573])
b1_gt10=np.array([-267.00,26700,-8.9E5])
b2_gt10=np.array([201.570,-19.2265,6.31013])
b3_gt10=np.array([174.672,-27.6938,10.2266])
b4_gt10=np.array([7.36916,-3.2955,2.33033])
c=np.array([1.0,1.0e3,1.0e5])
In [9]:
def computeQ(T_jk):
R = 3.3145e7
U_0 = 0.10
roh = 1.0e-6
C6 = 1.0
a_sum = 0.0
sum_ = 0.0
U = U_0*exp(-roh*R)
alpha_= log(U_0/T_jk)
alpha10=log(U_0/10)
if (T_jk<=1.0):
sum_=0.0
for i in range(len(a1_noble)):
a_sum=a1_noble[i]+a2_noble[i]*C6**(-1/3)
sum_= sum_+ a_sum*(T_jk)**(i/3)
Q_lr=1.1943*(1+sum_)*(C6/T_jk)**(1/3)
# end if
# if (NOBLE)
# do i=1,6
# b_sum=b1_noble(i)+b2_noble(i)*C6**(-1/3)
# sum_= sum_+ b_sum*(T_jk)**(i/3)
# end do
# Q_lr=1.1874*(1+sum_)*(C6/T_jk)**(1/3)
# end if
elif (1.0<T_jk<=10.0):
sum_=0.0
for i in range(len(b2_lt10)):
sum_= sum_ + b2_lt10[i]*(log(T_jk))**(i)
Q_lr=exp(sum_)
elif (T_jk>10.0):
sum_=0.0
for i in range(len(b1_gt10)):
b_sum=b1_gt10[i]+((-1)**i)*((roh*alpha10)**(-2))*c_[i]*(b2_gt10[i]+(b3_gt10[i]/alpha10)+(b4_gt10[i]/alpha10)**2)
sum_= sum_+ b_sum*(log(T_jk))**(-2*i)
Q_lr=((roh*alpha_)**(2))*(0.89+sum_)
return Q_lr
In [37]:
O11_2=np.empty_like(T_ij)
In [38]:
for j in range(len(T_ij)):
Q=T_ij[j]
O11_2[j]=computeQ(Q)
In [39]:
plot(T_ij, O11_2)
plt.figsize(15,10)
In [19]:
file00="/media/idjibril/Stock/Colusion_Integrals.cvs"
In [20]:
TT=np.loadtxt(file00)
In [21]:
## Reduced Temperature Array TT
T=TT[:,0]
## Mass Diffusivity Collision Integral array O11_exp
O11_exp=TT[:,1]
In [25]:
## First Numerical Method
O11_1st = np.empty_like(T)
O11_2nd = np.empty_like(T)
O11_1st = (AA/T**B)+(C/exp(D*T))+(EE/exp(F*T))+(G/exp(H*T))
## Second Numerical Method
for j in range(len(T)):
Q=T[j]
O11_2nd[j]=computeQ(Q)
In [35]:
plt.plot(T, O11_exp)
plt.plot(T, O11_1st)
plt.plot(T, O11_2nd)
plt.figsize(15,10)