CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

How to recover the cells create with the setsToZones utility into the C source file

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 21, 2010, 11:59
Default How to recover the cells create with the setsToZones utility into the C source file
  #1
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 229
Rep Power: 9
Cyp is on a distinguished road
Hello!

I splitted my domain (for the moment a mere square) into 2 subdomains with the setsToZones utility. The cellZones file is well created and the my subdomains are named "phase1" and "phase2".

In my calculations, I need to integrate a field over the domain "phase1" and then over the domain "phase2". (My solver is an adapted version of the scalarTransportFoam solver with variable transport properties defined by the setFields utility). How can I recover the domain "phase1" (and then "phase2") into my main solver C source file in order to integrate my field over this domain.

Thank you for your help,
Cyprien
Cyp is offline   Reply With Quote

Old   June 22, 2010, 02:46
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
Quote:
Originally Posted by Cyp View Post
Hello!

I splitted my domain (for the moment a mere square) into 2 subdomains with the setsToZones utility. The cellZones file is well created and the my subdomains are named "phase1" and "phase2".

In my calculations, I need to integrate a field over the domain "phase1" and then over the domain "phase2". (My solver is an adapted version of the scalarTransportFoam solver with variable transport properties defined by the setFields utility). How can I recover the domain "phase1" (and then "phase2") into my main solver C source file in order to integrate my field over this domain.
The mesh has a cellZones() member:
http://foam.sourceforge.net/doc/Doxy...f55a4fcb32dfd2
that you can use to access the cell zones.

Try "git grep cellZones" to find lots of examples in the source code of how it is used.
If this is provides too much information for you, take a look at porousZone/porousZones ... I know it is used there and the classes are fairly small and should be easy enough to understand.
olesen is offline   Reply With Quote

Old   June 22, 2010, 10:01
Default
  #3
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 229
Rep Power: 9
Cyp is on a distinguished road
Thank you for your answer !

I think I could find out a solution to my problem.
Cyp is offline   Reply With Quote

Reply

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
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 14:43
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
HELPInstallation on RedHat90 booosix OpenFOAM Installation 8 July 17, 2007 06:40
Results saving in CFD hawk Main CFD Forum 16 July 21, 2005 20:51
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


All times are GMT -4. The time now is 07:57.