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

Transient post-processing, Time averaged pressure work

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 2, 2011, 18:40
Default Transient post-processing, Time averaged pressure work
  #1
Member
 
Join Date: Aug 2010
Posts: 31
Rep Power: 6
Turbomachine is on a distinguished road
Dear All,

I am currently doing the post processing of a transient turbine analysis. I was looking at the previous posts and realised that there were several similar problems that have been raised but remained unsolved. Firstly, the description of the problem is the following:

I have to calculate the work done by the pressure forces on the blade during its movement. Mathematically speaking I need to integrate pressure * mesh displacement over one cycle (100 timesteps) and then plot the work distribution.

In previous discussions the following solutions have been proposed:

1) POWER SYNTAX in CFX-Post:

! @myTimeSteps = ("71","105","136"); # add your "solver steps" between brackets as they are listed in POST "Time Selector"
! $MyVariable = "Water.Superficial Velocity"; # put the variable of interset between quotes
! $MyPlane = "Plane zx"; # put the plane name here

! open(MyOutF,">C:/TimeAvgOut.csv") || die "Can't open file $!\n"; # this will create a Report file named "TimeAvgOut.csv" on root of C:\ drive

! $TStepsNo = @myTimeSteps;
!print MyOutF "Time step , ",$MyVariable, "\n";
! for ($i=0;$i<$TStepsNo;$i++){
> load timestep= $myTimeSteps[$i]
! $MyAvgVel = areaAve($MyVariable, $MyPlane,"");
!print MyOutF $myTimeSteps[$i]," , ",$MyAvgVel, "\n";
!}
! close MyOutF;

The above syntax calculates the area averaged work value at each timestep and stores it in a file.


2) TRANSIENT STATISTICS in CFX-Pre

By setting transient statistics in CFX-Pre it is possible to obtain the time averaged output of variables, however I am not aware of the possibility to include mathematical operators such as p*displ.



Despite the first option what I need is to plot the time averaged work distribution over selected timesteps.

Can anyone suggest a way to achieve this? Thank you for your help!!
Turbomachine is offline   Reply With Quote

Old   January 3, 2011, 18:01
Default Macro
  #2
Member
 
Join Date: Aug 2010
Posts: 31
Rep Power: 6
Turbomachine is on a distinguished road
I am using the following macro (suggested by Pavitran in a former discussion) to create a folder and export the data files of the variables I need. The problem is it works for a simple case of a flat plate with 40 nodes but it does not work with a large case with 20000 nodes. When I try to export it from the CFX Post file menu, however, it works fine.

Can someone help me out with this?


################################################## ######################
#### Name convention
################################################## ######################

! $PathSeparator = "/";
! $ResFileName = getValue("DATA READER", "Current Results File");
! $ResPos = index($ResFileName, ".res");
! $ResFileLength = length($ResFileName);

! if ($ResPos == ($ResFileLength - 4)){
! $FileBase = substr($ResFileName, 0, $ResFileLength-4);
! }
! else {
! $FileBase = $ResFileName ;
! }
! $DirName = $FileBase . "_EXPORT1"; ##################### ADJUST THIS
! mkdir ($DirName, 0777);
! $DirName = $DirName . $PathSeparator;


################################################## ######################
#### Start postprocessing loop
################################################## ######################
! $count = 200; ##################### ADJUST THIS (number of the start imestep)

! @tlistt = (200, 201, 202, 203, 204, 205, 206, , 300); ##################### ADJUST THIS

! foreach $tlist (@tlistt){

DATA READERATA READER
Current Timestep = $tlist
END
> load

! $dummyfile = $DirName . "t" . $count.".csv";

EXPORT:
#ANSYS Export Data = Element Pressure
#ANSYS Export Locator = wallmeshcdb
#ANSYS Fluid Selection = All Fluids
#ANSYS Reference Temperature = 0.0 [C]
#ANSYS Specify Reference Temperature = Off
Export Type = Generic
#BC Profile Type = Inlet Velocity
Export Connectivity = Off
Export Coord Frame = Global
Export File = $dummyfile
Export Geometry = On
Export Node Numbers = Off
Export Null Data = Off
Export Units System = Current
#Export Variable Type = Hybrid
Include File Information = Off
Include Header = On
Location List = Plane 1 ##################### ADJUST THIS (Inlet, Outlet, Plane1,) (only one allowed!!!)
Null Token = 0
Overwrite = On
Precision = 10
Separator = ", "
Spatial Variables = X,Y,Z
Variable List = Total Temperature, Total Pressure, ##################### ADJUST THIS (you can specify more than one variable)
Vector Brackets = ()
Vector Display = Scalar
END
>export

! $count = $count + 1;

#############################
! }
#
# Ende der Sub-Definition
Turbomachine is offline   Reply With Quote

Reply

Tags
post-processing, pressure, time average, time averaged, transient

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
calculation diverge after continue to run zhajingjing OpenFOAM 0 April 28, 2010 04:35
Transient Simulation of Oscillating Pressure Waves ylm054 CFX 1 December 4, 2009 06:02
Pressure Inlet Post Processing meshinggod FLUENT 1 November 16, 2009 14:45
Post Processing Transient Data chrisoturner FLUENT 1 September 9, 2009 17:33
Automatic post processing of Transient simulation Aziz CFX 2 June 24, 2005 14:37


All times are GMT -4. The time now is 11:48.