# calculation of stress

Dear all
I have a question about calculation of stress.
from manual I know that the result of the pzz and c_pressz from following commands are the same.

compute peratom all stress/atom
compute pz all reduce sum c_peratom
variable pressz equal -c_pz/vol

I have done it and I found that is OK when I have no loading or I don’t define boundary group (group of atom that don’t deform during loading) in my simulation (like using deform command).

1- when I define the some groups that don’t deform during loading (boundry), is the volume of this group used to calculate the global stress too?

2- if the lammps do it, why the result of top commands are not the same?

2- if the lammps do it, that means the global stress reduced when I choose the bigger boundary and it is not real.

3-in this situation which method is better to calculate the stress?

-define a mobile group (global volume- boundary volume) and use the volume of it (Voronoi/atom) to calculate the stress, or

• use the global stress of lammps calculation.

thanks

Dear all
I have a question about calculation of stress.
from manual I know that the result of the pzz and c_pressz from following
commands are the same.

you have to be very careful in what you call what here.

compute peratom all stress/atom
compute pz all reduce sum c_peratom
variable pressz equal -c_pz/vol

you're computing pressure here from virial stress.

I have done it and I found that is OK when I have no loading or I don't
define boundary group (group of atom that don't deform during loading) in my
simulation (like using deform command).

1- when I define the some groups that don't deform during loading
(boundry), is the volume of this group used to calculate the global stress
too?

no. why should it?

2- if the lammps do it, why the result of top commands are not the same?

it doesn't, so they should be different.

2- if the lammps do it, that means the global stress reduced when I choose
the bigger boundary and it is not real.

the problem is that you compute you pz component on the global volume.
there are many discussions on this subject in the mailing list archives.
please read up on them. no point in repeating it.

3-in this situation which method is better to calculate the stress?
-define a mobile group (global volume- boundary volume) and use the
volume of it (Voronoi/atom) to calculate the stress, or
- use the global stress of lammps calculation.

there is no global "best". it all depends on what you want to learn
about your system and the way to determine the best is to run some
"benchmark" calculations on where you know the results and figure out
which approach/approximation is consistently giving you the "best"
result.

axel.