Computer Physics (Computational Physics for classical systems)




Office hours:

monday, 12:00-13:00, room 318 (3-rd floor), building D7 (new)


Lecture notes

  1. (10 min) General information
  2. (3 h) Ordinary differential equations part 1
  3. (2 h) Ordinary differential equations part 2
  4. (2 h) Ordinary differential equations part 3
  5. (4 h) Molecular Dynamics
  6. (2 h) OTHER (IN PREPARATION)
  7. (2 h) OTHER (IN PREPARATION)

Computer laboratory projects

  1. (3h) Simulation of projectile motion with Forward Euler method
  2. (3h) Simulation of dumped harmonic oscillator with periodic drive with RK4 method
  3. (3h) Precession of Mercury perihelium - simplectic integrators
  4. (3h) Radioactive decay - stiffness problem in ODE
  5. (9h) Molecular dynamics simulation in 2D
  6. (3h) OTHER (IN PREPARATION)
  7. (3h) OTHER (IN PREPARATION)
  8. (3h) OTHER (IN PREPARATION)

Example textbooks on computational physics (some of them are downloadable from university ip address)

  1. (pdf - from AGH ip) Franz Vesely "Computational Physics", Springer
  2. (pdf - from AGH ip) Philipp Scherer "Computational Physics - simulation of classical and quantum systems", Springer
  3. (pdf - from AGH ip) B. Stickler, E. Schachinger "Basic concepts in computational physics", Springer
  4. (pdf - from AGH ip) M. Griebel, S. Knapek, G. Zumbush "Numerical simulation in molecular dynamics", Springer
  5. (pdf) Konstantinos Anagnostopoulos "Computational Physics", Springer
  6. (pdf) Simon Sirca, Martin Horvat " Computational Methods in Physics Compendium for Students", Springer
  7. J.M. Thijssen "Computational Physics",Cambridge
  8. Joel Franklin "Computational Methods for physics", Cambridge
  9. Michael Bestehorn "Computational Physics with worked out examples in fortran and matlab", de Gruyter
  10. Tao Pang, "An introduction to computational physics", Cambridge
  11. D.C. Rapaport "The art of molecular dynamics simulation", Cambridge
  12. Michael P. Allen, Dominic J. Tildesley, "Computer Simulation of liquids", Oxford
  13. Joseph F. Boudreau, Eric S. Swanson "Applied computational physics", Oxford
  14. Harvey Gould, Jan Tobochnik, Wolfgang Christian "An Introduction to Computer Simulation Methods: Applications To Physical Systems"

Notes on the existing rules in laboratory:

Students carry out the projects relating to numerical solutions of basic physical problems.
Each project must be performed individually by writing the computer program which
conducts all tasks contained in the project instruction.
Preffered programming language: C/C++.
Project is recognized as accomplished after preparing
and sending the instructor the report. Only the electronic version of report
in PDF format is acceptable. It must contain:
(i) brief introduction i.e. the description of the physical problem,
(ii) short description of the numerical method/algorithm used in computations,
(iii) compact presentation of the results (figures, tables ), each supported
with short 2-3 sentences of comment, and,
(iv) conclusions (~ 0.5 page) summarizing student's own observations/reflections.
The report shall be placed in UPEL platform within 1 week (7 days)
counting from the end of the laboratory the project was realized. Reports are assessed
in a scale between 0 and 100 points. In case of delay in sending the report,
the amount of points is decreased by 20 for each subsequent week of delay.
In case of excused absence of student on computer laboratory student is obliged to realize
the project on his/her own and send the report within a week after attending
the next classes. Unexcused absence would be granted with zero points for missed classes.


Notes about how to use the numerical libraries
in computer laboratory on Taurus Linux server

  1. BLAS library

    It is installed in Taurus server, to use the BLAS routines compile your code using following command

    g++ source_code.cpp -lblas -lm

  2. LAPACKE C wrappers to LAPACK routines.

    Unfortunately administrator of Taurus server hasn't yet installed this package.
    Therefore we must cope with this issue ourselves. Below there is the link to the compiled library,
    just click on the link and download the archived file.

    lapacke.zip

    In your home directory create new directory "bin", put the downloaded file "lapacke.zip" in it
    and unzip it with command

    unzip lapacke.zip

    Unzipped directory contains the header files in include subdirectory and the library liblapacke.a.
    In order to compile the C++ source code with the LAPACKE wrapper we need to provide
    the path to the headers files (-I/path flag) and the location of the library (-L/path flag),
    for this purpose use the following command

    g++ -I$HOME/bin/lapacke/include -L$HOME/bin/lapacke source_code.cpp -llapacke -llapack -lblas -lm

    Notice that the compiler links the libraries in the order read from the right to the left
    (first is the mathematical library, then BLAS and LAPACK while LAPACKE is the last one).

    If everything is ok you shall see an executable file in your working directory.
    If you wish to use the LAPACKE wrappers on your home computer, you do not need to compile it manually
    just install an appropriate packages from repository: blas and lapacke-dev.
    All dev packages contain the headers files which must be included during the compliation.
    Usually the headers files and the libraries are placed in the directories which the system
    conventionally searches so you do not need to usually add these paths but you must still inform
    which libraries you use in your program.
    If due to some reasons the libraries are put in non-standard directories,
    then locate the directory with headers files and the library with locate command (Linux systems)

    locate lapacke


Numerical libraries documentation

  1. BLAS C interface (pdf)
  2. LapackE: C interface to Lapack (manual - online)
  3. Lapack: how to use it in Fortran and C/C++
  4. FFTW (manual - online) (manual - pdf)
  5. Math Kernel Library (Intel) (manual - online) (manual - pdf)
  6. GSL - GNU Scientific Library (manual - online) (manual - pdf)
  7. MUMPS: a parallel sparse direc solver (manual - pdf)
  8. ARPACK-ng: large scale eigenvalue solver (manual - pdf)
contact
Dr Hab. Eng. Tomasz Chwiej
AGH University of Krakow
Faculty of Physics and Computer Science
Department of Computer Science and Computer Physics
room 318, building D7, phone:(12) 617 44 71
chwiej@fis.agh.edu.pl