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

forced convection of air inside a heated rectangular channel

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 3, 2013, 09:11
Default forced convection of air inside a heated rectangular channel
  #1
Ank
Member
 
ankur
Join Date: May 2012
Location: India
Posts: 50
Rep Power: 14
Ank is on a distinguished road
Hey,

I am simulating the forced convection of air inside a heated rectangular channel. The air velocity is 1 m/s at the inlet. The temperature of the all four walls is 400 K and air is at 300 K. Initially I have taken the case of pitzdaily in simpleFoam solver and included the energy equation to incorporate the heat transfer. Then I used buoyantBoussinesqPimpleFoam solver but I am not able to get the convergence in pressure. I have given the velocity in x direction, but it does not show any velocity in that direction, instead it is showing the effect of buoyancy only, and show the circulating cells. I have tried the totalPressure, fixedPressure boundary conditions at the inlet and zeroGradient at the outlet, but no improvement.
I am using kEpsilon model with first order upwind. For testing purpose the grid is a bit coarser. I am able to run the case without energy equation successfully with the simpleFoam solver, but problem comes whenever I include the energy equation.

Please help me, it seems an easy problem but I am really stuck...


Thanks
Ankur
Ank is offline   Reply With Quote

Old   June 4, 2013, 04:23
Default
  #2
Ank
Member
 
ankur
Join Date: May 2012
Location: India
Posts: 50
Rep Power: 14
Ank is on a distinguished road
Hey

I just checked my results. The velocity vectors are showing that the velocity reaches to zero value near the outlet. It is non physical as velocity should be 1 m/s everywhere.
I am attaching the snapshot. I dont know what is happening.

Please have a look.
Attached Images
File Type: jpg U.jpg (9.9 KB, 60 views)
Ank is offline   Reply With Quote

Old   June 5, 2013, 06:31
Default
  #3
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 182
Blog Entries: 1
Rep Power: 16
Ahmed Khattab is on a distinguished road
Hi Ankur,

could you please upload case files.

thanks
Ahmed Khattab is offline   Reply With Quote

Old   June 5, 2013, 07:38
Default
  #4
Ank
Member
 
ankur
Join Date: May 2012
Location: India
Posts: 50
Rep Power: 14
Ank is on a distinguished road
Hey

I found the solution to my earlier problem, Now the problem is different and the velocity which is 1 m/s at the inlet is going above to 1.14 m/s at the outlet. I am posting the case files and snapshot.

I have made a silly mistake in the calculation of epsilon. I will get back to you once fix it. To get the pure forced convection my gravity and expansion coefficients are both zero.
Attached Images
File Type: jpg U.jpg (17.5 KB, 44 views)
Attached Files
File Type: zip 0.zip (5.0 KB, 42 views)
File Type: zip system.zip (3.7 KB, 28 views)
Ank is offline   Reply With Quote

Old   June 5, 2013, 07:50
Default
  #5
Ank
Member
 
ankur
Join Date: May 2012
Location: India
Posts: 50
Rep Power: 14
Ank is on a distinguished road
The problem remains same with correct calculations also. I am attaching more files now. The velocity is going beyond its correct value.
Attached Files
File Type: zip constant.zip (1.8 KB, 26 views)
Ank is offline   Reply With Quote

Old   June 5, 2013, 08:19
Default
  #6
Senior Member
 
n/a
Join Date: Sep 2009
Posts: 199
Rep Power: 17
deji is on a distinguished road
Perhaps you should try buoyantPressure BC for the pressure at the inlet and outlet. This is the "perturbation" pressure that you are referring to, correct?
deji is offline   Reply With Quote

Old   June 5, 2013, 08:42
Default
  #7
Ank
Member
 
ankur
Join Date: May 2012
Location: India
Posts: 50
Rep Power: 14
Ank is on a distinguished road
Hey Deji

I do not understand your reply. I have taken zero gravity so do you still think It will work?
secondly I tried it but it is diverging.
Now pressure is also converging but the velocity is going beyond its value as I posted above.

Thanks
Ank is offline   Reply With Quote

Old   June 5, 2013, 09:10
Default
  #8
Senior Member
 
T. Chourushi
Join Date: Jul 2009
Posts: 321
Blog Entries: 1
Rep Power: 18
Tushar@cfd is on a distinguished road
Quote:
Originally Posted by Ank View Post
Hey,

For testing purpose the grid is a bit coarser. I am able to run the case without energy equation successfully with the simpleFoam solver, but problem comes whenever I include the energy equation.

Thanks
Ankur

What do you mean to say by the mentioned Quote? Are you running your own solver "simpleFoam" with included energy equation in to it?
Tushar@cfd is offline   Reply With Quote

Old   June 5, 2013, 09:13
Default
  #9
Ank
Member
 
ankur
Join Date: May 2012
Location: India
Posts: 50
Rep Power: 14
Ank is on a distinguished road
Hey Tushar

Good to see your reply again..

No I am using my own solver. Sorry for the language. It meant when I shifted from simpleFoam to buoyantBoussinesqSimpleFoam. It seems to be a bit easy problem but I am getting strange velocity increment at the outlet.

And the case I have taken is with very coarse grids, dimensions 0.1 X 0.05 X 0.5 with 17000 hexa cells.
Ank is offline   Reply With Quote

Old   June 5, 2013, 09:16
Default
  #10
Senior Member
 
n/a
Join Date: Sep 2009
Posts: 199
Rep Power: 17
deji is on a distinguished road
My mistake. Since g is set to zero, that BC would be invalid.
deji is offline   Reply With Quote

Old   June 5, 2013, 09:19
Default
  #11
Senior Member
 
n/a
Join Date: Sep 2009
Posts: 199
Rep Power: 17
deji is on a distinguished road
It seems like your flow is accelerating inside the channel due to a negative pressure gradient, -dP/dx. What kind of pressure boundaries do you have at the inlet and outlet? And is this pressure the "perturbation pressure"?
deji is offline   Reply With Quote

Old   June 5, 2013, 09:22
Default
  #12
Ank
Member
 
ankur
Join Date: May 2012
Location: India
Posts: 50
Rep Power: 14
Ank is on a distinguished road
Hey Deji

Thanks for the reply..

I am using zeroGradient at the inlet and fixedvalue (uniform 0) at the outlet. I am sorry but I dont know the meaning of perturbation pressure.

Normally the simulation runs fine with these BCs when heating is not there.
Ank is offline   Reply With Quote

Old   June 5, 2013, 09:26
Default
  #13
Senior Member
 
n/a
Join Date: Sep 2009
Posts: 199
Rep Power: 17
deji is on a distinguished road
Do me a favor, look in solver and paste the pressure equation and how the pressure is solved. You are probably solving a pressure equation, I would think.
deji is offline   Reply With Quote

Old   June 5, 2013, 09:33
Default
  #14
Ank
Member
 
ankur
Join Date: May 2012
Location: India
Posts: 50
Rep Power: 14
Ank is on a distinguished road
Hey

I think I got the perturbation pressure, is it the pressure correction term in the SIMPLE algorithm?

Here is the solver


00002 volScalarField rUA("rUA", 1.0/UEqn().A());
00003 surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA));
00004
00005 U = rUA*UEqn().H();
00006 UEqn.clear();
00007
00008 phi = fvc::interpolate(U) & mesh.Sf();
00009 adjustPhi(phi, U, p_rgh);
00010
00011 surfaceScalarField buoyancyPhi = rUAf*ghf*fvc::snGrad(rhok)*mesh.magSf();
00012 phi -= buoyancyPhi;
00013
00014 for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
00015 {
00016 fvScalarMatrix p_rghEqn
00017 (
00018 fvm::laplacian(rUAf, p_rgh) == fvc::div(phi)
00019 );
00020
00021 p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
00022
00023 // retain the residual from the first iteration
00024 if (nonOrth == 0)
00025 {
00026 eqnResidual = p_rghEqn.solve().initialResidual();
00027 maxResidual = max(eqnResidual, maxResidual);
00028 }
00029 else
00030 {
00031 p_rghEqn.solve();
00032 }
00033
00034 if (nonOrth == nNonOrthCorr)
00035 {
00036 // Calculate the conservative fluxes
00037 phi -= p_rghEqn.flux();
00038
00039 // Explicitly relax pressure for momentum corrector
00040 p_rgh.relax();
00041
00042 // Correct the momentum source with the pressure gradient flux
00043 // calculated from the relaxed pressure
00044 U -= rUA*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rUAf);
00045 U.correctBoundaryConditions();
00046 }
00047 }
00048
00049 #include <finiteVolume/continuityErrs.H>
00050
00051 p = p_rgh + rhok*gh;
00052
00053 if (p_rgh.needReference())
00054 {
00055 p += dimensionedScalar
00056 (
00057 "p",
00058 p.dimensions(),
00059 pRefValue - getRefCellValue(p, pRefCell)
00060 );
00061 p_rgh = p - rhok*gh;
00062 }
00063 }
Ank is offline   Reply With Quote

Old   June 6, 2013, 01:02
Default
  #15
Senior Member
 
T. Chourushi
Join Date: Jul 2009
Posts: 321
Blog Entries: 1
Rep Power: 18
Tushar@cfd is on a distinguished road
Hello Ank,

Since, Boussinesq approximation is used for the pressure, as you are using buoyantBoussinesqSimpleFoam. So, you need to provide the BC for p_rgh something like this....

{
type buoyantPressure;
rho rhok;
value uniform 0;
}

see the tutorial on heatTransfer/buoyantBoussinesqSimpleFoam/ you will get an idea.
Tushar@cfd is offline   Reply With Quote

Old   June 6, 2013, 02:42
Default
  #16
Ank
Member
 
ankur
Join Date: May 2012
Location: India
Posts: 50
Rep Power: 14
Ank is on a distinguished road
Hey Tushar

I tried that also, but it didnt work. Another thing is that its totally forced convection and my gravity is also zero so buoyant does not mean anything here as I have understood. I do not know what else can go wrong in this simple problem.

I will try more things now, lets see how it goes. You can also think what else can be wrong.

Thanks
Ank is offline   Reply With Quote

Old   June 6, 2013, 02:54
Default
  #17
Senior Member
 
T. Chourushi
Join Date: Jul 2009
Posts: 321
Blog Entries: 1
Rep Power: 18
Tushar@cfd is on a distinguished road
Hello,

I mean to say by putting the mentioned BC for "p_rgh" and setting g=0, your case will be of forced convection only (i.e., independent of buoyancy).
I have a doubt with pressure "p" BC. Try setting the BC for Outlet & inlet.
Check:
If you are not getting solution.
Also check:
Are you getting convergence?
Tushar@cfd is offline   Reply With Quote

Old   June 6, 2013, 03:19
Default
  #18
Ank
Member
 
ankur
Join Date: May 2012
Location: India
Posts: 50
Rep Power: 14
Ank is on a distinguished road
I am posting my p_rgh and U files, kindly suggest me what I should change,

P_rgh
dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;

}
pipe
{
type zeroGradient;


}

outlet
{
type fixedValue;

value uniform 0;

}

wall
{
type zeroGradient;
}



U

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{

inlet
{
type fixedValue;

value uniform (1 0 0);
}

pipe
{
type fixedValue;
value uniform (0 0 0);
}

outlet
{
type zeroGradient;


}

wall
{
type fixedValue;
value uniform (0 0 0);
}

I have tried changinp_rgh to buoyantPressure it was not converging.
Ank is offline   Reply With Quote

Old   June 6, 2013, 03:25
Default
  #19
Senior Member
 
T. Chourushi
Join Date: Jul 2009
Posts: 321
Blog Entries: 1
Rep Power: 18
Tushar@cfd is on a distinguished road
Check my earlier post for "p" BC...
Tushar@cfd is offline   Reply With Quote

Old   June 6, 2013, 03:45
Default
  #20
Ank
Member
 
ankur
Join Date: May 2012
Location: India
Posts: 50
Rep Power: 14
Ank is on a distinguished road
I changed the p_rgh to buoyantPressure and p file to zeroGradient at the inlet and fixedValue at the outlet.

It is showing this error



--> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux : 0.000771162
Specified mass inflow : 0.005
Specified mass outflow : 0
Adjustable mass outflow : 2.34371e-110


From function adjustPhi(surfaceScalarField& phi, const volVectorField& U,const volScalarField& p
in file cfdTools/general/adjustPhi/adjustPhi.C at line 118.

FOAM exiting
Ank is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
air bubble is disappear increasing time using vof xujjun CFX 9 June 9, 2009 08:59
Creating a grid for a channel inside a brick sanin FLUENT 0 November 6, 2008 09:03
how to estimage air speed with natural convection? Pei-Ying Hsieh Main CFD Forum 2 May 1, 2008 16:29
Modelling the Heat flow inside the curing oven Marios Vlad CFX 1 February 6, 2008 08:11
CFX-5.5 simulating air free convection Dustin Lee CFX 0 April 16, 2003 03:54


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