|
[Sponsors] |
January 24, 2011, 21:24 |
how to obtain the total number of cells
|
#1 |
New Member
Coiby Xu
Join Date: Jan 2011
Posts: 7
Rep Power: 15 |
I know we can see the number when importing mesh file. But does Fluent provide API? Thanks!
Last edited by coiby; January 28, 2011 at 01:55. |
|
January 24, 2011, 21:50 |
|
#2 |
Senior Member
Join Date: Feb 2010
Posts: 164
Rep Power: 17 |
||
January 24, 2011, 23:54 |
|
#3 |
New Member
Coiby Xu
Join Date: Jan 2011
Posts: 7
Rep Power: 15 |
||
January 25, 2011, 23:47 |
|
#4 |
New Member
anonymous
Join Date: Jan 2011
Posts: 23
Rep Power: 15 |
Could you try thread->nelements, where thread is a cell thread.
In that case, you have to loop over all cell threads using therad_loop_c. Or Try domain-> cell_count It should help. |
|
January 27, 2011, 03:46 |
|
#5 | |
New Member
Coiby Xu
Join Date: Jan 2011
Posts: 7
Rep Power: 15 |
Quote:
I've tried "domain-> cell_count" : Code:
DEFINE_INIT(my_init_function, domain) { cell_t c; Thread *t; int i; //loop control int j; //loop control int cnum = domain->cell_count; // the total number of cells float *radius[cnum][K]; j=0; thread_loop_c(t,domain) { for(i=0;i<K;i++) *radius[j][i]=gauss(); j++; } } "error C2039: 'cell_count' : is not a member of 'domain_struct'"? And I check mem.h, find these lines: Code:
#if RP_HOST int cell_count, face_count; #endif Thanks! |
||
January 27, 2011, 13:07 |
|
#6 |
New Member
anonymous
Join Date: Jan 2011
Posts: 23
Rep Power: 15 |
which version of fluent are you using.
|
|
January 27, 2011, 19:58 |
|
#7 |
New Member
Coiby Xu
Join Date: Jan 2011
Posts: 7
Rep Power: 15 |
Hi, vig. I'm using Fluent_v6.3.26, 32bit, Win7.
I first compile it under Linux, but there are extra errors(see http://www.cfd-online.com/Forums/flu...tters-why.html). |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to obtain average Nusselt number | Caner | Main CFD Forum | 3 | March 2, 2012 14:44 |
DecomposePar unequal number of shared faces | maka | OpenFOAM Pre-Processing | 6 | August 12, 2010 09:01 |
Number of cells | Johnny B | FLUENT | 2 | March 17, 2010 04:00 |
total number of cells changes !!!! | Zeitistgeld | FLUENT | 0 | October 10, 2005 01:49 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 04:15 |