0

I want to try to draw stress and strain curve for copper nanoparticles with Lammps. This is my code. I don't know whether this is correct or not. Can anybody help me? It has fix nve for relaxation, but before that has fix nvt ,and these 2 fixes can't come together.

# tensile   test
echo both
dimension  3  
boundary   s  p   p
units  metal  
atom_style  atomic

##########create  box#######
region  copperbox   block  -80  80   -40   40   -40  40  units box
create_box  1  copperbox
lattice  fcc  3.61
region  copper  block  -60  60  -20  20  -20  20  units box 
create_atoms  1  region  copper  
mass  1  63.546 
thermo_modify lost ignore  
region      left  block   -60  -50  -20  20   -20   20    units box
group       left region left
region      right  block 50  60   -20   20   -20   20    units box
group       right region right
group   middle   subtract   all   left   right 
timestep   0.002

pair_style   eam  
pair_coeff  * *  cu_u3.eam
velocity  all  create  300  4928459  mom  yes  rot  yes   dist  uniform  
velocity  left  create   0   4928459   mom  yes  rot  yes   dist   uniform   
velocity  right  create   0   4928459   mom  yes  rot  yes   dist   uniform
fix  1  all  nvt  temp  300  300  0.01  
fix  2  left   setforce   0  0  0
fix  3  right  setforce   0   0   0
fix  4   all  nve  
thermo 100
run  1000
#####################################

compute  1  middle stress/atom
compute  2  middle  reduce   sum   c_1[1]
dump        1 all custom 100 stress.txt mass x y z c_1[1]  c_1[2]  c_1[3]  
c_1[4] c_1[5] c_1[6]
dump        2 all xyz 100 dump.xyz

#####################################

variable a loop 2
label loopa
fix  8   right  move  linear   0.2   0  0  units  box
fix  9   left   move   linear   0   0  0   units  box
run 1000

#####################################

unfix   8 
unfix  9
fix  8   right  move   linear  0  0  0  units box
fix  9   left   move  linear    0  0  0  units box
run 40000

#####################################
fix  10   all  nve  
thermo 100
run 10000

#####################################

variable   sigma  equal  "c_2/(40000)*(10^4)"
variable   l2  equal  xcm(right,x)

variable  l0   equal  ${l2}
variable   strain  equal  "(v_l2-v_l0)/(v_l0)*100"
next a
jump in.copper99 loopa
restart         1000 restart.*
Yadu
  • 103
  • 1
  • 14
  • 2
    Welcome to StackOverflow. Please give more details on what you think is wrong with your code and what you have tried. Currently this question has not enough information to be considered acceptable. – Martin Jul 07 '15 at 11:39
  • 2
    You've tagged this with [notepad++] - I'm guessing that this is just the editor you're using. You may get better eyes on your question if you use the correct tags for whatever toolset you're running this through. – James Thorpe Jul 07 '15 at 11:51

0 Answers0