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

operating on a specific cellZone ???

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By kdarc

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 8, 2009, 17:59
Default operating on a specific cellZone ???
  #1
Member
 
Ken Darcovich
Join Date: Mar 2009
Location: Ottawa, Canada
Posts: 34
Rep Power: 17
kdarc is on a distinguished road
Hi.
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 =
cellZones()[cellZones().findZoneID("carboxen")];

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 18:05. Reason: clarity
kdarc is offline   Reply With Quote

Old   May 11, 2009, 11:47
Default
  #2
Member
 
Ken Darcovich
Join Date: Mar 2009
Location: Ottawa, Canada
Posts: 34
Rep Power: 17
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...
Liangyuan likes this.
kdarc 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
Simulation of a single bubble with a VOF-method Suzzn CFX 21 January 29, 2018 01:58
operating pressure and operating density phil FLUENT 5 November 7, 2017 18:02
Specific heat in STAR-CD Andrew Siemens 3 September 4, 2009 00:33
WeightedAverage for a specific cellZone region guido_adriaensen OpenFOAM Post-Processing 6 August 21, 2009 10:19
Two-Phase Buoyant Flow Issue Miguel Baritto CFX 4 August 31, 2006 13:02


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