PSEUDOCODE

<Header Files>

Constants:

,

 

Function Module for Opening DataFiles when running programme

{

entering max filename character size;

inputting filename to be opened;

inserting error checking in opening file

Set format for output of numbers;

}

Module Function for Central Potential (V screening)

{

switch structure is used

         N= 1:

        break because hydrogen has no V screening effect.

       N= 2:

       c=0.056; (c being the parameter of each of these alkali atoms)

      N= 3:

      c=0.055;

     N= 4

    c=0.066;

   N =5; 

   c=0.058;

  N = 6:

Using two different V-screen formulas depending on whether ror r > ;

   return V-screen;

 } 

 

Module Function for Coulomb Potential

{

received passed values from main;

declarationg of variables and arrays;

setting boundary values for the V Potential;

Formatting to output;

Iterating of V Potential;

Return values to main;

}

Module Function for Iteration of trial energy (main core of the bisection method)

{

declare variables;

received passed values from main function and Eigenvalue module;

set selection structure with looping structure for iteration of E + DELTA E (energy step size) or

Hydrogen---->Z =1;

Lithium ----> Z = 3;

Natrium---->Z = 11;

Potassium----> Z = 19;

Rubidium----> Z = 37;

Cesium-----> Z = 55;

E –(DELTA E)/2 depending on the sign of the product of two wavefunctions being positive or negative;

return E energy;

}

Module Function for Eigenvalue(trial energy)

{

received passed values from main;

declare variables and arrays;

set selection structure for trial energy;

define constants for the Schroedinger Time Independent equation;

set boundary values for first set of wavefunction;

assign sum of wavefunctions to a variable;

repeat the steps for the second set by setting now the trial energy to + DELTA E;

do-while looping{

same steps repeated for the third set but this time the function for Iteration is called;

passed values from Eigenvalue to Iteration function;

when eigenvalue begins to converge, set a function that allows halving of DELTA_E until the final stage of convergence;

to test for opposite or similar signs, assign a variable to the multiplication of u[i]_previous and u[i]_next;

input tolerance level to set the scale of accuracy;

set formatting for the output on the file;

set error check for selection structure;

return 0;

}

Module Function for graphing utility

{

set x scaling, y scaling;

set max x, min x, max y, min y;

set iteration for max x ,minx ,max y, min y for pixel width setting;

set type of graphs and refresh mode;

set graph plotting function;

}  

 

Main Function

{

declare variables;

set formatting;

list names of atoms;

Received input from users for filename  , angular momentum, step size of radial increment, number of iteration, trial energy and step size of energy;

call function Eigenvalue;

format output style;

close data file;

close programme;

end;

}