حساب الصيغة شبه التجريبية للجزيئات الكيميائية باستخدام بلغة البرمجة Python
- برمجة بايثون
- فيزياء
- 2021-08-23
- artistic12
الأجوبة
a)
import numpy as np
import math
a= 58
z=28
a1= 15.67
a2= 17.23
a3= 0.75
a4= 93.2
if z%2==0 and a-z%2==0:
a5= 12.00
elif z%2!=0 and a-z%2!=0:
a5=-12.00
else:
a5= 0
B= a1*a
arr= [a]
ar=np.cbrt(arr)
for i in ar :
a13=i
B=B- (a2*a13*a13)
B=B- ((a3*z*z) /a13)
B=B- ((a4*(a-(2*z)) * (a-(2*z)))/a)
a12= math.sqrt(a)
B=B+(a5/a12)
print( "Atomic number, z=",z)
print( "Mass number, A=",a)
print (" Approximate nuclear binding energy is calculated as",B)
b)
import numpy as np
import math
a= 58
z=28
a1= 15.67
a2= 17.23
a3= 0.75
a4= 93.2
if z%2==0 and a-z%2==0:
a5= 12.00
elif z%2!=0 and a-z%2!=0:
a5=-12.00
else:
a5= 0
B= a1*a
arr= [a]
ar=np.cbrt(arr)
for i in ar :
a13=i
B=B- (a2*a13*a13)
B=B- ((a3*z*z) /a13)
B=B- ((a4*(a-(2*z)) * (a-(2*z)))/a)
a12= math.sqrt(a)
B=B+(a5/a12)
print( "Atomic number, z=",z)
print( "Mass number, A=",a)
print (" Approximate nuclear binding energy is calculated as",B/a)
c)
Z=int(input ("enter the value of z"))
al=15.67
a2=17.23
a3=0.75
a4=93.2
lbn=0
lba=0
for a in range(Z,3*Z):
if(a%2!=0):
a5=0
elif(a%2==0 and Z%2==0):
a5=12.5
else:
a5=-12.0
b=al*a-a2*(a**(2/3))-a3*((Z**2)/(a**(1/3) ))-a4*(((a-2*Z)**2)/a)+a5/(a**(1/2))
epn=b/a
if(epn>lbn):
lbn=epn
lba=a
print("For the most stable nucleon A is = ",a+1,"and the energy per nucleon is =",lbn,"MeV")
معلومات ذات صلة
- جامعة الشارقة
- Computational Physics 1430353
- برمجة بايثون | Python programming
- ابحث عن مسائل برمجة بايثون | Python programming بالانجليزي
- فيزياء | Physics