CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

Does CX_Interpret_String work in parallel?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   June 28, 2014, 11:17
Default Does CX_Interpret_String work in parallel?
  #1
New Member
 
Manuel
Join Date: Jan 2014
Posts: 18
Rep Power: 3
86lolo is on a distinguished road
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
86lolo is offline   Reply With Quote

Old   June 29, 2014, 21:22
Default
  #2
Senior Member
 
Ji Junjie
Join Date: Feb 2010
Location: Shanghai, China
Posts: 105
Rep Power: 7
gearboy is on a distinguished road
I also encountered such thing. I prefer to writing scheme command and use "Execute command" menu to perform it in parallel mode.
gearboy is offline   Reply With Quote

Old   June 30, 2014, 04:36
Default
  #3
New Member
 
Manuel
Join Date: Jan 2014
Posts: 18
Rep Power: 3
86lolo is on a distinguished road
Do you mean in Calculation Activities panel?
86lolo is offline   Reply With Quote

Reply

Tags
parallel, scheme, udf

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parallel processing problem newbie29 OpenFOAM Running, Solving & CFD 1 June 22, 2012 04:23
error while running in parallel using openmpi on local mc 6 processors suryawanshi_nitin OpenFOAM 5 May 21, 2012 14:13
CFX parallel multi-node jobs fail w/ SLURM on Ubuntu 10.04 danieru CFX 0 February 17, 2012 07:20
HP MPI warning...Distributed parallel processing Peter CFX 10 May 14, 2011 06:17
Cases with small length scale work fine on a single processor but fail in parallel adona058 OpenFOAM Bugs 5 April 17, 2009 04:41


All times are GMT -4. The time now is 15:07.