|
[Sponsors] |
May 8, 2009, 17:59 |
operating on a specific cellZone ???
|
#1 |
Member
Ken Darcovich
Join Date: Mar 2009
Location: Ottawa, Canada
Posts: 34
Rep Power: 17 |
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 |
|
May 11, 2009, 11:47 |
|
#2 |
Member
Ken Darcovich
Join Date: Mar 2009
Location: Ottawa, Canada
Posts: 34
Rep Power: 17 |
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... |
|
|
|
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 |