CFD Online Discussion Forums

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

ap February 27, 2004 15:11

UDF error
 
I'm writing a UDF to implement a scalar transport equation. If I enable the source term, FLUENT does one iteration, then, during the second, it gives this error:

Error: > (greater-than): invalid argument [2]: wrong type [not a number] Error Object: nan

If I disable the source term, this doesn't happen.

What does this mean?

Thanks in advance :)

ap

Jun February 27, 2004 15:51

Re: UDF error
 
I guess the solution is divergent due to the source term. You can see the scalar contour after just one iteration and see what happens. Have fun.:)

Jun

ap February 27, 2004 18:17

Re: UDF error
 
Thanks a lot.

You're right, solution is divergent.

To calculate the source term, I need stress tensor components, but I don't know how to obtain them from FLUENT, so I'm calculating them with a code I wrote for this purpose. Maybe the problem is in that part of the code.

Is there a function in FLUENT to obtain stress tensor components?

Hi :)

ap

thomas March 1, 2004 04:31

Re: UDF error
 
Hi, You should post your UDF lines. thomas

Jun March 1, 2004 12:04

Re: UDF error
 
Probably you need to contact Fluent support people to make sure if you can access the stress tensor components directly. On the other hand, calculating them from those gradient vectors seems viable. There are some tips which may help. Start your own calculation from a convergent flow field. Put some limit on the variable you are calculating. And most importantly, good luck. :)

Jun

ap March 1, 2004 13:12

Re: UDF error
 
Really thank to all for your help.

Trying to make the code work, I found a little bug, which probably was the cause of divergence. Now I'm doing some test to see if it works.

Hi and thanks again :)

ap


All times are GMT -4. The time now is 05:10.