CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Can anybody please check my boundary conditions? (

lovecraft22 July 25, 2011 14:10

Can anybody please check my boundary conditions?
1 Attachment(s)
Hi all;
I'm getting some strange results for a 2D circular cylinder run at 30 m/s, see this picture please:

Now, can anybody of you guys please check my case (attached) and tell me what I'm doing wrong?

Thank you!

srakshit July 25, 2011 16:12


I'm getting some strange results for a 2D circular cylinder run at 30 m/s, see this picture please
In your setting,the velocity inlet is at 30 m/s but the outlet is at zeroGradient. This is creating the problem in your domain. keep the velocity constant at 30 m/s.

MasterCooler July 25, 2011 17:08

Hey lovecraft22,

without having had the files opened and analysed (I am in a windows session) it reminds me of a problem I had some months ago. Then as a really new user I did the mistake to violate the rules to create blocks in blockMesh. My block was created instead of in a right-hand in a left-hand coordinate system. It was very strange that I could create the blockMesh without having problems. Also I could show it in paraView where it looked really nice and as assumed. As I didn't expect any problem I didn't execute checkMesh but started the calculation directly. And saw really strange results, inexplicable and senseless results like yours.

Therefore the question: have you performed a checkMesh run and says checkMesh that your mesh is okay?

Further I can't comprehend the hint of srakshit. I did several simulation with fixedValue for inlet velocity and zeroGradient for outlet velocity. As I know it should work if you use a zeroGradient condition for pressure at the inlet and fixedValue condition for pressure at the outlet.


srakshit July 25, 2011 17:13

Yes, I agree with MasterCooler. Out of U and p, one value should be fixed for either inlet or outlet.

lovecraft22 July 26, 2011 02:18

Thanks to both of you.

I haven't performed a check mesh, I'll surely do that.
About my boundary conditions, how would you advise to set them as?

Thank you!

Balakrshnan Ramakrishnan July 26, 2011 08:25

can you please explain why you have mentioned

frontAndBack as symmetryPlane ?

and upper and lowerWall as empty?

Are you trying to do a simulation in Z direction???:confused:

lovecraft22 July 26, 2011 13:37

I'm trying to simulate a flow in the x-y plane, so the planes parallel to this have to be empty…

Balakrshnan Ramakrishnan July 26, 2011 13:40

are you sure??

can you try with frontAndBack with empty ,

upperWall and lowerWall with symmetry?

I think it will work.. :cool:

lovecraft22 July 26, 2011 13:50

1 Attachment(s)
Actually, if you look at my blockMeshDict you'll see that frontAndBack are the planes parallel to the xz plane (red in the following picture) while upperWall and lowerWall are the planes parallel to the xy plane (yellow in the following picture).
So, I think this boundary conditions should be fine…

srakshit July 26, 2011 15:59

If your domain is 1 cell thick in z direction, then keeping the frontAndBack patch as 'empty' will reduce the computational efforts (it wont solve U for that direction). Otherwise, i dont think it will matter. About the upper and lower wall, keeping them to 'symmetry' is a better choice. I have no idea what an empty patch will do at the wall, but again those area shouldn't effect the nature of flow you are working with.

Just use the suggestions mentioned earlier for your inlet and outlet boundary.

lovecraft22 July 26, 2011 16:29

Thank you Sukanata…
I haven't quite well understood what you mean with watch you suggested about the boundary conditions…

I'd really appreciate if you could give me some more detailed informations.

Thank you!

srakshit July 26, 2011 16:55

ok...since you are doing flow past a cylinder with 30 m/s velocity. Your inlet boundary is consistent (since Velocity is initialized and pressure is kept floating).
Problem is with your outflow boundary. Both of your variables are floating (which may be the reason for waves bouncing inside the domain and velocity rising upto 900 m/s.) Initialize either pressure or velocity for the the outlet. Try using 30 m/s for velocity outlet if outlet pressure is unknown.

lovecraft22 July 27, 2011 02:21

Ok, this way thought I'll set the velocity at the outlet at 30 m/s but that's not the physical case… Am I correct?

srakshit July 27, 2011 02:51

Are you validating some experiments?

If the pressure is unknown, you should define the velocity at the boundary. Keeping both of them floating is inconsistent. Since this is a steady state analysis of flow past a cylinder, you can assume a constant velocity.

lovecraft22 July 27, 2011 03:18

Ok, I'll set them as you suggested and we'll what comes out...

Just another quick question: which boundary conditions would you set if you were running a car in a free stream?

Thank you once again!

joel.lehikoinen July 27, 2011 03:22

If you are running an incompressible simulation you can naturally fix pressure at the outlet.

srakshit July 27, 2011 03:24

For an unsteady analysis, zero gradient for both pressure and velocity will be fine. But for steady state study, its better to have a steady state boundary for both inlet and outlet.

lovecraft22 July 27, 2011 07:31

Can't I set the pressure at the outlet to be the same as the freestream static pressure?

srakshit July 30, 2011 23:12

Yes, you can try setting the outlet pressure at freeStream.

lovecraft22 August 2, 2011 13:57

2 Attachment(s)
Hi again;
I changed the boundary conditions but I'm still getting some really strange results, se the picture attached: the free stream should be coming from left to right at 30 m/s.

I've also attached my new boundary conditions.

Does anybody have a clue of what's going on here?

Thank you!

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