CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Bugs (
-   -   wallGradU does not work in OF 2.2.2 (

SKLee January 13, 2014 13:28

wallGradU does not work in OF 2.2.2
Hi All,

I run utility wallGradU for cases solving by rhoCentralFoam but it generates the gradient of velocity at the wall of zero. This is wrong answer.

Can someone check this ?


wyldckat February 10, 2014 17:05

1 Attachment(s)
Greetings Sung-Ki,

I've taken a look into this and wallGradU works perfectly fine. The detail is that it's configured to only work on walls.

For example, if after the mesh is generated, you run this command:

patchSummary  -constant
You'll get a summary about the patches, e.g.:

wall    : top
    scalar        p        zeroGradient
    scalar        T        fixedValue
    vector        U        fixedValue

patch    : inlet
    scalar        p        fixedValue
    scalar        T        fixedValue
    vector        U        fixedValue

patch    : outlet
    scalar        p        zeroGradient
    scalar        T        zeroGradient
    vector        U        zeroGradient

symmetryPlane    : bottom
    scalar        p        symmetryPlane
    scalar        T        symmetryPlane
    vector        U        symmetryPlane

empty    : frontAndBack
    scalar        p        empty
    scalar        T        empty
    vector        U        empty

In this example, only the patch named "top" is of type wall, which means that wallGradU will only work for this patch.

In addition, when post-processing the case in ParaView, to visualize the "wallGradU" field, make sure you have loaded the patches of type "wall" in the "Mesh parts" section, as shown in the attached image.

Best regards,

SKLee February 12, 2014 03:30

Thanks Bruno for your response. That's great.

I also have a problem with snGrad() function that I posted at

I will be appreciated if you can help me to figure out it.


All times are GMT -4. The time now is 19:25.