LAMMPS-Molecular-Dynamics-Simulator/C2/Modeling-of-the-Single-Phase-System/English

From Script | Spoken-Tutorial
Jump to: navigation, search

Title of script: Modeling of the Single-Phase System


Author: Dr.Snehalatha Kaliappan, Prasad Baddi, Gopi Kundia


Keywords: LAMMPS, Simulation video tutorial


Visual Cue Narration
Slide Number 1

Title Slide

Welcome to this tutorial on Modeling of the Single-Phase System.
Slide Number 2

Learning Objectives

In this tutorial, we will learn to,

Set up a simulation of the bulk Lennard-Jones liquid.

Slide Number 2

Learning Objectives

Use LAMMPS's thermo_style and thermo commands to extract and monitor properties such as;

temperature, potential energy, kinetic energy, total energy, density and pressure.


Slide Number 3

System Requirement

To record this tutorial, I am using,


Ubuntu Linux OS version 22.04


Latest stable version of LAMMPS .

Slide Number 4

Prerequisite

To follow this tutorial learner must be familiar with,

basic computer operations on Linux OS.

Slide number 5

Code file

The following input file is required to practice this tutorial:


SPinputA.txt


This file is provided in the Code files link of this tutorial page.

Open the input file SPinputAtxt in gedit test editor. Here I have opened the input file SPinputA.txt in a text editor.
Cursor on each section and highlight. As described in the prerequisite tutorial, the input script is divided into four sections:


  1. Initialization
  2. System definition
  3. Simulation settings
  4. Running a simulation
Cursor on the input file. Please refer to the prerequisite tutorial for the details of the input commands for each section.
Cursor on line 22: group liq type 1 Scroll down to the simulation settings section.

With this command all type 1 particles are grouped with a group ID liq.

Scroll to Energy minimization section.

Cursor on lines 35 and 36,

Scroll to the Energy minimization section.

Here, we will use thermo_style and thermo commands.

thermo_style sets the style for printing thermodynamic data to the screen and log file.

The units for each column of output is determined by units command.


thermo command sets the frequency of printing thermodynamic data to the screen and log file.

Line 34: timestep 0.005

The timestep command computes and prints the output at the mentioned time interval.

Cursor on the line 52: fix 1 liq npt temp 0.8 0.8 0.5 iso 1 1 5 fix is any operation that is applied to the system during timestepping or minimization.

The npt command performs the time integration using equations of motion to generate positions and velocities for atoms.

In an npt ensemble, the number of particles, pressure and temperature of the system are held constant. 

Cursor on the line 53: run 10000 Here 10,000 indicates the number of timesteps.
Slide Number 6

About timestep command

About timestep command

We need to run the simulation long enough for the system to reach an equilibrium state.

This means its macroscopic properties like temperature, energy, density, and pressure have reached a stable plateau.

Slide number 7

About timestep command

The values must be fluctuating around their average equilibrium values.


Once the system is stable, we can collect the data to study phenomena we are interested in.


We'll learn how to analyze these properties in the upcoming tutorial.

Cursor on the input file.


Close the text editor.

Back to the input file.


Now let us run this input file.

Close the text editor.

Go to the folder where the input file is located.

Open the folder and show the input file.

Navigate to the location of the input file.
Right click on the folder containing the input file.

From the context menu choose Open in Terminal option.

Right click on the folder containing the input file.


From the context menu choose Open in Terminal option.

Cursor on the terminal. Alternatively, you can open the terminal and navigate to the path leading to the input file.
At the prompt type lmp_serial -in SPinputA.txt

Press Enter.

Type the following command at the prompt to run the input file.

lmp_serial -in SPinputA.txt

Windows users can open the command prompt, type the command and proceed as shown.

Press Enter.

Cursor on the terminal.


Open the folder containing the input file to show log.lammps, thermo_properties.csv and output.atom.

The output is seen on the terminal.

Three output files are generated, log.lammps, thermo_properties.csv and output.atom.

These files will be saved in the same folder where your input file is located.

Cursor on the folder. The analysis and visualization of the output files will be covered in the upcoming tutorial.
This brings us to the end of this tutorial.
Slide Number 8

Summary

Here is the summary for the tutorial.
Slide Number 9

Assignment

As an assignment please do the following:

In the input script, modify the values for temperature.

Save and run the input file in LAMMPS.

Slide Number 10

Acknowledgement

Thank you

Contributors and Content Editors

Snehalathak