######################################################################## #### An input script file for test the bug in Lammps_2016 ### #### Reverse Poiseuille Flow of classic DPD fluid ### #### ### #### Created : Zhen Li (zhen_li@brown.edu) ### #### Division of Applied Mathematics, Brown University. ### #### ### #### Date : Dec. 1, 2016 ### ######################################################################## variable xlo equal 0.0 variable xhi equal 20.0 # <= 20.0 will give the correct result variable ylo equal 0.0 variable yhi equal 20.0 variable zlo equal 0.0 variable zhi equal 10.0 variable nden equal 3.0 variable Npart equal round((${xhi}-${xlo})*(${yhi}-${ylo})*(${zhi}-${zlo})*${nden}) variable gx equal 0.02 #********************************************************************** ## End of the definition of variables ##********************************************************************** units lj dimension 3 boundary p p p neighbor 0.3 bin neigh_modify every 1 delay 0 check yes atom_style atomic comm_modify vel yes region dpd block ${xlo} ${xhi} ${ylo} ${yhi} ${zlo} ${zhi} units box create_box 1 dpd create_atoms 1 random ${Npart} 543218 NULL ##********************************************************************** pair_style dpd 1.0 1.0 245641 pair_coeff 1 1 25 4.5 1.0 mass 1 1.0 ##---------------------------------------------------------------------- ## thermodynamics ##---------------------------------------------------------------------- compute mythermo all temp/partial 0 1 1 thermo 1000 thermo_modify temp mythermo thermo_modify flush yes velocity all create 1.0 6529814 loop local dist gaussian fix integrate all nve timestep 0.01 run 10000 reset_timestep 0 ##---------------------------------------------------------------------- ## Apply the driving force ##---------------------------------------------------------------------- variable ymid equal (${yhi}+${ylo})/2 variable fx atom mass*${gx}*((y>${ymid})-(y<${ymid})) fix reverce_periodic all addforce v_fx 0.0 0.0 ##---------------------------------------------------------------------- ## Extract the velocity profile ##---------------------------------------------------------------------- compute cc1 all chunk/atom bin/1d y 0.0 1.0 fix stat all ave/chunk 1 10000 30000 cc1 vx norm sample file vel.profile #fix ave_v all ave/spatial 1 10000 30000 y 0.0 1.0 vx file vx.dat timestep 0.01 run 30000 ######################################################################## #### Input file Ends ! ########################################################################