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

Fluent UDF: POSTPROCESSING

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 19, 2012, 15:40
Default Fluent UDF: POSTPROCESSING
  #1
New Member
 
Join Date: Jul 2012
Posts: 18
Rep Power: 5
mila_oliv is on a distinguished road
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???


Here's what i've already written:

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.
mila_oliv is offline   Reply With Quote

Old   July 19, 2012, 17:24
Default
  #2
New Member
 
Join Date: Jul 2012
Posts: 18
Rep Power: 5
mila_oliv is on a distinguished road
I cant even compile this udf
mila_oliv is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
fluent udf, saving data in udf mohsen zendehbad Fluent UDF and Scheme Programming 13 March 21, 2014 16:36
Two questions on Fluent UDF Steven Fluent UDF and Scheme Programming 4 September 20, 2013 16:30
Transient pressure UDF for parallel fluent droberts Fluent UDF and Scheme Programming 5 October 11, 2010 04:13
udf fluent 6.3.26 don't work in fluent 12 enry Fluent UDF and Scheme Programming 16 September 9, 2010 02:44
fluent UDF external library lapack problem Rick FLUENT 0 May 7, 2008 10:16


All times are GMT -4. The time now is 01:16.