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

Using Perl's "Foreach" loop in CFXPost

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 31, 2018, 07:08
Default Using Perl's "Foreach" loop in CFXPost
  #1
New Member
 
Navid Mikaillian
Join Date: Mar 2018
Posts: 7
Rep Power: 8
navidmkl2 is on a distinguished road
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.
navidmkl2 is offline   Reply With Quote

Old   March 31, 2018, 11:56
Default
  #2
New Member
 
Navid Mikaillian
Join Date: Mar 2018
Posts: 7
Rep Power: 8
navidmkl2 is on a distinguished road
Update!
Maybe i can try this one: http://www.eureka.im/4160.html

I'll let you know the outcome.

//Navid
navidmkl2 is offline   Reply With Quote

Old   April 1, 2018, 02:05
Default
  #3
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Reply

Tags
cfxpost, foreach loop, perl


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
[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


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