Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. import scipy.constants as c
  2. import numpy as np
  3. a=c.physical_constants['Bohr radius'][0]
  4.  
  5. # Put all other functions here
  6.  
  7. def radial_wave_func(n,l,r):
  8. # Write here
  9. if l == 0 and n == 1:
  10. return np.round(2.0*(1/a)**(3/2.0)*np.exp(-r/a),5)
  11. if l == 0 and n == 2:
  12. return np.round((1/(np.sqrt(2)))*(1/a)**(3/2.0)*(2-(r/a))*np.exp(-r/(2.0*a)),5)
  13. if l == 1 and n == 2:
  14. return np.round((1/(2.0*np.sqrt(6)))*(r/a)*np.exp(-r/(2.0*a)),5)
  15. if l == 0 and n == 3:
  16. return np.round((2/(81.0*np.sqrt(3)))*(1/a)**(3/2.0)*(2.0*(r/a)**2-18.0*(r/a)+27)*np.exp(-r/(3.0*a)),5)
  17. if l == 1 and n == 3:
  18. return np.round((4/(81.0*np.sqrt(6)))*(1/a)**(3/2.0)*(6.0*(r/a)-(r/a)**2)*np.exp(-r/(3.0*a)),5)
  19. if l == 2 and n == 3:
  20. return np.round((4/(81.0*np.sqrt(30)))*(1/a)**(3/2.0)*(r/a)**2*np.exp(-r/(3.0*a)),5)
  21. if l == 0 and n == 4:
  22. return np.round((1/384.0)*(1/a)**(3/2.0)*np.exp(-r/(4.0*a))*(96.0-(72.0*r/a)+((12.0*r**2)/a**2)-((r**3)/(2.0*a**3))),5)
  23. if l == 1 and n == 4:
  24. return np.round((1/(256.0*np.sqrt(15)))*(1/a)**(3/2.0)*np.exp(-r/(4.0*a))*(r/a)(80.0-((20.0*r)/a)+((r**2)/(a**2))),5)
  25. if l == 2 and n == 4:
  26. return np.round((1/(768.0*np.sqrt(5)))*(1/a)**(3/2.0)*np.exp(-r/(4.0*a))*(r/a)**2*(12.0-(r/a)),5)
  27. if l == 3 and n == 4:
  28. return np.round((1/(768.0*np.sqrt(35)))*(1/a)**(3/2.0)*(r/a)**3*np.exp(-r/(4.0*a)),5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement