CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   udf - iteration number within one time step?! (

Mira January 22, 2008 06:17

udf - iteration number within one time step?!
Hi you all, I have a question about this statement:

int current_iter = (nres==0)?(0) : ((int) cont2[nres-1]];

I read this several times here in this forum. In general this is exactly what I need - hopefully - because I want to know the iteration step within a time step (for unsteady calculation). One problem seems to be, that I just interpret my udf in fluent, so I get the error message: label "count2" not found (pc=32). Does anyone know a possibility to get the iteration number within one time step for interpreted udfs?

Best regards and thanks for help, Mira

Mira January 23, 2008 04:16

Re: udf - iteration number within one time step?!
Just one new fact I found:

int current_iter = (nres==0)?(0) : ((int) cont2[nres-1]]; has not the value of the iteration-number made in one time step but the value of all made iteration-steps, so that gives us the same information as nres itself.

But the variable current_iter is accessible with a compiled udf and that's the number of iterations made in one time step.

How to get this information with an interpreted udf is still a question.

regards, Mira

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