From 9d961cf84e3634976c28e85fdea8850290e4661b Mon Sep 17 00:00:00 2001 From: nilsberglund-orleans <83530463+nilsberglund-orleans@users.noreply.github.com> Date: Tue, 28 Dec 2021 15:52:05 +0100 Subject: [PATCH] Update README.md --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5277354..0842fd0 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ C code for videos on YouTube Channel https://www.youtube.com/c/NilsBerglund Parameter values used in specific simulations will be gradually added to file `Parameters.md`, `Parameters_June21.md` and so on. -There are two groups of 5 files and 11 files. +There are three groups of 5 files, 11 files and 3 files. In addition the following files handling color schemes have been included: 1. `hsluv.c`and `hsluv.h` from https://github.com/adammaj1/hsluv-color-gradient @@ -50,7 +50,7 @@ in the shell before running the program 7. *wave_comparison.c*: comparison of the wave equation in two different domains 8. *wave_energy.c*: a version of `wave_billiard` plotting the energy profile of the wave 9. *mangrove.c*: a version of `wave_billiard` with additional features to animate mangroves -10. *heat.c*: simulation of the heat equation, with optional drawing of gradient field lines +10. *heat.c*: simulation of the heat equation, with optional drawing of gradient field lines 11. *schrodinger.c*: simulation of the Schrodinger equation - Create subfolders `tif_wave`, `tif_heat`, `tif_schrod` @@ -75,10 +75,28 @@ in the shell before running the program `ffmpeg -i wave.%05d.tif -vcodec libx264 wave.mp4` +### Molecular dynamics simulations + +1. *global_ljones.c*: global variables and parameters +2. *sub_lj.c*: some drawing and initialization routines +3. *lennardjones.c*: simulation of molecular dynamics + +- Create subfolders `tif_ljones` +- Customize constants at beginning of .c file +- Compile with + +`gcc -o lennardjones lennardjones.c -L/usr/X11R6/lib -ltiff -lm -lGL -lGLU -lX11 -lXmu -lglut -O3 -fopenmp` + +- Generate movie with + +`ffmpeg -i lennardjones.%05d.tif -vcodec libx264 lennardjones.mp4` + #### Some references #### - Discretizing the wave equation: https://hplgit.github.io/fdm-book/doc/pub/wave/pdf/wave-4print.pdf - Absorbing boundary conditions: https://hal.archives-ouvertes.fr/hal-01374183 - Cloaking device: https://www.sciencedirect.com/science/article/pii/S0165212514001759 - Poisson disc sampling: https://bl.ocks.org/mbostock/dbb02448b0f93e4c82c3 +- Thermostat algorithm: https://doi.org/10.1007/s10955-009-9734-0 +http://www.maths.warwick.ac.uk/~theil/HL12-3-2009.pdf