Computational Materials Modelling Using LAMMPS: Finding state of a material using molecular dynamics method: Gas

Finding state of a material using molecular dynamics method: Gas

 In this blog, I will be showing how to check whether a given material at a given temperature is gas or not. For this, I am using Xenon(Xe) as the material and the temperature to be around 350K.


Input script

units metal 

boundary p p p  

atom_style atomic 

#================================================

region forbox block 0 730.58 0 730.58 0 730.58 units box

create_box 1 forbox #<Create the box>

#================================================

create_atoms 1 random 1000 19829 forbox

#================================================

mass 1 131.29 #<Mass of atom type 1 is 39.48 [mass units grams/mole]> 

pair_style eam/alloy

pair_coeff * * U_Mo_Xe.2013.eam.alloy Xe 

#================================================

group Xe type 1 

minimize 1e-12 1e-25 10000 10000 

#=================================================

# Provide an initial maxwellian distribution of velocity corresponding to temperature 700K

velocity all create 700 198728 dist gaussian

#Perform an NVE integration with this initial position and velocity distribution

timestep 0.001 #<Time step in ps. So this is 0.001ps or 1 femto second>

compute rdfs all rdf 100 1 1 

fix frdf all ave/time 1 10000 10000 c_rdfs[1] c_rdfs[2] c_rdfs[3] file rdf_gas.txt mode vector

# The above command averages the RDFs over time.

fix 1 all nve 

thermo_style custom step time cpu temp pe ke etotal press vol#<Print the thermodynamic information >

thermo 1000

run 10000 #<Run for 3 ps (Since it seems to reach constant P and T in that time>

unfix 1

####End

Visit LAMMPS manual for a detailed explanation of commands used.

Potential used


Result





Explanation

After running the simulation, the RDF values will be stored in "rdf_gas.txt" file. With the values, you can plot the curve. Rdf-Radial Distribution Function physically gives the probability of finding an atom at a certain point. In solid the probability of finding an atom at equal interval is very low. So we get a curve like this. The plot will be similar for any gas.

Hope the post is useful for you. For further updates, keep visiting the blog!




No comments:

Post a Comment