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

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

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread 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: 299
Rep Power: 18
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: https://olesenm.github.io/
Posts: 1,686
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
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: 299
Rep Power: 18
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


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 Off
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 13:43
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19: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 15:16


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