TITLE 'Particle in a Potential Well' SELECT Errlim = 1e-4 Modes = 5 Bold = On COORDINATES Cartesian1 VARIABLES psi DEFINITIONS { SI units throughout } Lx = 3e-9 d = 1e-9 me = 9.1096e-31 { Electron mass } h = 6.6262e-34 { Planck's constant } c = 8*pi^2*me/h^2 { Coefficient for PDE } V0 = 2e-18 V { Potential energy } int_psi2 = integral(psi^2) { Integral in 1D } psi1 = psi/sqrt(int_psi2) { Normalized wave function } well1 = V/V0*globalmax(psi1^2) { For plot only } EQUATIONS dxx(psi) - c*V*psi + lambda*c*psi = 0 BOUNDARIES Region 'domain' V = V0 Start (-Lx) Point value(psi) = 0 Line to (Lx) Point value(psi) = 0 Region 'well' V = 0 Start (-d/2) Line to (d/2) PLOTS Elevation(psi1^2, well1) from (-1.5*d/2) to (1.5*d/2) END