Home 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 class file name is threle, so save this text editor as "threle.java", 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.
import java.util.Scanner;
class threle {
public static void main(String[] args) {
// three-electron atoms, ions
// input atomic number Z
Scanner stdIn=new Scanner(System.in);
System.out.println("Atomic number Z ? (Li=3, Be+=4, B2+=5, C3+=6, N4+=7...)");
double Z=stdIn.nextDouble();
// input initial electron-1's x-coordinate r1
System.out.println("r1 between nucleus and electron 1 (MM)? ");
double r=stdIn.nextDouble();
// input absolute value of atomic energy |E|
System.out.println("absolute value of energy |E| in three-electron-atom (eV) ? ");
double E=stdIn.nextDouble();
// me = elecrtron mass (kg)
double me=9.1093826e-31;
// pai=pi epsi=electric constant
double pai=3.141592653589793;
double epsi=8.85418781787346e-12;
// h = Planck constant ele= electron charge
double h=6.62606896e-34; double ele=1.60217653e-19;
double ab=(ele*ele)/(4.0*pai*epsi); double ac=ab/me;
// 2s-electron approximately feels Z-2 charge
// Eb= energy of 3rd outer electron in 2s
double Eb=-((Z-2)*(Z-2)*ele*ele*ele*ele*me)/(32*epsi*epsi*h*h);
// Rb = radius of 3rd outer electron in 2s
double Rb=(4.0*epsi*h*h)/((Z-2.0)*pai*ele*ele*me);
// change meter into MM (= 10^-14 m )
double Rbb=Rb*1.0e14;
double Rbc=Rbb/(Math.sqrt(2.0));
// display radius of the outer 2s-electron
System.out.printf("outer-electron's raidus (MM) = Rbb:%.2f\n", Rbb);
for (int i=1;i < 100;i++) {
// repeat until initial r1 increases to r1+100
// change unit from r (= MM ) to rr (= meter )
double rr=r*1.0e-14;
// disb = distance betwen electrons-1 and 3
double disb=Math.sqrt((rr*rr)+Rb*Rb);
// poten = initial Coulomb potential energy
double poten=-(2.0*Z*ab)/rr+ab/(2.0*rr)+(2.0*ab)/disb-(Z*ab)/(Rb);
// vya = kinetic energy of two inner electrons
// the outer electron kinetic energy = -Eb
double vya=-(E*1.60217646e-19)-poten+Eb;
if (vya > 0) {
// vyb = initial velocity of an electron
double vyb=Math.sqrt(vya/me);
// 1SS = 10^-23 second
// 1MM/SS = 10^9 m/s
// change unit of velocity from m/s to MM/SS
// VX,VY = velocity of electron-1 (MM/SS)
double VY=vyb*1.0e-9; double VX=0.0;
// prexx, preyy = electron-1's coordinate
double prexx=r; double preyy=0.0;
// WN = number of de Broglie wavelength
double WN=0.0;
double xx,yy,vk, leng, wav; xx=0.0;
do {
// xx,yy = electron-1's position after 1SS
xx=prexx+VX; yy=preyy+VY;
vk=VX*VX+VY*VY;
// leng = moving length (meter) for 1SS
leng=Math.sqrt(vk)*1.0e-14;
// wav = de Broglie wavelength = h/mv (meter)
wav=h/(me*Math.sqrt(vk)*1.0e9);
// WN = sum of de Broglie wavelength
WN=WN+leng/wav;
// ra = distance between electron and nucleus
double ra=Math.sqrt(prexx*prexx+preyy*preyy);
// rb = distance between two electrons
double rb=Math.sqrt(4.0*prexx*prexx+2.0*preyy*preyy);
// rc = distance between electros-1 and 3
double rc=Math.sqrt(prexx*prexx+(Rbb*Rbb)/2.0+(preyy+Rbc)*(preyy+Rbc));
// change 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 from Coulomb force
// update x-velocity VX (MM/SS) of electron-1
VX=VX+1.0e-32*ac*prexx*(-Z/(ra*ra*ra)+2.0/(rb*rb*rb)+1.0/(rc*rc*rc));
// update y-velocity VY of electron-1
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 reached y-axis
// until electron-1 has moved its 1/4 orbit
// display initial x-coordinate r1
System.out.print("r1: "+r+" ");
// display electron's last x,y-velocty VX,VY
System.out.printf("VX:%.6f ", VX);
System.out.printf("VY:%.6f ", VY);
// display total de Broglie wavelength WN
System.out.printf("WN:%.6f\n", WN);
} r=r+1;
}}}