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

Finding out boundary cells in a domain

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   October 9, 2003, 13:44
Default Finding out boundary cells in a domain
  #1
Abbas
Guest
 
Posts: n/a
I have a simple 2-D channel, and I want to manipulate the cells at channel boundary. I wrote a code for it, but it gives Segmentation Violation when I run it.

Please see if you can see what the problem is with this UDF:

---------------------------------------------

# include "udf.h"

DEFINE_ADJUST (macro_s,d) {

Thread *t, *tf, *tc1;

face_t f;

cell_t c;

cell_t c1;

int n,k;

thread_loop_c (t, d) /*loops over all cell threads in domain*/

{

begin_c_loop(c, t) /* loops over cells in a cell thread */

{

c_face_loop(c,t,n) /* loops over all faces on a cell */

{

f=C_FACE(c,t,n); /* returns the face f for the cell c and Thread t */

tf=C_FACE_THREAD(c,t,n); /* get cell ids c0 and c1 which are adjacent to this face f */

tc1=F_C1_THREAD(tf, t);

c1=F_C1(f,tf);

if (c1=NULL) ; /*Error occurs when cells are out of the boundary. Have to apply condition to the cell ADJACENT to it */

printf("%f, it's out\n", k);

k++;

}

}

end_c_loop(c, t)

}

}

---------------------------------------------

Thanks.
  Reply With Quote

 


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
Finding boundary cells stephan OpenFOAM Running, Solving & CFD 5 October 4, 2016 11:56
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 10:56
increasing mesh quality is leading to poor convergence tippo CFX 2 May 5, 2009 10:55
help:uds source added to boundary cells FredPacheo FLUENT 5 September 5, 2008 05:45
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15


All times are GMT -4. The time now is 15:05.