Ahmed Body Drag Validation Problem

Ric, this is wrong in my opinion: shear stress and viscous forces are parallel to flow (this results from shear stress equation).

1 Like

Hey Retsam!

Yes, I agree with you. I was referring especifically to the y component (y wallshearstress that was plotted on the post above). Sorry, I’ll edit this sentence to make it more clear.

Ok Ric: odds are also that low Re are not relevant fort he case we try to solve. We are possibly in a regime called ‘drag crisis’ , explained a bit on sphere geometry in different documentation:


This happens to sphere, which is ‘blunt’ shape, I expect its extends much more for streamlined objects, like airfoil profiles. Anyway, this is a very interesting topic. Some guys where inventing golf ball, where pimples are adding kind of viscous layer and air is ‘feeling’ much less resistance…

1 Like

What is best practice ‘reference length’ for RE calcs in internal pipe flow?

What is the ‘reference length’ for RE calcs and BL layer calcs for that sim run?

EDIT: I took the time to do a yPlus Histogram for that sim run:

I really think that we should try to make sure we are using a AvgY+=1 Full Resolution Wall BC for this example.

I am not sure it will make a difference but I think we should cover all bases.

I might be able to get some time to re-mesh and run tomorrow, or maybe you could try that…

I am even thinking we should try running prism layers right to pipe center, what do you think?

That is a GREAT presentation you linked to, it will take me a bit to absorb it :wink:


For flow inside a round pipe, the characteristic length is the hydraulic diameter (dh):

dh = 4*cross sectional area/wetted perimeter = internal diameter.

And yes, we can do that, just to make sure and make some further comparisons between hex and tet :grin:


Ric has given us a simple explanation and a possible reason for the apparent discrepancy between OpenFoam integration of the Wall Shear Stress vector into viscous lift and drag forces and my ParaView integration…

So, before going down too many rabbit holes trying to solve this riddle, I decided to concentrate on trying to find out what Frame of Reference that OpenFoam actually uses for its calculation of the Wall Shear Stress vector…

Consequentially, I researched Wall Shear Stress (WSS), in relation to CFD, and with a new goal of finding out OpenFoams’ Frame of Reference for it…

I found nothing related specifically to OpenFoam, but I did find this statement in a ScienceDirect article:

" In arterial blood flow, the wall shear stress expresses the force per unit area exerted by the wall on the fluid in a direction on the local tangent plane."

I am pretty sure that is NOT a reference to the WSS vector which we are given by OpenFoam because, our WSS vector is NOT “in a direction on the local tangent plane”

Putting that difference aside, it does appear that it may be standard practice to define wall shear stress vector in the frame of reference where forces are exerted by a wall on the fluid

This seems contrary to the way we are used to having a Frame of Reference defined for our aerodynamic forces, where Drag is defined as](Causes of aerodynamic drag — Science Learning Hub) “pushing in the opposite direction to the motion of the object”.

So, I am now willing to agree that the ‘proper’ way to integrate the WSS vector components in ParaView, is by adding a multiplication factor of -1 on the WSS vector components, during integration…

By doing that, ParaView integration agrees with OpenFoam integration and everyone should be happy now.

For those that follow, I will soon create a Forum topic on how to integrate WSS into viscous forces using ParaView …

PS. Many thanks to Ric and Retsam for putting up with me in a detailed RocketChat discussion today, which led to this post :slight_smile:

1 Like

Hi All.

I just wanted to post to say we actually internally investigated this thoroughly, and I am sure we have not covered all the missing questions and what I am posting will not be the be all and end all, however, hopefully it gives some insight as to what FOAM is doing and why it may not be comparable. The comment is almost a direct quote from one of our OpenFOAM experts.

Start Quote:
We had a long discussion on this in the Simulation slack channel involving [Names removed but myself included] at various points. I will try to summarize my investigation in the points below:

  1. I had isolated the viscous contribution to the total force (Sfb[patchI] & devRhoReffb[patchI] summed over all the patches) to make sure that there is no inconsistency between what [results] are showing on the platform and what OpenFOAM is calculating. The two results were the same both in magnitude and direction, thus ruling out any cause for concern. (My summary is that we return exactly what openfoam calculates to the user)

  2. [Dales concern] seems to be that the sign of the computed viscous force that he gets in paraView and what he retrieves from our platform are different.

  3. He commented " Have you any comments on my quest to calculate Viscous Drag with a ParaView integration of the X component of the Wall Shear Stress vector issue and why I am integrating to a -ve viscous drag instead of +ve (I have a matching magnitude to OpenFoam though) "

So I looked a bit more deeper into the OF code. For anyone wanting a reference here are the two files that is of interest, and are version independent:

  1. For the forces computation: https://github.com/OpenFOAM/OpenFOAM-2.3.x/blob/master/src/postProcessing/functionObjects/forces/forces/forces.C
  2. https://github.com/OpenFOAM/OpenFOAM-2.3.x/blob/master/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C

Looking at these files closely, one can notice that the area normal that multiplies the shear stress in case of the force calculation is given by: mesh.Sf().boundaryField()[patchI] on a specific patch and by negative of mesh.Sf().boundaryField()[patchI] for the wall shear stress calculation. Important to note that OpenFOAM uses the shear stress tensor to compute these quantities independently and does not derive one from the other.
Hence if one wants to use the wallShearStress to compute the viscous forces directly, he will see a difference in sign unless he multiplies the value with -1. So basically what he should be doing is compute the following quantity:
F = - int (n.A.dv/dx).
:End Quote

Hope this can be of some help.



Hi Darren,

Thanks, I know digging up the code took some effort, I was avoiding that :wink:

I do think that you have just shown, in OF code, that my multiplication by -1, in the integration of the x viscous forces, is the proper way to integrate the x viscous forces from OpenFoam force results… :sunglasses:

See you at my next emergency… :joy::rofl::joy::rofl:


PS. The links don’t seem to work, but by looking at their paths, I am sure I could get there if I had too…

1 Like