learn-physics-0.6.0.0: Haskell code for learning physics

Copyright(c) Scott N. Walck 2015-2016
LicenseBSD3 (see LICENSE)
MaintainerScott N. Walck <walck@lvc.edu>
Stabilityexperimental
Safe HaskellTrustworthy
LanguageHaskell98

Physics.Learn.Schrodinger1D

Contents

Description

This module contains functions to solve the (time dependent) Schrodinger equation in one spatial dimension for a given potential function.

Synopsis

Potentials

freeV Source

Arguments

:: Double

position

-> Double

potential energy

Free potential. The potential energy is zero everywhere.

harmonicV Source

Arguments

:: Double

spring constant

-> Double

position

-> Double

potential energy

Harmonic potential. This is the potential energy of a linear spring.

squareWell Source

Arguments

:: Double

well width

-> Double

energy height of well

-> Double

position

-> Double

potential energy

Finite square well potential. Potential is zero inside the well, and constant outside the well. Well is centered at the origin.

doubleWell Source

Arguments

:: Double

width (for both wells and well separation)

-> Double

energy height of barrier between wells

-> Double

position

-> Double

potential energy

A double well potential. Potential energy is a quartic function of position that gives two wells, each approximately harmonic at the bottom of the well.

stepV Source

Arguments

:: Double

energy height of barrier (to the right of origin)

-> Double

position

-> Double

potential energy

A step barrier potential. Potential is zero to left of origin.

wall Source

Arguments

:: Double

thickness of wall

-> Double

energy height of barrier

-> Double

position of center of barrier

-> Double

position

-> Double

potential energy

A potential barrier with thickness and height.

Initial wavefunctions

harm Source

Arguments

:: Int

nonnegative integer n identifying stationary state

-> Double

x sqrt(hbar(m * omega)), i.e. position in units of sqrt(hbar/(m * omega))

-> C

complex amplitude

Harmonic oscillator stationary state

coherent Source

Arguments

:: Double

mass of particle

-> Double

angular frequency

-> Complex Double

parameter z

-> Double 
-> Complex Double

wavefunction

gaussian Source

Arguments

:: Double

width parameter

-> Double

center of wave packet

-> Double 
-> Complex Double

wavefunction

movingGaussian Source

Arguments

:: Double

width parameter

-> Double

center of wave packet

-> Double

momentum

-> Double 
-> Complex Double

wavefunction

Utilities

stateVectorFromWavefunction Source

Arguments

:: R

lowest x

-> R

highest x

-> Int

dimension of state vector

-> (R -> C)

wavefunction

-> Vector C

state vector

Transform a wavefunction into a state vector.

hamiltonianMatrix Source

Arguments

:: R

lowest x

-> R

highest x

-> Int

dimension of state vector

-> R

hbar

-> R

mass

-> (R -> R)

potential energy function

-> Matrix C

Hamiltonian Matrix

expectX Source

Arguments

:: Vector C

state vector

-> Vector R

vector of x values

-> R

X, expectation value of X

picture Source

Arguments

:: (Double, Double)

y range

-> [Double]

xs

-> Vector C

state vector

-> Picture 

Produce a gloss Picture of state vector for 1D wavefunction.