CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Configuring the same variable for two different regions (http://www.cfd-online.com/Forums/openfoam/82233-configuring-same-variable-two-different-regions.html)

Bufacchi November 20, 2010 12:36

Configuring the same variable for two different regions
 
I'm using chtMultiRegionFoam with two regions: one fluid and one porous media (this is usually a solid region). On the fluid region I have variables such as U, p, rho that characterizes the flow. On the porous media region, I have the same variables, but to characterize a different flow. The problem comes on how to describe the two flows with the same variables. If I change the fluid variable, such as U, to Uf (U on the fluid region), all the .H and .C files needed to solve the fluid flow don't recognize the new variable Uf.

Does anyone know how to handle this problem? Any hint? I'm working on this issue for a month now, and I couldn't find my way out of this problem.

Thanks in advance.

Paulo :)

wyldckat November 28, 2010 15:07

Hi Paulo,

My experience is rather limited when it comes to modifying solvers to have more CFD capabilities. But from what I can tell, currently chtMultiRegionFoam has fluid and solid regions, so you'll have to add a new porous region. You can use the interface references to K between fluid and solid, and add for the porous region a Uf interface.

The folders fluid and solid contain independent handling for each region. The files where the fields are defined are createFluidFields.H and createSolidFields.H. If you analyse each one, you'll see that only K is shared between them. Possibly, if you define a Porous region, you can still use the variable U, and its treatment would be made in the separate region, just how its done between fluid and solid regions!
As for the rest, you'll have to analyse all of the steps on chtMultiRegionFoam.C to see how it is organized and how it works.

By the way, don't the current porous solvers do both fluid and porous regions already? I'm not familiar with them, but at first glance to the tutorials, it seems that way...

Best regards and good luck!
Bruno


All times are GMT -4. The time now is 01:30.