CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF of iterations (https://www.cfd-online.com/Forums/fluent/33762-udf-iterations.html)

h6h6 May 19, 2004 07:52

UDF of iterations
 
I want to have UDF :

from 1 ~ 500 iteration , pressure-outlet=101000pa

when 500 iteration finished, 101200pa.

file of *.c is below, but have error.

Anyone help me? ............................................. #include "udf.h"

DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; int iter;

iter = N_ITER;

if (iter < 500)

F_PROFILE(f, thread, position) = 101000; else

F_PROFILE(f, thread, position) = 101200;

} .................................................. ..

Melih May 19, 2004 18:33

Re: UDF of iterations
 
As far as I understood, you want to have a pressure outlet b.c. of a value 101000pa when ite. lower than 500 and 101200 pa after 500 ite. I think, you won't get a b.c. like that, even your UDF runs fine, because hooking for UDF can not be made in UDF itself. You must do it manually...

good luck...

Melih

FJ May 23, 2004 21:05

Re: UDF of iterations
 
Hi,

"nres" should be used instead of "N_ITER".

FJ

h6h6 May 23, 2004 21:55

Re: UDF of iterations
 
It is OK!

Thank you very very much!

hongzhilin August 28, 2018 23:07

Quote:

Originally Posted by FJ
;112731
Hi,

"nres" should be used instead of "N_ITER".

FJ

hi,
I am using nres in my udf, but i can tell the difference between nres and N_ITER, can you explain it?

thanks


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