CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Boundary condition for natural convection (http://www.cfd-online.com/Forums/openfoam/105242-boundary-condition-natural-convection.html)

Ank July 26, 2012 01:28

Boundary condition for natural convection
 
Hey

I am new to openfoam, I want to simulate some tubes inside a cylinder having steam, air is entering from bottom of the cylinder and leaving from the top due to buoyancy. I am using the zeroGradient BC for the inlet(bottom) and the outlet(top). But the solution is diverging, can anybody help me what boundary condition should i give for pressure and velocity in this case.

Thank you

Bernhard July 26, 2012 01:36

What boundary condition did you give? Which solver do you use? What is diverging exactly? Please provide more information, because there are so many option. If I remember correctly, for p_rgh you have a buoyantPressure bc that may suit your needs.

Ank July 26, 2012 02:13

I have used buoyantBoussinesqPisoFoam with Quick scheme, actually I have used uniform 0 for pressure at the inlet and the outlet, zeroGradient for velocity at the inlet and the outlet. After that the courant number is going very high, final residual for pressure is also very high after 3rd iteration only, hence the solution is getting diverged.I am having openfoam 1.6

niaz July 26, 2012 16:21

you trap pressure in your field so it is normal to diverge.
and zero gradient for both side is not good idea.
can you show your test case clearly?

Ank July 27, 2012 00:09

hey thanks for the reply people,

My case is to do simulation of one cylinder having some 20 tubes inside, so I am simulating a quarter of the cylinder having 5 tubes. Steam is flowing from top to bottom at 413 K inside the tubes, and cylinder is open from both the side so that there can be a natural flow of air due to buoyancy.

Thanks..

niaz July 27, 2012 03:00

Dear Ank
1- zeroGradient affects the solution of test cases. is your top and bottom limited?
I mean " can you increase the length of the main cylinder?"
2- change one of your pressure to zeroGradient.
tell me: does it work properly?

Ank July 27, 2012 04:01

Hey Niaz

Thank you for the reply, I did what you said to me but it is stil now working, I will try some other BC as well..if you know some other Bc then please let me know

niaz July 27, 2012 04:36

add these lines to your controldict
adjustTimeStep yes;

maxCo 0.2;
you may use a big times step. it helps to control courant number. and tiemstep.
try and tell me what is the result.

Ank July 27, 2012 05:00

I did it, but courant number has already gone to 4, after 4 iterations...so again there is no result. I dont know what is the problem with the pressure..it is fluctuating now..I will let you know if it gets stable..thanks..

Bernhard July 27, 2012 05:03

Did you try decreasing your initial time-step? Please post a log-file, it will contains a lot of information.

Ank July 27, 2012 05:16

1 Attachment(s)
I am using 1e-06 as initial time step, I am posting my case files, please have a look at it..solution has diverged again.

ternik July 27, 2012 06:38

Quote:

Originally Posted by Ank (Post 373604)
Hey

I am new to openfoam, I want to simulate some tubes inside a cylinder having steam, air is entering from bottom of the cylinder and leaving from the top due to buoyancy. I am using the zeroGradient BC for the inlet(bottom) and the outlet(top). But the solution is diverging, can anybody help me what boundary condition should i give for pressure and velocity in this case.

Thank you

Dear all,

I am having some difficulties with the natural convection as well;details were posted here:

http://www.cfd-online.com/Forums/ope...implefoam.html

After quite some time spent I have concluded that the problem might be with the boundary conditions for p and p_rgh (zero velocity and zero gradient/constant temperature on solid walls are pretty straightforward).

It is true that I have found some (similar) posts regarding the natural convection problem, but no final (and validated) results are available.

Is there someone that can give me usefull hints how to set the correct pressure boundary conditions (not only from numerical but from physical point of veiw as well)?!

Best,
Primoz

niaz July 27, 2012 09:46

Quote:

Originally Posted by Ank (Post 373884)
I am using 1e-06 as initial time step, I am posting my case files, please have a look at it..solution has diverged again.

Dear Ank
at first, change your pressure BC. it is not correct to use uniform 0 for inlet and outlet. this BC means that no flow can in or out and it forces to circulate in the tube.
secondly, I think courant control is not work in of1.6 which you used

Ank July 28, 2012 07:59

Hey Niaz

I tried other BCs as well, but didnt work out. Can you suggest me some specific BC for this kind of case, which you have used?
Thanks

niaz July 28, 2012 14:33

Dear Ank
are you check that your case is not turbulent?

Ank July 30, 2012 00:40

Hey Niaz,
If the flow is turbulent then what difference does it make to the boundary conditions?

niaz July 30, 2012 04:26

dear ank
firstly, you have a problem in convergency of your problem.
it can affect the solution.


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