CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Unsteady udf (https://www.cfd-online.com/Forums/fluent/47992-unsteady-udf.html)

Mary April 21, 2008 05:17

Unsteady udf
 
Hi Dear All I want to define the source term in Energy Equation. After compiling it in Fluent and starting to iteration, this error appears and solver goes out from running mode.This error is for """"C_T_M1(c,t)"""" for taking the temperature value in previous time step.I write this Text Command """""">Solve/set/expert""""" and then answering ""Yes"" to this question""keep temporary solver memory from being freed?"" but my problem has not been solved yet. Please Help me. Best Regards.

#include "udf.h"

#define C2 100.0

DEFINE_SOURCE(amir_source4,c,t,dtime,dS,eqn) { real x[ND_ND]; real con, source,delti,al,rol;

C_CENTROID(x,c,t); con = C2*0.5*C_R(c,t)*x[1]; al = RP_Get_Real("physical-time-step"); rol=C_T_M1(c,t);

source = -.000000001*C_T_G(c,t)[0]*C_T(c,t)*rol;

return source; }

bohis April 22, 2008 03:20

Re: Unsteady udf
 
instead of RP_Get.... , I would use al=CURRENT_TIMESTEP;

further, I am not sure, but You may need to define a derivation of your source (dS[eqn])

bye


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