CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   How to control the time step and iteration for summation? (http://www.cfd-online.com/Forums/fluent-udf/72970-how-control-time-step-iteration-summation.html)

josh_z February 23, 2010 10:05

How to control the time step and iteration for summation?
 
Hi,

I need to sum a variable per each time step while not sum per each iteration. the UDF is like the following:

if (N_TIME==1)
{
sum=C_UDMI(c,t,0);
N=0;
}
else if (N_TIME==N)
{
sum+=C_UDMI(c,t,0);
}
...
N=N_TIME+1;

It does not working. What's wrong?

Thanks in advance

josh_z February 23, 2010 10:19

I mean, the UDF did not do the summation.

Goldsstean February 23, 2010 11:02

Compile and hook it.


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