Appropriate pressure boundary condition in incompressible flow
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 |
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.
|
Hi,
Quote:
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 http://www.cfd-online.com/Forums/ope...-velocity.html . You can further reserach, how total pressure is leading to converge solution. Do you get correct solution with total pressure boundary conditions? Thanks, |
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. |
Quote:
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. |
Quote:
Quote:
|
Quote:
Anyway, it treats inward flow and outward flow differently and therefore should be more stable when back flow occurs. |
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. |
Quote:
|
I appreciate to both of you. I learned a lot :D
|
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:
|
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:
|
I am also trying a similar case.
|
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. |
flow rate at inlet and outlet
Hello friends,,
I am using Openfoam-2.3.1, mass flow rate at inlet and outlet differs by 0.2 kg/s. But it should be same, I am not getting what could be the reason for that difference. Please can anybody tell me what's the reason. I am using 2 cases. one with inlet p totalPressure, U pressureInletOutletVelocity outlet p atmospheric pressure value U inletOutlet and the 2nd case inlet p zeroGradient , U flowRateInletVelocity outlet p atmospheric pressure value U inletOutlet Thanking you |
Quote:
|
Why do you want it? use pressureInletOutletVelocity with zeroGradient does the same!
|
Thanks for your answer Ardali. I am using it already. I was just curious about the other one mentioned pressureOutletInletVelocity. Does it exist at all? If not, some edition will be great to avoid confusion.
|
No, they merged them together!
|
Quote:
Inlet U .. freestream P .. zeroGradient Outlet U .. zeroGradient P .. freestreamPressure Please correct me if I am wrong. Thanks. |
All times are GMT -4. The time now is 19:51. |