stress equal to delta_pressure

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 ly502 (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,

Is that, in LAMMPS, stress equal the different of pressure


Please read the doc pages for the computes pressure and stress/atom.

The concept of zero strain is completely arbitrary. For fix deform, it
is based on whatever configuration you specify at the start of the