|
[Sponsors] |
June 1, 2010, 16:15 |
Temperature inlet/outlet boundary conditions
|
#1 |
Senior Member
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 16 |
Hello all,
I am new to openfoam and so am just trying out a bunch of simple cases to get practice with the program. Right now I am simulating a heated plate at 400K in air at 300K to try and see what happens. I am having a problem in that before about 1 second of simulation time my entire control volume jumps up to 400K uniformly. I have attached pictures of my CV at 3 different time steps. I think the problem is in my temperature boundary condition. The way I want it is to simulate as if the heated plate was in atmosphere, so the 3 boundary conditions that aren't the heated plate would be inlets and outlets, these boundaries are the top, left and right patches on the pictures. The way I have it setup right now is that they are all zeroGradient in my 0/T file, but I know this is wrong. What other boundary condition should I use for my 0/T file for the patches that I want to act as an atmospheric inlet/outlet? Thanks a lot! |
|
June 2, 2010, 08:46 |
|
#2 |
Senior Member
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 16 |
Oh also, I am using the solver buoyantBoussinesqPisoFoam and the attached picture is a temperature plot.
Thanks |
|
June 2, 2010, 23:24 |
|
#3 |
New Member
Sunny Karnani
Join Date: Apr 2010
Posts: 22
Rep Power: 16 |
I think I ran in to a similar issue. It is the boundary conditions. By keeping the side walls at a zeroGradient, the volume will remain adiabatic.
I think the way to solve this would be to change the boundary conditions to inletOutlet or outletInlet. This way depending on the direction of the flow the boundary condition will change between zeroGradient and fixedValue. I'm still trying to figure it all out, but this might point you in the right direction. Best, Sunny |
|
June 3, 2010, 08:47 |
|
#4 |
Senior Member
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 16 |
Hi Skarnani,
Thanks for the advice, yeah I know for sure it's the boundary conditions I just don't know exact how to specify that the boundaries are suppose to be dispelling into the atmosphere. I'll give inletOutlet and outletInlet a shot (what's the difference between the two?) and let you know how that works. Thanks again. |
|
June 3, 2010, 14:01 |
|
#5 |
New Member
Sunny Karnani
Join Date: Apr 2010
Posts: 22
Rep Power: 16 |
Hi Jeff,
The OpenFOAM user guide describes the function of inletOutlet and outletInlet as the following: Switches U and p between fixedValue and zeroGradient depending on direction of U I take it to mean, the first stated function will have a fixedValue and the second zeroGradient. inletOutlet -- when functioning as an inlet, the boundary will have a fixed value; as an outlet, the boundary will have a zeroGradient. I may not be the best person to ask. I'm having troubles assigning appropriate boundary conditions for temperature, too. Sunny |
|
June 3, 2010, 14:07 |
|
#6 |
Senior Member
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 16 |
I actually was able to get it to work perfectly with inletOutlet. I will post my solution in a little while, it's actually simulating right now, I'm trying to increase my mesh size enough so that my solution converges. The only thing I had to change was my 0/U file and that all I did was change the atmospheric boundaries to:
type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); I kept all my other 0 files (including the 0/T file) exactly the same with zeroGradient as the boundary conditions to the atmosphere. The results are exactly what I wanted, upwards velocity in the centre of the heated plate, and downwards velocity near the sides to act like the air around it is boiling, just like a pot of water. It's really awesome, but again I'll post my solution and 0 files once I finish my simulation. Should be later today. Thanks for the help |
|
June 3, 2010, 20:54 |
|
#7 |
Senior Member
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 16 |
Hi,
Below are my 0/U, 0/T and 0/p files for you to take a look at. I have also attached a picture of my velocity field to show you what the results I got looked like: 0/U: dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { heatedPlate { type freestream; freestreamValue uniform (0 0 0); } leftsideatmosphere { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } rightsideatmosphere { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } topatmosphere { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } frontAndBack { type empty; } } 0/T: dimensions [0 0 0 1 0 0 0]; internalField uniform 300; //300k boundaryField { heatedPlate { type fixedValue; value uniform 400; //400K } leftsideatmosphere { type zeroGradient; } rightsideatmosphere { type zeroGradient; } topatmosphere { type zeroGradient; } frontAndBack { type empty; } } 0/p: dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { heatedPlate { type buoyantPressure; rho rhok; value uniform 0; } topatmosphere { type buoyantPressure; rho rhok; value uniform -1.138941; //-rho*g*h } leftsideatmosphere { type uniformDensityHydrostaticPressure; rho 1.161; pRefValue 101325; pRefPoint (0 0 0); value $internalField; } rightsideatmosphere { type uniformDensityHydrostaticPressure; rho 1.161; pRefValue 101325; pRefPoint (0.1 0 0); value $internalField; } frontAndBack { type empty; } } I hope these help. If you need to know anything else just let me know. -J |
|
June 3, 2010, 21:35 |
|
#8 |
New Member
Sunny Karnani
Join Date: Apr 2010
Posts: 22
Rep Power: 16 |
Thanks, I think the result looks great. Based on your advice from the posts have helped a lot. I was running into an issue where based on my boundary conditions (I used an inletOutlet when defining temperature), temperatures in my domain would fall below 200K with an exothermic chemically reacting flow.
Long story short, following your lead in defining 0/U and 0/T, looks like my problem is solved. |
|
June 3, 2010, 21:40 |
|
#9 |
New Member
Sunny Karnani
Join Date: Apr 2010
Posts: 22
Rep Power: 16 |
BTW, looking at your 0/p file, correct me if I'm wrong, but the something doesn't seem right about the dimensions. Shouldn't it be [1 -1 -2 0 0 0 0]?
|
|
June 4, 2010, 08:54 |
|
#10 |
Senior Member
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 16 |
Yeah the pressure file is in units of pressure/unit density. I'm not sure why it doses this but I've run into this before, it all depends on what type of solver you use. In this case buoyantBoussinesqPisoFoam needs p/rho, weird I know.
|
|
June 11, 2010, 03:06 |
|
#11 |
New Member
pop
Join Date: Feb 2010
Posts: 13
Rep Power: 16 |
Hi,jeff.
based on your B.C.: rightsideatmosphere { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } Inward velocity should be inletValue,i.e. zero. at right/left sides. Basically, inletOutlet is zero gradient unless the flow is inward in which case it is fixed value (inletValue). But your uploaded pic showed inward volicities occured at right/left sides, allthough which was what you hoped, it was an expected result of the imposed B.C. I think outletInlet maybe more appropriate to you , as outletInlet is zero gradient if the flow is inward and fixed value (outletValue) if the flow is outward |
|
June 11, 2010, 03:34 |
|
#12 | |
New Member
Christoph
Join Date: Apr 2010
Posts: 19
Rep Power: 16 |
Quote:
I have an interesting issue here: Using a room, wall at all sides, using a gravity acceleration of g=10m/s^s I am expecting a pressure increase of rho*g*h according to Bernoulli. My room is 5m in height, so I would expect a pressure difference of 5*10=50 m^2/s^2, but I get about 100? m^2/s^2? Plus: is there any place/necessity to specify the density of the fluid for the buoyantBoussinesqPisoFoam solver? |
||
June 11, 2010, 04:20 |
|
#13 | |
New Member
pop
Join Date: Feb 2010
Posts: 13
Rep Power: 16 |
Quote:
Governing eqns.: continuity, div(u)=0 momentum Du/Dt=-Grad(p)/rho+Div(nyu_eff*Grad(u))+beta*g*(T-T0) let P=p/rho, then rho vanish from mom-eqn. anyway,P and p are not real pressure. They are simplified by p=p_real-rho*g*h. In Rans model, 2/3K is also included in p. |
||
June 11, 2010, 04:48 |
|
#14 | |
New Member
Christoph
Join Date: Apr 2010
Posts: 19
Rep Power: 16 |
Quote:
http://www.cfd-online.com/Forums/ope...planation.html However, I have switched the turbulence model to laminar so I expect p~ to decrease hydrostatically with g*z, having no fluid flow, but it doesnt: http://www.bilder-space.de/show_img....&size=original I have set g to 10 m/s^2, the room is 5m in height, so the p~ difference should be 50 m^2/s^2, but it is around 90 instead. |
||
June 11, 2010, 10:17 |
|
#15 |
Senior Member
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 16 |
Kriz,
Can you post your 0/p file. From the looks of your plot (http://www.bilder-space.de/show_img....&size=original) it looks like you have a different boundary conditions for your pressure on the left side of your control volume than you do on the right side. Judging by the picture I'm guessing you have maybe fixedValue on the right side, and then the left side is the properly set BC. -J |
|
June 11, 2010, 22:59 |
|
#16 |
New Member
pop
Join Date: Feb 2010
Posts: 13
Rep Power: 16 |
Hi,jeff.
"value uniform -1.138941; //-rho*g*h" "rho 1.161;" Perhaps these should be : "value uniform -1.138941/1.161; //-rho*g*h" "rho 1.161/1.161;" in BuoyantBoussnesq*, the pressures are devided by rho. e.g., rhok=1-beta*dT*g, si also devided by rho. the pressrure boundaries calculated from 1.16, may cause a stronger pressure gradient, even it doesnt change the results pattern, velocities will be a bit faster. |
|
June 11, 2010, 23:49 |
|
#17 | |
New Member
pop
Join Date: Feb 2010
Posts: 13
Rep Power: 16 |
Quote:
Appropriate setting is: pd=0,or p=p_top-g*h pd=0 is a easy way |
||
June 13, 2010, 07:53 |
|
#18 | |
New Member
Christoph
Join Date: Apr 2010
Posts: 19
Rep Power: 16 |
Quote:
What is pd and where can I set it instead of p~? Or were you referring to my BC as I used it? The change the BC to p_top-g*h I will have to do some coding work - Can you tell me where the sources lie, what compiler I do need and how I do compile them? Hopefully it's possible to explain it in a short way? Up to now I was only heavily into Matlab programming and I therefore did not have to bother about compiler, where the source files lie, what the heck a makefile is? a.s.o. |
||
June 14, 2010, 00:47 |
|
#19 |
New Member
pop
Join Date: Feb 2010
Posts: 13
Rep Power: 16 |
kriz.
For buoyancy case, use buoyantPressure at all walls .At inlet, buoyantPressure seems better than zeroGradient. At outlet, zeroGradient fot velocity and specific value for pressure. If you have one outlet and the outlet perpendicular to gravity, simply specify a fixed value zero for pressure. If not,you have to specify the static pressure p in version 1.6, pd(=p-rho*h*x) in 1.5. Setting pd=0 is a easy way, I am not sure whether 1.6 supports pd. In 1.6, it seems that uniformDensityHydrostaticPressure is supposed to facilitate the transition from pd to p by specifying an equivalent to constant pd. you may try the bellow p at outlet (it works for me): { type uniformDensityHydrostaticPressure; rho 1.0; pRefValue 0; pRefPoint (lower right corner location or upper right corner location); value $internalField; } |
|
August 16, 2010, 10:09 |
|
#20 |
Senior Member
|
Thanks a lot to all of you!
Until I found this thread, the use of the inletOutlet boundary conditions was nothing more but questionmarks to me! Now at least I know the syntax and what they are supposed to do! ;-) Thanks again! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFX doesn't continue calculation... | mactech001 | CFX | 6 | November 15, 2009 22:25 |
increasing mesh quality is leading to poor convergence | tippo | CFX | 2 | May 5, 2009 11:55 |
free stream temperature (boundary conditions) | Leentje | FLUENT | 2 | October 11, 2006 09:48 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 05:15 |
Please help with flow around car modelling! | Tudor Miron | CFX | 17 | March 19, 2004 20:23 |