CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Timestep UDF not work (https://www.cfd-online.com/Forums/fluent-udf/87765-timestep-udf-not-work.html)

peaker007 April 28, 2011 12:10

Timestep UDF not work
 
Hi,all
I have met a problem in timestep UDF.The following is my UDF code.
DEFINE_DELTAT(mytimestep,d)
{
real time_step;
real flow_time = CURRENT_TIME;

if (flow_time < 0.005)
time_step = 0.00005;
else if(flow_time < 0.025)
time_step = 0.0001;
else if(flow_time<0.175)
time_step=0.0005;
else if(flow_time<1.175)
time_step=0.001;
else if(flow_time<5.675)
time_step=0.003;
else if(flow_time<10.675)
time_step=0.005;
else
time_step=0.01;
return time_step;
}
After i hook my UDF to Fluent and start up the iteration,but only one time step can be run, then iteration was stopped and can not work continue.Who can help me to find out the reason.Thanks.


All times are GMT -4. The time now is 02:07.