Obtaining force distribution from OpenFOAM results

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

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 ?

This issue could give you some hints.

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.

“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

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