CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

CFD-Post Power Syntax: referencing Location in 'evaluate' by $variable_name

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

Like Tree1Likes
  • 1 Post By clmssun

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2017, 21:50
Default CFD-Post Power Syntax: referencing Location in 'evaluate' by $variable_name
  #1
New Member
 
GPH
Join Date: Jun 2017
Posts: 5
Rep Power: 8
clmssun is on a distinguished road
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
clmssun is offline   Reply With Quote

Old   June 29, 2017, 10:30
Default
  #2
New Member
 
GPH
Join Date: Jun 2017
Posts: 5
Rep Power: 8
clmssun is on a distinguished road
I have resolved it.

!$loc=”Turbo Line ${i}”;
!($a,$aUnits)=evaluate("length\@${loc}");


Sent from my ONEPLUS A3000 using CFD Online Forum mobile app
Benzouz likes this.
clmssun is offline   Reply With Quote

Reply

Tags
cfd-post, evaluate, power syntax

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Input power calculation for pump in CFD post Dhairya@CFD CFX 3 April 27, 2017 08:06
CFD Salary CFD Main CFD Forum 17 January 3, 2017 17:09
CFD Design...The CFD Future John C. Chien Main CFD Forum 20 November 19, 2015 23:40
Where do we go from here? CFD in 2001 John C. Chien Main CFD Forum 36 January 24, 2001 21:10
Which is better to develop in-house CFD code or to buy a available CFD package. Tareq Al-shaalan Main CFD Forum 10 June 12, 1999 23:27


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