Forum Navigation
You need to log in to create posts and topics.

averaging of stain

Dear OVITO experts,

I was wondering whether we can calculate the average value over all atomic strain tensors of the model? I know that for shear strain it is possible by using a python script. How about the strain tensors?

Bets regards,

Bahman

Dear Bahman,

yes of course, like for any other particle property, you can also compute system or time averages of the atomic strain tensor. For time averaging, you can simply use the Time averaging modifier. A system average can be computed by using a Python script modifier in the GUI.

Here is how you can access the per-atom Green-Lagrangian strain tensor that can be computed with the Atomic Strain modifier.

data.particles["Strain Tensor"]

If you want to look up a specific component only, you can do e.g.

#first component
data.particles["Strain Tensor"][:,0]
#6th (last) component
data.particles["Strain Tensor"][:,5]

see e.g. https://numpy.org/devdocs/reference/arrays.indexing.html#basic-slicing-and-indexing

-Constanze