|
[Sponsors] |
Seg fault when accessing cell face velocities F_U, F_V, F_W |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 19, 2013, 16:55 |
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 |
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. |
|
Tags |
cell loop macros, face velocity |
|
|
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 |