|
[Sponsors] |
March 31, 2018, 07:08 |
Using Perl's "Foreach" loop in CFXPost
|
#1 |
New Member
Navid Mikaillian
Join Date: Mar 2018
Posts: 7
Rep Power: 8 |
Hi,
I am going to write a general script for gas turbine performance calculation. Let's say I have different domains in my model like Vane1, Blade1, Vane2, Blade2,... . (The names and number of domains can be different in different models) I am wondering if the domains can be treated as "Objects" of a model. I mean if a Perl script can go through all of them without knowing their names and count. For example by a "foreach" loop over the list of all domains: foreach $domain ($AllDomainsList) { ## Do something in $domain ## e.g. print its name! } One solution could be to publish a CFXPost report and then doing string manipulation over that text file... I know this solution... but I thought maybe someone knows a more direct way of having access to a CFX model objects. Cheers, //Navid Last edited by navidmkl2; March 31, 2018 at 08:33. |
|
March 31, 2018, 11:56 |
|
#2 |
New Member
Navid Mikaillian
Join Date: Mar 2018
Posts: 7
Rep Power: 8 |
Update!
Maybe i can try this one: http://www.eureka.im/4160.html I'll let you know the outcome. //Navid |
|
April 1, 2018, 02:05 |
|
#3 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144 |
The perl and CCL are separate interpreters. By that I mean the file is passed through the perl interpreter which generates a larger CCL file, and the CCL is interpreted by CFX. The two interpreters do not interact beyond that. So as long as your proposed loop fits inside this structure it should be possible.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
Tags |
cfxpost, foreach loop, perl |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 03:36 |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 12:04 |
[Gmsh] Problem with Gmsh | nishant_hull | OpenFOAM Meshing & Mesh Conversion | 23 | August 5, 2015 03:09 |
[CAD formats] my stl surface is seen as just a line | rcastilla | OpenFOAM Meshing & Mesh Conversion | 2 | January 6, 2010 02:30 |
NACA0012 geometry/design software needed | Franny | Main CFD Forum | 13 | July 7, 2007 16:57 |