Difference between revisions of "Simulation Methods in Physics I WS 2019/2020"

From ICPWiki
Jump to: navigation, search
(Lecture)
(Worksheets)
 
(9 intermediate revisions by 3 users not shown)
Line 9: Line 9:
 
;Location and Time
 
;Location and Time
 
:'''Lecture''': Thu, 14:00–15:30; ICP, Allmandring 3, Seminar Room (room 01.079)
 
:'''Lecture''': Thu, 14:00–15:30; ICP, Allmandring 3, Seminar Room (room 01.079)
:'''Tutorials''': ([[Patrick Kreissl]] and [[Kai Szuttor]])
+
:'''Tutorials''': Thu, 15:45–17:15 ([[Patrick Kreissl]]); Fri, 14:00–15:30 ([[Kai Szuttor]])
 
; Prerequisites
 
; Prerequisites
 
: We expect the participants to have basic knowledge in classical and statistical mechanics, thermodynamics, and partial differential equations, as well as knowledge of a programming language (Python and C).
 
: We expect the participants to have basic knowledge in classical and statistical mechanics, thermodynamics, and partial differential equations, as well as knowledge of a programming language (Python and C).
Line 42: Line 42:
  
 
|-
 
|-
|1||2019-10-17 || Course Content, Organization, Introduction || ||
+
|1||2019-10-17 || Course Content, Organization, Introduction || [https://www.icp.uni-stuttgart.de/~icp/html//teaching/2019-ws-sim_methods/lecture01_slides.pdf Slides] ||
  
 
|-
 
|-
|2||2019-10-24 || MD: Integrators || ||
+
|2||2019-10-24 || MD: Integrators || [https://www.icp.uni-stuttgart.de/~icp/html//teaching/2019-ws-sim_methods/lecture02_notes.pdf Lecture Notes] ||
  
 
|-
 
|-
|3||2019-10-31 || Basics of Statistical Mechanics, Chaos || ||
+
|3||2019-11-07 || Chaos, LJ-Potential, Units || [https://www.icp.uni-stuttgart.de/~icp/html//teaching/2019-ws-sim_methods/lecture03_notes.pdf Lecture Notes] ||
 +
 
  
 
|-
 
|-
|4||2019-11-07 || Chaos, LJ-Potential, Units || ||
+
|4||2019-10-31 || Basics of Statistical Mechanics, Chaos || [https://www.icp.uni-stuttgart.de/~icp/html//teaching/2019-ws-sim_methods/lecture04_notes.pdf Lecture Notes] ||
 +
 
  
 
|-
 
|-
|5||2019-11-14 || PBC, cell-lists, simple MD || ||
+
|5||2019-11-14 || PBC, cell-lists, simple MD || [https://www.icp.uni-stuttgart.de/~icp/html//teaching/2019-ws-sim_methods/lecture05_notes.pdf Lecture Notes] ||
  
 
|-
 
|-
|6||2019-11-21 || Observables, Brownian Motion, Diffusion || ||
+
|6||2019-11-21 || Observables, Brownian Motion, Diffusion || [https://www.icp.uni-stuttgart.de/~icp/html//teaching/2019-ws-sim_methods/lecture06_notes.pdf Lecture Notes] ||
  
 
|-
 
|-
|7||2019-11-28 || Diffusion, Green-Kubo, Langevin Dynamics || ||
+
|7||2019-11-28 || Diffusion, Green-Kubo, Langevin Dynamics || [https://www.icp.uni-stuttgart.de/~icp/html//teaching/2019-ws-sim_methods/lecture07_notes.pdf Lecture Notes] ||
  
 
|-
 
|-
|8||2019-12-05 || Thermostats, Barostats || ||
+
|8||2019-12-05 || Thermostats, Barostats || [https://www.icp.uni-stuttgart.de/~icp/html//teaching/2019-ws-sim_methods/lecture08_notes.pdf Lecture Notes] ||
  
 
|-
 
|-
|9||2019-12-12 || Thermostats, Barostats || ||
+
|9||2019-12-12 || Thermostats, Barostats || [https://www.icp.uni-stuttgart.de/~icp/html//teaching/2019-ws-sim_methods/lecture09_notes.pdf Lecture Notes] ||
  
 
|-
 
|-
|10||2019-12-19 || Error analysis, B.Sc. / M.Sc. thesis @ ICP: information & research topics || ||
+
|10||2019-12-19 || Error analysis, B.Sc. / M.Sc. thesis @ ICP: information & research topics || [https://www.icp.uni-stuttgart.de/~icp/html//teaching/2019-ws-sim_methods/thesis_topics.pdf Slides] ||
  
 
|-
 
|-
|11||2020-01-09 || Monte-Carlo Method || ||
+
|11||2020-01-09 || Monte-Carlo Method || [https://www.icp.uni-stuttgart.de/~icp/html//teaching/2019-ws-sim_methods/lecture11_notes.pdf Lecture Notes] ||
  
 
|-
 
|-
|12||2020-01-16 || Monte-Carlo and Critical Phenomena || ||
+
|12||2020-01-16 || Monte-Carlo and Critical Phenomena || [https://www.icp.uni-stuttgart.de/~icp/html//teaching/2019-ws-sim_methods/lecture12_notes.pdf Lecture Notes] ||
  
 
|-
 
|-
|13||2020-01-23 || Critical Exponent || ||
+
|13||2020-01-23 || Critical Exponent || [https://www.icp.uni-stuttgart.de/~icp/html//teaching/2019-ws-sim_methods/lecture13_notes.pdf Lecture Notes] ||
  
 
|-
 
|-
|14||2020-01-30 || Finite Size Scaling || ||
+
|14||2020-01-30 || Finite Size Scaling || [https://www.icp.uni-stuttgart.de/~icp/html//teaching/2019-ws-sim_methods/lecture14_notes.pdf Lecture Notes] ||
  
 
|-
 
|-
|15||2020-02-06 || Reweighting || ||
+
|15||2020-02-06 || Reweighting || [https://www.icp.uni-stuttgart.de/~icp/html//teaching/2019-ws-sim_methods/lecture15_notes.pdf Lecture Notes] ||
  
 
|}
 
|}
Line 126: Line 128:
 
* The Friday tutorial on February 8th will be held by [[David Sean]]. Please submit your reports to him.-->
 
* The Friday tutorial on February 8th will be held by [[David Sean]]. Please submit your reports to him.-->
  
<!--
+
 
 
=== Worksheets ===
 
=== Worksheets ===
  
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
!Topic !! Deadline !! Worksheet  !! Further Resources
+
!Topic !! Online on !! Deadline !! Files
  
 
|-
 
|-
| 0. First steps with Linux, Python, and C ||  no submission required || {{Download|WS_2015_SM1_worksheet0.pdf|Worksheet 0|pdf}} || {{ipynb|PythonTutorial.ipynb|PythonTutorial.ipynb}}, {{ipynb|NumPyTutorial.ipynb|NumPyTutorial.ipynb}}.
 
  
 
|-
 
|-
| 1. Integrators (lectures 1-2) || 2018-11-12 12:00 || {{Download|WS_2018_SM1_worksheet1.pdf|Worksheet 1|pdf}} || {{Download|solar_system.pkl.gz|solar_system.pkl.gz|tgz}} {{Download|cannonball_template.png|cannonball_template.png}}
+
| 1. Integrators || 2019-10-25 || 2019-11-10 midnight || [[:Media:Worksheet_01.tar.gz|Worksheet 1]]
 
+
|-
 
+
| 2. Statistical Mechanics and Molecular Dynamics || 2019-11-08 || 2019-11-24 midnight || [[:Media:Worksheet_02.tar.gz|Worksheet 2]]
 
|-
 
|-
| 2. Statistical mechanics and Molecular Dynamics (lectures 2-4) || 2018-11-26 12:00 || {{Download|WS_2018_SM1_worksheet2.pdf|Worksheet 2|pdf}} || {{Download|Templates.tar.gz|Templates.tar.gz|tgz}} {{Download|SS_2012_PC_Cython.pdf|Cython Introduction}}
+
| 3. || 2019-11-22 || 2019-12-08 midnight ||
 
 
 
 
 
|-
 
|-
| 3. Molecular Dynamics  and Observables (lectures  4-5) || 2018-12-10 12:00 || {{Download|WS_2018_SM1_worksheet3.pdf|Worksheet 3}} || {{Download|WS_2015_SM1_WS3_templates.tar.gz|templates.tar.gz|tgz}}
+
| 4. || 2019-12-06 || 2019-12-22 midnight ||
 
 
 
 
 
|-
 
|-
| 4. Thermostats and Diffusion (lectures 6-8) || 2019-01-07 12:00 || {{Download|WS_2018_SM1_worksheet4.pdf|Worksheet 4}} || {{Download|WS_2018_SM1_WS4_templates.tar.gz|templates.tar.gz|tgz}}
+
| 5. || 2019-12-20 || 2019-01-19 midnight ||
 
 
 
 
 
|-
 
|-
| 5. Monte-Carlo (lectures 10-11) || 2019-01-21 12:00 || {{Download|WS_2018_SM1_worksheet5.pdf|Worksheet 5}} || [https://www.icp.uni-stuttgart.de/~icp/bib//janke02a.pdf janke02.pdf]
+
| 6. || 2019-01-17 || 2019-02-02 midnight ||
 
 
  
|-
 
| 6. Ising Model and Finite Size Scaling (lectures 11-13) || 2019-02-04 12:00 || {{Download|WS_2018_SM1_worksheet6.pdf|Worksheet 6}} || {{Download|WS_2015_SM1_WS6_templates.tar.gz|templates.tar.gz|tgz}}
 
remeber to use: python setup.py build_ext -fi
 
 
|}
 
|}
-->
 
  
 
=== General Remarks ===
 
=== General Remarks ===

Latest revision as of 19:28, 8 November 2019

Overview

Type
Lecture (2 SWS) and Tutorials (2 SWS)
Lecturer
Prof. Dr. Christian Holm
Course language
English
Location and Time
Lecture: Thu, 14:00–15:30; ICP, Allmandring 3, Seminar Room (room 01.079)
Tutorials: Thu, 15:45–17:15 (Patrick Kreissl); Fri, 14:00–15:30 (Kai Szuttor)
Prerequisites
We expect the participants to have basic knowledge in classical and statistical mechanics, thermodynamics, and partial differential equations, as well as knowledge of a programming language (Python and C).

The lecture is accompanied by hands-on tutorials which will take place in the CIP-Pool of the ICP, Allmandring 3 (room 01.033). They consist of practical exercises at the computer such as small programming tasks, simulations, visualization and data analysis. The tutorials build upon each other, therefore continuous attendance is expected.

Lecture

Scope

The first part of the course intends to give an overview about modern simulation methods used in physics today. The focus of the lecture will be to introduce different approaches to simulating a problem, hence we will not go too to deep into specific details but rather try to cover a broad range of methods. In more detail, the lecture will consist of:

Molecular Dynamics
The first problem that comes to mind when thinking about simulating physics is solving Newtons equations of motion for particles with given interactions. From that perspective, we first introduce the most common numerical integrators. This approach quickly leads us to Molecular Dynamics (MD) simulations. Many of the complex problems of practical importance require us to take a closer look at statistical properties, ensembles and the macroscopic observables.
The goal is to be able to set up and run real MD simulations for different ensembles and understand and interpret the output.
Error Analysis
Autocorrelation, Jackknifing, Bootstrapping
Monte Carlo Simulations
Since their invention, the importance of Monte Carlo (MC) sampling has grown constantly. Nowadays it is applied to a wide class of problems in modern computational physics. We want to present the general idea and theory behind MC simulations and show some more properties using simple toy models such as the Ising model.
Critical exponents in second order phase transitions
Finite-size scaling, universality concept, how to determine critical exponent with lattice spin models

Course Material

Date Subject Resources Remarks
1 2019-10-17 Course Content, Organization, Introduction Slides
2 2019-10-24 MD: Integrators Lecture Notes
3 2019-11-07 Chaos, LJ-Potential, Units Lecture Notes


4 2019-10-31 Basics of Statistical Mechanics, Chaos Lecture Notes


5 2019-11-14 PBC, cell-lists, simple MD Lecture Notes
6 2019-11-21 Observables, Brownian Motion, Diffusion Lecture Notes
7 2019-11-28 Diffusion, Green-Kubo, Langevin Dynamics Lecture Notes
8 2019-12-05 Thermostats, Barostats Lecture Notes
9 2019-12-12 Thermostats, Barostats Lecture Notes
10 2019-12-19 Error analysis, B.Sc. / M.Sc. thesis @ ICP: information & research topics Slides
11 2020-01-09 Monte-Carlo Method Lecture Notes
12 2020-01-16 Monte-Carlo and Critical Phenomena Lecture Notes
13 2020-01-23 Critical Exponent Lecture Notes
14 2020-01-30 Finite Size Scaling Lecture Notes
15 2020-02-06 Reweighting Lecture Notes

Recommended literature

Useful online resources

From Theory to Algorithms, Lecture Notes, (2002).

  • Reweighing: W. Janke, Histograms and all that, Computer Simulations of Surfaces and Interfaces, pp 137-157, Springer book
  • Monte Carlo Simulations: W. Janke, Monte Carlo, Monte Carlo Simulations of Spin Systems, Computational Physics pp 10-43
  • Be careful when using Wikipedia as a resource. It may contain a lot of useful information, but also a lot of nonsense, because anyone can write it.

Tutorials

Worksheets

Topic Online on Deadline Files
1. Integrators 2019-10-25 2019-11-10 midnight Worksheet 1
2. Statistical Mechanics and Molecular Dynamics 2019-11-08 2019-11-24 midnight Worksheet 2
3. 2019-11-22 2019-12-08 midnight
4. 2019-12-06 2019-12-22 midnight
5. 2019-12-20 2019-01-19 midnight
6. 2019-01-17 2019-02-02 midnight

General Remarks

  • For the tutorials, you will get a personal account for the ICP machines.
  • For the reports, we have a nice txt.pnglatex-template.tex (7 KB)Info circle.png.
  • You can do the exercises in the CIP-Pool when it is not occupied by another course. The pool is accessible on all days, except weekends and late evenings.
  • If you do the exercises in the CIP-Pool, all required software and tools are available.
  • If you want to do the exercises on your own computer, the following tools are required. All of these packages should be readily available from your OS distribution, if it is not Windows.
    • Python
    • The following Python packages:
      • IPython
      • NumPy
      • SciPy
      • matplotlib
    • A C compiler (e.g. GCC)
  • We only have experience with Unix/Linux machines. Although most tools will probably also work on Windows, we cannot guarantee it, and we can also not help you to get it running there.

Hand-in-exercises

  • The worksheets are to be solved in groups of two or three people. We will not accept hand-in-exercises that only have a single name on it.
  • A written report (between 5 and 10 pages) has to be handed in for each worksheet. We recommend using LaTeX to prepare the report.
  • You have two weeks to prepare the report for each worksheet.
  • The report has to be sent to your tutor via email.
  • Participants need 50 % of the points of the hands-in exercises on each worksheet to be admitted to the oral examination (see Examination for details).

What happens in a tutorial

  • The tutorials take place every week.
  • The new worksheet will be available for download on the days before the tutorial.
  • In the first tutorial after you received a worksheet, the solutions of the previous worksheet will be presented (see below) and the new worksheet will be discussed.
  • In the second tutorial after you received the worksheet, there is time to work on the exercises and to ask questions.
  • You will have to hand in the reports on Monday after the second tutorial.
  • In the third tutorial after you received the worksheet, the solutions will be discussed:
    • The tutor will ask a team to present their solution.
    • The tutor will choose one of the members of the team to present each task.
    • This means that each team member should be able to present any task.
    • At the end of the term, everybody should have presented at least once.

Documentation

Linux

Python

  • Use the existing documentation of Python itself! To get help on the command print, use
 pydoc print
  • Or use the Web browser to read it. Start
 pydoc -p 4242
and visit the page http://localhost:4242

NumPy

  • first of all, try to use
 pydoc numpy

LaTeX

Running Python on your own computer

If you want to solve the problems on your own computer, you need to install Python along with a few extensions. This works differently depending on your operating system.

Debian und Ubuntu Linux

sudo apt-get update
sudo apt-get install python python-numpy python-scipy \
    python-matplotlib ipython ipython-notebook gcc g++ \
    cython
mkdir -p ~/.config/matplotlib
echo 'backend: TkAgg' > ~/.config/matplotlib/matplotlibrc

OpenSUSE Linux

sudo zypper install python python-numpy python-scipy \
    python-matplotlib IPython gcc python-Cython
mkdir -p ~/.config/matplotlib
echo 'backend: TkAgg' > ~/.config/matplotlib/matplotlibrc

Mac OS X

First, install the C compiler:

xcode-select --install
xcodebuild -license accept

Now download and install MacPorts. Next, you can install the Python packages.

sudo port selfupdate
sudo port install python27 py27-numpy py27-scipy \
    py27-matplotlib py27-ipython py27-jupyter py27-cython
sudo port select python python27
sudo port select ipython py27-ipython
sudo port select cython cython27

Windows

For Windows, we recommend Anaconda Python, an all-in-one package that includes all required Python modules.

For the worksheets that use Cython, you will also need to install a compatible C compiler. If you chose Python 2.7, that is Visual Studio 2008 Express Edition plus, if you are running 64-bit Windows, the Windows SDK 2008 (in the installer, select "Installation Options", "Developer Tools", "Visual C++ Compilers", "Install the Visual C++ 9.0 Compilers). If you chose Python 3.5 or 3.6, you need Visual Studio 2015 Community Edition (in the installer, select "Custom" and on the next page, select "Common Tools for Visual C++ 2015" in the "Programming Languages" category and uncheck all the other components that we do not need).

Examination

Depending on the programme you are enrolled in, Simulation Methods is part of different modules that award different numbers of credits after different kinds of exams. Please have a look at File:SimMethModuleOverview.pdf, which also explains how you can take Advanced Simulation Methods.

C++ Course

The Computer Science department is offering a week-long C++ course at the end of this semester. We recommend all students that plan on participating the Advanced Simulation Methods lecture in summer semester 2020 to take this course. We also recommend it to all students that are considering doing a master's or bachelor's thesis at the ICP. Current bachelor students might be able to take this course as Schlüsselqualifikation – but please contact the organizing Professor beforehand to ensure that this is actually the case. Master students will be able to take this course as One Course (2 SWS) in an Application Field of Simulation Methods as part of the Fortgeschrittene Simulationsmethoden (Schwerpunkt) module, pending a change of the Modulhandbuch. Note that even current bachelor students can already take the course in 2020 if they intend to enroll in the master programme (starting in fall 2020) and take Advanced Simulation Methods (in summer 2021). All students will need to present their "Schein" at the Advanced Simulation Methods exam in order to prove that they successfully participated in the C++ course and completed all required exercises.