[lammps-users] Re :question about stress tensor components

Hi Arun,
Thanks for the information. But I’m still not clear about this whole stress thingy. Probably I’m not framing my question properly. Here is my situation in a more detailed way.

I am more interested in the triangular components of the stress tensor matrix Sxy, Sxz, and Syz. So, What I am actually looking for are these tensor components for the entire system at each time step. Here is the sample data which I want the stress data to look like

(desired Output)
time step Sxy Sxz Syz (for the entire system)
1 **** **** ****
2 **** **** ****
3 **** **** ****
and so on…

But here is what LAMMPS data looks like

time step
1
atom id atom type Sxy Sxz Syz (each individual atom)
1 1 **** **** ****
2 1 **** **** ****

and so on…N values
time step
2
atom id atom type Sxy Sxz Syz
1 1 **** **** ****
2 1 **** **** ****

and so on…N values
(N is the total number of atoms in the system.

LAMMPS outputs the individual tensor components at every time step. My question is how do I convert them to look like the above desired result. I do not want the tensor components of all the individual atoms. Instead, I want the total value of each component for the system.

This is what I did

SXY = Sigma (Sxy) … added up the contributions of all the atoms
SXZ = Sigma (Syz)
SYZ = Sigma (Syz)

This is not giving me the same result as another software that was used to run a simulation using the same inital configeration. The trajectories match but the stress tensor components do not.

I would like to know wether what I did (summation of all the contributions) is the right way to get the stress tensor components for the system or amI missing on something. If not, could you please take some time to help me figure out this.
Thank you very much
Venkat

Hi,
       After summing up the stresses(Sxy Sxz Syz) for all the atoms, a division by system volume(initial or final depending upon the definition of stress ) of the summation is suppose to give Sxy Sxz Syz in actual stress units. You can also use the Pxy Pxz Pyz value obtained from custom thermo command. However in case of Sxy Sxz Syz, the virial contributions of bond, angle etc is not included (refer manual) and so i would prefer Pxy Pxz Pyz.

Thanks
Arnab

Venkat Padmanabhan wrote:

Venkat,
To get the stresses (all 6 components) from the atom stresses this is
what you need to do:
1. Sum stress components (Just like what you described)
2. Divide the total stress (from step 1) by the volume of the system

Only if you divide the summed stress output you will get the stress in
stress units and I think this may be your problem.

As Arnab pointed out, the stress tensor in LAMMPS does not include the
virial terms from bonds and if you need this included, you should use
the pressure tensor instead.

Arun

Venkat Padmanabhan wrote: