Skip to content

izlotnik/schrodinger-dtbc

Repository files navigation

Matlab License

Description

The provided Matlab codes allow to solve numerically the generalized time-dependent Schrödinger equation in unbounded domains. In case of variable coefficients becomes constant for large space variables, we can construct so-called discrete transparent boundary conditions (DTBC) and use them to restrict used numercal schemes to a finite mesh. Both theoretical analysis of stability and the accomplished computations confirm that considered numerical methods coupled to the discrete TBC are effective even in the case of highly oscillating solutions and discontinuous potentials.

The following numerical methods are effectively implemented and coupled with discrete or semi-discrete TBC:

  • a two-level symmetric in time (i.e. the Crank-Nicolson) scheme
  • global Richardson extrapolation in time (high-order scheme in time)
  • broad family of finite difference schemes with three-point parameter dependent averaging in space, incl.
    • no averaging
    • higher order Numerov-like scheme
    • scheme of the first order finite element method
  • any order finite element in space numerical method (high-order scheme in space, only for 1D)
  • splitting in potential (only for 2D)

For the detailed explanation, please refer to our publications.

Main Publications

Installation Steps

  1. Download dependencies from MATLAB Central (see below) and save them to the MATLAB path or to the project folder.
  2. Run the script "Install.m" to update Matlab path and disable few warning messages.

Dependencies

In order to run the code we will need to functions both available on MATLAB Central:

The first functon sym2str is widely used in the visualization functions to add values like $\theta=1/12$ to the labels on the plot. So if we do not need visualization you can omit that dependency.

The second function DataHash is used to calculate MD5-hash value of the task parameter values while determining if the solution of that particular task has been already calculated and saved on the disk (if so it will be loaded from the disk and not to be calculated again). So far, if we do not need to save/load our solution to/from the hard drive we can omit the dependency of DataHash.

Note: We have been running our codes since Matlab R2007b. The latest version of the code is tested on Matlab R2017a. Please let us know if you run into any problem.

Sample code

More Information

For more information, please see the published papers or contact the author.

Disclaimer

The code is free for academic/research purpose. Use it at your own risk and we are not responsible for any loss resulting from this code. Feel free to submit pull request for bug fixes.

Author

Ilya Zlotnik 2007 - 2014