CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Bernolli's Boundary Condition

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By crubio.abujas

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 6, 2020, 11:08
Default Bernolli's Boundary Condition
  #1
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 164
Rep Power: 5
gu1 is on a distinguished road
Hello,

I was reading a work of natural convection and the author performed a LES simulation using the OF and in one of the boundary conditions he comments that he used the ''Bernolli's boundary condition" and explaining that it occurs in the form of p = -0.5v.
Could someone teach me how this can be set in OpenFOAM?

OF5.0
solver: buoyantSimpleFoam

Thanks
gu1 is offline   Reply With Quote

Old   July 7, 2020, 04:29
Default
  #2
Member
 
Carlos Rubio Abujas
Join Date: Jan 2018
Location: Spain
Posts: 84
Rep Power: 5
crubio.abujas is on a distinguished road
It seems like a custom boundary condition. If you only need it once you can try with a codedFixedValue boundary. The following code should do the work.

Code:
    inlet
    {
        type            codedFixedValue;
        value           uniform 0;
        name            BernoilliBC;
        code
        #{
            const volVectorField& U = db().lookupObject<volVectorField>("U");

            const vectorField& U_p = U.boundaryField()[patch().index()];

            // Set the equation on each face of the patch 
            scalarField& field = *this;
            field = -0.5*magSqr(U_p)();
        #};

    }
The code is pretty straight. It recovers the U field from the objectRegistry (a kind of library of the field employed) and then get the velocity field on the current patch. Then it just apply on each of the faces of the cell the formula you mentioned. magSqr will return the value of |U|.
If you need to do more extensibe usage of this boundary condition you may want to create a custom BC with this code.

I hope it this helps!
crubio.abujas is offline   Reply With Quote

Old   July 8, 2020, 06:59
Default
  #3
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 164
Rep Power: 5
gu1 is on a distinguished road
Thank you very much, I will test today.
I believe that the idea of the work that I referred to is a mathematical/physical approach and not real... even because an inviscid flow is a hypothesis.
gu1 is offline   Reply With Quote

Old   July 10, 2020, 12:24
Default
  #4
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 164
Rep Power: 5
gu1 is on a distinguished road
Hi,

I have another question,

''The thermal boundary condition for the vertical wall is: −kf ∂T/∂n = hf (T − Tf )."

Based on the information above, I could write BC similar to the way you taught me?
gu1 is offline   Reply With Quote

Old   July 10, 2020, 14:20
Default
  #5
Member
 
Carlos Rubio Abujas
Join Date: Jan 2018
Location: Spain
Posts: 84
Rep Power: 5
crubio.abujas is on a distinguished road
I think this is a much more standard condition, so you don't need to code it yourself. Try with externalWallHeatFluxTemperature. Here I've attached an example for a 600k wall and h equals to 10 W/m2K.

Code:
wall1
{
    type            externalWallHeatFluxTemperature;
    mode            coefficient;       // Other methods are: power and flux
    Ta              constant 600;      // Ambient temperature
    h               uniform 10.0;      // Value of the hfilm coefficient
    value           uniform 300;       // Default value
    kappaMethod     fluidThermo;       
}
gu1 likes this.
crubio.abujas is offline   Reply With Quote

Reply

Tags
boundaries condition, buoyantsimplefoam, openfoam 5.0

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Centrifugal fan j0hnny CFX 13 October 1, 2019 13:55
sliding mesh problem in CFX Saima CFX 45 September 22, 2015 10:53
Accessing multiple boundary patches from a custom boundary condition file ripudaman OpenFOAM Programming & Development 0 October 22, 2014 18:34
Radiation interface hinca CFX 15 January 26, 2014 17:11
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44


All times are GMT -4. The time now is 20:48.