# Stress direction in saved data (.csv)

**URL:** https://discourse.paraview.org/t/stress-direction-in-saved-data-csv/11245
**Category:** ParaView Support
**Created:** [January 24, 2023, 6:55am UTC](https://discourse.paraview.org/t/stress-direction-in-saved-data-csv/11245 "2023-01-24T06:55:15Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![sandyITS](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/ba9def/32.png) [@sandyITS](https://discourse.paraview.org/u/sandyITS)
#### Post date: [January 24, 2023, 6:55am UTC](https://discourse.paraview.org/t/stress-direction-in-saved-data-csv/11245/1 "2023-01-24T06:55:15Z")

</div>

Hi everyone…  
I’ve extract or SaveData to csv. In the csv file, there are 9 stress types (Stress0 to Stress8 and StressMagnitude). Could anyone please help me, where can I find the explanation of these stresses especially direction of each stress type. I found the pairs between these stresses (1-3, 2-6, and 5-7), which has similar value within the columns of each pair.  
Please let me know the explanation of it.  
Thanks

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [January 24, 2023, 10:00am UTC](https://discourse.paraview.org/t/stress-direction-in-saved-data-csv/11245/2 "2023-01-24T10:00:54Z")

</div>

> [@sandyITS](#):
>
> I’ve extract or SaveData to csv. In the csv file, there are 9 stress types

These stresses comes from somwhere, either a filter or your initial dataset. You need to share more info.

---

<div class="post-metadata">

### Author: ![jfausty](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jfausty/32/9405_2.png) [@jfausty](https://discourse.paraview.org/u/jfausty)
#### Post date: [January 24, 2023, 1:31pm UTC](https://discourse.paraview.org/t/stress-direction-in-saved-data-csv/11245/3 "2023-01-24T13:31:31Z")

</div>

Hi @sandyITS,

It looks like you are exporting a stress tensor ([Cauchy stress tensor - Wikipedia](https://en.wikipedia.org/wiki/Cauchy_stress_tensor)) from your data. Is this data from a mechanical simulation?

In this case it is most likely that each row of your csv file represents one component of the stress tensor (3 x 3 = 9). And the similarities between different components is because the tensor is symmetric.

The magnitude of the stress tensor is often defined as the square root of the dot product of the tensor with itself similarly to matrices ([Matrix norm - Wikipedia](https://en.wikipedia.org/wiki/Matrix_norm#%22Entry-wise%22_matrix_norms)).

What exactly were you expecting from your stress data?

Best regards,

---

<div class="post-metadata">

### Author: ![sandyITS](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/ba9def/32.png) [@sandyITS](https://discourse.paraview.org/u/sandyITS)
#### Post date: [January 24, 2023, 2:27pm UTC](https://discourse.paraview.org/t/stress-direction-in-saved-data-csv/11245/4 "2023-01-24T14:27:55Z")

</div>

Hi @mwestphal  
Thank you for your reply… I provide the file below.

[CUBE.pvd](https://discourse.paraview.org/uploads/short-url/1oQppWeviOLJCUgQOTxXtowZ9ET.pvd) (5.0 KB)  
[CUBE.pvsm](https://discourse.paraview.org/uploads/short-url/kBKs4SPsiHSA5YdNX3FbrbPQ9py.pvsm) (828.8 KB)  
[Paraview\_SaveData.csv](https://discourse.paraview.org/uploads/short-url/rmgesFLePk75g2Z6hrksVke9bJ8.csv) (129.5 KB)

---

<div class="post-metadata">

### Author: ![sandyITS](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/ba9def/32.png) [@sandyITS](https://discourse.paraview.org/u/sandyITS)
#### Post date: [January 24, 2023, 2:46pm UTC](https://discourse.paraview.org/t/stress-direction-in-saved-data-csv/11245/5 "2023-01-24T14:46:27Z")

</div>

Hi @jfausty

Yes, this is from mechanical simulation (.vtk files) about 50 steps, so I have 50 .vtk files.  
Do you mean  
Stress0 is SigmaX  
Stress1 is ThetaXy  
Stress2 is ThetaXz  
Stress3 is SigmaY  
Stress4 is ThetaYx  
Stress5 is ThetaYz  
Stress6 is SigmaZ  
Stress7 is ThetaZx  
Stress8 is ThetaZy  
in that order?  
I follow the above order and the pairs do not match at pair 5-7 because they are in different directions. Confuses me alot… I provide you the .csv file and the model.  
 ![image](https://discourse.paraview.org/uploads/default/original/2X/d/dcffc49f61a6b89aa0909592bca0780cc8de8bea.png)  
[Paraview\_SaveData.csv](https://discourse.paraview.org/uploads/short-url/rmgesFLePk75g2Z6hrksVke9bJ8.csv) (129.5 KB)

Thankyou

---

<div class="post-metadata">

### Author: ![jfausty](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jfausty/32/9405_2.png) [@jfausty](https://discourse.paraview.org/u/jfausty)
#### Post date: [January 24, 2023, 3:26pm UTC](https://discourse.paraview.org/t/stress-direction-in-saved-data-csv/11245/6 "2023-01-24T15:26:07Z")

</div>

Hi @sandyITS,

This actually truly depends on where your data comes from and how the source encodes tensor data. If that is the order in which your simulation wrote the components of the tensor than that is how they should be read in ParaView.

Usually, in my experience however, tensor components are ordered as so:

\sigma = \begin{pmatrix}\sigma\_0 & \sigma\_1 & \sigma\_2 \\ \sigma\_3 & \sigma\_4 & \sigma\_5 \\ \sigma\_6 & \sigma\_7 & \sigma\_8 \end{pmatrix} = \begin{pmatrix}\sigma\_x & \tau\_{xy} & \tau\_{xz} \\ & \sigma\_y & \tau\_{yz} \\ & & \sigma\_z \end{pmatrix}

(taking into account symmetry)

This ordering would also support your previous observation that  
\begin{array}{c c c}\sigma\_{1} \simeq \sigma\_{3} & \sigma\_{2} \simeq \sigma\_{6} & \sigma\_{5} \simeq \sigma\_{7} \end{array}

Best,
