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

How to plot a function over a time period?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 15, 2009, 12:33
Default How to plot a function over a time period?
  #1
New Member
 
Join Date: Jul 2009
Posts: 8
Rep Power: 8
Cirion0000 is on a distinguished road
I want to plot this function: "1000*0.3142E-07*areaAve(Velocity)@OUTLET" [mass flow rate] over a certain time period. How can I do this? Seemingly simple problem, especially after all the hurdles I went through to get the FSI simulation and everything, but yet I can't figure this out, so any help is appreciated.

I would think there would be a way to achieve this in the table directly, sort of how in excel you assign the time values in one column also.
Cirion0000 is offline   Reply With Quote

Old   July 15, 2009, 18:34
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,671
Rep Power: 84
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
Hi,

Assign the CEL expression to a monitor point. Then you can get the full time history as the solution progresses in the solver manager.

Glenn Horrocks
ghorrocks is offline   Reply With Quote

Old   July 16, 2009, 09:15
Default
  #3
New Member
 
Join Date: Jul 2009
Posts: 8
Rep Power: 8
Cirion0000 is on a distinguished road
That's cool and all, but is there any way I can get the mass flow solution per time step (with the idea of plotting them over time as well as getting the overall mass flow over time) without having to re-do both FSI simulations entirely? I've already done them, and they took 30-50 hours... a pop. (Our computers here are bad, lol)

[edit] I think I've got it, now I just have to find a way to take all the data and find an overall mass flow (but this is a start at least.)

What I did was just make a time chart, and use method: expression, and put in my expression there.

[edit2] Got it. Just exported the CSV file, done. Surprised I didn't figure this out before...

PS - I'm not sure if you were already telling me to do what I just did, but it sounded like from monitor point you meant in the cfx-pre solver menu.

Last edited by Cirion0000; July 16, 2009 at 09:38.
Cirion0000 is offline   Reply With Quote

Old   July 16, 2009, 19:34
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,671
Rep Power: 84
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
Hi,

Yes, I think you got it. There are two main approaches:

1) put in a monitor point and it will calculate as the simulation proceeds. You cannot post-process this.

2) Load the res files into CFD-Post and extract it there using the function calculator or a table. If you feel adventurous you can script it in CFD-Post to do it automatically. This can be done post-processing but obviously only on the time steps saved as the run proceeded.

Glenn Horrocks
ghorrocks is offline   Reply With Quote

Old   July 18, 2009, 12:48
Default
  #5
Senior Member
 
Rogerio Jack
Join Date: Mar 2009
Location: Brazil
Posts: 100
Rep Power: 7
rogbrito is an unknown quantity at this point
Send a message via Skype™ to rogbrito
Hi,
IŽd like to know in how to do that in a transient simulation (please see the text below)?
Rogerio.



Example: Pressure Calculation on Multiple Files using Batch Mode

This example calculates the value of pressure at a point in each of three results files.
These features can be useful in situations where a large number of results files need to be processed at once.
In order to carry out this procedure, you will make use of session files, power syntax and the Command Editor
dialog box.

First, create a session file based on the first results file.
  1. Copy the results files to your current working directory.
  2. Start CFD-Post and select File > Load Results. Select the static mixer results file StaticMixer_001.res. (Your results file may have a slightly different name).
  3. Select Session > New Session from the main menu.
    For details, see New Session Command.
  4. Enter batchtest.cse as the session file name and click Save.
  5. Select Session > Start Recording from the main menu to begin recording the session file commands.
  6. Select Insert > Location > Point and accept the default name Point 1.
    You will now use Power Syntax to find the value of pressure at Point 1, and print it to the command line. In addition to printing the value of pressure, it would be useful to know the name of the results file. You will make use of the DATA READER object to find the name of the current results file.
  7. Select Tools > Command Editor.
  8. Enter the following into the command window:
    ! $filePath = getValue("DATA READER","Current Results File");
    ! $pressureVal =
    probe("Pressure","Point 1");
    ! print "\nFor results file $filePath, Pressure at Point 1 is \
    $pressureVal\n";
  9. Click Process to process the commands.
  10. Now enter the following:
    ! $pressureVal = probe("Pressure","Point 1");
    ! print "\nFor results file $filePath, Pressure at Point 1 is \
    $pressureVal\n";
  11. Check your terminal window to make sure the command worked as desired.
This completes the first part of the example. Select Session > Stop Recording from the main menu to stop recording the session file. You may want to close down CFD-Post at this time.
You can now run the session file on any number of results files using the command:

<CFXROOT>/bin/cfdpost -batch testbatch.cse <resfile>

where <resfile> is the name of your results file. You can re-run the command by typing in another results file name.

As an example, this C shell script would pass arguments as results file names to the CFD-Post command line:

#!/bin/csh
foreach file ($argv)
<CFXROOT>/cfdpost -batch testbatch.cse $file
end
rogbrito 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
Computational time sunnysun OpenFOAM Running, Solving & CFD 5 March 16, 2009 04:32
Compilation errors in ThirdPartymallochoard feng_w OpenFOAM Installation 1 January 25, 2009 07:59
Gravity function of time arapar FLUENT 0 March 8, 2008 14:49
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 12 September 17, 2007 17:48
unsteady calcs in FLUENT Sanjay Padhiar Main CFD Forum 1 March 31, 1999 12:32


All times are GMT -4. The time now is 00:05.