CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Generalized Neumann BC q f nc grad f%3dg (

maddhi August 17, 2008 09:51

Good day everyone! Are gene
Good day everyone!

Are generalized Neumann boundary conditions available in OpenFOAM?

In case the expression "q f + n.(c grad f)=g" is not quite clear, what I mean is:
"q f" is the field f scaled by a factor q
"n.(c grad f)" is the scalar product of the surface normal n with the gradient of f scaled by c. (c may be tensorial).

If this BC is not available, maybe someone could be so kind to give a rough idea of how it could be implemented? Which classes are best used as a basis, which files do I need to modify?

I have seen the mixedFvPatchField, but it seems not to implement the generalized Neumann BC, instead it is a "linear transition" between fixedValue and fixedGradient BC. Am I right?

I don't see which physical meaning this mixed BC has, and I didn't find it in any of the tutorials. Can you suggest any demonstrative situation that would require the mixed BC? Just for curiosity.


maddhi August 18, 2008 20:52

If this generalized Neumann BC
If this generalized Neumann BC is not available, do you have a suggestion how to model the temperature T_b of a boundary (conductivity k_b) which is connected to a temperature T_ext through a thin heat conducting layer (thickness L, conductivity k_ext)?

Equating the interior and exterior fluxes
n.(k_b (grad T)_b) = k_ext (T_ext-T_b)/L
I end up with the type of BC I had asked about in the previous posting.

I am sure this kind of BC is used frequently, but how is it called in OpenFOAM?

With kind regards

eugene August 19, 2008 04:44

There is a boundary that kind
There is a boundary that kind of does what I think you want. It is called wallHeatTransfer.

Found here:


maddhi August 19, 2008 05:30

Dear Eugene, that is exactly w
Dear Eugene, that is exactly what I was looking for.

After a quick look into wallHeatTransferFvPatchScalarField.C I think that it simply adjusts the refValue, refGrad and valueFraction of a mixedFvPatchScalarField to produce the gen. Neumann BC. I'll study it in more detail in order to see if I can modify it for tensorial c in "q f + n.(c grad f)=g".

I find it a bit frustrating that such general purpose functionality is allocated to special fields like thermophysical modelling, because users who need it for other purposes will never find it unless they study almost all of the existing OpenFOAM code.

In quite old forum postings I read that the work on improving the documentation is mostly frozen until sponsoring is available. Are any guesstimates around about the payment required to get at least a basic description of all available solvers, turbulence models and boundary types? It should be possible to collect 10-100$ each from some 50 forum users who value a more complete documentation. Just an idea. If there are any comments, we might move to another thread.

A big thank you!

markusrehm July 7, 2009 11:27

Heat loss at wall
Hi all,

I need to implement wall heat loss into a combustion solver. As mentioned before the BCs at src/thermophysicalModels/basic/derivedFvPatchFields/ can do that. I think gradientEnthalpy would be most appropriate.

I tried it with the buoyantSimpleFoam-hotRoom-case modifying the fixedWalls in the temperature file:


        //type            zeroGradient;
        type            gradientEnthalpy;
        gradient        uniform -1000.0;

and it results in


DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 8.06253e-07, No Iterations 6
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 7.71905e-07, No Iterations 6
DILUPBiCG:  Solving for Uz, Initial residual = 0.999994, Final residual = 7.96709e-07, No Iterations 6

"Speicherzugriffsfehler" should be a memory allocation error.

So is it a problem with the thermos or did I only apply the BC in a wrong way?

What is the unit of the gradientEnthalpy, maybe [W/m2]?

Regards, Markus.

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