Skip to content

Commit

Permalink
Improve Langevin tutorial (#4329)
Browse files Browse the repository at this point in the history
Part of #4052 

Description of changes:
- Add Green-Kubo calculation of the diffusivity. To get at least somewhat acceptably smooth VACFs, the number of simulation steps was increased from 400000 to 1000000, the simulation time is still quite acceptable, I think.
- General improvements, including changes requested by @RudolfWeeber and @christophlohrmann 
- Proper additon of hidden solutions
  • Loading branch information
kodiakhq[bot] committed Aug 13, 2021
2 parents fc932dc + b9367ae commit 62f96b6
Show file tree
Hide file tree
Showing 17 changed files with 704 additions and 526 deletions.
2 changes: 2 additions & 0 deletions doc/tutorials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ add_custom_target(tutorials_python)
# Here: add new directory
add_subdirectory(lennard_jones)
add_subdirectory(error_analysis)
add_subdirectory(langevin_dynamics)
add_subdirectory(charged_system)
add_subdirectory(polymers)
add_subdirectory(lattice_boltzmann)
add_subdirectory(raspberry_electrophoresis)
add_subdirectory(active_matter)
Expand Down
16 changes: 10 additions & 6 deletions doc/tutorials/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ physical systems.
* **Simulate a simple Lennard-Jones liquid**
Modelling of a single-component and a two-component Lennard-Jones liquid.
[Guide](lennard_jones/lennard_jones.ipynb)
* **Error_analysis**
Statistical analysis of simulation results
* **Error analysis**
Statistical analysis of simulation results
Guide
[Part 1](error_analysis/error_analysis_part1.ipynb) |
[Part 2](error_analysis/error_analysis_part2.ipynb)
Expand All @@ -26,6 +26,9 @@ physical systems.
* **Charged systems**
Modelling of ion condensation around a charged rod.
[Guide](charged_system/charged_system.ipynb)
* **Langevin dynamics**
Modelling of Brownian motion and measurement of diffusion coefficients.
[Guide](langevin_dynamics/langevin_dynamics.ipynb)
* **Ferrofluid**
Modelling of a monolayer ferrofluid system.
Guide
Expand All @@ -35,10 +38,11 @@ physical systems.
* **Lattice-Boltzmann**
Simulations including hydrodynamic interactions using the Lattice-Boltzmann method.
Guide
[Part 1](lattice_boltzmann/lattice_boltzmann_part1.ipynb) |
[Part 2](lattice_boltzmann/lattice_boltzmann_part2.ipynb) |
[Part 3](lattice_boltzmann/lattice_boltzmann_part3.ipynb) |
[Part 4](lattice_boltzmann/lattice_boltzmann_part4.ipynb)
[Part 1](lattice_boltzmann/lattice_boltzmann_theory.ipynb) |
[Part 2](lattice_boltzmann/lattice_boltzmann_poiseuille_flow.ipynb)
* **Polymers**
Modelling polymers with hydrodynamic interactions.
[Guide](polymers/polymers.ipynb)
* **Raspberry electrophoresis**
Extended objects in a Lattice-Boltzmann fluid, raspberry particles.
[Guide](raspberry_electrophoresis/raspberry_electrophoresis.ipynb)
Expand Down
3 changes: 3 additions & 0 deletions doc/tutorials/langevin_dynamics/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
configure_tutorial_target(TARGET tutorial_ld DEPENDS langevin_dynamics.ipynb)

nb_export(TARGET tutorial_ld SUFFIX "" FILE "langevin_dynamics.ipynb" HTML_RUN)
21 changes: 21 additions & 0 deletions doc/tutorials/langevin_dynamics/NotesForTutor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Langevin dynamics

## Learning objectives (physics)

* Learning the basics of Brownian motion
* Modeling the Brownian motion of a spherical object
* Calculating the diffusion coefficient of a spherical object using the
mean square displacement and Green-Kubo relation

After the tutorial, students should be able to:

* Explain the microscopic origin of diffusion and how it is captured in the Langevin equation
* Describe a typical mean-square-displacement plot and identify the different regimes
* Estimate the diffusion coefficient from time series of a particle's position or velocity
* Name the limitations of the Langevin equation, particularly with regards to hydrodynamic interactions

## Learning objectives (ESPResSo)

* Setting up a system in which particles move according to the Langevin equation
* Calculating the diffusion coefficient using observables and accumulators based
on the mean square displacement and the velocity autocorrelation function
Loading

0 comments on commit 62f96b6

Please sign in to comment.