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

Programming Post in PowerSyntax / Perl

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

Like Tree1Likes
  • 1 Post By James Date

Reply
 
LinkBack Thread Tools Display Modes
Old   January 17, 2005, 04:59
Default Programming Post in PowerSyntax / Perl
  #1
R P
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
  Reply With Quote

Old   January 17, 2005, 17:58
Default Re: Programming Post in PowerSyntax / Perl
  #2
James Date
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
  Reply With Quote

Old   January 18, 2005, 01:32
Default Re: Programming Post in PowerSyntax / Perl
  #3
R P
Guest
 
Posts: n/a
James,

Thanks for your kind help. I am eager to see the code.

Thanks

R P
  Reply With Quote

Old   January 18, 2005, 09:09
Default Re: Programming Post in PowerSyntax / Perl
  #4
James Date
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
TrII4d likes this.
  Reply With Quote

Old   January 26, 2005, 03:10
Default Re: Programming Post in PowerSyntax / Perl
  #5
R P
Guest
 
Posts: n/a
James,

Thanks for the trick. I shall surely use it in my programming.

R P
  Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ansys Post processing ano999 ANSYS 1 May 27, 2011 16:24
NO model vs post processing in coal combustion,CFX sakalido CFX 1 April 15, 2011 14: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 11:59


All times are GMT -4. The time now is 17:16.