# Obtaining force distribution from OpenFOAM results

**URL:** https://discourse.paraview.org/t/obtaining-force-distribution-from-openfoam-results/9951
**Category:** ParaView Support
**Created:** [June 30, 2022, 4:24pm UTC](https://discourse.paraview.org/t/obtaining-force-distribution-from-openfoam-results/9951 "2022-06-30T16:24:48Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![FEngineer](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/5f8ce5/32.png) [@FEngineer](https://discourse.paraview.org/u/FEngineer)
#### Post date: [June 30, 2022, 4:24pm UTC](https://discourse.paraview.org/t/obtaining-force-distribution-from-openfoam-results/9951/1 "2022-06-30T16:24:48Z")

</div>

Hi,

I’m looking for a way to obtain the force (normal and tangential components) distribution on the surface of an object around which the flow occurs. I haven’t found a way to get such output from OpenFOAM (it seems that only total forces can be obtained this way) so postprocessing in ParaView seems to be the only potential way to achieve this. This video shows how to use the Calculator filter and a few preceding filters to get the normal forces in each global direction from pressure: [How to calculate aerodynamic forces with Paraview - YouTube](https://www.youtube.com/watch?v=J944HOj_4b0)

However, there can be a problem with tangential (shear) forces. I tried using the Generate Surface Tangents filter instead of the Generate Surface Normals one but it shows the error “Texture coordinates are requested to generate tangents”. Do I need some additional data ? I only have standard results from OpenFOAM (a simple test case involving flow around a sphere). Or maybe there’s another approach that could let me achieve the desired goal ?

---

<div class="post-metadata">

### Author: ![pindakaas](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/cab0a1/32.png) [@pindakaas](https://discourse.paraview.org/u/pindakaas)
#### Post date: [July 1, 2022, 6:46am UTC](https://discourse.paraview.org/t/obtaining-force-distribution-from-openfoam-results/9951/2 "2022-07-01T06:46:29Z")

</div>

This [issue](https://discourse.paraview.org/t/calculation-of-surface-tangents-error/9052/15) could give you some hints.

---

<div class="post-metadata">

### Author: ![FEngineer](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/f/5f8ce5/32.png) [@FEngineer](https://discourse.paraview.org/u/FEngineer)
#### Post date: [July 1, 2022, 8:44am UTC](https://discourse.paraview.org/t/obtaining-force-distribution-from-openfoam-results/9951/3 "2022-07-01T08:44:13Z")

</div>

Thanks. I’ve seen this thread but it seems that its author wanted to calculate values just for a slice while I need the data for the whole surface. Just like him, I don’t have the TCoords values and don’t know how to get them.

---

<div class="post-metadata">

### Author: ![timothee.chabat](https://discourse.paraview.org/user_avatar/discourse.paraview.org/timothee.chabat/32/5729_2.png) [@timothee.chabat](https://discourse.paraview.org/u/timothee.chabat)
#### Post date: [July 6, 2022, 8:51am UTC](https://discourse.paraview.org/t/obtaining-force-distribution-from-openfoam-results/9951/4 "2022-07-06T08:51:06Z")

</div>

“Generate Surface Tangents” needs texture coordinates to generate the tangent because it needs a direction for the tangent. There is theoratically an infinity of tangents at a point so it needs some constraints to generate something, as you’d need if you want to compute it yourself.

So either you have some implicit constraint that you know and that you can implement in a Python calculator or something, either the output of your simulation lacks data.

I think this is kind of similar to [Calculation of surface tangents error](https://discourse.paraview.org/t/calculation-of-surface-tangents-error/9052/)

---

<div class="post-metadata">

### Author: ![timothee.chabat](https://discourse.paraview.org/user_avatar/discourse.paraview.org/timothee.chabat/32/5729_2.png) [@timothee.chabat](https://discourse.paraview.org/u/timothee.chabat)
#### Post date: [July 6, 2022, 8:56am UTC](https://discourse.paraview.org/t/obtaining-force-distribution-from-openfoam-results/9951/5 "2022-07-06T08:56:00Z")

</div>

(maybe filters such as “Surface Vector” or “Compute Derivatives” could help you)
