CFD Online Logo CFD Online URL
Home > Forums > FLUENT

problem with UDF

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

LinkBack Thread Tools Display Modes
Old   April 21, 2008, 15:57
Default problem with UDF
Posts: n/a
Hi All, I've problem with an UDF. I have to define a pressure profile that respond to the following equation: ((Ql*Ri)+(vol/C)) where Ql is the flow rate at the current time, Ri and C are costant and vol derive to the following expression ((Ql*(current time-previous time))+volume at the previous time). I've made different UDF where I've used the variables F_U, F_V, F_W e F_U_M1, F_V_M1, F_W_M1 but I'm not an expert so maybe I've missed something because UDF doesn't run well. I've tried also with some external variables but I don't understand how I've to use them…I'm really hopeless!! This is the UDF: DEFINE_PROFILE(press_insp,thread,position)


face_t f;

real NV_VEC(psi);

real NV_VEC(A);

real NV_VEC(psit);

real intervallo =0.0;

real ora = 0.0;

real prima = 0.0;

real Q=0;

real Ql=0;

real vol=0;

real Qtl=0;

real volprec=0;

real Qt=0;







NV_D(psi,=,F_U(f,thread),F_V(f,thread),F_W(f,threa d));


Ql= Q*1000;

NV_D(psit,=,F_U_M1(f,thread),F_V_M1(f,thread),F_W_ M1(f,thread));





intervallo = istante - precedente;





  Reply With Quote

Old   April 30, 2008, 05:09
Default Re: problem with UDF
Paolo Lampitella
Posts: n/a

if the UDF is running, that is it's correctly compiled (even if not running as expected), it could be nearly impossible to find the error without knowing about the case you're trying to solve, the b.c. and so on.

At first sight it seems to be a b.c. problem (maybe the pressure b.c. does not works properly due to it's coupling with other b.c. on the other sides of the domain).

The UDF seems to be written in the right formal way, to be sure of this you could try the "copy & paste" approach from the UDF manual. Also you could try to remove the f_profile sentence and print on the screen the informations you are trying to use in your profile.

Finally it seems that you have defined a couple of variables not used in your profile, Qtl and vol, and maybe there is a simple distraction error.

Hope this helps
  Reply With Quote


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
VOF diffuse problem on two fluids problem Fang Jin FLUENT 5 February 17, 2011 06:38
Problem in Modelling Heat Transfer Problem Deepak R FLUENT 1 December 6, 2007 10:37
Problem in cavity flow problem saad Main CFD Forum 4 November 1, 2007 08:45
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
problem in solving "wave generation" problem san FLUENT 2 April 3, 2006 23:37

All times are GMT -4. The time now is 09:24.