# Principal stress direction vectors

**URL:** <https://forum.itascainternational.com/t/principal-stress-direction-vectors/2131>\
**Category:** 3DEC\
**Tags:** fish\
**Created:** [June 17, 2025, 8:46pm UTC](https://forum.itascainternational.com/t/principal-stress-direction-vectors/2131 "2025-06-17T20:46:55Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeoBBL](https://avatars.discourse-cdn.com/v4/letter/l/ccd318/32.png) [@LeoBBL](https://forum.itascainternational.com/u/LeoBBL)\
**Post date:** [June 17, 2025, 8:46pm UTC](https://forum.itascainternational.com/t/principal-stress-direction-vectors/2131/1 "2025-06-17T20:46:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Theophile](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.itascainternational.com/theophile/32/299_2.png) [@Theophile](https://forum.itascainternational.com/u/Theophile)\
**Post date:** [June 18, 2025, 12:25pm UTC](https://forum.itascainternational.com/t/principal-stress-direction-vectors/2131/2 "2025-06-18T12:25:03Z")

</div>

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

```auto
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:

```auto
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):

```auto
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.

---

<div class="post-metadata">

**Author:** ![Theophile](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.itascainternational.com/theophile/32/299_2.png) [@Theophile](https://forum.itascainternational.com/u/Theophile)\
**Post date:** [June 18, 2025, 12:36pm UTC](https://forum.itascainternational.com/t/principal-stress-direction-vectors/2131/3 "2025-06-18T12:36:59Z")

</div>

Bonus : you can accelerate post-processing with Python:

```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:

```auto
>>> 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])

```

---

<div class="post-metadata">

**Author:** ![LeoBBL](https://avatars.discourse-cdn.com/v4/letter/l/ccd318/32.png) [@LeoBBL](https://forum.itascainternational.com/u/LeoBBL)\
**Post date:** [June 18, 2025, 1:33pm UTC](https://forum.itascainternational.com/t/principal-stress-direction-vectors/2131/4 "2025-06-18T13:33:00Z")

</div>

Thank you for your help @Theophile 🙌

---

<div class="post-metadata">

**Author:** ![Theophile](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.itascainternational.com/theophile/32/299_2.png) [@Theophile](https://forum.itascainternational.com/u/Theophile)\
**Post date:** [June 18, 2025, 1:34pm UTC](https://forum.itascainternational.com/t/principal-stress-direction-vectors/2131/5 "2025-06-18T13:34:00Z")

</div>

You’re welcome, cheers!

Theophile

---

<div class="post-metadata">

**Author:** ![Damir](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@Damir](https://forum.itascainternational.com/u/Damir)\
**Post date:** [June 24, 2025, 11:19am UTC](https://forum.itascainternational.com/t/principal-stress-direction-vectors/2131/6 "2025-06-24T11:19:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jhazzard](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jhazzard](https://forum.itascainternational.com/u/jhazzard)\
**Post date:** [June 25, 2025, 5:34pm UTC](https://forum.itascainternational.com/t/principal-stress-direction-vectors/2131/7 "2025-06-25T17:34:20Z")

</div>

In the plot items, under Block, choose Tensor.

---

<div class="post-metadata">

**Author:** ![Damir](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@Damir](https://forum.itascainternational.com/u/Damir)\
**Post date:** [June 30, 2025, 9:58am UTC](https://forum.itascainternational.com/t/principal-stress-direction-vectors/2131/8 "2025-06-30T09:58:33Z")

</div>

Thanks Jim, as always!

Please, is it possible that somebody at Itasca opens this \*.sav file couple of steps earlier. I saved file regularly, but after I tried to reopen it, 3DEC said that it is corrupted, which is correct because stucture is failed. The link is: [20000621\_0051\_105\_apsida.sav](https://unizggf-my.sharepoint.com/:u:/g/personal/damir_grad_hr/ETf_ApfTPEpMtAWipsVE6jABlts4EAGhQSuVRgXCBS4W0g?e=siNN8K)

---

<div class="post-metadata">

**Author:** ![jhazzard](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jhazzard](https://forum.itascainternational.com/u/jhazzard)\
**Post date:** [June 30, 2025, 1:53pm UTC](https://forum.itascainternational.com/t/principal-stress-direction-vectors/2131/9 "2025-06-30T13:53:57Z")

</div>

I can’t get the link to work from here. Please send to [3decsupport@oneitasca.com](mailto:3decsupport@oneitasca.com)

---

<div class="post-metadata">

**Author:** ![tuncerakilli](https://avatars.discourse-cdn.com/v4/letter/t/9d8465/32.png) [@tuncerakilli](https://forum.itascainternational.com/u/tuncerakilli)\
**Post date:** [July 3, 2025, 7:43pm UTC](https://forum.itascainternational.com/t/principal-stress-direction-vectors/2131/10 "2025-07-03T19:43:10Z")

</div>

Hi Everyone,

Just a quick question:

_Does the following function return the sum of the increments or the last increment?_

`itasca.block.zonearray.` `strain_inc_flat` ()

If it is the last increment, how would I loop through cycles when the model is already solved? It would be greatly appreciated if I get some insight!

Thanks!  
Tuncer

---

<div class="post-metadata">

**Author:** ![jhazzard](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jhazzard](https://forum.itascainternational.com/u/jhazzard)\
**Post date:** [July 3, 2025, 8:54pm UTC](https://forum.itascainternational.com/t/principal-stress-direction-vectors/2131/11 "2025-07-03T20:54:16Z")

</div>

The name is somewhat misleading. **Strain increment** is just **total strain**. What it means is the increment in strain since the last time displacements were set to 0.

---

<div class="post-metadata">

**Author:** ![tuncerakilli](https://avatars.discourse-cdn.com/v4/letter/t/9d8465/32.png) [@tuncerakilli](https://forum.itascainternational.com/u/tuncerakilli)\
**Post date:** [July 3, 2025, 9:35pm UTC](https://forum.itascainternational.com/t/principal-stress-direction-vectors/2131/12 "2025-07-03T21:35:21Z")

</div>

Sounds great! Thank you very much, Jim!
