CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Post-Processing (
-   -   wallGradU or wallShearStress on Time-Averaged Velocity Field (

minger August 21, 2013 22:55

[CLOSED] wallGradU or wallShearStress on Time-Averaged Velocity Field
As the topic says I have a highly unsteady solution which I'd like to find the "time-averaged" wall shear stress for.

Ideally I would simply add wall shear stress to the runtime averaging, ala:

        type            fieldAverage;
        functionObjectLibs ( "" );
        enabled        true;
        outputControl  outputTime;

                mean        on;
                prime2Mean  on;
                base        time;

                mean        on;
                prime2Mean  on;
                base        time;
        mean        on;
        prime2Mean  on;
        base        time;

But that doesn't seem to be helping. Is there any trick for this that doesn't involve writing a data file every time step and averaging by hand/script?

edit: Wow I feel dumb. ParaView filter Temporal Statistics can achieve this. . .Run wallShearStress and then just average it. This does however require that I basically output many time steps and average. It would be nice to be able to treat wallShearStress like a velocity or pressure and allow the code to average and just end with one single result.

minger August 23, 2013 10:04

I have gotten close to fixing this. I have gotten nearly there directly in paraFoam by the following approach

- Extract Surfaces
- Computer Normals on Surfaces
- Create a dummy magnitude for the time-averaged velocity, UMean
- Computed the gradient of the new time-avg velocity magnitude
- Create a calculator for the dot product of the surface normals and the gradient
wallNormGrad = Normals.gradUMean

Now, if I zoom way way in near the wall, it seems as though this process is working. That is, I can see contours near the wall, however the values do not seem to exist "On" the wall.

My main issue is that I'd like to exact the wall data on the surface for further post processing and comparison which I've currently been unable to do. If anyone can provide some guidance I would appreciate it; thanks.

lfpaulinyi September 12, 2013 04:34

Time Average
I believe I have figured out an easier way to do it.

If you are doing a field averaging of the vector U, just get the last time step and rename the file UMean as U and run wallShearStress or wallGradU utility. OpenFOAM will calculate the shear stresses based on your averaged velocity field, thus giving you an averaged wall shear stress

minger September 12, 2013 12:29


That seems to simple and elegant I feel ashamed for not having thought of it. I will try when I get home, but see no reason that it shouldn't work. Thanks a ton!

ngj September 12, 2013 15:49

Good evening,

I the case of a highly unsteady case as the present, then you will need to consider the non-linear coupling between the near-wall eddy viscosity and the near wall velocity gradient. Performing an averaging of each of them and computing the shear stress based on these is not (necessarily) the same as computing the average of the shear stress.

Kind regards


minger September 13, 2013 17:47


I completely agree. My main purpose here is determining the time-average separation point (the actualy value of the shear stress not improtant) -- for which I believe just looking at wall gradient (wallGradU) would be sufficient.


All times are GMT -4. The time now is 09:15.