Skip to content

Virial stress

jax_morph.physics.VirialStress #

VirialStress(potential: PairwisePotential)

Quasistatic step writing each cell's virial pressure into a per-cell stress field.

For any PairwisePotential the per-cell value is the Irving-Kirkwood virial pressure

\[p_i = -\frac{1}{2 d V_i} \sum_j r_{ij}\, \frac{dU}{dr}(r_{ij}),\]

where \(d\) is the spatial dimension, \(V_i\) the cell's \(d\)-ball volume, and the one-half shares each pair's virial between its two cells. The minus sign makes compression (repulsion, \(\frac{dU}{dr} < 0\)) read positive and tension negative; cells beyond the potential's cutoff read 0. stress is a transient sensing quantity (heritable=False), recomputed from the live configuration each macro-step; the step's parameters ride inside potential, so a traced potential parameter (e.g. a jax.Array epsilon) is optimizable through the written stress.

Attributes:

  • potential

    Pairwise interaction potential used to compute virial pressure.

Methods:

  • __call__

    Compute and store per-cell stress.

state_reads #

state_reads()

Reads positions, radii, the alive mask, and any field the potential sources params from.

state_writes #

state_writes()

Writes the per-cell stress field (a transient sensing quantity).