Home page
Back to reduced mass 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, first we input the initial y-coordinate r2 (in MM) of electron 1 (= the electron-1 starts from y-axis, and electron-2 start from z-axis ), and the absolute value of the total energy E (in eV) of helium atom.
↑ This initial input r2 value increases per calculation of the electron's 1/4 orbit until r2 + 30.
From the inputted values, this program computes electrons' 1/4 orbits (= electron-1 moves from y-axis to x-axis on x-y place, while electron-2 moves from z-axis to x-axis on the perpendicular x-z plane symmetrically ) by rigorously calculating Coulomb forces among two electrons and a nucleus, de Broglie wavelength, updating electrons' positions, velocities at short time intervals of 1SS (= 1 × 10-23 second ) like in this.
Then, this program outputs electron-1's x (= VX ) and y (= VY ) components of last velocity, last-x-coordinate after the electron has moved a quarter of its orbits from y-axis to x-axis (= electron-1 must cross the x-axis perpendicularly with the last VX velocity being zero to form the most stable symmetrical orbit around the nucleus = so we should choose the uniquely-determined r2 which gives the zero last VX in each different helium total energy E ).
This program also outputs WN (= the number of de Broglie's waves included in one quarter of the orbital, which should be 0.250000 when one orbit is 1 × de Broglie wavelength, which case uniquely gives the predicted helium energy by this real helium model's program ).
Here we use new convenient units of time = 1 SS = 1 × 10-23 second, distance = 1 MM = 1 × 10-14, velocity = 1MM/SS = 1 × 109 m/s, acceleration = 1MM/SS^2 = 1032 m/s^2.
The initial x-coordinate is automatically increased per calculation until +30 (= these different initial y-coordinates give different orbits, out of which we can uniquely determine only one initial y-coordinate that gives a symmetrical orbit around a nucleus with zero x-component of electron-1's last velocity (= VX = 0.000000 ) after electron-1 moves a quarter of its orbit ).
#include <stdio.h>
#include <math.h>
int main(void)
{
/* electron-1 start from y-axis to x-axis */
/* initial angle of electron-1-nucleus-electron-2 is 90 degree */
int i;
double r,E,rm;
double vya,vyb,poten,VX,VY,prexx,preyy,WN,ra,rb;
double xx,yy,vk,leng,wav,ac;
/* 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;
/* nucle = helium nuclear mass (kg) */
double nucle = 6.64465650e-27;
double Z = 2.0;
/* rm = reduced mass */
rm =(2.0*me*nucle)/(2.0*me+nucle);
rm=rm*0.5;
/* input electron-1's initial y-coordinate r2 (MM = 10^-14 meter ) */
printf("r2 between nucleus and electron 1 (MM)? ");
scanf("%lf",&r);
/* input absolute value of total energy |E| (eV) of helium */
printf("absolute value of total energy |E| of helium atom (eV) ? ");
scanf("%lf", &E);
printf(" \n");
for (i=1; i < 30 ;i++) {
/* repeat calculations until r2 increases to r2+30 */
/* poten = initial Coulomb potential energy */
poten=-(2.0*Z*ele*ele)/(4.0*pai*epsi*r)+(ele*ele)/(4.0*pai*epsi*r*sqrt(2.0));
/* vya = total energy - Coulomb potential energy (J) */
vya=-(E*1.60217646e-19)-poten*1.0e14;
if (vya > 0) {
/* vyb = electron's initial velocity (m/s) */
vyb=sqrt(vya/me);
/* VX,VY = electron-1 x,y-velocity (= MM/SS = 10^9 m/s )*/
VX=-vyb*1.0e-9; VY=0.0;
/* prexx, preyy = electron-1's x,y-coordinate */
prexx=0.0; preyy=r;
/* WN = sum of de Broglie wavelength */
WN=0.0;
do {
/* xx,yy = electron-1's x,y-coordinate after 1SS (= 10^-23 second ) */
xx=prexx+VX; yy=preyy+VY;
vk=VX*VX+VY*VY;
/* leng = electron's moving length (= meter ) per 1SS */
leng=sqrt(vk)*1.0e-14;
/* wav = de Broglie wavelength = h/mv (meter) */
wav=h/(rm*sqrt(vk)*1.0e9);
/* WN = summing number of de Broglie wavelength */
WN=WN+leng/wav;
/* ra = distance between electron-1 and nucleus */
ra=sqrt(prexx*prexx+preyy*preyy);
/* rb = distance between two electrons */
rb=sqrt(4.0*prexx*prexx+2.0*preyy*preyy); /* between two electrons */
/* change length unit from MM into meter */
ra=ra*1.0e-14; rb=rb*1.0e-14;
prexx=prexx*1.0e-14; preyy=preyy*1.0e-14;
ac=(ele*ele)/(4.0*pai*epsi*rm);
/* update electron-1's x,y-velocity VX,VY (= MM/SS ) from Coulomb force */
VX=VX+1.0e-32*ac*prexx*(-Z/(ra*ra*ra)+2.0/(rb*rb*rb));
VY=VY+1.0e-32*ac*preyy*(-Z/(ra*ra*ra)+1.0/(rb*rb*rb));
prexx=xx;preyy=yy;
} while (yy >= 0);
/* until electron-1 reaches x-axis, moving its 1/4 orbit from y-axis */
/* display electron-1's initial y-coordinate r2 */
printf("r2= %.2f ", r );
/* display electron-1's last x,y-velocity VX,VY */
printf("VY= %.6f ", VY);
printf("VX= %.6f ", VX);
/* display electron-1's last x-coordinate */
printf("last-x= %.1f ", xx );
/* display total de Broglie wavelength WN of 1/4 orbit */
printf("WN= %.6f\n", WN);
} r=r+1;
} return 0;
}