# how to calculate the Von Mises stress for each atom?

Dear OVITO developers,

I would like to calculate the Von Mises stress for each atom in my dump file.  The equation for calculation of von mises stress can be seen the attachment.  I need to calculate the stress tensor and voronoi volume for each atom.  Could you please tell me how I can use a python script or the compute property modifier to do that?

Sincerely yours,

Kevin

Kevin,

I need to calculate the stress tensor

OVITO can calculate kinematic and structural quantities. However, it cannot be used to calculate any quantities that involve energies or forces, for that you will need to use a molecular dynamics code like e.g. LAMMPS.

I need to calculate the voronoi volume for each atom

You can use the Voronoi analysis modifier to compute Voronoi volumes.

I would like to calculate the Von Mises stress

Import your data including the stress tensor. Then, insert a Compute property Modifier in your pipeline and use above formula. It's as simple as that.

`sqrt( 0.5* (StressTensor.XX - StressTensor.YY)**2 + ....))`

Dear Constanze,

Got it. Thanks for your help.

Best regards,

Kevin

Quote from Constanze Kalcher on February 5, 2021, 9:44 am

Kevin,

I need to calculate the stress tensor

OVITO can calculate kinematic and structural quantities. However, it cannot be used to calculate any quantities that involve energies or forces, for that you will need to use a molecular dynamics code like e.g. LAMMPS.

I need to calculate the voronoi volume for each atom

You can use the Voronoi analysis modifier to compute Voronoi volumes.

I would like to calculate the Von Mises stress

Import your data including the stress tensor. Then, insert a Compute property Modifier in your pipeline and use above formula. It's as simple as that.

`sqrt( 0.5* (StressTensor.XX - StressTensor.YY)**2 + ....))`

Hi,

The equation of this Von Mises stress is different from this website: https://www.ovito.org/docs/current/reference/pipelines/modifiers/atomic_strain.html#particles-modifiers-atomic-strain

Could you explain why?

Thanks,

Cong

Hi, the manual entry you linked is talking about the von Mises local shear invariant of the Green-Lagrangian strain tensor not the von Mises stress.

### 新的OVITO微信频道!New for our users in China: OVITO on WeChat

Official OVITO WeChat channel operated by Foshan Diesi Technology Co., Ltd.