Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo both
- package gpu 1 omp 2 device_type nvidiagpu
- variable temperature equal 100
- variable tempDamp equal 2.5e-6
- variable density equal 1e-6
- variable particlessqrt equal 1000 # sqrt(number of particles)
- variable seed equal 74581
- variable thermo_out_freq equal 1000
- variable dump_out_freq equal 500
- variable time_step equal 5e-3
- variable thermo_time equal 15e3
- variable run_time equal 1e4
- timer timeout 11:55:00 every 1000
- dimension 2
- units lj
- atom_style atomic
- # Create square lattice that becomes a gas upon equilibration at high temperature
- lattice sq ${density}
- region box block 0 ${particlessqrt} 0 ${particlessqrt} -0.1 0.1
- create_box 1 box
- create_atoms 1 box
- pair_style lj/cut/gpu 2.5
- pair_coeff * * 1.0 1.0 2.5
- mass 1 1.0
- thermo ${thermo_out_freq}
- timestep ${time_step}
- # default time step is 5e-3
- neighbor 500.0 bin
- #########################
- # Equilibrate
- #########################
- fix 1 all nvt/gpu temp ${temperature} ${temperature} $(285.0*dt)
- #fix 2 all momentum 10000 linear 1 1 1 angular
- fix 3 all enforce2d
- velocity all create ${temperature} ${seed} dist gaussian
- variable fx atom sin(2*PI*y*${density})*sqrt(${temperature})/100/(${thermo_time}*${time_step})
- fix 4 all addforce v_fx 0. 0.
- run ${thermo_time}
- reset_timestep 0
- #########################
- # Production
- #########################
- unfix 1
- #unfix 2
- unfix 4
- fix 5 all print 100 "$(step) $(temp) $(pe) $(ke) $(press) $(density)" file thermo.txt title "# step temp pe ke press density" screen no
- fix 6 all nve/gpu
- dump myDump all atom ${dump_out_freq} lj_short.pos
- #dump myDump2 all custom ${dump_out_freq} lj_short.vel id vx vy
- dump myDump3 all custom ${dump_out_freq} particles.data id x y vx vy
- run ${run_time}
- write_data lj.lammps-data
Advertisement
Add Comment
Please, Sign In to add comment