oscillator.m

From Spinach Documentation Wiki
Jump to: navigation, search

Harmonic oscillator infrastructure in 1D.

Syntax

    [H_oscl,X_oscl,xgrid]=oscillator(parameters)

Description

Basic quantum mechanical operators required for a simple harmonic oscillator in a gravitational potential.

Arguments

  parameters.frc_cnst    - force constant, N/m

  parameters.par_mass    - particle mass, kg

  parameters.grv_cnst    - gravitational acceleration. m/s^2

  parameters.n_points    - number of discretization points

  parameters.box_size    - oscillator box size, m

Outputs

  H_oscl   -   oscillator Hamiltonian, Joules

  X_oscl   -   oscillator X operator, m

  xgrid    -   X coordinate grid, m

Examples

See slosh_test_1.m and slosh_test_2.m files in examples/nmr_diffusion directory.

Notes

Gravitation is directed along the X axis. Finite difference derivative operators are used.

See also

hydrodynamics.m, v2fplanck.m


Version 2.1, authors: Ilya Kuprov