naigner

lammps cuda crack example

Oct 20th, 2011
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. # 2d LJ crack simulation
  2.  
  3. suffix cuda
  4. package cuda gpu/node special 1 1
  5. newton off
  6.  
  7. dimension 2
  8. boundary s s p
  9.  
  10. atom_style atomic
  11. neighbor 0.3 bin
  12. neigh_modify delay 5
  13.  
  14. # create geometry
  15.  
  16. lattice hex 0.93
  17. region box block 0 100 0 40 -0.25 0.25
  18. create_box 5 box
  19. create_atoms 1 box
  20.  
  21. mass 1 1.0
  22. mass 2 1.0
  23. mass 3 1.0
  24. mass 4 1.0
  25. mass 5 1.0
  26.  
  27. # LJ potentials
  28.  
  29. pair_style lj/cut 2.5
  30. pair_coeff * * 1.0 1.0 2.5
  31.  
  32. # define groups
  33.  
  34. region 1 block INF INF INF 1.25 INF INF
  35. group lower region 1
  36. region 2 block INF INF 38.75 INF INF INF
  37. group upper region 2
  38. group boundary union lower upper
  39. group mobile subtract all boundary
  40.  
  41. region leftupper block INF 20 20 INF INF INF
  42. region leftlower block INF 20 INF 20 INF INF
  43. group leftupper region leftupper
  44. group leftlower region leftlower
  45.  
  46. set group leftupper type 2
  47. set group leftlower type 3
  48. set group lower type 4
  49. set group upper type 5
  50.  
  51. # initial velocities
  52.  
  53. compute new mobile temp
  54. velocity mobile create 0.01 887723 temp new
  55. velocity upper set 0.0 0.3 0.0
  56. velocity mobile ramp vy 0.0 0.3 y 1.25 38.75 sum yes
  57.  
  58. # fixes
  59.  
  60. fix 1 all nve
  61. fix 2 boundary setforce NULL 0.0 0.0
  62.  
  63. # run
  64.  
  65. timestep 0.003
  66. thermo 200
  67. thermo_modify temp new
  68.  
  69. neigh_modify exclude type 2 3
  70. dump 1 all atom 500 dump.crack
  71. run 5000
  72.  
  73.  
Add Comment
Please, Sign In to add comment