Guest User

Untitled

a guest
Nov 2nd, 2023
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. echo both
  2.  
  3. package gpu 1 omp 2 device_type nvidiagpu
  4.  
  5. variable temperature equal 100
  6. variable tempDamp equal 2.5e-6
  7. variable density equal 1e-6
  8. variable particlessqrt equal 1000 # sqrt(number of particles)
  9. variable seed equal 74581
  10. variable thermo_out_freq equal 1000
  11. variable dump_out_freq equal 500
  12. variable time_step equal 5e-3
  13. variable thermo_time equal 15e3
  14. variable run_time equal 1e4
  15.  
  16. timer timeout 11:55:00 every 1000
  17. dimension 2
  18. units lj
  19. atom_style atomic
  20. # Create square lattice that becomes a gas upon equilibration at high temperature
  21. lattice sq ${density}
  22. region box block 0 ${particlessqrt} 0 ${particlessqrt} -0.1 0.1
  23. create_box 1 box
  24. create_atoms 1 box
  25. pair_style lj/cut/gpu 2.5
  26. pair_coeff * * 1.0 1.0 2.5
  27. mass 1 1.0
  28. thermo ${thermo_out_freq}
  29. timestep ${time_step}
  30. # default time step is 5e-3
  31. neighbor 500.0 bin
  32.  
  33. #########################
  34. # Equilibrate
  35. #########################
  36. fix 1 all nvt/gpu temp ${temperature} ${temperature} $(285.0*dt)
  37. #fix 2 all momentum 10000 linear 1 1 1 angular
  38. fix 3 all enforce2d
  39. velocity all create ${temperature} ${seed} dist gaussian
  40. variable fx atom sin(2*PI*y*${density})*sqrt(${temperature})/100/(${thermo_time}*${time_step})
  41. fix 4 all addforce v_fx 0. 0.
  42. run ${thermo_time}
  43.  
  44. reset_timestep 0
  45. #########################
  46. # Production
  47. #########################
  48. unfix 1
  49. #unfix 2
  50. unfix 4
  51. fix 5 all print 100 "$(step) $(temp) $(pe) $(ke) $(press) $(density)" file thermo.txt title "# step temp pe ke press density" screen no
  52. fix 6 all nve/gpu
  53. dump myDump all atom ${dump_out_freq} lj_short.pos
  54. #dump myDump2 all custom ${dump_out_freq} lj_short.vel id vx vy
  55. dump myDump3 all custom ${dump_out_freq} particles.data id x y vx vy
  56. run ${run_time}
  57.  
  58. write_data lj.lammps-data
  59.  
Advertisement
Add Comment
Please, Sign In to add comment