|
[Sponsors] |
Problem with looping over faces in certain cell |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 9, 2015, 15:31 |
Problem with looping over faces in certain cell
|
#1 |
Member
Join Date: Dec 2014
Posts: 38
Rep Power: 12 |
Hi I try to write a macro to loop over faces of certain cell, to check mass flux over there. I found out that there is a macro to loop over a faces in the cell. I try to use it and every time a get an error "Segmentation fault". and Error Object:#f. Could anybody help my with this UDF?
DEFINE_ADJUST(voidf, super_domain) { FILE *fp; fp = fopen("data.txt", "a"); Thread *t; cell_t c; face_t f; thread_loop_c(t, super_domain) { begin_c_loop_int(c, t) { c_face_loop(c, t, i) { f = C_FACE(c, t, i); massflow += F_FLUX(f, t); fprintf(fp, "masflow: %f \n", massflow); } massflow = 0.0; fprintf(fp, "\n\n"); } end_c_loop_int(c, t) } fclose(fp); } |
|
January 9, 2015, 22:57 |
|
#2 |
Member
Join Date: Dec 2014
Posts: 38
Rep Power: 12 |
I should mentioned, in previous post, that I work with several phases. And glad to inform I found the solution to the problem
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Mesh Importing Problem | cuteapathy | ANSYS Meshing & Geometry | 2 | June 24, 2017 06:29 |
interFoam running blowing up | sandy13 | OpenFOAM Running, Solving & CFD | 2 | May 5, 2015 08:16 |
foam-extend_3.1 decompose and pyfoam warning | shipman | OpenFOAM | 3 | July 24, 2014 09:14 |
Cluster ID's not contiguous in compute-nodes domain. ??? | Shogan | FLUENT | 1 | May 28, 2014 16:03 |
Looping over faces in a cell | Senthil | FLUENT | 3 | April 11, 2002 12:41 |