ball.stress

Syntax

Tensor Access

t = ball.stress(bp<,i1,i2>)

Get the stress tensor arising from all contacts acting on the ball. The stress tensor is computed as:

\[\sigma^{(\phi)}_{ij} = \frac{1}{V} \sum_{n_c}(x^{(c)}_i - x^{(\phi)}_i) F^{(c,\phi)}_j\]
Returns:

t - stress tensor or value.

Arguments:

bp - ball pointer.

i1 - Optional tensor index that, if given without i2, ranges from 1 to 6, accessing the xx, yy, zz, xy, xz, and yz tensor values.

i2 - Optional tensor notation that must be given with i1. In this case, i1 corresponds to the first index of the tensor position and i2 to the second in the row/column format. For instance, i1 = 1 and i2 = 3 returns the xz tensor value.

Value Access

f = ball.stress.xx(bp)

Get the xx-value of the stress.

Returns:f - xx-value of the stress tensor
Arguments:bp - ball pointer
f = ball.stress.xy(bp)

Get the xy-value of the stress.

Returns:f - xy-value of the stress tensor
Arguments:bp - ball pointer
f = ball.stress.xz(bp)

Get the xz-value of the stress.

Returns:f - xz-value of the stress tensor
Arguments:bp - ball pointer
f = ball.stress.yy(bp)

Get the yy-value of the stress.

Returns:f - yy-value of the stress tensor
Arguments:bp - ball pointer
f = ball.stress.yz(bp)

Get the yz-value of the stress.

Returns:f - yz-value of the stress tensor
Arguments:bp - ball pointer
f = ball.stress.zz(bp)

Get the zz-value of the stress.

Returns:f - zz-value of the stress tensor
Arguments:bp - ball pointer