CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Questions about the inletOutlet and outletInlet boundary conditions (https://www.cfd-online.com/Forums/openfoam-solving/60337-questions-about-inletoutlet-outletinlet-boundary-conditions.html)

brooksmoses February 1, 2006 02:38

I'm working on a rather simple
 
I'm working on a rather simple calculation -- a polar-mesh simulation of flow around a cylinder. On the outer boundary, I want to use a boundary condition that specifies the velocity if it's an inflow, and the pressure if it's an outflow. Page U-148 of the user manual makes it pretty clear that I can do this with the inletOutlet (and possibly the outletInlet) boundary conditions, but beyond that I'm confused.

The first source of my confusion is thus: the inletOutlet boundary condition for the velocity requires two values: "value" and "inletValue". However, I can't see why it would need more than one: it needs the inlet velocity for when it's doing fixedValue on the inlet regions, and doesn't need anything to do zeroGradient on the outlet regions. Thus, my confusion: do I set "value" or "inletValue" to this desired inlet velocity? What do I set the other one to?

The second source of my confusion is that I am uncertain which of the boundary conditions I should use for the pressure. Are they coupled such that I'm expected to use the same one for both U and p, or do I use outletInlet for the pressure since I want it specified at the outlet? And, again, which of "value" or "outletValue" should contain my desired outlet pressure, and what should the other one contain?

Finally: Is this explained in the manual anywhere? What did I miss when I was looking for it?

Thanks much!

brooksmoses February 1, 2006 04:30

Actually, now that I've poked
 
Actually, now that I've poked around at this a bit more, I think I've figured most of it out:

* I should use inletOutlet for the velocity, and outletInlet for the pressure.

* The "inletValue" and "outletValue" values are what I should put my desired constraints in.

* The "value" values are where OpenFOAM will put the actual boundary values (which may or may not match the constraints) in the files for the later timesteps.

Is this correct?

Also, I'd still like to know if this is explained anywhere in the manual, so that I'll know where to look when I have a similar question.

lr103476 February 1, 2006 04:59

I am very interested at the re
 
I am very interested at the results of your cylinder flow. Which Reynolds number are you using? I simulated static cylinders at Re=150, which resulted in certain 'strange' results. Check my thread:

http://www.cfd-online.com/OpenFOAM_D...tml?1138207958

Please post your results.....
Frank

brooksmoses February 1, 2006 14:45

I saw that thread, yes. I'm d
 
I saw that thread, yes. I'm doing steady flow, so my Reynolds numbers are in the range of 10 to 30 or so.

I will indeed post a new thread once I get some results -- right now, I'm still having some convergence problems (due to starting out on a very fine mesh, rather than solving on a coarse mesh and then interpolating the results as an initial condition for the fine mesh).

vaina74 July 2, 2010 05:27

Hi, brooksmoses. I'm also confused about inletOutlet and outletInlet boundary conditions. I'm involved in external flows simulations and I need them becouse I can't always know a priori inlet or outlet faces. I agree with the meaning of inletValue, but what about value? You wrote this thread in 2006, maybe you know about that now ;-)

mcamps September 27, 2010 04:33

The value entry is the actual value of the field at the boundary.

At time 0 it is the initial value of the boundary condition. At the first iteration OpenFoam doesn't know if the boundary is an inlet or an outlet, so it needs some initial value to start the simulation.

vaina74 September 27, 2010 04:53

thanks, marta. a light in the darkness :-)

Fransje September 27, 2010 18:14

Ok.

Let's try to explain inflowOutflot and outflowInflow simply. Let's consider the following code:
Code:

U:
outlet
{
    type inletOutlet;
    inletValue uniform (-2 0 0);
    value (0 0 0);
}

With this boundary condition, we have that:
  • If the velocity vector at the outlet points out of the domain, then the boundary condition will be of the Neumann type, ie, zeroGradient.
  • If the velocity vector points into the domain, then we can imagine that the outflow is no longer an outflow, but an inflow, and that we therefore would like to specify a Dirichlet boundary condition, ie, with constant value. In our case the boundary condition would take the value (-2 0 0), ie, Ux = -2, Uy = 0, Uz = 0.
From what I've read, the value (0 0 0) option is a dummy option needed for paraFoam/paraview and should not further be considered. Please correct me if I'm wrong.

Similarly, if, for some reason, we were to specify:
Code:

k:
outlet
{
    type outletInlet;
    outletValue uniform 5;
    value 0;
}

we would have that
  • If the velocity vector at the outlet was to point out of the domain, then the boundary condition would be of the Dirichlet type, with value 5.
  • If the velocity vector at the outlet was to point into the domain, then the outflow conditions would switch from fixedValue to zeroGradient, and become a Neumann boundary condition.

I hope this was helpful!

vaina74 September 28, 2010 08:13

Another light in the darkness :-)
I notice that everyone has a different theory about the value parameter. The only common thing is its probably irrelevant 'initial value'.
I was interested in this boundary condition becouse I'm involved with external flows, inside spherical or similar domains. So i have a single external boundary - with no inlet or outlet patches - and use so far
Code:

boundaries
    {
        type            inletOutlet;
        inletValue  $internalField;
        value          $internalField;
    }

If I'm wrong, tell me.
Anyway, thanks for your help.

jamessbriscoe November 19, 2010 14:59

Undefined inletValue error
 
Hello everyone,

I'm using the inletOutlet boundary condition to model a bubble collapse problem. I have specified both the inletValue and value keywords for all boundaries, but for some reason OpenFOAM gives me an error that inletValue is undefined.

Any assistance would be greatly appreciated. Below you can see my 0/U file. I set the initial values to correspond to an outlet, and specified inletValues which point towards the center of the domain:

boundaryField
{
inletOutletTop
{
type inletOutlet
inletValue uniform (0 -1 0);
value uniform (0 1 0);
}
inletOutletBottom
{
type inletOutlet;
inletValue uniform (0 1 0);
value uniform (0 -1 0);
}
inletOutletLeft
{
type inletOutlet;
inletValue uniform (1 0 0);
value uniform (-1 0 0);
}
inletOutletRight
{
type inletOutlet;
inletValue uniform (-1 0 0);
value uniform (1 0 0);
}
frontAndBack
{
type empty;
}
}

jamessbriscoe November 19, 2010 15:14

Sorry ignore previous post
 
Sorry everyone, somehow stared at that forever and didn't notice a missing semicolon.

Love looking like an idiot...

Ahmed Khattab March 4, 2012 14:30

how is value evaluated at outlet in case of neumann?
 
Quote:

Originally Posted by Fransje (Post 276840)
Ok.

Let's try to explain inflowOutflot and outflowInflow simply. Let's consider the following code:
Code:

U:
outlet
{
    type inletOutlet;
    inletValue uniform (-2 0 0);
    value (0 0 0);
}

With this boundary condition, we have that:
  • If the velocity vector at the outlet points out of the domain, then the boundary condition will be of the Neumann type, ie, zeroGradient.
  • If the velocity vector points into the domain, then we can imagine that the outflow is no longer an outflow, but an inflow, and that we therefore would like to specify a Dirichlet boundary condition, ie, with constant value. In our case the boundary condition would take the value (-2 0 0), ie, Ux = -2, Uy = 0, Uz = 0.
From what I've read, the value (0 0 0) option is a dummy option needed for paraFoam/paraview and should not further be considered. Please correct me if I'm wrong.

Similarly, if, for some reason, we were to specify:
Code:

k:
outlet
{
    type outletInlet;
    outletValue uniform 5;
    value 0;
}

we would have that
  • If the velocity vector at the outlet was to point out of the domain, then the boundary condition would be of the Dirichlet type, with value 5.
  • If the velocity vector at the outlet was to point into the domain, then the outflow conditions would switch from fixedValue to zeroGradient, and become a Neumann boundary condition.

I hope this was helpful!

how is value evaluated at outlet in case of neumann?, and what is the gradient in this case?

iamed18 May 16, 2012 11:57

Moving a Wall Through Air
 
Hey All,

I have a problem along these same lines, and I just want to make sure that my boundary conditions make sense before I move to my next step. The goal of my simulation is to have the moving wall "move" through open atmosphere (i.e. take the three walls out of the cavity tutorial in favor of inlets/outlets).

So what I did, after reading through these posts, was set the following.

U:
Code:

internalField  uniform (0 0 0);

boundaryField
{
    movingWall
    {
        type            fixedValue;
        value          uniform (10 0 0);
    }

    atmosphere
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
        value          (0 0 0);
    }

    frontAndBack
    {
        type            empty;
    }
}

p:
Code:

internalField  uniform 0;

boundaryField
{
    movingWall
    {
        type            zeroGradient;
    }

    atmosphere
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value          0;
    }

    frontAndBack
    {
        type            empty;
    }
}

icoFoam runs, and when I visualize the velocity field with ParaView, I get the following:
http://i.imgur.com/fDvuz.png

It appears as though the boundary on the left is working more/less correctly, but the boundary on the right almost looks to be acting more like a wall than anything else.

I'd love to hear feedback about this. In the meantime, I'm going to mess around with it a little more.

Thanks!

iamed18 May 17, 2012 09:06

Figured that Out
 
Alas, it has been resolved. I was able to simulate the wall moving through air with the following:

U:
Code:

boundaryField
{
    movingWall
    {
        type            fixedValue;
        value          uniform (10 0 0);
    }

    leftWall
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }

    rightWall
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }

    bottomWall
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }

    frontAndBack
    {
        type            empty;
    }
}

p:
Code:

boundaryField
{
    movingWall
    {
        type            zeroGradient;
    }

    rightWall
    {
        type            fixedValue;
        value          uniform 0;
    }

    leftWall
    {
        type            fixedValue;
        value          uniform 0;
    }

    bottomWall
    {
        type            fixedValue;
        value          uniform 0;
    }

    frontAndBack
    {
        type            empty;
    }
}

Hope this helps someone else!

vonboett March 20, 2013 05:23

totalPressure for p at left / right / bottom wall would probably work well, too

JAY ADHVARYU August 25, 2013 09:11

I have some problem with my boundary condition that how i utilize the neumann condition(∂φ/∂x = 0) at outlet. Can i select pressure outlet at outlet?
my inlet condition is :
flat velocity profile =40m/s
Re=1.916*10^5
turbulent intensity=4.5%
And Inlet height of duct=5mm


I select velocity inlet at inlet because my flow is incompresible.
And axis boundary condition applied along the centerline.
and no slip condition at wall.

pls help me.

openfoammaofnepo October 4, 2013 10:42

Hi All,

It is very interesting about this kind of boundary condition. For inletOutlet, in most cases, if the flux is pointed into the flow domain, then this corresponds to the reverse flow. For this situation, Openfoam will ask us to input the inletValue, however, how can we the velocity when the flow direction is into the domain? In other words, how to specify the inletValue for it?

Any comments? Thank you so much!

Quote:

Originally Posted by rebel ahmed (Post 347585)
how is value evaluated at outlet in case of neumann?, and what is the gradient in this case?


JAY ADHVARYU October 4, 2013 12:56

Generally Neumann condition or Drichlate condition at outlet or inlet improve the stability of your result that conditions specify the behaviour of the flow and thats so tricky in my case i used neumann condition at outlet as(∂φ/∂x = 0) where φ=U,V but how it useful in openform that i don't know because i use Fluent & CFX.

viraj20feb June 1, 2016 02:00

Boundary Conditions Maths
 
Hello,

Can anyone share any material describing the Maths behind different boundary conditions in OpenFOAM?
Thanks

KateEisenhower September 13, 2016 06:16

Hello Edward,

this problem sounds quite interesting. But I don't know exactly what you try to simulate. For example, where is the moving wall in the vector plot you posted? And where has the atmosphere BC gone in your second post?

I hope you can remember after 4 years...


Best regards,

Kate

Quote:

Originally Posted by iamed18 (Post 361661)
Alas, it has been resolved. I was able to simulate the wall moving through air with the following:

U:
Code:

boundaryField
{
    movingWall
    {
        type            fixedValue;
        value          uniform (10 0 0);
    }

    leftWall
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }

    rightWall
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }

    bottomWall
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }

    frontAndBack
    {
        type            empty;
    }
}

p:
Code:

boundaryField
{
    movingWall
    {
        type            zeroGradient;
    }

    rightWall
    {
        type            fixedValue;
        value          uniform 0;
    }

    leftWall
    {
        type            fixedValue;
        value          uniform 0;
    }

    bottomWall
    {
        type            fixedValue;
        value          uniform 0;
    }

    frontAndBack
    {
        type            empty;
    }
}

Hope this helps someone else!



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