CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

operating on a specific cellZone ???

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

LinkBack Thread Tools Display Modes
Old   May 8, 2009, 16:59
Default operating on a specific cellZone ???
Ken Darcovich
Join Date: Mar 2009
Location: Ottawa, Canada
Posts: 31
Rep Power: 10
kdarc is on a distinguished road
I have been able to create cellZones in my mesh, which as best as I can tell are simply sets of cell indices.

My question is about how-to:

How do I make use of cell zones??
For example, I want to give a value to a field only in a certain cellZone.

I imagine this operation to be akin to defining boundary conditions on only specific patches, but so far I have been unable to find any example code for cellZones.

I found something relevant looking in a file called mixerFvMesh.C, shown below:

const labelList& cellAddr =

forAll (cellAddr, cellI)
k_ads[cellI] = k0_ads*Foam::exp(-E_ads/(R_gas*T[cellI])) ; // rate of adsoption of HCHO onto carboxen [1/s]


Are there some .H files or other preparations I would need to get this code to compile?? A compile library??

my error output is:

cEqn.H: In function ‚int main(int, char**)‚:
cEqn.H:5: error: no matching function for call to Foam::cellZone::cellZone()‚

any help greatly appreciated.

Last edited by kdarc; May 8, 2009 at 17:05. Reason: clarity
kdarc is offline   Reply With Quote

Old   May 11, 2009, 10:47
Ken Darcovich
Join Date: Mar 2009
Location: Ottawa, Canada
Posts: 31
Rep Power: 10
kdarc is on a distinguished road
An in-house colleague kindly sorted this out for me.

The syntax is:

const label cellZoneID = mesh.cellZones().findZoneID("carboxen");
const labelList& cellAddr = mesh.cellZones()[cellZoneID];

etc etc...
kdarc 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
operating pressure and operating density phil FLUENT 5 November 7, 2017 18:02
Simulation of a single bubble with a VOF-method Suzzn CFX 18 October 2, 2009 04:18
Specific heat in STAR-CD Andrew Siemens 3 September 3, 2009 23:33
WeightedAverage for a specific cellZone region guido_adriaensen OpenFOAM Post-Processing 6 August 21, 2009 09:19
Two-Phase Buoyant Flow Issue Miguel Baritto CFX 4 August 31, 2006 12:02

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