CFD Online Logo CFD Online URL
Home > Forums > FLUENT


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

LinkBack Thread Tools Display Modes
Old   July 15, 2003, 21:42
Default UDF
Posts: n/a
Hello all:

I use the UDF try to get the previous time step temperatur by C_T_M1(c,t) for unsteady flow simulation. But it cann't run normally. If i change the C_T_M1(c,t) to C_U_M1(c,t), there are no any problem. Clould anyone tell me hot to get the previous time Temperature? The bellow is the udf code:

#include "udf.h" #define CON 0.5 #define SL 1.0

DEFINE_SOURCE(cell_source,c, t, dS, eqn) { float source; float temp; float t1; float t0; float dt; float density; float curr_ts;

curr_ts = RP_Get_Real("flow-time"); dt=RP_Get_Real("physical-time-step");

if (curr_ts>0.1) { t0=C_T(c,t); t1=C_T_M1(c,t); density=C_R(c,t); printf("%15.7f%15.7f%15.7f\n",t1,t0,dt); source = -CON*SL*density*t1/dt; dS[eqn] = -CON*SL*density; }

return source; }

  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
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
Dynamic Mesh UDF Qureshi FLUENT 1 December 2, 2009 01:27
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 05:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01

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