In this blog, I have made a simulation on which two nickel spheres colloid each other. Through this simulation, I have introduces some new commands. Have a look at them.
Input script
log log.in
dimension 3
units metal
atom_style atomic
boundary p p p
region box block -100 100 -100 100 -400 400 units lattice
create_box 1 box
lattice fcc 3.52
region 1 sphere 0 0 350 50 units box
create_atoms 1 region 1
group 1 region 1
lattice fcc 3.52
region 2 sphere 0 0 -350 50 units box
create_atoms 1 region 2
group 2 region 2
#-------------- Define Interatomic Potential -------------------
pair_style eam
pair_coeff 1 1 Ni_u3.eam
compute 1 all pe/atom
compute 2 all stress/atom NULL virial
#------------- Run the simulation for equilibration -------------
velocity all create 300.0 12345 dist gaussian
fix 1 all npt temp 298 298 .5 x 0.0 0.0 .5 y 0.0 0.0 .5
thermo 100
thermo_style custom step pe ke etotal temp lx ly lz press atoms
dump eve all custom 25 dump.in id type x y z vx vy vz c_1 c_2[1] c_2[2] c_2[3]
timestep 0.001
fix bal all balance 250 1 shift z 10 1
thermo_style custom step temp ke pe press vol
run 50
unfix 1
change_box all boundary p p s
#------------- Run the simulation for impact --------------
reset_timestep 0
velocity 1 set 0.0 0.0 -20.0 sum yes units box #20 A/ps =7200 Km/hr
velocity 2 set 0.0 0.0 20.0 sum yes units box #20 A/ps =7200 Km/hr
fix 2 all nve
timestep 0.002
run 10000
#-----------------------end---------------------------------------
#------------------------------------------------------------------
Visit LAMMPS Manual for further explanation.
Simulation
If you see the nickel spheres disperses completely. The reason is the spheres move at very velocity. Each of the spheres moves at a speed of 7200 Km/hr!
No comments:
Post a Comment