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

calculate distance from wall to neighbourig cell centroid

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 1, 2009, 04:24
Default calculate distance from wall to neighbourig cell centroid
  #1
Member
 
R. Roy
Join Date: Mar 2009
Location: India
Posts: 52
Rep Power: 17
rr123 is on a distinguished road
dear all,

i need to calculate the distance between the wall and the centroid of the cell touching this wall. my system is 2D.

this is the main code snippet:

begin_c_loop (c,t)
{
c_face_loop(c,t,n)
{
tf = C_FACE_THREAD(c,t,n);
if(THREAD_TYPE(tf) == THREAD_F_WALL)
{
f = C_FACE(c,t,n);
F_CENTROID(x,f,t);
wf = x[1]; /* for 2D */
C_CENTROID(cell,c,t);
nc = cell[1];
dist = FABS(wf-nc);
}
}
}
end_c_loop (c,t)


am i right ? is it correct ordering of the loop structure ?

hopign for a reply.

best regards.
rr123 is offline   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
Wall distance? stein lee Main CFD Forum 4 November 15, 2013 21:26
distance between particle and wall Worth FLUENT 2 June 13, 2009 03:04
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 20:30
Wall function in adverse pressure gradients stephane baralon Main CFD Forum 11 September 2, 1999 04:05
Wall functions Abhijit Tilak Main CFD Forum 6 February 5, 1999 01:16


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