CFD-Post Power Syntax: referencing Location in 'evaluate' by $variable_name
Hello, CFX users on CFD Online,
In Power Syntax, I have automated the creation of 5 Turbo Lines, named Turbo Line 0 to Turbo Line 4. I would like to evaluate some quantities along these Turbo Lines in an automated (for loop) manner. This (non-generalized non-automated) code yields a reasonable answer: !($a,$aUnits)=evaluate('length@Turbo Line 1'); How can I reference Turbo Line 0, Turbo Line 1, Turbo Line 2, Turbo Line 3, Turbo Line 4, respectively, in my evaluate request in a general/automated manner (for loop)? I have tried (within a for loop of i): 1) !($a,$aUnits)=evaluate(‘length@Turbo Line $i’); 2) !($a,$aUnits)=evaluate(‘length@Turbo Line ${i}’); 3) !$loc=”Turbo Line ${i}”; !($a,$aUnits)=evaluate(‘length@${loc}’); I have tried many sequences/usages of single-quotes and double-quotes in my evaluate call. Thus far, I continually fail with CFD-Post explaining: Use of uninitialized value in concatenation (.) or string at (eval 357) As stated near the top, if I specify Turbo Line 1, I indeed get the desired length of Turbo Line 1. I have successfully scripted/automated numerous CFD-Post “Location” constructs: Turbo Surface, Polylines, Turbo Lines, but I am failing when I want I to compute my “ultimate” numbers (at each Turbo Line) by referencing each Turbo Line in the Location field of an Evaluate statement. I have been perusing the Power Syntax documentation, but I am still confounded with the subject problem. I have also been trying to find the CFD-Post Power Syntax installation directory without success. Can anyone direct me to the Power Syntax installation subdirectory within the main CFX installation directory where I might see the coding of some of the included routines and macros? Any help is appreciated. Thank you very much, Greg |
I have resolved it.
!$loc=”Turbo Line ${i}”; !($a,$aUnits)=evaluate("length\@${loc}"); Sent from my ONEPLUS A3000 using CFD Online Forum mobile app |
All times are GMT -4. The time now is 19:08. |