User's Schrödinger Equation:



Time-independent Schrödinger Equation
_________

Wikipedia comments: "In quantum mechanics, the Schrödinger equation is a partial differential equation that describes how the quantum state of some physical system changes with time. It was formulated in late 1925, and published in 1926, by the Austrian physicist Erwin Schrödinger."

- h2
2m
* ∇2 Ψ + U Ψ = E Ψ

Do you have a Schrödinger equation to solve? Or any other math equations? For the next few months of 2014, we are willing to help you solve them using Calculus-level programming. To start, copy and modify the source code below in a file we'll call it {abc}{123}.fc where {abc} = your initials and {123} = any number or id; 8 characters max. for filename. Edit your {abc}{123}.fc file, especially lines starting with a "!" character. E-mail us your {abc}{123}.fc file. We will compile & execute it and send you the output file. Try compiling you own code with our FC-Compiler program. Download and install FC-Compiler with more [~60] example problems to choose from. Learn how easy it works.

All "!" characters in columns 1 or 2 must be deleted before compiling. These "!" were added in order to point out areas needing work.

Next, you may modify a copy of this web page and send it to us for viewing. If accepted, we will post your webpage showing your problem with solution. If you want people to be able to contact you, please include your e-mail address on this web page.

Please mention our fortranCalculus.info website to others. Thanks!


User's Schrödinger Equation Source Code:



For 1-dimensional Schrödinger Equation use following:



      global all
      problem SchrodingerPDE	! time-independent version
C ------------------------------------------------------------------------
C --- Calculus Programming example: Schrödinger Equation; a PDE (1D) Initial
C --- Value Problem.
C ------------------------------------------------------------------------
C
C User parameters ...
        h = 6.6260689633e-34	 ! Js ... Planck's constant
C
C x-parameter initial settings: x ==> i
!        xFinal=1:  xPrint=xFinal/20
C
        call xAxis      !
      end               ! Stmt.s not necessary in IVP, but used in BVP version
      model xAxis       !
C ... Integrate over x-axis
C
        x= 0:	xPrt = xPrint:	dx = xPrt / 10
!        PSI = ???:   PSIx = ???:   PSIxx = ???    ! Initial Conditions @x=0
        Initiate pegasus   for PDE &
          equations PSIxx/PSIx, PSIx/PSI   of x   step dx   to xPrt
        do while (x .lt. xFinal)
          Integrate PDE    by pegasus
          if( x .ge. xPrt) then
            print 79, x, PSI, PSIx, PSIxx
            xPrt = xPrt + xPrint
          end if
        end do
 79     format( 1h , f8.4, 1x, 3(g14.5, 1x))
      end
      model PDE                         ! Partial Differential Equation
!        U = ???
!        E = ???    ! energy of particle
        PSIxx = 2*m/(h*h) * (E - U) * PSI
      end

For 2-dimensional Schrödinger Equation use following:




      global all
      problem SchrodingerPDE
C ------------------------------------------------------------------------
C --- Calculus Programming example: Schrödinger Equation; a PDE (2D) Initial
C --- Value Problem solved using Method of Lines.
C ------------------------------------------------------------------------
        dynamic PSI, PSIx, PSIxx
C
C User parameters ...
        h = 6.6260689633e-34  ! Js ... Planck's constant
!       m = ...               ! mass of the particle
!       jpoints = 50          ! grid pts. over y-axis
C
C x-parameter initial settings: x ==> i
!       xFinal =  1:     xPrint = xFinal/20
C
C y-parameter initial settings: y ==> j
!       yFinal =  1:     dy = yFinal/(jpoints-1)
        pi= 4*atan(1):   jp= jpoints
        allot PSI( jp), PSIx( jp), PSIxx( jp)
        do 20 j = 1, jpoints       ! Initial Conditions @y=0
          PSI(j)= PSI0(j*dy):   PSIx(j)= ???:   PSIxx(j)= ???
 20     continue
C
        call xAxis      !
      end               ! Stmt.s not necessary in IVP, but used in BVP version
      model xAxis       !
C ... Integrate over x-axis
C
        x= 0:	xPrt = xPrint:	dx = xPrt / 10
        Initiate athena   for PDE &
          equations PSIxx/PSIx, PSIx/PSI   of x   step dx   to xPrt
        do while (x .lt. xFinal)
          Integrate PDE    by athena
          if( x .ge. xPrt) then
            print 79, x, (PSI(jj), jj = 1, jp)
            xPrt = xPrt + xPrint
          end if
        end do
 79     format( 1h , f8.4, 1x, 10(g14.5, 1x))
      end
      model PDE                         ! Partial Differential Equation
C                                       ! Method of Lines
        do 40 jj = 2, jpoints - 1       ! System of ODEs
!          U = ???
!          E = ???    ! energy of particle
          PSIyy = (PSI(jj+1) - 2*PSI(jj) + PSI(jj-1))/dy**2
          PSIxx(jj)= 2*m/(h*h) * (E - U) * PSI - PSIyy
 40     continue
!       PSI(jp)= ???:   PSIx(jp)= ???:    PSIxx(jp)= ???   ! Boundary Conditions @x=L, if any
      end
      Fmodel PSI0(yy)       ! Initial starting values @ x = 0
!        if( yy .le. 0) then
!          PSI0 = 0
!        elseif( yy .lt. .5 ) then
!          PSI0 = (1 - cos( 4 * pi * yy))/2
!        else
!          PSI0 = 0
!        endif
      end

User's Schrödinger Equation Output:



selected output goes here ...

HTML code for linking to this page:



<a href="http://fortranCalculus.info/math-problems/schrodinger-equation.html"><img style="float:left; width:100px" src="http://fortranCalculus.info/image/fc-compiler-icon.png"/> <strong>Schrödinger Equation</strong> </a>; Parameter Estimation for Optimal Solution.

Go to top

 
Valid CSS! Calculus (level) Problem-Solving for Engineers & Scientists Author's Amazon Account

Textbooks - Parameter Estimation 4 ODE/PDE - Signal Analysis / Spectral Estimation - Body Plasma - Solar Cell
Increasing Productivity Examples: AC Motor Design - Matched Filters - Pulse Slimming / InterSymbol Interference - Pilot (safe) Ejection - PharmacoKinetics Simulation - Poisson's (Differential) Equation - Schrodinger (Differential) Equation - BVP 4 PDE Equations - Implicit (Differential) Equations