CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   thread facet cell in flunt (http://www.cfd-online.com/Forums/fluent/37984-thread-facet-cell-flunt.html)

peter September 23, 2005 04:06

thread facet cell in flunt
 
newbie here, learning the UDF, and really confued some of the terms, can some one tell me the meaning and difference of "thread", "facet" "cell", for exapmle

real x[ND_ND];

real y;

face_t f;

begin_f_loop(f, thread)

{

F_CENTROID(x, f, thread);

y = x[1];

F_PROFILE(f, thread, index) = 20. - y*y/(.0745*.0475)*20.;

}

end_f_loop(f, thread)

in my opinion, F_CENTROID returns the x coordinate of a thread, but why let y= x[1] everytime?

any hints or references would be appereciated.

RoM September 27, 2005 09:02

Re: thread facet cell in flunt
 
Hello,

in fluent all cells an faces are grouped together in so calles threads. as an exampel all faces that belong to a specific boundary are gouped together in one thread. lets call this thread boundary face thread and the thread number (id) can be seen in the boundary conditions panel. if you know the number of the thread you can access all faces of that thread usually with one of fluents loop macros. since the id of a thread is just a number and the thread itsefl is a data structure holding all infomations you will need to get a pointer to that data structure. there are fluent commands to do so but since your udf looks like a udf to specify a velocity profile at a boundary fluent will provide the thread pointer for you. the loop macro will loop over all faces of the boundary and face_t is just the index (id) of a specfic face.

in you udf the first line uses one of fluents macros and will expand to "real x[2]" for 2d cases and "real x[3]" for 3d. this means x is a vector storing 2 or 3 components. x[0] will be the x-coodinate, x[1] the y-coordinate and x[2] the z-coordinate (3d only). F_CENTROID will store the center coordinates of a face in x and F_PROFILE will set the velocity profile for that face as a function of y.

RoM

peter September 27, 2005 23:16

Re: thread facet cell in flunt
 
Thanks a lot, RoM, u help me a lot.


All times are GMT -4. The time now is 20:50.