CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Problem with looping over faces in certain cell

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 9, 2015, 15:31
Default Problem with looping over faces in certain cell
  #1
Member
 
Join Date: Dec 2014
Posts: 38
Rep Power: 12
Harry321 is on a distinguished road
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);
}
Harry321 is offline   Reply With Quote

Old   January 9, 2015, 22:57
Default
  #2
Member
 
Join Date: Dec 2014
Posts: 38
Rep Power: 12
Harry321 is on a distinguished road
I should mentioned, in previous post, that I work with several phases. And glad to inform I found the solution to the problem
Harry321 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
[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


All times are GMT -4. The time now is 07:36.