|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Peter Maday
Join Date: Aug 2011
Posts: 14
Rep Power: 15 ![]() |
Dear All,
I am trying to create a script to export a flow rate time series to a CSV file. I create a time series of flow rate values by using the PlotSelectionOverTime filter on an IntegrateVariables output. When I use the "Save Data" in the GUI to create a CSV file with the results it works fine. I would like to automate the process thereby I recorded a script using the "Trace" GUI feature. The problem is that the export of the CSV file does not show up in the trace script (using Paraview 4.0.1)! The main problem I face when trying to do the export manually (using the CreateWriter function) is that I need an input that contains the time series values and I don't really know how to access it... It would be nice if the temporal samples related to the PlotSelectionOverTime filter could be exported directly. In general is there a way to access the array values of a filter specific to a temporal instance? As a last resort it should be possible to step through the frames manually and create separate files for each instance. Thanks a lot! |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 129 ![]() ![]() ![]() ![]() ![]() ![]() |
Greetings Peter,
Sorry, I don't have time this weekend to try this myself, but have a look at this post for ideas: http://www.cfd-online.com/Forums/ope...tml#post446333 post #6 Best regards, Bruno
__________________
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Peter Maday
Join Date: Aug 2011
Posts: 14
Rep Power: 15 ![]() |
Thanks for the reply!
The solution I have found for my problem was to use a programmable filter to create a vtkTable out out the vtkMultiBlockDataset that is the output of the plotSelectionOverTime filter (with the appropriate selection of the block and column indices): progFilter=ProgrammableFilter() progFilter.OutputDataSetType='vtkTable' progFilter.PythonPath = '' progFilter.RequestInformationScript = '' #progFilter.RequestUpdateExtentScript= '' progFilter.Script = "\ dataTable=self.GetInput().GetBlock(0).GetColumn(0) \n\ output=self.GetTableOutput()\n\ output.AddColumn(dataTable)\n\ " I believe it is worth mentioning that it is possible to put the debugger breakpoints (pdb.set_trace()) in the progFilter.Script string and this way to figure out what exactly the input of the filter is like. |
|
![]() |
![]() |
![]() |
Tags |
csv files, scripting, temporal |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 05:13 |
How to export time series of variables for one point? | mary mor | OpenFOAM Post-Processing | 8 | July 19, 2017 11:54 |
High Courant Number @ icoFoam | Artex85 | OpenFOAM Running, Solving & CFD | 11 | February 16, 2017 14:40 |
simpleFoam error - "Floating point exception" | mbcx4jc2 | OpenFOAM Running, Solving & CFD | 12 | August 4, 2015 03:20 |
dynamic Mesh is faster than MRF???? | sharonyue | OpenFOAM Running, Solving & CFD | 14 | August 26, 2013 08:47 |