CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   THREAD_STORAGE always == NULL (https://www.cfd-online.com/Forums/fluent/39549-thread_storage-always-null.html)

Luca February 7, 2006 11:47

THREAD_STORAGE always == NULL
 
Hi all,

I have a udf wherein I impose a mass fraction gradient. Since at the first step the gradient is not defined, I placed a control like this:

if (NULL != THREAD_STORAGE(t,SV_Y_0_G))

dYfdy = C_YI_G(c,t,0)[1];

else

dYfdy = -0.1;

My problem is that THREAD_STORAGE(t,SV_Y_0_G) is ALWAYS equal to zero at every step (not only the first). And if I change my grid it seems to work.

Does anyone have idea why I have this problem?

Thanks guys, keep up the good work.

Luca


RoM February 8, 2006 01:24

Re: THREAD_STORAGE always == NULL
 
Try the following TUI commands

//define/models/species/save-gradients? : yes

and

//set/solver/expert "Keep temporary solver memory from beeing freed?" : yes

This should force the fluent solver to store the gradients you want.

RoM

Luca February 14, 2006 13:35

Re: THREAD_STORAGE always == NULL
 
Thanks a lot RoM, I soved my problem. Could you please tell me the commands to store the thermal gradients also?

Where can I find a list of TUI commands?

Thank you!

Luca

rom February 15, 2006 01:53

Re: THREAD_STORAGE always == NULL
 
The //set/solver/expert "Keep temporary solver memory from beeing freed?" should take care of all available gradients including energy. I dont know why there is an extra command for the species gradients.

RoM


All times are GMT -4. The time now is 21:57.