|
[Sponsors] |
January 17, 2005, 04:59 |
Programming Post in PowerSyntax / Perl
|
#1 |
Guest
Posts: n/a
|
Hi
I am trying to do a bit of programming to post process my data . I have a set of 50 backup files, for which I need to process various contour plots. I have recorded a session file, from the start including loading of the files till I need to post process my contours and print them as JPEG's. Now I need to loop this single session file in a loop such that I can do the same for 50 more files. Can anyone be kind enough to help me out in this? All the 50 files are in sequential order. Thanks R P |
|
January 17, 2005, 17:58 |
Re: Programming Post in PowerSyntax / Perl
|
#2 |
Guest
Posts: n/a
|
R P,
I've done this, its not too difficult. I'll post the syntax tomorrow when i'm at work. James |
|
January 18, 2005, 01:32 |
Re: Programming Post in PowerSyntax / Perl
|
#3 |
Guest
Posts: n/a
|
James,
Thanks for your kind help. I am eager to see the code. Thanks R P |
|
January 18, 2005, 09:09 |
Re: Programming Post in PowerSyntax / Perl
|
#4 |
Guest
Posts: n/a
|
I actually took forces from each of the files, but you could just replace the these statements with plot statements:
You need a session file and a batch file. -------------------------------------------------- # Session file started: 2004/10/21 10:38:42 # CFX-5.7 build 2004.04.01-23.00 ! open (DATAFILE,">>Datafile.txt") or die "File Error\n"; ! $filePath = getValue("DATA READER","Current Results File"); ! $torque_x = torque("Rotor","X"); ! $torque_y = torque("Rotor","Y"); ! $torque_z = torque("Rotor","Z"); ! $force_x = force("Rotor","X"); ! $force_y = force("Rotor","Y"); ! $force_z = force("Rotor","Z"); ! $Cp_chord_wise = $torque_z/$force_y; ! $Cp_span_wise = $torque_x/$force_y; ! format DATAFILE= ! @>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> @>>>>>>>>>>>>> @>> @>>>>>>>>>>>>> @>> @>>>>>>>>>>>>> @>> @>>>>>>>>>>>>> @>> @>>>>>>>>>>>>> @>> @>>>>>>>>>>>>> @>> @>>>>>>>>>>>>> @>> @>>>>>>>>>>>>> ! "Full Path and Run Number", "Force-X (N)", "", "Force-Y (N)", "", "Force-Z (N)", "", "Torque-X (N*M)", "", "Torque-Y (N*M)", "", "Torque-Z (N*M)", "", "Cp-Chord (M)", "", "Cp-Span (M)" ! @>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> @.############ @>> @.############ @>> @.############ @>> @.############ @>> @.############ @>> @.############ @>> @.############ @>> @.############ ! $filePath, $force_x, "", $force_y, "", $force_z, "", $torque_x, "", $torque_y, "", $torque_z, "", $Cp_chord_wise, "", $Cp_span_wise !. ! write DATAFILE; ! close DATAFILE; >quit # Session file stopped: 2004/10/21 10:40:42 -------------------------------------------------- DOS Batch File -------------------------------------------------- @ECHO Off C:\CFX\CFX-5.7\bin\cfx5post -batch T:\ANSYS_CFX\Post_session.cse T:\ANSYS_CFX\1\1_001.res C:\CFX\CFX-5.7\bin\cfx5post -batch T:\ANSYS_CFX\Post_session.cse T:\ANSYS_CFX\2\2_001.res -------------------------------------------------- You could gave done some kind of perl loop, but i figured this was quicker to do. Regards James |
|
January 26, 2005, 03:10 |
Re: Programming Post in PowerSyntax / Perl
|
#5 |
Guest
Posts: n/a
|
James,
Thanks for the trick. I shall surely use it in my programming. R P |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Ansys Post processing | ano999 | ANSYS | 1 | May 27, 2011 17:24 |
NO model vs post processing in coal combustion,CFX | sakalido | CFX | 1 | April 15, 2011 15:07 |
Export from post gives different result between v11 and v12 | bennn | CFX | 2 | February 10, 2011 06:38 |
CFX5Post error in batch mode with Perl | windhair | CFX | 2 | March 20, 2007 06:41 |
Post Processing in FEM | Abhijit Tilak | Main CFD Forum | 0 | April 26, 2004 12:59 |