CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   UDF steady state to transient (

Vcent December 20, 2012 12:55

UDF steady state to transient

After successfully using a UDF for a nonlinear velocity profile at an inlet in a steady state mode, I would like to run it in a transient mode. I added the factor time. However the function only runs with constants for "q" (see red part). Otherwise I get a error "divergence detected in AMG solver x-momentum".

After testing several parts, I think it has probably something to do with y=x[1] (see blue part). Does anyone know a solution?

#include "udf.h"

DEFINE_PROFILE(inlet_x_velocity, thread, index)
real x [ND_ND];
real y;
face_t f;
real t = CURRENT_TIME;
real q;

if (CURRENT_TIME <= 100000.0)
q = 2.0*pow((y/3.0),0.4);
q = 1;
F_PROFILE(f, thread, index)=q;
end_f_loop(f, thread);



All times are GMT -4. The time now is 19:49.