/phys389-2020-project-JP-Carr

phys389-2020-project-JP-Carr created by GitHub Classroom

Primary LanguagePython

phys389-2020-project-JP-Carr (python 3.0+)

Instructions

  • To generate a single set of wavefunctions ψ and energy eigenvalues Eₙ, run "wavefunction_generator.py", changing the value of "N" to the desired number of integration steps (NOTE: Increases in "N" increase run time exponentially).
  • To generate a set of ψ and Eₙ results for multiple values of "N", run "multiprocess_generator.py" with "simulations" set to the number of desired simulations to be run. Simulation start at a value of N=50, which increase by 50 for each successive simulation (NOTE: VS code recommended for monitoring this).
  • To view the generated wavefuncton ψ and its comparison to an analytically generated wavefunction run "wavefunction_plotter.py", changing the variable "wave_function_csv" to the path of the desired csv located in "phys389-2020-project-JP-Carr\wavefunctions".
  • To view the comparisons of the numerically calculated energy eigenvalues Eₙ to their analytically generated counterparts, run "energy_comparison.py".

Contents

  • analytical_E_levels.py - produces energy eigenvalues Eₙ as derived from the non-dimensional Scrödinger equation

  • analytical_psi.py - produces wavefunction ψ, the solution the non-dimensional Scrödinger equation

  • conftest.py - allows for modules relevant to test files to be loaded when running py.test command

  • energy_comparison.py - compares energy levels produced by "wavefunction_generator.py" to those from "analytical_E_levels.py"

  • \energy_levels - directory for CSV file containing energy eigenvalues Eₙ for different values of N

  • error.py - facilitates the quick production of quick error messages with an audio que

  • linear_timer.py - times "wavefunction_generator.py" at different values of N

  • multiprocess_generator.py - runs "wavefunction_generator.py" at multiple values of N

  • potential_class.py - contains the "potential" class, which can describe the potential fields, and calculate their depths

  • probability_plotter.py - plots the normalised probability density, as taken from the wavefunction ψ, generated by "wavefunction_generator.py"

  • quantum_particle.py - contains the "q_particle" class, which describes a quantum particle of a given energy, and allows for the calculation of one section of a wavefunction using the Numerov method, when placed in a potential field

  • \test_scripts - can all be run using the command "py.test" in the "phys389-2020-project-JP-Carr" directory

    • test_analyticalE.py - Performs checks on the "analytical_E" function from "analytical_E_levels.py"
    • test_normalisation.py - Performs checks on the "normalise" function from "probability_plotter.py"
    • test_particle.py - Performs checks on the functions contained in "quantum_particle.py"
    • test_potential.py - Performs checks on the functions contained in "potential_class.py"
    • test_turning_points.py - - Performs checks on the "turn_points" function from "wavefunction_generator.py"
  • time_plotter.py - plots data produced by "linear_timer.py"

  • \wavefunctions - directory for CSV file containing wavefunctions ψ for different values of N

  • wavefunction_generator.py - produces and finds valid wavefunction of a given "q_particle" object in a "potential" object potential, given a set of boundary conditions

  • wavefunction_plotter.py - normalises and plots the wavefunctions ψ produced by "wavefunction_plotter.py" and plots a comparison between ψ and the wavefunction produced by "analytical_psi.py"

Required Modules

  • Numpy
  • Matplotlib
  • Pandas
  • Scipy
  • OS - Standard
  • Math - Standard
  • Multiprocessing - Standard
  • Time - Standard
  • Copy - Standard
  • Pytest
  • Sys - Standard
  • Random - Standard