Recently, there was a request to ouput the principal stresses for each element at lower and upper surfaces of each shell element in DYNAIN file to use in some failure theories. I beleive this feature is a routine output in PamStamp simulations. To enable this, the attached ‘C’ code can be used that reads in a DYNAIN file (valid output from LSDYNA) to use the stresstensor and output the principal stresses for each element at lower and upper surfaces.

KevnZeng,
Thanks for the correction. The new version (v12) now has the update you pointed out.
Suri Bala

Two lines also should Be:
Line 103 : avg_sig[5] = sig[5];
Line 141 : iv[1] = sig[0]*sig[1] sig[0]*sig[2] sig[2]*sig[1]pow(sig[3],2)pow(sig[4],2)pow(sig[5],2);
??Question1:
Can you comment to the principal result for following data:
1 1 2 0
9.491E013.809E 051.837E 05 2.445E 02 2.020E 04 1.484E 022.294E 04 1.732E02
…
(Above program give out results:
eid s1 s2 s3
1 188116.7969 188120.2656 188118.4375
1 135118.0469 135114.7344 135117.2344
)
But I doubt it whether I calculate correctly or not.(My results are much different with yours using a similar method:
PStress= 1.0e 05 *
0.0163
3.8430
1.8168
)Question2:
If there are much difference about Principal Stress between the 5 or 7 integration points, does that mean shell element is not suitable for this simulation, and Solid element is needed?Thanks.
should line 175 be ps[2] = ((s u)/2) – (b/3*a) – i*(su)*sqrt(3)*0.5; ?