CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Documentation for Neumann boundary conditions in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 11, 2021, 06:38
Default Documentation for Neumann boundary conditions in OpenFOAM
  #1
New Member
 
Join Date: Dec 2021
Posts: 23
Rep Power: 4
MamboJambo is on a distinguished road
Hi,

I was looking to implement some Neumann boundary conditions.

I am taking a look at fixedGradient and https://www.openfoam.com/documentati...-gradient.html and mixed boundary conditions https://www.openfoam.com/documentati...d.html#details.

They appear to be the same (on the latter I should set the valueFraction to zero), but the documentation seems weird:
The fixedGradient will tell you that it is a Neumann condition defined as:

\phi_f = \phi_C + \Delta \nabla \phi_{ref}

Where \phi_{ref} should be the gradient normal to the face?


Upon checking the code, the implementation seems to be on the evaluate function with:
Code:
    Field<Type>::operator=
    (
        this->patchInternalField() + gradient_/this->patch().deltaCoeffs()
    );
And deltaCoeffs() should be the inverse of the distance between face center and cell center?

On the other hand the mixed boundary is defined as:

x_p = w x_p + (1-w) \left( x_c + \dfrac{\nabla_{\perp } x}{\Delta}\right)

Here \nabla_{\perp } is specifically stated to be the patch normal gradient and the distance term appears in the denominator.

Upon checking the code of the evaluate function I see:
Code:
    Field<Type>::operator=
    (
        valueFraction_*refValue_
      +
        (1.0 - valueFraction_)*
        (
            this->patchInternalField()
          + refGrad_/this->patch().deltaCoeffs()
        )
    );
Where the last term seems to be the same as the fixedGradient boundary.

So my question here is: Why two different documentations for something that seems to be the same ? Did I misunderstood something?
MamboJambo is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Table bounds warnings at: END OF TIME STEP CFXer CFX 4 July 16, 2020 23:44
UDF for Automatic Solution Initialization for previous case data file gartz89 Fluent UDF and Scheme Programming 6 March 30, 2020 07:38
Out File does not show Imbalance in % Mmaragann CFX 5 January 20, 2017 10:20
boundary conditions and errors KTG OpenFOAM Running, Solving & CFD 0 June 6, 2016 17:47
Difficulty In Setting Boundary Conditions Moinul Haque CFX 4 November 25, 2014 17:30


All times are GMT -4. The time now is 02:27.