# Fluent UDF: POSTPROCESSING

 Register Blogs Members List Search Today's Posts Mark Forums Read

July 19, 2012, 15:40
Fluent UDF: POSTPROCESSING
#1
New Member

Join Date: Jul 2012
Posts: 18
Rep Power: 6
Hi,

i recently started learning udf. My objective is to implement heat flux lines in a square cavity with natural convection. It's supposed to be just like fluent shows us stream lines on "graphics and animations".

To do so, i started programing stream lines to be able to compare my results with fluent's results.

I'm having basic problems like what DEFINE should i use?
And after de code for calculation is done, do i use "return(name)"????

And when its finally compiled, isn't it diferent to calculate some number (like velocity inlet) and show a graphic???

Quote:
 #include "udf.h" #include "mem.h" DEFINE_EXECUTE_AT_EXIT(funcaocorrente) { real psi[320][320]; /* função corrente que se deseja determinar*/ real NV_VEC(u); /* vetor velocidade em x*/ int i, j, deltax, m, n; cell_t c; Thread *t, *tc; i=1; j=1; /*condições de contorno*/ psi[i][1]=0; psi[i][n]=0; psi[1][j]=0; psi[n][j]=0; /*condições de contorno*/ n=C_NNODES(c,t); /*number of nodes on the mesh*/ m=(n^0.5)-1; /* divisions on the mesh: m X m */ deltax=1/m; /* distance between nodes */ NV_D(u,=,C_U(c,t)); /* u is Vx in a cell */ NV_S(u,*=,deltax) /* (u*deltax) */ begin_c_loop(c,tc) { for(i=1;i<320;i++) { for(j=1;j<320;j++) { psi[i][j+1]=psi[i][j]+NV_VEC(u)); /*integral -> stream function definition*/ } } }end_c_loop(c,tc) return psi; }

am I on the right way?

Last edited by mila_oliv; July 19, 2012 at 16:58.

 July 19, 2012, 17:24 #2 New Member   Join Date: Jul 2012 Posts: 18 Rep Power: 6 I cant even compile this udf

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post mohsen zendehbad Fluent UDF and Scheme Programming 14 August 3, 2016 07:23 Steven Fluent UDF and Scheme Programming 4 September 20, 2013 16:30 droberts Fluent UDF and Scheme Programming 5 October 11, 2010 04:13 enry Fluent UDF and Scheme Programming 16 September 9, 2010 02:44 Rick FLUENT 0 May 7, 2008 10:16

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