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

Periodic Inlet/Outlet Boundary Condition

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 1 Post By FlyBob91
  • 4 Post By arvindpj
  • 1 Post By arvindpj
  • 1 Post By arvindpj

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 20, 2016, 12:14
Cool Periodic Inlet/Outlet Boundary Condition
  #1
Senior Member
 
FlyBob91's Avatar
 
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10
FlyBob91 is on a distinguished road
Hello to all,
i have to simulate the flow in a duct and to save some time i saw many people use periodic boundary conditions at the inlet and outlet.
Now i set them correctly in the blockMeshDict

Code:
    inlet
    {
        type cyclic;
        neighbourPatch  outlet; 
        faces
        (
            (0 4 7 3)
        );
    }

    outlet
    {
        type cyclic;
        neighbourPatch  inlet;
        faces
        (
            (1 2 6 5)
        );
    }

but i don't know how to set them in the initial condition file. I know the entry velocity but what should i do with the other conditions?


Thanks for help,
Roberto
Luttappy likes this.
FlyBob91 is offline   Reply With Quote

Old   December 20, 2016, 14:45
Default
  #2
Member
 
Arvind Jay
Join Date: Sep 2012
Posts: 96
Rep Power: 14
arvindpj is on a distinguished road
Here are some possible options:

Quote:
Originally Posted by ngj View Post
Hi Jitender

Another approach is to look in the example

~/OpenFOAM/OpenFOAM-1.6.x/tutorials/incompressible/pisoFoam/les/pitzDailyDirectMapped

where a mapping procedure is carried out between to planes with a given offset between them. The profile from the interior plane is mapped back on to the inlet, hence between these two planes you basically have an infinitely long pipe, and since you are considering laminar flows, then the distance between the two planes is of minor importance as far as the validity of the velocity (and turbulence) profile(s) goes.

I have some nice pictures of a laminar jet in a laminar cross flow on which I performed a POD-analysis, so if you are interested in seeing the results just drop me an email.

Happy New Year,

Niels
Quote:
Originally Posted by wenterodt View Post
If you want to simulate a fully developed channel flow in constant cross sections or in a periodically repeating geometry, the cyclic boundary condition for the U-field is what you need. The easiest way to prescribe a pressure drop between inlet and outlet is to use the fan-boundary condition. I.e. in constant/polyMesh/blockMeshDict use e.g.
Code:
cyclic inout
  (
    (4 7 3 0)
    (6 5 1 2)
  )
Then in 0/U
Code:
  inout
  {
    type cyclic;
    value uniform (0 0 0);
  }
In 0/p write
Code:
inout
  {
    type fan;
    patchType cyclic;
    f List<scalar> 1(-0.005); // p_OF = p_real / rho
    value uniform 0;
  }
and mind that the OpenFOAM pressure is divided by the density in incompressible flow. The pressure drop (here 0.005*rho) that is needed for a certain mean velocity can be calculated by the Poisseuille number (if available) or must be guessed and then corrected. (Yes, I know there is channelFoam, but I cannot recommand that for various reasons.)
Here the "value"-entries are only used for the first iteration (and to prevent paraFoam from crashing) and are then overwritten.
Good luck!
arvindpj is offline   Reply With Quote

Old   December 20, 2016, 16:00
Default
  #3
Senior Member
 
FlyBob91's Avatar
 
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10
FlyBob91 is on a distinguished road
Hi arvindpj,
hanks for your reply


I don't understand 3 things about your suggestion comment,

1) why he used only one name for both inlet and outlet and how they are defined. I would like to take them saparated because i have to extract the velocity profile at the outlet

2) why the velocity is null

3) and this part in the p boundary condition

Code:
f List<scalar> 1(-0.005); // p_OF = p_real / rho
FlyBob91 is offline   Reply With Quote

Old   December 20, 2016, 16:33
Default
  #4
Member
 
Arvind Jay
Join Date: Sep 2012
Posts: 96
Rep Power: 14
arvindpj is on a distinguished road
I don't understand 3 things about your suggestion comment,

1) why he used only one name for both inlet and outlet and how they are defined. I would like to take them separated because i have to extract the velocity profile at the outlet

There are inlet and outlet present. This set-up corresponds to a flow through a duct driven by a fan in the middle. inout in the previous post is the cyclic patch in the middle.

The inlet and outlet U bc's are:
Code:
 
     inlet           
    {
        type            pressureInletVelocity;
        phi             phi;
        value           uniform (0 0 0);
    }

    outlet          
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
        value           uniform (0 00 0);
    }



2) why the velocity is null

Velocity is not NULL, it's BC is cyclic. and value uniform (0 0 0); is a place holder and is overridden.

3) and this part in the p boundary condition

Code:
f List<scalar> 1(-0.005); // p_OF = p_real / rho

The f above is a list of polynomial coefficients in the pressure jump definition

delta p = f_1 + f_2 * v + f_3 * v^2 + ...

Above only f_1 is assigned, f_1 = -0.005
FlyBob91 likes this.
arvindpj is offline   Reply With Quote

Old   December 20, 2016, 17:01
Default
  #5
Senior Member
 
FlyBob91's Avatar
 
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10
FlyBob91 is on a distinguished road
Many thanks arvindpj, you are opening me a world but, unfortunately, i haven't understand yet the p boundary condition.
Is the f_1 value constant or should i calculate it? Is the condition the same for both inlet and outlet?

As i mentioned the only data i know is the inlet velocity and and the flow rate.

Sorry for my multiple questions
FlyBob91 is offline   Reply With Quote

Old   December 20, 2016, 17:06
Default
  #6
Member
 
Arvind Jay
Join Date: Sep 2012
Posts: 96
Rep Power: 14
arvindpj is on a distinguished road
Quote:
Originally Posted by FlyBob91 View Post
Many thanks arvindpj, you are opening me a world but, unfortunately, i haven't understand yet the p boundary condition.
Is the f_1 value constant or should i calculate it? Is the condition the same for both inlet and outlet?

As i mentioned the only data i know is the inlet velocity and and the flow rate.

Sorry for my multiple questions
Could you describe a little bit more about your problem? What are you trying to achieve?
arvindpj is offline   Reply With Quote

Old   December 20, 2016, 17:26
Default
  #7
Senior Member
 
FlyBob91's Avatar
 
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10
FlyBob91 is on a distinguished road
Quote:
Originally Posted by arvindpj View Post
Could you describe a little bit more about your problem? What are you trying to achieve?
Sure

As you can see, thanks to the image i liked, my problem is a simple 3D channel with the flow that followes the y-direction. The flow enters throught the inlet with a velocity of 0.42 m/s and this is the only data i know.

Now my aim is to find the outlet velocity profile with a fully developed boundary layer.
Because the length of the channel is very large, my professor suggested to me to use a periodic boundary condition to save time during the calculation. In this manner i could use a not so long channel and obtain the fully developed flow saving time.

Then i have to use the outlet velocity profile as inlet profile in a second simulation (but this is another problem).

I hope to have been clear.
Attached Images
File Type: png Channel.png (3.6 KB, 73 views)

Last edited by FlyBob91; December 20, 2016 at 18:49.
FlyBob91 is offline   Reply With Quote

Old   January 3, 2017, 11:38
Default
  #8
Senior Member
 
FlyBob91's Avatar
 
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10
FlyBob91 is on a distinguished road
Sorry for the bump
FlyBob91 is offline   Reply With Quote

Old   January 3, 2017, 11:54
Default Sorry!
  #9
Member
 
Arvind Jay
Join Date: Sep 2012
Posts: 96
Rep Power: 14
arvindpj is on a distinguished road
Quote:
Originally Posted by FlyBob91 View Post
Sorry for the bump
Opps!

In order to get a fully developed velocity profile at outlet bc, using the mapped bc would suffice.

Code:
In blockMeshDict:

 inlet
    {
        type mappedPatch;
        offsetMode      uniform;
        offset          (2 0 0);  // Plane to be mapped
        sampleRegion    region0;
        sampleMode      nearestCell;
        samplePatch     none;
        faces
        (
            (0 4 7 3)
        );
    }

In 0/U:

    inlet
    {
        type            mapped;
        field           U;
        setAverage      1;
        average         (0.1335 0 0);  // Velocity Magnitude
        interpolationScheme cell;
        value           uniform (0.1335 0 0);
    }
Attached is a sample 2D Channel Flow case with Mapped inlet. This is similar to the pitzdaily tutorial, I had mentioned in my earlier post.

Cheers,
Attached Files
File Type: zip channelFlow_wMappedInlet.zip (22.3 KB, 121 views)
FlyBob91 likes this.
arvindpj is offline   Reply With Quote

Old   January 4, 2017, 17:54
Default
  #10
Senior Member
 
FlyBob91's Avatar
 
Join Date: Mar 2016
Location: Bergamo
Posts: 157
Rep Power: 10
FlyBob91 is on a distinguished road
Many thanks arvindpj
i'll test it as soon as possible.

Best regards,
Roberto
FlyBob91 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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 07:38
Basic Nozzle-Expander Design karmavatar CFX 20 March 20, 2016 08:44
Problem in setting Boundary Condition Madhatter92 CFX 12 January 12, 2016 04:39
About periodic boundary condition. kohel_11 FLUENT 3 July 30, 2013 07:37
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00


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