|
[Sponsors] |
buoyantBoussinesqPisoFoam: A detailed explanation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 22, 2010, 18:23 |
buoyantBoussinesqPisoFoam: A detailed explanation
|
#1 |
Member
Matthew J. Churchfield
Join Date: Nov 2009
Location: Boulder, Colorado, USA
Posts: 49
Rep Power: 19 |
All,
I am beginning to use buoyantBoussinesqPisoFoam. Therefore, I thought it wise to really look at the inner-workings of the code both to understand what it is doing and to get used to OOP in C++. I had to do a lot of digging around, so I wrote up detailed notes of how buoyantBoussinesqPisoFoam works and posted it at http://docs.google.com/fileview?id=0...OTdhNDM4&hl=en. Please note, I was not able to fully understand everything, so if you find any mistakes in my notes, please let me know. I hope this may be helpful. Matt |
|
January 23, 2010, 03:54 |
|
#2 | |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
Quote:
Your explanation of buoyantBoussinesqPisoFoam is indeed detailed. So the RANS and LES equation are nearly the same ,except in RANS using turbulent viscosity nu, LES use sub-grid viscosity nuSgs. Am I right ? This is a little like pisoFoam. But in OpenFOAM-1.6, buoyantBoussinesqPisoFoam can only be used for RANS model, can't be used for LES. Because I am beginner, I try to modify buoyantBoussinesqPisoFoam in the refference of pisoFoam, But I am affraid mistake will happen. Could you send your solver here ? That would be best. Thank you very much. |
||
January 23, 2010, 04:11 |
|
#3 |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
And if I want to add another passive scalar transport euqtion, for example concentration transport equation, it would be like this:
dC/dt +d/dxj*(C*uj)=(nut/Sct+nu0/Sc)*d/dxk(dC/dxk). |
|
January 23, 2010, 06:08 |
|
#4 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
Good job :-)
P.S. Could you add the link to the wiki so the link does not go lost in the forum? http://openfoamwiki.net/index.php/Main_OFSolvers
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
January 23, 2010, 08:05 |
|
#5 |
Senior Member
|
Very good work... Thanks a lot for documenting.
best,
__________________
Holger Marschall web: http://www.holger-marschall.info mail: holgermarschall@yahoo.de |
|
January 23, 2010, 23:59 |
|
#6 | |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
Quote:
In Buoyant problem, I want to use nonuniform value Temperature in Wall. In my problem, my wall temperature is know, but not uniform. my temperature is changing with the hight of the wall. But when I modied the hotRoom/setHotRoom, and generated my own utility, It seems that boundary function can't be used for wall, only can be used for inlet condition. How I can do this ? Thank you very much. |
||
January 24, 2010, 01:31 |
|
#7 | |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
Quote:
http://openfoamwiki.net/index.php/Contrib_groovyBC to specify it. Best,
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
||
January 24, 2010, 23:45 |
|
#8 | |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
Quote:
Thank you very much. |
||
January 25, 2010, 14:20 |
buoyantBoussinesqPisoFoam Wiki and LES-capability
|
#9 |
Member
Matthew J. Churchfield
Join Date: Nov 2009
Location: Boulder, Colorado, USA
Posts: 49
Rep Power: 19 |
Alberto: I've posted this description of buoyantBoussinesqPisoFoam to http://openfoamwiki.net/index.php/Bu...sinesqPisoFoam.
Panda60: yes, you are correct in that regardless if it is RANS or LES, the equations look the same. In LES you supply nu_SGS and in RANS you supply nu_t. You are also correct that, out-of-the-box, buoyantBoussinesqPisoFoam only works with a RANS model. If you go to the above wiki posting, section 4, I explain how to modifiy it to be LES-capable just like pisoFoam. Matt |
|
January 26, 2010, 21:38 |
|
#10 | |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
Quote:
Your explanation is very good. And in the guidence of you, I have modified the solve. But I'm a little confused.buoyant solver seems to converge slowly. and for p boundary condition, It seems very important. My case is a wind engineering problem. in outlet condition , it seems that using " fixedValue" for p is not good, and can't converge. when I change to buoyantPressure, then it slowly converge. I don't khow the what's the meaning of buoyantPressure, if it is only can be used in wall boundary, or also can be used for outlet condition ? Because it seems not so many people researching on buoyant effect, could you give us some suggestion on buoyant solver ? what we must pay attation to. Thank you very much. |
||
January 27, 2010, 10:37 |
|
#11 |
Member
Matthew J. Churchfield
Join Date: Nov 2009
Location: Boulder, Colorado, USA
Posts: 49
Rep Power: 19 |
Jiang,
When you say the solver converges slowly, what exactly do you mean? Do you mean that you are using it with an LES model, and it takes a lot of time for it to come to some sort of steady turbulent state? Or are you using it in RANS mode and trying to come to steady state? If you are using it for RANS, it might be better to use buoyantBoussinesqSimpleFoam which is meant for steady state problems. My understanding of the bouyantPressure boundary condition is that it is used on walls that are not parallel to the hydrostatic pressure gradient. It appears to then apply dp/dz on the wall that corresponds to the hydrostatic pressure gradient. What sort of problem are you solving? That may let me better help you. Matt |
|
January 27, 2010, 21:14 |
|
#12 | |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
Quote:
I am very thankfulness for your kind hearted. My problem like this: I have an rectangular simulation domain, an single building was located in the domain. Wind is coming from left to right, the ground temperature is higher than the air. My solver is buoyantBoussinesqSimpleFoam. if I use {fixed value; value 0} for p in outlet condition, the flow didn't converge at all. in the outlet position, will have reverse flow in upper domain, and have strong velocity in lower domain. if I use buoyantPressure for outlet condition, the flow seems converge ,but in the corner of domain, will have strong velocity ,the flow field is not right. I searched the whole forum, somebody sai could use totalPressure or fixed meanPressure, I don't unstand . So I think maybe the pressure boundary condition I ues is not right. Could you tell me what pressure boundary condition you use ? especially in outlet ? Thanks. |
||
January 27, 2010, 22:02 |
|
#13 |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
This is my pressure boundary 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; } This picture is my U_velocity contour. I have been struggling this problem for several days. I need your help. Thanks. |
|
January 28, 2010, 11:07 |
|
#14 |
Member
Matthew J. Churchfield
Join Date: Nov 2009
Location: Boulder, Colorado, USA
Posts: 49
Rep Power: 19 |
Jiang,
At time zero, how do you initialize your pressure field? Do you have a constant pressure throughout the domain? If so, that could be a problem. Pressure should decrease with height. Note that in buoyantBoussinesqSimpleFoam, I think the pressure variable is really pressure divided by a reference density, and we'll call it p~, so p~ = p/rho_ref. (Please check the equations to make sure.) Therefore, if you specify that some reference p~ at the ground, then p~(z) = p~(z=0) - g*z. In my simulations, I write my own code to create an initial p~ field that follows these hydrostatic conditions. So then you have some choices for the outflow conditions. You need something to keep the flow moving, so you can either specify a constant value of velocity, U, at the top of the domain, which should drive the flow. Or you can specify a pressure gradient by making the outlet pressure lower than the inlet pressure. If you fix the inlet pressure at the hydrostatic conditions defined by p~(z) = p~(z=0)-g*z, then the outlet conditions could be p~(z) = p~(z=0) - g*z - (dp/dx)*L. The (dp/dx)*L is the pressure drop across the length, L, of your domain due to a pressure gradient dp/dx. You'll have to figure out which dp/dx is necessary to drive the flow at the velocity you want. I think you are getting flow reversal and acceleration at the outflow because the pressure might be constant across the outflow plane. Can you post a contour plot of pressure, just like the plot of velocity that you show? |
|
January 29, 2010, 10:10 |
|
#15 |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
Yes, I just give a const pressure 0 as initial field.
and I use 290K as refference temperature. in Left ,Right and Top of the domain I use symmetry boundary condition. This is my pressure field. |
|
January 29, 2010, 10:30 |
|
#16 |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
Because I can't modify the code, so I can't give hydrostatic initial conditions for pressure. I feel that , in buoyancy driven flow, the outlet condition is very important. In the guidance of you, today I try to use fixed value pressure in outlet like this: p=5-9.8*z. This fixed outlet value is small than internal field, an vary with hight, the flow is a little better, but also not correct.
near ground in outlet, the velocity is also high. And the internal pressure seems to change with the outlet pressure value. My temperature field is completely wrong. In my case , ground temperature is 45 degree, the air is 16 degree. I try to use constant pressure gradient in outlet, but it doesn't work, have continues problem. |
|
January 29, 2010, 12:35 |
|
#17 |
Member
Matthew J. Churchfield
Join Date: Nov 2009
Location: Boulder, Colorado, USA
Posts: 49
Rep Power: 19 |
Jiang,
I think it would really help you if you started from initial conditions in which the pressure throughout the field was set to hydrostatic. I think all of your outlet problems are coming from the fact that the flow has a hard time adjusting from a constant 0 pressure to hydrostatic. You'll have to write your own little code to write out the correct internal field. Once you have that initial condition for p, then you can try out different boundary conditions that you have already tried and see if they work. If I were you, I would also extend my domain upwind and downwind of the building by a factor of probably 3 times what you already have. This will allow the effects of the building to be minimized at the boundaries. You also said that your temperatures were 16 and 45 degrees. Do you mean degrees C. Note that OpenFOAM defaults to using Kelvin. Matt |
|
January 31, 2010, 05:45 |
|
#18 |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
Dear mchurchf ,
I have initialize my pressure field using funkySetFields utilities. Because my tempeture near ground is about 25 degree, so I estimate the pressure near ground is p=rho*R*T=1.22*287*(273+25)=104342 Pa, dp=104342-101325=3017 Pa, so I initilize my pressure field using p=3017-rho*g*z; in outlet I also use fixed value 0 condition for p. Now my simulation have going on for 6 hours, 2000 steps, result seems not good. If using SimpleFoam, 2000 steps can get good result . I will let my simulation going on to tomorrow morning ,and then see if can get good result. If I should initialize my tempeture field using approximate value like pressure? |
|
January 31, 2010, 14:01 |
|
#19 | |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
Quote:
I have one note about section 3.1. The pseudo-staggered arrangement is not applied because of the central differencing scheme. It effectively represent an improved version of the Rhie-Chow method (you can take a look at Hannu Karema thesis on multiphase flow to have the details, it is available online at VTT, Finland). This strategy is very effective when you have rapidly changing source terms, for example. Best, Alberto
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
||
January 31, 2010, 22:44 |
|
#20 |
Senior Member
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 17 |
Dear mchurchf,
I already initialize my T and p field with good value, because I use RANS model, and in both side of the domain I use symmetry boundary condition, but after 5000 steps, the flow field is not symmetry, my flow field always have high asymmetry. Why this would happen ? Thank you very much. |
|
|
|
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 |