CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   short question: zeroGradient equal fixedGradient=(0 0 0) ?! (

andyru July 16, 2013 07:54

short question: zeroGradient equal fixedGradient=(0 0 0) ?!

I looked at fixedGradientFvPatchField.C and
zeroGradientFvPatchField.C and for me


type fixedGradient;
value uniform (0 0 0);

behaves like using:

type zeroGradient;
So why do we have zeroGradient? fixedGradient type would be enough?!
Or do I draw the wrong conclusion?

Best regards,


Bernhard July 16, 2013 08:34

They are not the same. zeroGradient only garantuees the wall-normal derivative to be zero, not the complete gradient.

andyru July 16, 2013 12:52

Thank you for the fast answer. I got it.

Next little question:
A given fixedGradient value (a b c) will specify the gradient of for example U in the standard Coordinate-System(x,y,z) on a patch
HTML Code:
This boundary condition supplies a fixed gradient condition, such that the patch values are calculated using:
where = patch values = internal field values = gradient (user-specified) = inverse distance from patch face centre to cell centre

Hence, x_p is independent from the normal patch face vector?

Thanks for the answer in advance,


All times are GMT -4. The time now is 14:17.