|April 21, 2008, 15:57||
problem with UDF
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)
real intervallo =0.0;
real ora = 0.0;
real prima = 0.0;
intervallo = istante - precedente;
|April 30, 2008, 05:09||
Re: problem with UDF
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
|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|