CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > 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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 19, 2013, 16:55
Default Seg fault when accessing cell face velocities F_U, F_V, F_W
  #1
New Member
 
Dapo
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;

c_face_loop(cell,CellThread,n)
{
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

Reply

Tags
cell loop macros, face velocity

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
udf problem jane Fluent UDF and Scheme Programming 37 February 20, 2018 05:17
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 11:04
Accessing cell thread from a boundary face thread? Vishal FLUENT 2 March 21, 2006 08:29
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15


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