Principal stress direction vectors

Hi Everyone

When obtaining the principal stress directions (with block.zone.stress.prin.dir ), do the vectors correspond to the actual orientation of the stresses or to the normal vectors of each principal plane? Thanks.

Cheers,

Leo

Hi there.

block.zone.stress.prin.dir gives the actual direction of the stresses.

You can confirm this by running a real simple elastic model with no joints where you apply XYZ aligned stresses on the boundaries. You would expect the principal stresses in the zones to be XYZ aligned as well.

Say we run this

  • cube of edge 2m
  • bottom, X- and Y- sides with no normal displacement; X+ and Y+ sides with applied stress; and Z+ kept free
  • maximum applied stress = SYY, intermediate applied stress = SXX and minimal stress = SZZ due to weight
model new
model large-strain off
block create brick test
block zone generate edge 0.2
block zone cmodel assign elastic
block zone property density 2600 young 5e9 poisson 0.3
model gravity 0 0 -9.81
block face apply vel-n 0 range pos-z -1 pos-x -1 pos-y -1 union
block face apply stress -1e7 -2e7 0 0 0 0 range pos-x 1 pos-y 1 union
model solve ratio 1.e-6

Then, post-processing with:

fish define get_pp_dir
    global prin = array(3)
    local dir = array(9)
    loop foreach local zpnt block.zone.list
        global v = block.zone.stress.prin.dir(zpnt,prin,dir)
    end_loop
    prin=vector(prin)
    global dir_s3 = vector(dir(1),dir(2),dir(3))
    global dir_s2 = vector(dir(4),dir(5),dir(6))
    global dir_s1 = vector(dir(7),dir(8),dir(9))
end
[get_pp_dir]

Would bring the following results (principal stress values / dirs in last zone):

prin = (-2.01009e+07,-1.03134e+07,-86120.2)
dir_s3 = (-9.09228e-06,1,-4.61634e-05)
dir_s2 = (9.999999e-01,9.09006e-06,-4.79662e-05)
dir_s1 = (-4.79658e-05,-4.61639e-05,-1)

Recalling that principal stresses are organized with an increasing order (i.e., from more to less compressive one), we retrieve that principal stresses are aligned with Y, X and Z.

1 Like

Bonus : you can accelerate post-processing with Python:

>>> import itasca as it
>>> import numpy as np
>>> stresses = it.block.zonearray.stress()
>>> ppmags, ppdirs = np.linalg.eigh(stresses)

Where ppmags[i] gives principal stresses in i-th zone ppdirs[i,:,j] gives direction of j-th principal stress in i-th zone. We can check results are in accordance with Fish:

>>> ppmags[-1]
array([-20100857.87640904, -10313412.08031488,    -86120.23033133])
>>> ppdirs[-1,:,0] # sig3
array([ 9.09227798e-06, -9.99999999e-01,  4.61634484e-05])
>>> ppdirs[-1,:,1]
array([ 9.99999999e-01,  9.09006369e-06, -4.79662120e-05])
>>> ppdirs[-1,:,2]
array([4.79657923e-05, 4.61638845e-05, 9.99999998e-01])
1 Like

Thank you for your help @Theophile :raising_hands:

You’re welcome, cheers!

Theophile

Hi everybody!

Is it possible to efficiently plot principal stress directions using GUI? For example, in some cross section through the model with large number of zones.

Thanks,

Damir