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

Appropriate pressure boundary condition in incompressible flow

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

Like Tree2Likes
  • 2 Post By wc34071209

Reply
 
LinkBack Thread Tools Display Modes
Old   October 20, 2014, 02:01
Default Appropriate pressure boundary condition in incompressible flow
  #1
New Member
 
Junshin Park
Join Date: Oct 2013
Posts: 5
Rep Power: 5
lonelywing is on a distinguished road
Dear Foamers,

I frequently account this problem and hasn't got answer for an year since I started using OpenFOAM solving incompressible external flow with pisoFoam or simpleFoam.

First is that I don't understand why do we require pressure boundary condition in solving incompressible flow except for providing reference pressure. I do understand that zeroGradient is imposed on the no-slip wall, but it is usually guaranteed naturally, isn't it?

At first I thought it was kinda 'fill in the blank' form for OpenFOAM boundary condition and does not do any special roles when solving stuff.

But when I solve external flow with stationary boundary(which means ambient flow with no flow direction specified), this pressure boundary condition bothers me a lot. Continuity error diverges, I guess pressure BC somehow 'block' the domain so that continuity is not satisfied.

I usually impose zeroGradient at the inlet, and fixedValue for the outlet or opening(where flow direction is not specified).

Someday I tried totalPressure boundary condition and it worked(solution converged). I started to wonder whether how these pressure boundary conditions work.

Is there any pressure BC update procedure inside simpleFoam or pisoFoam? If there is, then why is it required?


Second question is then what is appropriate sets of BC for external flow with no flow direction is specified?

I'd like to simulate jet entrainment when there is a strong jet impinging on the wall.

Freestream BC(which is variant of inletOutlet) seems to block (or to specify flow velocity) the flow whenever there is reversal, which is not appropriate for my case.


I would appreciate any help for this problem.


Many thanks

JP

Last edited by lonelywing; October 20, 2014 at 22:18.
lonelywing is offline   Reply With Quote

Old   October 20, 2014, 17:21
Default
  #2
Member
 
Cong
Join Date: Nov 2012
Posts: 79
Rep Power: 6
wc34071209 is on a distinguished road
Maybe try to take a look at pressueInletOutletVelocity or pressureOutletInletVelocity. i dont have much experience,but just keep mind of back flow which might help.
wc34071209 is offline   Reply With Quote

Old   October 21, 2014, 02:18
Default
  #3
Senior Member
 
Ashwani
Join Date: Sep 2013
Location: Hyderabad
Posts: 100
Rep Power: 5
AshwaniAssam is on a distinguished road
Hi,

Quote:
First is that I don't understand why do we require pressure boundary condition in solving incompressible flow except for providing reference pressure. I do understand that zeroGradient is imposed on the no-slip wall, but it is usually guaranteed naturally, isn't it?
If you see the step 4 on this wiki page and rest, the algorithm http://openfoamwiki.net/index.php/Th...hm_in_OpenFOAM , you can see how the boundary conditions is updated for pressure. Anyhow, pressure is solved through iterative scheme, so it would need boundary condition to be updated.

If you are getting reverse flow then, you can check look at pressueInletOutletVelocity or pressureOutletInletVelocity boundary condition as suggested by @Cong.

For total Presssure boundary condition, I have seen it used for Internal compressible flow problems, like nozzle.
"Setting total pressure at inlet allows you to obtain a completely developed profile in all pipe extension" , I found this statement in the post Boundary Conditions : Total Pressure or Velocity .
You can further reserach, how total pressure is leading to converge solution. Do you get correct solution with total pressure boundary conditions?

Thanks,
AshwaniAssam is offline   Reply With Quote

Old   October 21, 2014, 03:48
Default
  #4
New Member
 
Junshin Park
Join Date: Oct 2013
Posts: 5
Rep Power: 5
lonelywing is on a distinguished road
I appreciate both of the replies, @Cong, @Ashwani. It really helped me a lot.

But can I also ask the reason why the pressure BC such as zeroGradient or fixedValue is not appropriate for some cases?

pressureInletOutletVelocity boundary condition is the one that I've been looking for, but it is a velocity boundary condition and says that I have to input the value like the one on the fifth line.

type pressureInletOutletVelocity;
phi phi;
rho rho;
tangentialVelocity uniform (0 0 0);
value uniform (0 0 0);

What does this value mean? I checked out the code and it seems like it wouldn't care what the value is since refGrad() is zero vector, but I just want to make sure.

Total pressure BC sounds compressible BC for me, too. It's just that I've tried several BCs and it's the only BC that makes the solution converges. Otherwise the domain would blow up with because of continuity error, or outer iteration goes forever. Residual plot shows that residuals oscillates to a band after some thousands of iterations. (Although I don't know what this banded oscillation of residual means... Mesh qualities are decent, but I guess fine enough for the RANS computation. They are full-hexa mesh with quality examined by ICEM has no value lower than 0.45. There are few meshes with Mesh expansion factor of 22, but mostly less than 10.)

The solution I got using totalPressureBC seems 'qualitively and physically' correct, but unfortunately there's no experimental data that I can verify this.
lonelywing is offline   Reply With Quote

Old   October 21, 2014, 04:29
Default
  #5
Member
 
Cong
Join Date: Nov 2012
Posts: 79
Rep Power: 6
wc34071209 is on a distinguished road
Quote:
Originally Posted by lonelywing View Post
I appreciate both of the replies, @Cong, @Ashwani. It really helped me a lot.

But can I also ask the reason why the pressure BC such as zeroGradient or fixedValue is not appropriate for some cases?

pressureInletOutletVelocity boundary condition is the one that I've been looking for, but it is a velocity boundary condition and says that I have to input the value like the one on the fifth line.

type pressureInletOutletVelocity;
phi phi;
rho rho;
tangentialVelocity uniform (0 0 0);
value uniform (0 0 0);

What does this value mean? I checked out the code and it seems like it wouldn't care what the value is since refGrad() is zero vector, but I just want to make sure.

Total pressure BC sounds compressible BC for me, too. It's just that I've tried several BCs and it's the only BC that makes the solution converges. Otherwise the domain would blow up with because of continuity error, or outer iteration goes forever. Residual plot shows that residuals oscillates to a band after some thousands of iterations. (Although I don't know what this banded oscillation of residual means... Mesh qualities are decent, but I guess fine enough for the RANS computation. They are full-hexa mesh with quality examined by ICEM has no value lower than 0.45. There are few meshes with Mesh expansion factor of 22, but mostly less than 10.)

The solution I got using totalPressureBC seems 'qualitively and physically' correct, but unfortunately there's no experimental data that I can verify this.

According to my limited knowledge, the cases when fixedValue or zeroGradient doesn't work usually have a back flow at the openings. The pressureInletOutletVelocity along with totalPressure for p is kind of a combination of zeroVeclocity and zeroGradient, switching between each other depending on the flow direction.
wc34071209 is offline   Reply With Quote

Old   October 21, 2014, 05:22
Default
  #6
New Member
 
Junshin Park
Join Date: Oct 2013
Posts: 5
Rep Power: 5
lonelywing is on a distinguished road
Quote:
Originally Posted by wc34071209 View Post
According to my limited knowledge, the cases when fixedValue or zeroGradient doesn't work usually have a back flow at the openings.
Thanks a lot. I'll take a careful look at it inside the code.

Quote:
Originally Posted by wc34071209 View Post
The pressureInletOutletVelocity along with totalPressure for p is kind of a combination of zeroVeclocity and zeroGradient, switching between each other depending on the flow direction.
You said zeroVelocity, so does that mean backflow(flow inside the domain) is actually blocked?
lonelywing is offline   Reply With Quote

Old   October 21, 2014, 05:39
Default
  #7
Member
 
Cong
Join Date: Nov 2012
Posts: 79
Rep Power: 6
wc34071209 is on a distinguished road
Quote:
Originally Posted by lonelywing View Post
Thanks a lot. I'll take a careful look at it inside the code.



You said zeroVelocity, so does that mean backflow(flow inside the domain) is actually blocked?
It is my typing mistake. There is no b.c. called zeroVelocity.


Anyway, it treats inward flow and outward flow differently and therefore should be more stable when back flow occurs.
wc34071209 is offline   Reply With Quote

Old   October 21, 2014, 11:06
Default
  #8
Member
 
Cong
Join Date: Nov 2012
Posts: 79
Rep Power: 6
wc34071209 is on a distinguished road
I just thought a little bit and got a few statements below:

1) You cannot specify both velocity and pressure at the same side (either inlet or outlet or whatever). Put simply, if one variable is specified as a value, the other must be specified as a gradient at the same side.

2) Velocity and pressure b.c. at the outlet depends highly on what b.c. you set for velocity and pressure at the inlet.

3) If you specify velocity/flow rate at the inlet/outlet, you should specify pressure at the outlet/inlet.

4) You can specify 'totalPressure' for pressure at the inlet, and then you need to specify velocity/flow rate at the outlet. Instead of specifying velocity at the outlet, you can also in principle specify static pressure at the outlet. However, this has been said to be not so stable.

5) If you are afraid of back flow at the outlet, OpenFOAM allows you to specify b.c. like this:

a. for velocity, you set 'pressureInletOutletVelocity' and for pressure, 'totalPressure', on the condition that you know the inflow pressure. This combination treats inflow and outflow differently.

b. in case you have no idea of the inflow pressure but you DO know the inflow velocity, you can set
velocity: freestream; pressure: freestreamPressure;



Of course it is possible that I am wrong with one or perhaps all the above statements. So everybody is welcome to correct me.
esujby and mizzou like this.
wc34071209 is offline   Reply With Quote

Old   October 22, 2014, 06:56
Default
  #9
Senior Member
 
Ashwani
Join Date: Sep 2013
Location: Hyderabad
Posts: 100
Rep Power: 5
AshwaniAssam is on a distinguished road
Quote:
why the pressure BC such as zeroGradient or fixedValue is not appropriate for some cases
Unless the flow is not fully developed at outlet, using of fixed value pressure boundary condition is not numerically correct.

Last edited by AshwaniAssam; October 22, 2014 at 06:57. Reason: missed few words
AshwaniAssam is offline   Reply With Quote

Old   October 22, 2014, 22:06
Default
  #10
New Member
 
Junshin Park
Join Date: Oct 2013
Posts: 5
Rep Power: 5
lonelywing is on a distinguished road
I appreciate to both of you. I learned a lot
lonelywing is offline   Reply With Quote

Old   November 18, 2016, 10:45
Default
  #11
New Member
 
Join Date: Jun 2016
Posts: 12
Rep Power: 2
xuegy is on a distinguished road
Hi.

I'm simulating a incompressible jet flow. All I know is inlet velocity. Outlet velocity in unknown and I don't care about pressure since it's incompressible.

Now I'm using the following BCs
Inlet: U turbulentInlet P zeroGradient
Outlet: U pressureInletOutletVelocity P fixedValue
This will work in most cases. However I can still get some strange backflow in extreme conditions.

You said freestream can deal with the backflow problem. But I can't use it on outlet since I don't know the outlet velocity at all. So do you know how to apply freestream BC for my case?

Thanks.

Quote:
Originally Posted by wc34071209 View Post
I just thought a little bit and got a few statements below:

1) You cannot specify both velocity and pressure at the same side (either inlet or outlet or whatever). Put simply, if one variable is specified as a value, the other must be specified as a gradient at the same side.

2) Velocity and pressure b.c. at the outlet depends highly on what b.c. you set for velocity and pressure at the inlet.

3) If you specify velocity/flow rate at the inlet/outlet, you should specify pressure at the outlet/inlet.

4) You can specify 'totalPressure' for pressure at the inlet, and then you need to specify velocity/flow rate at the outlet. Instead of specifying velocity at the outlet, you can also in principle specify static pressure at the outlet. However, this has been said to be not so stable.

5) If you are afraid of back flow at the outlet, OpenFOAM allows you to specify b.c. like this:

a. for velocity, you set 'pressureInletOutletVelocity' and for pressure, 'totalPressure', on the condition that you know the inflow pressure. This combination treats inflow and outflow differently.

b. in case you have no idea of the inflow pressure but you DO know the inflow velocity, you can set
velocity: freestream; pressure: freestreamPressure;



Of course it is possible that I am wrong with one or perhaps all the above statements. So everybody is welcome to correct me.

Last edited by xuegy; November 22, 2016 at 00:34.
xuegy is offline   Reply With Quote

Old   November 23, 2016, 22:31
Default
  #12
New Member
 
Join Date: Jul 2014
Posts: 1
Rep Power: 0
haer is on a distinguished road
hi xuegy,

i'm working on a similar case as you with a known inlet velocity but unknown conditions at the outlet except that the outlet would be at atmospheric pressure.

have you managed to get a suitable bc for your case?

also do you think your bc below can also be applied to my case?

im new on openfoam, appreciate if you or members here could share some knowledge.

thanks!

Quote:
Originally Posted by xuegy View Post
Hi.

I'm simulating a incompressible jet flow. All I know is inlet velocity. Outlet velocity in unknown and I don't care about pressure since it's incompressible.

Now I'm using the following BCs
Inlet: U turbulentInlet P zeroGradient
Outlet: U pressureInletOutletVelocity P fixedValue
This will work in most cases. However I can still get some strange backflow in extreme conditions.

You said freestream can deal with the backflow problem. But I can't use it on outlet since I don't know the outlet velocity at all. So do you know how to apply freestream BC for my case?

Thanks.
haer is offline   Reply With Quote

Old   November 25, 2016, 03:14
Default
  #13
New Member
 
Bo Kong
Join Date: Oct 2016
Location: China
Posts: 5
Rep Power: 2
huangfei is on a distinguished road
I am also trying a similar case.
huangfei is offline   Reply With Quote

Old   November 28, 2016, 17:39
Default
  #14
New Member
 
Join Date: Jun 2016
Posts: 12
Rep Power: 2
xuegy is on a distinguished road
Hello haer,

Currently I haven't found any alternative solutions yet. I have tried so many combinations and this is the only one works properly.

Last edited by xuegy; November 29, 2016 at 16:12.
xuegy is offline   Reply With Quote

Reply

Tags
incompressible flow, pressure bc, simplefoam not converged

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time dependant pressure boundary condition yosuke1984 OpenFOAM Verification & Validation 3 May 6, 2015 06:16
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
strange flow of pressure boundary adjacent periodic condition oilsok FLUENT 2 May 26, 2012 12:51
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05
External,incompressible flow boundary condition? John Main CFD Forum 0 October 1, 2003 00:00


All times are GMT -4. The time now is 07:30.