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/)
-   -   Does CX_Interpret_String work in parallel? (http://www.cfd-online.com/Forums/fluent-udf/138106-does-cx_interpret_string-work-parallel.html)

86lolo June 28, 2014 11:17

Does CX_Interpret_String work in parallel?
 
Hello guys
I am having trouble with that function.
I have an EXECUTE_ON_DEMAND which evaluates some conditions of my problem, and based on the result, it will keep'on iterating. I need to iterate over time-steps untill a certain condition gets reached
Therefore I had something like:
Code:

while(my_condition_not_satisfied) /*more iterations needed*/
{
 CX_Interpret_String("/solve/dti 100 20");
 evaluate_again_condition;
}

It did not work. Seems that this function does not like general fluent commands. Instead, it is necessary to use "(physical-time-steps 100 20)" as the string. General TUI commands do not work, only those scheme commands wrapped in brackets. I wonder why.
Then I even thought of using the scheme command "ti-menu-load-string" to load any string you want, putting it inside the CX_Interpret_String and. Sounds ridiculous, (a string interpreter inside a string interpreter), but worth trying...

That didn't work either. Fluent will crash, entering in no-response mode, without even printing in the console why.
ANYWAY, I tried to continue with (physical-time-steps) and make it to work in parallel... big mistake. It didn't work. CX_Interpret_String gives me error:
Code:

Error: eval: unbound variable
Error Object: physical-time-steps

(with same code which worked in serial mode). Fluent manual is not explicit whether this function should be protected by #if ! directives. Anyway, I have tried all the combinations and still I get the same.

I think my problem is solvable by scheme commands (a scheme DO loop and rp-variable passing to UDFs to evaluate the condition), but I'd really like to try by UDF first, scheme is tedious, user-unfriendly and hard-to-write.

Has anyone used CX_Interpret_String in parallel Fluent?
Is there any documentation about it? I found nothing in Ansys UDF Manual. I have also found around that exists CX_Interpret_String_to_String and CX_Message functions, but I don't know what they are for and where is documentation about them.

Thanks in advance

gearboy June 29, 2014 21:22

I also encountered such thing. I prefer to writing scheme command and use "Execute command" menu to perform it in parallel mode.

86lolo June 30, 2014 04:36

Do you mean in Calculation Activities panel?


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