# tensor.j2

Syntax

f := tensor.j2(t)

Get the second deviatoric stress invariant. The tensor must be of size three. This is defined as $$J_2 = \frac{1}{6}[({\sigma}_x-{\sigma}_y)^2+({\sigma}_y-{\sigma}_z)^2+({\sigma}_z-{\sigma}_x)^2]+{{\tau}^2}_{xy}+{{\tau}^2}_{yz}+{{\tau}^2}_{zx}$$ .

Returns: f - second deviatoric stress invariant t - tensor