|
[Sponsors] |
July 15, 2003, 21:42 |
UDF
|
#1 |
Guest
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; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 07:37 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 22:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 21:38 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 04:03 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 04:01 |