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

Temperature inlet/outlet boundary conditions

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

Like Tree3Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   June 1, 2010, 15:15
Default Temperature inlet/outlet boundary conditions
  #1
Senior Member
 
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 7
ozzythewise is on a distinguished road
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!
Attached Images
File Type: jpg T=0.jpg (22.7 KB, 148 views)
File Type: jpg T=0.5.jpg (66.0 KB, 194 views)
File Type: jpg T=1.jpg (14.8 KB, 130 views)
ozzythewise is offline   Reply With Quote

Old   June 2, 2010, 07:46
Default
  #2
Senior Member
 
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 7
ozzythewise is on a distinguished road
Oh also, I am using the solver buoyantBoussinesqPisoFoam and the attached picture is a temperature plot.

Thanks
ozzythewise is offline   Reply With Quote

Old   June 2, 2010, 22:24
Default
  #3
New Member
 
Sunny Karnani
Join Date: Apr 2010
Posts: 22
Rep Power: 7
skarnani is on a distinguished road
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
skarnani is offline   Reply With Quote

Old   June 3, 2010, 07:47
Default
  #4
Senior Member
 
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 7
ozzythewise is on a distinguished road
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.
ozzythewise is offline   Reply With Quote

Old   June 3, 2010, 13:01
Default
  #5
New Member
 
Sunny Karnani
Join Date: Apr 2010
Posts: 22
Rep Power: 7
skarnani is on a distinguished road
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
skarnani is offline   Reply With Quote

Old   June 3, 2010, 13:07
Default
  #6
Senior Member
 
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 7
ozzythewise is on a distinguished road
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
ozzythewise is offline   Reply With Quote

Old   June 3, 2010, 19:54
Default
  #7
Senior Member
 
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 7
ozzythewise is on a distinguished road
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
Attached Images
File Type: jpg Flow Field.jpg (44.5 KB, 352 views)
lth, Sherlock_1812 and kornickel like this.
ozzythewise is offline   Reply With Quote

Old   June 3, 2010, 20:35
Default
  #8
New Member
 
Sunny Karnani
Join Date: Apr 2010
Posts: 22
Rep Power: 7
skarnani is on a distinguished road
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.
skarnani is offline   Reply With Quote

Old   June 3, 2010, 20:40
Default
  #9
New Member
 
Sunny Karnani
Join Date: Apr 2010
Posts: 22
Rep Power: 7
skarnani is on a distinguished road
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]?
skarnani is offline   Reply With Quote

Old   June 4, 2010, 07:54
Default
  #10
Senior Member
 
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 7
ozzythewise is on a distinguished road
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.
ozzythewise is offline   Reply With Quote

Old   June 11, 2010, 02:06
Default
  #11
New Member
 
pop
Join Date: Feb 2010
Posts: 11
Rep Power: 7
poplar is on a distinguished road
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
poplar is offline   Reply With Quote

Old   June 11, 2010, 02:34
Default
  #12
New Member
 
Christoph
Join Date: Apr 2010
Posts: 19
Rep Power: 7
kriz is on a distinguished road
Quote:
Originally Posted by ozzythewise View Post
Yeah the pressure file is in units of pressure/unit density.
So when postprocessing the value p after using the buoyantBoussinesqPisoFoam solver, I get p/rho and not p?

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?
Attached Images
File Type: jpg Clipboard01.jpg (9.8 KB, 73 views)
kriz is offline   Reply With Quote

Old   June 11, 2010, 03:20
Default
  #13
New Member
 
pop
Join Date: Feb 2010
Posts: 11
Rep Power: 7
poplar is on a distinguished road
Quote:
Originally Posted by kriz View Post
Plus: is there any place/necessity to specify the density of the fluid for the buoyantBoussinesqPisoFoam solver?
Density is not required for buoyantBoussinesqPiso/SimpleFoam solver.

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.
poplar is offline   Reply With Quote

Old   June 11, 2010, 03:48
Default
  #14
New Member
 
Christoph
Join Date: Apr 2010
Posts: 19
Rep Power: 7
kriz is on a distinguished road
Quote:
Originally Posted by poplar View Post
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.
Thank you, there is also a great explanation of the solver by mchurchf I just found:
buoyantBoussinesqPisoFoam: A detailed explanation

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.
kriz is offline   Reply With Quote

Old   June 11, 2010, 09:17
Default
  #15
Senior Member
 
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 7
ozzythewise is on a distinguished road
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
ozzythewise is offline   Reply With Quote

Old   June 11, 2010, 21:59
Default
  #16
New Member
 
pop
Join Date: Feb 2010
Posts: 11
Rep Power: 7
poplar is on a distinguished road
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.
poplar is offline   Reply With Quote

Old   June 11, 2010, 22:49
Default
  #17
New Member
 
pop
Join Date: Feb 2010
Posts: 11
Rep Power: 7
poplar is on a distinguished road
Quote:
Originally Posted by kriz View Post

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.
Your right Boundary was set as a fixed pressure =0?
Appropriate setting is: pd=0,or p=p_top-g*h
pd=0 is a easy way
poplar is offline   Reply With Quote

Old   June 13, 2010, 06:53
Default
  #18
New Member
 
Christoph
Join Date: Apr 2010
Posts: 19
Rep Power: 7
kriz is on a distinguished road
Quote:
Originally Posted by poplar View Post
Your right Boundary was set as a fixed pressure =0?
Appropriate setting is: pd=0,or p=p_top-g*h
pd=0 is a easy way
Correct, I was having issues using zeroGradient, but the problem was the zeroGradient BC at the bottom and the top, where the pressure gradient is not zero - Long story short - Yes, I do have p=0 at the right side boundary, but the problem with my calculation seems to be the zeroGradient BC at top and bottom, therefore the faulty values. I changed all to buoyantPressure and now it works fine.

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.
kriz is offline   Reply With Quote

Old   June 13, 2010, 23:47
Default
  #19
New Member
 
pop
Join Date: Feb 2010
Posts: 11
Rep Power: 7
poplar is on a distinguished road
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;
}
poplar is offline   Reply With Quote

Old   August 16, 2010, 09:09
Default
  #20
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Magdeburg/Geneva
Posts: 176
Blog Entries: 1
Rep Power: 7
Linse is on a distinguished road
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!
Linse is offline   Reply With Quote

Reply

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
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 10:55
free stream temperature (boundary conditions) Leentje FLUENT 2 October 11, 2006 08:48
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15
Please help with flow around car modelling! Tudor Miron CFX 17 March 19, 2004 20:23


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