Principal Stress Values From Stress Tensor - Excel Labs LAMBDA Function

| /** | |
| * Returns Principal Stress Values from Tensor (Sx,Sy,Sz,Sxy,Syz,Sxz) | |
| * - Tensor is a row range of values | |
| * - Direct solution of the cubic polynomial | |
| **/ | |
| PRINCIPALSTRESS=LAMBDA( StressTensor, | |
| LET( | |
| SX, INDEX(StressTensor,,1), | |
| SY, INDEX(StressTensor,,2), | |
| SZ, INDEX(StressTensor,,3), | |
| SXY, INDEX(StressTensor,,4), | |
| SYZ, INDEX(StressTensor,,5), | |
| SXZ, INDEX(StressTensor,,6), | |
| B, 2*(SX+SY+SZ), | |
| C, 6*(SX*SY+SY*SZ+SX*SZ-SXY^2-SYZ^2-SXZ^2), | |
| D, 108*(SX*SY*SZ-SX*SYZ^2-SY*SXZ^2-SZ*SXY^2+2*SXY*SYZ*SXZ), | |
| P, B^2-2*C, // P >= 0 | |
| Q, B*(P-C)+D, | |
| V, ABS(C^2*(3*P-2*C)-D*(2*Q-D)), | |
| T, IF( OR(P=0,Q+V=0), 0, ATAN2(Q, SQRT(V))/3 ), | |
| R, SQRT(ABS(P)), | |
| X, R*COS(T), | |
| Y, R*SIN(T)*SQRT(3), | |
| HSTACK(B+2*X, B-X+Y, B-X-Y)/6 | |
| ) | |
| ); |
评论
?
参与讨论