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

Output force as a function of time

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 21, 2005, 23:54
Default Output force as a function of time
  #1
Andrew
Guest
 
Posts: n/a
I've been trying to export force on a body as a function of time from CFX-10 with little success. I can get the data I want as a txt file if I export from a chart (using expression eg. forze_z@body wall vs. time), but...I want to fully automate this to fit in with the rest of my automisation scheme i.e. not need to open post.

Help Appreciated

  Reply With Quote

Old   November 23, 2005, 01:31
Default Re: Output force as a function of time
  #2
test
Guest
 
Posts: n/a
Hi,

You can do this using a simple perl script which has to loop over different transient result files. contact your local support office and you should get one easily.

Regards, test
  Reply With Quote

Old   November 23, 2005, 19:12
Default Re: Output force as a function of time
  #3
James Date
Guest
 
Posts: n/a
I posted this a while back.

To take the forces from each of the transient output files use something like the script written below.

You need a session file and a DOS 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

  Reply With Quote

Old   December 6, 2005, 16:16
Default Re: Output force as a function of time
  #4
HR
Guest
 
Posts: n/a
If you can do it interactively, then you can do in the batch mode as well. All you need to do is make a session file out of your interactive session: 1. start Post 2. start recording a session (Session > New Session, then Session > Start Recording) 3. load file, make your chart, export data, etc. 4. quit You can now tweak the recorded session if needed and play it back in batch mode.

  Reply With Quote

Old   August 19, 2013, 09:23
Default
  #5
Member
 
Join Date: Oct 2012
Posts: 42
Rep Power: 5
A_Prakash is on a distinguished road
I have been fiddling with things in CFD-post. I know just enough about session file to automate the routine tasks I perform.
However, I am now thinking of adding some fool-proofing options via GUI to my .cse file so that a colleague can interact with it through a message box.

Here is my question: How can I use a Perl command to display a simple message box as part of my .cse file execution?

P.S Don't wish to be ignorant.. but, I have been struggling to get to a good staring point on using GUI thru perl. I am completely new to scripting... but, with some help-in-context baby steps.. I know I will be up and running fast... Thanks.
A_Prakash is offline   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
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
Force Report help~ or maybe Custom Field Function sailor FLUENT 0 April 13, 2011 03:45
Full force and moment coefficient output Newfoamy OpenFOAM 6 March 17, 2010 04:19
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07
Residence time distribution function Roustam Phoenics 3 February 26, 2002 09:47


All times are GMT -4. The time now is 14:12.