CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

Seg fault when accessing cell face velocities F_U, F_V, F_W

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   December 19, 2013, 16:55
Default Seg fault when accessing cell face velocities F_U, F_V, F_W
New Member
Join Date: Jul 2012
Posts: 2
Rep Power: 0
oayeni1 is on a distinguished road
I am trying to access the F_U, ..., face velocities within the c_face_loop celll looping macro. My udf compiles without errors but returns a seg fault at runtime. The problem is coming from trying to access the cell face velocities. It has me stomped because the face thread pointer is properly assigned, and a similar access to the F_FLUX macro yields no errors. I have shown the problematic segment of this code:

Thread *fthread, *CellThread; face_t face; int n; Domain *domain; cell_t cell = (obtained from another part of the code);
domain = Get_Domain(1);
CellThread = domain->c;

face = C_FACE(cell,CellThread,n); fthread = C_FACE_THREAD(cell,CellThread,n);
VmF[0] += CVm*DT*F_FLUX(face,fthread)*F_U(face,fthread)/RhoF/CellVolume;
VmF[1] += CVm*DT*F_FLUX(face,fthread)*F_V(face,fthread)/RhoF/CellVolume;
VmF[2] += CVm*DT*F_FLUX(face,fthread)*F_W(face,fthread)/RhoF/CellVolume;

It gives no runtime errors when I remove the F_U, F_V, F_W macros but leave the F_FLUX. Any help would be appreciated.
oayeni1 is offline   Reply With Quote


cell loop macros, face velocity

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
udf problem jane Fluent UDF and Scheme Programming 17 September 21, 2017 07:56
how to access each cell of a face? (user fortran) Katariina CFX 3 January 28, 2008 10:16
Cell face values computation un unstructured grids Sergio Rossi Main CFD Forum 2 May 28, 2006 10:04
Accessing cell thread from a boundary face thread? Vishal FLUENT 2 March 21, 2006 08:29
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15

All times are GMT -4. The time now is 11:40.