learn-physics-0.6.5: Haskell code for learning physics

Copyright(c) Scott N. Walck 2015-2018
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

coherent Source #

Arguments

:: R

length scale = sqrt(hbar / m omega)

-> C

parameter z

-> R 
-> C

wavefunction

gaussian Source #

Arguments

:: R

width parameter

-> R

center of wave packet

-> R 
-> C

wavefunction

movingGaussian Source #

Arguments

:: R

width parameter

-> R

center of wave packet

-> R

l0 = hbar / p0

-> R 
-> C

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.

xRange :: R -> R -> Int -> [R] Source #

listForm :: (R, R, Vector C) -> ([R], Vector C) Source #