Stress Tensor¶
The stress tensor of a particle is
with \(I\) the active interactions, \(f_{ij}\) the force between particles \(i\) and \(j\), and \(c_{ij} = r_i - p_{ij}\) the vector between the center \(r_i\) of particle \(i\) and the contact position \(p_{ij}\). The stress of the system is \(\sigma = \frac{1}{V} \sum_{loc} \sigma_{loc}\), with \(V\) the volume.
The per-particle stress is computed by stress_tensor (field stress), the average stress by avg_stress_tensor,
and the output file is written by write_stress_tensor. Set analysis_dump_stress_tensor_frequency in the global
block (default -1, never):
The result is written in <dir_name>/AvgStressTensor.txt, with the columns
Time Sxx Sxy Sxz Syx Syy Syz Szx Szy Szz.
Pipeline¶
This frequency triggers the computation of the per-particle stresses, then the chaining of three blocks: the volume, the average stress tensor and the output.
By default, the volume is the volume of the simulation domain. For a deposit or another simulation where the domain
does not match the volume of the sample, replace compute_volume by your own operator:
or give a fixed volume:
Example: example/polyhedra/analyses/write_avg_stress.msp, hexapods dropped into a box.


scripts/post_processing/avg_stress.gnu plots the components: