stress on particular region

Dear Lammps users,
I want to get the stress from a specific region using Pxx. I know the Pxx value is for the whole simulation box. Is it reasonable to just do some simple calculation like Pxx times the ration between the the area of the specific region and the the area of the whole simulation box?
Thanks.

That will only work if your box is homogeneous. To calculate Pxx for a specific region or group, check out the “compute streee/atom” command: http://lammps.sandia.gov/doc/compute_stress_atom.html

Ray

However, if use the compute stress/atom, how to get the volume of the specific region? I did find any command that can give the volume of the region.
Thanks

Junhua Gu

And you can sum compute stress/atom over the atoms you want

via the compute reduce command.

However, if use the compute stress/atom, how to get the volume of the
specific region? I did find any command that can give the volume of the
region.

well, isn't this an input parameter? all regions (as understood by
LAMMPS are simple geometry objects and thus their respective volumes
are equally simple to compute.

So what you mean is to neglect the volume change after the deformation of the region?
Thanks
Junhua Gu

So what you mean is to neglect the volume change after the deformation of the region?

as far as i remember, LAMMPS regions don't deform.

And if it’s a complicated region, like the union/intersection
of multiple other regions, than LAMMPS is no more clever
at computing the volume than you would be. I.e. LAMMPS
expects you to know the volume of your region and whether
it is filled with atoms or not.

Steve