Hi everyone,

I use “fix deform” to apply a strain in y direction for the system of single layer carbon , then compute the pressure.

to compute pressure in y direction, the following commands are employed:

variable volume equal ly*50*2 (since x and z is set as scale 1 in fix deform)

compute peratom all stress/atom

compute p all reduce sum c_peratom[1] c_peratom[2] c_peratom[3]

variable pressyy equal -c_p[2]/v_volume (I didn’t use vol (the box volume), since my object is solid and much smaller than box size.)

thermo_style custom step temp etotal pyy v_pressyy

the log file indicate that pyy and pressyy is different. so pyy is, by default, calculated as " variable pyy equal -c_p[2]/vol"

then I plot the pressyy and strain relation. and I got pressyy=-2e10 (bar) at strain=0.

Actually I am more interested in stress in y direction. since it is strange to calculate pressure for solid material.

some material in LAMMPS and maillist indicate pressure = stress.

However, stress_y should be 0 at strain=0. while I got pressyy=-2e10 (bar) at strain=0.

Is that, in LAMMPS, stress equal the different of pressure “stress_y=pressyy0-pressyy”?

Thank you,

Alec