CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

Configuring the same variable for two different regions

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   November 20, 2010, 12:36
Default Configuring the same variable for two different regions
Paulo Bufacchi
Join Date: Jun 2010
Posts: 50
Rep Power: 9
Bufacchi is on a distinguished road
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.

Bufacchi is offline   Reply With Quote

Old   November 28, 2010, 15:07
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,031
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
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!

Last edited by wyldckat; November 28, 2010 at 15:07. Reason: one word too many ;)
wyldckat is offline   Reply With Quote


Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to limit a variable ash OpenFOAM Running, Solving & CFD 1 June 26, 2008 20:32
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas Main CFD Forum 1 May 30, 2008 04:35
Problems with additional variable Krishna Premi CFX 1 October 29, 2007 09:19
Env variable not set gruber2 OpenFOAM Installation 5 December 30, 2005 05:27
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09

All times are GMT -4. The time now is 17:14.