DENSE SUSPENSIONS LAMMPS TUTORIAL



Get started

  1. Familiarise yourself with the physics of dense suspensions by reading e.g. Guazzelli and Pouliquen or Ness, Seto and Mari.
  2. This site accompanies the tutorial here.
  3. The following assumes you are using Mac or Linux and that you have a working knowledge of the terminal.

I already have LAMMPS

  1. Put the lubrication .cpp file and .h file in your lammps/src/ directory.
  2. Install the granular and colloid packages by running in lammps/src/: make yes-GRANULAR yes-COLLOID
  3. Recompile LAMMPS
  4. Run the input scripts in.create and in.run just like any other.

I don't already have LAMMPS

  1. Download LAMMPS to a suitable working/ directory (I used: LAMMPS Stable 23rd June 2022, download the .tar.gz here)
  2. Download the lubrication .cpp file and .h file and place these in: working/lammps-stable_23Jun2022/src/
  3. Download the input scripts in.create and in.run and place them in working/
  4. In Terminal, enter: working/lammps-stable_23Jun2022/src/
  5. Issue the command: make yes-GRANULAR yes-COLLOID

Then do:

Compile and run serial LAMMPS on a laptop (I used MacOS 12.6)

  1. Ensure that working/lammps-stable_23Jun2022/src/MAKE/Makefile.serial addresses the correct compiler settings for your machine. (Probably not necessary on Linux, but on Mac I did: sed -i '' 's/g++/g++-11/g' MAKE/Makefile.serial from within working/lammps-stable_23Jun2022/src/, see also the documentation)
  2. Compile LAMMPS by entering: working/lammps-stable_23Jun2022/src/ and issuing the command: make serial
  3. If successful, you can view the installed packages by running: ./lmp_serial -h

  4. Generate packing at prescribed volume fraction

  5. In working/, issue the command: lammps-stable_23Jun2022/src/lmp_serial -in in.create
  6. The output data.file contains the starting configuration to be used by in.run

  7. Run a rheology simulation

  8. Issue the command: lammps-stable_23Jun2022/src/lmp_serial -in in.run

Or:

Compile and run parallel LAMMPS on a cluster (I used Eddie)

  1. Ensure the appropriate compiler is available. On Scientific Linux I ran: module load openmpi/1.10.1
  2. Compile LAMMPS by entering the directory: working/lammps-stable_23Jun2022/src/ and issuing the command: make mpi
  3. If successful, you can view the installed packages by running: ./lmp_mpi -h

  4. Generate packing at prescribed volume fraction

  5. In working/, issue the command: mpirun -np 2 lammps-stable_23Jun2022/src/lmp_mpi -in in.create
  6. The output data.file contains the starting configuration to be used by in.run

  7. Run a rheology simulation

  8. Issue the command: mpirun -np 2 lammps-stable_23Jun2022/src/lmp_mpi -in in.run

Finally

  1. Always refer to the LAMMPS documentation.
  2. Refer to your local IT support for compilation questions.
  3. Contact me: chris.ness@ed.ac.uk
  4. That's it! Further detail is in the tutorial here.