Exact Bohr's three-electron atoms, ions

Simple C program to calculate three-electron atoms (ions).

top page
Back to chemistry page

If you copy and paste the program source code below into a text editor, you can easily compile and run this.
(This program is simple c language, so save this text editor as "filename.c", and compile it.)

In this program, we first input atomic number Z = 3 (= Li ), 4 (= Be+ ), 5 (= B2+ ), 6, 7, 8, 9, or 10.
Next we input the initial x-coordinate r1 (in MM) of electron 1, and the absolute value of the total energy E (in eV) of three-electron atoms (ions).

The 3rd electron in 2s outer orbit is approximately fixed in position of hydrogen-like orbit around +(Z-2) nucleus (= +Z nucleus and 2 inner electrons ).

After calculating 3rd-electron, like the two-electron atomic calculaton, from the inputted values, this program outputs the y component of electron 1 velocity (= VY ) after a quarter of its orbit, and WN (= the number of de Broglie's waves included in one quarter of the orbital).

Here units are time= 1 SS = 1 × 10-23 second,  length = 1 MM = 1 × 10-14 meter,  velocity = 1 MM/SS = 109 m/s,  acceleration = 1 MM/SS2 = 1032 m/s2

The initial electron-1's x-coordinate r1 is automatically increased per calculation until +100.

 


#include <stdio.h>
#include <math.h>

int main(void) 
 {

/* All three-electron atoms, ions */

   int i;
   double Z,r,E,ab,ac,Eb,Rb,Rbb,Rbc ; 
   double vya,vyb,poten,VX,VY,prexx,preyy,WN,ra,rb,rc;
   double xx,yy,vk,leng,wav,rr,disb;

/* me = electron mass (kg),  pai = pi 
  epsi = electric constant,  h=Planck constant,
  ele = electron's charge
*/

   double me=9.1093826e-31;
   double pai=3.141592653589793; 
   double epsi=8.85418781787346e-12;
   double h=6.62606896e-34; 
   double ele=1.60217653e-19;    
     
/* inpu atomic number Z */                                   

   printf("Atomic number Z ? (Li=3, Be+=4, B2+=5, C3+=6, N4+=7...) ");  
   scanf("%lf",&Z);

/* input elecron-1's initial x-coordinate r1 */

   printf("r1 between nucleus and electron 1 (MM)? ");  
   scanf("%lf",&r);

/* input absolute value of  total energy |E| of an three-electron atom or ion */

   printf("absolute value of total energy |E| of three-electron-atom (eV) ? ");  
   scanf("%lf", &E);
 
  
   ab=(ele*ele)/(4.0*pai*epsi); ac=ab/me;

/* Eb = approximate total energy of the 3rd outer electron of n = 2 feeling effective central charge = Z-2 = nucleus + two inner electrons */
 
   Eb=-((Z-2)*(Z-2)*ele*ele*ele*ele*me)/(32*epsi*epsi*h*h); 

/* Rb = approximate radius of the 3rd outer electron */

   Rb=(4.0*epsi*h*h)/((Z-2.0)*pai*ele*ele*me);   

/* change meter into MM (= 10^-14 meter )*/  
   
   Rbb=Rb*1.0e14;     
                       
   Rbc=Rbb/(sqrt(2.0));

/* display the 3rd outer electron's radius */

   printf("The outer electron's radius (MM) = %.2f\n", Rbb);

 printf(" \n");

   for (i=1; i < 100 ;i++) {    

/* repeat until electron-1's initial x-coordinate r1 to r1 + 100 */


/* change r(MM) to rr(meter) */

    rr=r*1.0e-14;   

/* disb = distance (meter) between electrons-1 and 3 */
                  
     disb=sqrt(rr*rr+Rb*Rb);

/* poten = initial Coulomb potential energy (J) */
 
     poten=-(2.0*Z*ab)/rr+ab/(2.0*rr)+(2.0*ab)/disb-(Z*ab)/(Rb);
                             
/* vya = total energy - potential energy - the 3rd outer electron's kinetic energy (= -Eb ) */ 
                          
 vya=-(E*1.60217646e-19)-poten+Eb; 

  if (vya > 0) {

 /* vyb=electron's initial velocity (m/sec) */ 

   vyb=sqrt(vya/me); 

/* VX,VY = electron-1's x,y-velocity (= MM/SS = 10^9 m/s )*/

   VY=vyb*1.0e-9; VX=0.0;  

/* prexx, preyy = electron-1's x,y-coordinate */
        
   prexx=r;    preyy=0.0;

/* WN = number of de Broglie wavelength */

  WN=0.0;
   
  
  do {

/* xx,yy = electron-1's x,y-coordinate after 1SS (= 1x10^-23 second )*/

    xx=prexx+VX; yy=preyy+VY;     

    vk=VX*VX+VY*VY;        

/* leng = electron's moving distance (= meter ) for 1SS */
          
    leng=sqrt(vk)*1.0e-14;      

/* wave = de Broglie wavelength (meter) = h/mv */

     wav=h/(me*sqrt(vk)*1.0e9);  

/* WN = sum of de Boglie wavelengths in all short segments */

    WN=WN+leng/wav;                
                                
/* ra = distance between electron and nucleus */

    ra=sqrt(prexx*prexx+preyy*preyy);  

/* rb = distance between two electrons */

    rb=sqrt(4.0*prexx*prexx+2.0*preyy*preyy); 

/* rc = distance between electrons-1 and 3 */
                                
    rc=sqrt(prexx*prexx+(Rbb*Rbb)/2.0+(preyy+Rbc)*(preyy+Rbc));

/* change length unit from MM into meter */
                                   
    ra=ra*1.0e-14; rb=rb*1.0e-14;  rc=rc*1.0e-14; 
    prexx=prexx*1.0e-14; preyy=preyy*1.0e-14;

/* calculating acceleration (= MM/SS^2 = 10^32 m/s^2  ) */   

/* update electron-1's x,y-velocity VX,VY from Couloumb force */ 
                                   
    VX=VX+1.0e-32*ac*prexx*(-Z/(ra*ra*ra)+2.0/(rb*rb*rb)+1.0/(rc*rc*rc));   
    VY=VY+1.0e-32*ac*((-Z*preyy)/(ra*ra*ra)+preyy/(rb*rb*rb)+(preyy+Rbc*1.0e-14)/(rc*rc*rc));

    prexx=xx; preyy=yy;
  
   } while (xx >= 0);              

/* until electron-1 has moved its 1/4 orbit to reach y-axis */
         
/* display electron-1's initial x-coordinate r1 */   
  
  printf("r1= %.2f ", r );

/* display electron-1's last velocity VX, VY */

  printf("VX= %.6f ", VX);
  printf("VY= %.6f ", VY);

/* display total de Broglie wavelength WN of 1/4 orbit */
 
  printf("WN= %.6f\n", WN);
    
   }  r=r+1;
   }  return 0;
   }