- **OpenFOAM**
(*http://www.cfd-online.com/Forums/openfoam/*)

- - **buoyantBoussinesqPisoFoam: A detailed explanation**
(*http://www.cfd-online.com/Forums/openfoam/72027-buoyantboussinesqpisofoam-detailed-explanation.html*)

buoyantBoussinesqPisoFoam: A detailed explanationAll,
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 |

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. |

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). |

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 |

Very good work... Thanks a lot for documenting.
best, |

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. |

Quote:
http://openfoamwiki.net/index.php/Contrib_groovyBC to specify it. Best, |

Quote:
Thank you very much. |

buoyantBoussinesqPisoFoam Wiki and LES-capabilityAlberto: 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 |

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. |

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 |

2 Attachment(s)
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. |

1 Attachment(s)
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. |

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? |

1 Attachment(s)
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. |

3 Attachment(s)
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. |

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 |

3 Attachment(s)
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? |

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 |

2 Attachment(s)
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. |

All times are GMT -4. The time now is 03:53. |