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

buoyantBoussinesqPisoFoam: A detailed explanation

Register Blogs Community New Posts Updated Threads Search

Like Tree10Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 2, 2010, 05:46
Default
  #21
New Member
 
Nabil
Join Date: Dec 2009
Posts: 7
Rep Power: 17
vilop6 is on a distinguished road
hi all

Thanks Mr mchurchf for the great work

i m new in openfoam i tried to use boussinesqBuoyantFoam with TransportProperties,
the solver is wrote by hjasak
first when i tried to compile this solver i got some dimension problems, so i made some changes ,the prog work but it dont converge (program aborted in less than 1s)

this is what i got

look at attached files

-> reponse.txt
-> boussinesq_1 : the solver
-> cdc_buoyantSimpleFoam ; my case solved with buoyantSimpleFoam
-> cdc : case i trie to solve

the changes i made : i multiply some euations by rho0 to adjust dimensions


best regards and thank you for your help



reponse.zip

cdc_buoyantSimpleFoam.zip

cdc.zip

boussinesq_1.zip
vilop6 is offline   Reply With Quote

Old   February 3, 2010, 02:14
Default
  #22
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17
panda60 is on a distinguished road
Dear all, I have strugling for using buoyantBoussinesqSimpleFoam for nearly half a month ,but don't have result. I am now doubt that if buoyantBoussinesqSimpleFoam is correct.

Now I describe my model in detail.
I have a rectangular domain, and a building was located in the domain.
wind come from inlet to outlet. the ground temperature is 318K, the air temperature is about 290K. the side and top domian I use symmetry boundary.

It seems that pressure doundary condition is very important when using buoyant solver. Then I try nearly all kinds of boundary condition for p. But all the result is not right. I am nearly crazy.

This is my model :

the following is my result:
Attached Images
File Type: jpg model.jpg (81.8 KB, 113 views)
File Type: jpg 1.jpg (42.8 KB, 111 views)
File Type: jpg 2.jpg (36.2 KB, 89 views)
File Type: jpg 3.jpg (42.1 KB, 87 views)
panda60 is offline   Reply With Quote

Old   February 3, 2010, 02:32
Default
  #23
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17
panda60 is on a distinguished road
1.The first result I get with the following pressure condition:
BUILDING
{
type zeroGradient;
}
INLET
{
type zeroGradient;
}
OUTLET
{
type fixedValue;
value uniform 0;
}
SYM_LEFT
{
type symmetryPlane;
}
SYM_RIGHT
{
type symmetryPlane;
}
SYM_TOP
{
type symmetryPlane;
}
GROUND
{
type zeroGradient;
}
GAS_INLET
{
type zeroGradient;
}

the iteration have going for more than 10000 steps,
I think ,for kEpsilon model it doesn't need so many iterations.

2.The second result I get with the buoyantPressure and totalPressure condition:
boundaryField
{
INLET
{
type buoyantPressure;
rho rhok;
value uniform 0;
}
OUTLET
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho rhok;
psi none;
gamma 1;
value uniform 0;
}
SYM_LEFT
{
type symmetryPlane;
}
SYM_RIGHT
{
type symmetryPlane;
}
SYM_TOP
{
type symmetryPlane;
}
GROUND
{
type buoyantPressure;
rho rhok;
value uniform 0;
}
BUILDING
{
type buoyantPressure;
rho rhok;
value uniform 0;
}
GAS_INLET
{
type buoyantPressure;
rho rhok;
value uniform 0;
}

3.The third result I get with the buoyantPressure for outlet:
boundaryField
{
INLET
{
type buoyantPressure;
rho rhok;
value uniform 0;
}
OUTLET
{
type buoyantPressure;
rho rhok;
value uniform 0;
}
SYM_LEFT
{
type symmetryPlane;
}
SYM_RIGHT
{
type symmetryPlane;
}
SYM_TOP
{
type symmetryPlane;
}
GROUND
{
type buoyantPressure;
rho rhok;
value uniform 0;
}
BUILDING
{
type buoyantPressure;
rho rhok;
value uniform 0;
}
GAS_INLET
{
type buoyantPressure;
rho rhok;
value uniform 0;
}
}

you could see, all the result is not right.
I was blamed by professor, why so easy problem you use so long time and can't get result.
Yes, It indeed an normal and easy problem when using Fluent. I don't know why it is so difficult to solve when using OpenFOAM .

Because I am already struggling this for a long time. Could anyone give me some help ?
what I should pay attation to when using buoyantBoussinesqFoam ?

what the exact meaning of buoyantPressure ? If it can be used for outlet ?
Thank you very much.
panda60 is offline   Reply With Quote

Old   February 3, 2010, 03:00
Default
  #24
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17
panda60 is on a distinguished road
My inlet condition for U, k, epsilon and T was get from experiment, and I check ,no problem. I use upwind scheme for all the advection term.

and I think alphat file is ued for compressible flow. So for boussinesq flow it is not needed. Am I right ?

I think if some experts like Thomas Baumann , can come here give some suggestions , that would be excited.
panda60 is offline   Reply With Quote

Old   February 3, 2010, 03:35
Default
  #25
Member
 
Join Date: Nov 2009
Posts: 36
Rep Power: 17
stawrogin is on a distinguished road
Dear Jiang,

did you also try a unsteady calculation (e.g. using Piso)? From my experience:
If buoyancy effects really become dominant in the flow ,the flow pattern becomes inherently transient. I think it is the same for bouyantBoussinesq and the bouyant solvers using the state equations. Maybe you can try to your cases with these solvers as well (using ideal gas instead of Boussinesq approach).

Maybe this helps.
Stawrogin
stawrogin is offline   Reply With Quote

Old   February 3, 2010, 13:20
Default
  #26
New Member
 
Scott Haynes
Join Date: May 2009
Posts: 10
Rep Power: 17
scotth2o is on a distinguished road
Jiang,

I think your third pressure file should work. Note that if you are using buoyantBoussinesqPisoFoam you need to set a reference temperature in transportProperties. It's easy enough to make this quantity into a field quantity by editing the solver and recompiling. The difference between the temperature and the reference temperature can send a fluid blobs racing toward the top of the model and make the whole thing crash. In my experience there is too much variation in temperature over the scale of the PBL to just use a scalar quantity. This is why I typically use a Tref field or buoyantPisoFoam (even though it's for compressible flows).

I am interested in your temperature and U BC files. is your model heating up or cooling down? At the moment I'd just switch the model to laminar and focus on the basics.

Good Luck

Scott
scotth2o is offline   Reply With Quote

Old   February 3, 2010, 13:39
Default
  #27
Member
 
Matthew J. Churchfield
Join Date: Nov 2009
Location: Boulder, Colorado, USA
Posts: 49
Rep Power: 19
mchurchf is on a distinguished road
Scott,

Can you clarify what you mean by using a Tref field? Do you mean that you set Tref not at just one point, but everywhere? In that way you can set the Tref field to be stratified?

If I understand correctly, if you set Tref to be stratified and initialize T to have the same stratification, then rho_k = 1 everywhere initially, correct?

Thanks,

Matt
mchurchf is offline   Reply With Quote

Old   February 3, 2010, 14:49
Default
  #28
New Member
 
Scott Haynes
Join Date: May 2009
Posts: 10
Rep Power: 17
scotth2o is on a distinguished road
That's exactly right, rhok would be zero initially but over time it won't be as blobs are displaced vertically (in this case by a building but also by terrain or turbulence) and advected to areas with a different Tref.

In the real atmosphere you get lots of buoyancy waves on a mesoscale due to stratification. I'm not convinced these things are dominate at the microscale (~100m) but they are present. My feeling is that when you turn on the turbulence a lot of these small scale wave features go away becasue TKE is larger in magnitude but I could be wrong.

Note, while I'm tossing the idea out here I haven't had a lot of luck with this modified solver. More luck than assuming a scalar Tref but I typically use buoyantPisoFoam for the atmospheric PBL. When I first started doing this I had concerns about using a compressible flow solver but from everything I've read I see no reason it won't work. I'd be interested in the groups thoughts regarding this subject (but lets not hijack this thread).

Scott
scotth2o is offline   Reply With Quote

Old   February 4, 2010, 01:10
Default
  #29
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17
panda60 is on a distinguished road
Dear stawrogin and scotth2o,
Thank you very much.
my inlet condition was got from experiment data, include U, T, k, epsilon.
The ground temperature is about 318K. The air temperature near ground is 295K. the air temperature in top is 282K. All these are from experiment. So in my model the air is a little heat up.
So the temperature differences is not large, dt=295-282=13K. I think this flow is dominanted by inlet velocity, not by buoyancy. The flow field only has buoyancy effect. so BuoyantBoussinesq is better than Buoyant buoyant solver.I have used field vararble TRef, but result not change so much.

This is my velocity boundary field. I use potentialFoam to initialize my velocity, and use experiment profile as inlet condition.

U
OUTLET
{
type zeroGradient;
}
SYM_LEFT
{
type symmetryPlane;
}
SYM_RIGHT
{
type symmetryPlane;
}
SYM_TOP
{
type symmetryPlane;
}
GROUND
{
type fixedValue;
value uniform (0 0 0);
}
BUILDING
{
type fixedValue;
value uniform (0 0 0);
}
GAS_INLET
{
type fixedValue;
value uniform (0 0 0.467);
}

This is my temperature file:

T
OUTLET
{
type zeroGradient;
}
SYM_LEFT
{
type symmetryPlane;
}
SYM_RIGHT
{
type symmetryPlane;
}
SYM_TOP
{
type symmetryPlane;
}
GROUND
{
type fixedValue;
value uniform 318.3;
}
BUILDING
{
type groovyBC;
valueExpression "509.51*pow(pos().z,4)-9.3428*pow(pos().z,3)+128.44*pow(pos().z,2)-51.296*pos().z +44.264+273.15";

}
GAS_INLET
{
type fixedValue;
value uniform 303.4;
}

Now I have been convinced that buoyantPressure is better for p outlet condition, because this result all the things are better, except that in the corner of the domain will have minus velocity after several steps, and then this minus velocity begin an instability to the whole field.Why this would happen ?

This is my picture for 200 steps. I think if there is not minus velocity in the domain corner, this result would be very good.
Attached Images
File Type: jpg T.jpg (65.9 KB, 67 views)
File Type: jpg buoyantO-ul.jpg (40.6 KB, 64 views)
File Type: jpg buoyantO-ur.jpg (30.2 KB, 69 views)
File Type: jpg buoyantO-centeru.jpg (40.3 KB, 88 views)

Last edited by panda60; February 4, 2010 at 03:28.
panda60 is offline   Reply With Quote

Old   February 4, 2010, 13:11
Default
  #30
New Member
 
Scott Haynes
Join Date: May 2009
Posts: 10
Rep Power: 17
scotth2o is on a distinguished road
For the ground, gas_inlet and outlet try "type inletOutlet" in the temperature file. The model will likely heat up or cool down for a few time steps before reaching a "more" steady state

While I can't remember the energy equation for buoyantBoussinesqPisoFoam in buoyantPisoFoam there is a div(alphat,grad(h) ) term which leads to fluxes of energy out of the top and the bottom. Setting T to inletOutlet seems to let these fluxes flux.

Typically I would set the top temp to inletOutlet too but I have never used the "symmetryPlane" boundary condition. How does this work at the top of the model? Is the temperature on the right side the mirror image of the T on the left?

Good Luck
Scott
scotth2o is offline   Reply With Quote

Old   February 6, 2010, 10:26
Default
  #31
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17
panda60 is on a distinguished road
Dear scotth2o,

my relaxationFactors like this, am I right ?

relaxationFactors
{
rho 0.9;
p 0.3;
U 0.7;
T 0.7;
k 0.7;
epsilon 0.7;
R 0.7;
}
panda60 is offline   Reply With Quote

Old   February 6, 2010, 10:33
Default
  #32
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17
panda60 is on a distinguished road
And I am little confused, why equation like this ?

fvScalarMatrix TEqn
(
fvm::div(phi, T)
- fvm::Sp(fvc::div(phi), T)
- fvm::laplacian(kappaEff, T)
);


tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
- fvm::Sp(fvc::div(phi), U)
+ turbulence->divDevReff(U)
);

why here have the term fvm::Sp(fvc::div(phi), T) ,and fvm::Sp(fvc::div(phi), U) ?
what is the meaning of this term ?

Because buoyantBoussinesaPisoFoam doesn't have this term. Why buoyantBoussinesaSimpleFoam have this ?
panda60 is offline   Reply With Quote

Old   February 9, 2010, 11:53
Default
  #33
New Member
 
Scott Haynes
Join Date: May 2009
Posts: 10
Rep Power: 17
scotth2o is on a distinguished road
I've never changed the relaxationFactors from the default values. They seem to work fine as far as I know.

Scott


Quote:
Originally Posted by panda60 View Post
Dear scotth2o,

my relaxationFactors like this, am I right ?

relaxationFactors
{
rho 0.9;
p 0.3;
U 0.7;
T 0.7;
k 0.7;
epsilon 0.7;
R 0.7;
}
scotth2o is offline   Reply With Quote

Old   February 12, 2010, 11:16
Default
  #34
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17
panda60 is on a distinguished road
Dear all, who can tell me the meaning of alphat ?
If it is only be used for compressible flow ?
If I use buoyantBoussinesSimpleFoam , if I need it ?

Because I saw in buoyantPisoFoam, it write like this:

floor
{
type compressible::alphatWallFunction;
value uniform 0;
}

but in buoyantBoussinesqPisoFoam ,it write like this:

floor
{
type alphatWallFunction;
value uniform 0;
}.

So I think it will be used in BoussinesqFoam, but I can't find which places have used it in the solver , who can tell me ?

Because If using kEpsilon model , we should need wall function for temperature like velocity, we use nutWallFunction can activate the velocity wall function, So I think we should need a variable to activate temperature wall function ?

If ahphat can do this work ?
Thank you very much.
panda60 is offline   Reply With Quote

Old   June 11, 2010, 05:29
Default
  #35
New Member
 
pop
Join Date: Feb 2010
Posts: 13
Rep Power: 16
poplar is on a distinguished road
good job! Matthew.

eqns (15)(16)(18) should be d/dt(keff*dT/dx), not keff*d2T/dx2.
cuz keff(x) is not constant.
poplar is offline   Reply With Quote

Old   June 11, 2010, 10:39
Default
  #36
Member
 
Matthew J. Churchfield
Join Date: Nov 2009
Location: Boulder, Colorado, USA
Posts: 49
Rep Power: 19
mchurchf is on a distinguished road
Poplar,

You are absolutely correct. I've updated the Wiki page on buoyantBoussinesqPisoFoam to reflect your corrections.

Thanks,

Matt
mchurchf is offline   Reply With Quote

Old   March 28, 2011, 21:57
Default Boundary conditions for pressure
  #37
Member
 
Yuri Feldman
Join Date: Mar 2011
Posts: 30
Rep Power: 15
feldy77 is on a distinguished road
Hi,
I have a general question. It is of common knowledge that there is no need for boundary conditions for pressure when solving incompressible flow in enclosures. Then, what are the supposed boundary conditions for p and p_rgh in this case. I tried to put just constant zero value and obtained some solution that looks good, but is it physical?
Thanks, Yuri
feldy77 is offline   Reply With Quote

Old   March 29, 2011, 10:01
Default
  #38
Member
 
Matthew J. Churchfield
Join Date: Nov 2009
Location: Boulder, Colorado, USA
Posts: 49
Rep Power: 19
mchurchf is on a distinguished road
Yuri,

If the flow is totally enclosed, you'll need to specify the pressure gradient normal to the surface. For p, static pressure, I recommend using the "buoyantPressure" boundary condition, which will set the static pressure gradient equal to (rho_k*g) dotted with the boundary surface normal, where rho_k is the Boussinesq density. For p_rgh, which is static pressure minus the hydrostatic part, also use "buoyantPressure". The "bouyantPressure" boundary condition looks at whether it is being used for p or p_rgh and applies the proper gradient. For p_rgh, it sets the gradient to -d(rho_k)/dn * g * height, where d/dn is the surface normal gradient.

See src\finiteVolume\fields\fvPatchFields\derived\buoy antPressure for details.

Matt
mchurchf is offline   Reply With Quote

Old   June 17, 2011, 05:27
Default
  #39
New Member
 
Maike
Join Date: Dec 2010
Posts: 8
Rep Power: 16
mugi is on a distinguished road
I started with open Foam to use it for geological problems. I'm trying to get into the buoyantBoussinesqPimpleFoam solver right now. Everything is working fine but I have one question:

I like to apply a linear temperature distribution as boundary conditions for the side walls. Is it possible to apply such in a simple way in openFOAM? In the tutorial there is setHotRoom used in the ./Allrun to define the boundaries. I didn't use that right know because I wasn't able to modify something in the setHotRoom. The only setHotRoom.C are in the tutorial for buoyantPimpleFoam but if I modify that (and recompile) I get no changes if I run setHotRoom with the Boussinesq solver. That sounds strange for me... Does someone have an idea about that??

Maike.
mugi is offline   Reply With Quote

Old   June 21, 2011, 10:41
Default
  #40
Member
 
Kai
Join Date: May 2010
Location: Shanghai
Posts: 61
Blog Entries: 1
Rep Power: 16
kaifu is on a distinguished road
Hi Matthew

How did u deduce eqn (20) from eqn (19)? And what about the approximation order? Is there any references? Thanks.

// Kai
kaifu 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
Pressure Gradient in channelOodles sega OpenFOAM Running, Solving & CFD 14 August 12, 2009 07:21
Physical explanation of pressure coefficent Ben Main CFD Forum 1 January 21, 2008 10:42
Problem implementing DETAILED REACTION MECHANISM Phil FLUENT 0 May 5, 2007 12:38
Explanation of status report of equation solution nico OpenFOAM Running, Solving & CFD 0 April 15, 2006 06:36
Kiva Subroutine Explanation liqiang Main CFD Forum 1 November 20, 2004 12:27


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