learn-physics-0.6.3: Haskell code for learning physics

Copyright (c) Scott N. Walck 2015-2018 BSD3 (see LICENSE) Scott N. Walck experimental Trustworthy Haskell98

Physics.Learn.Schrodinger1D

Description

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

Synopsis

# Potentials

Arguments

 :: Double position -> Double potential energy

Free potential. The potential energy is zero everywhere.

Arguments

 :: Double spring constant -> Double position -> Double potential energy

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

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.

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.

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.

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

Arguments

 :: R length scale = sqrt(hbar / m omega) -> C parameter z -> R -> C wavefunction

Arguments

 :: R width parameter -> R center of wave packet -> R -> C wavefunction

Arguments

 :: R width parameter -> R center of wave packet -> R l0 = hbar / p0 -> R -> C wavefunction

# Utilities

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.

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

Arguments

 :: Vector C state vector -> Vector R vector of x values -> R X, expectation value of X

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 #