[Paraview] Cut plane average velocity over time

David Larsson david.larsson at sth.kth.se
Fri Feb 19 11:25:07 EST 2016


Dear Jean,


thanks for the helpful advice!


However one question: aren't you right now creating a time average in for each point on a plane (or given input source)? What I was looking for was finding out the average value over a plane, and seeing how this changes over time. Can this be done in a similar fashion? Being new to paraview/python I'm though not really sure how...


Another question is regarding the output: How can I access the annoted outvalue (assigned in 'output.PointData.append(self.temp_data/self.tlen,'myOutputValueName'). Again, now it is in point data, but assuming I can get a single scalar value of the average value over a plane, how could I save this (for each time step) such that I can plot or evaluate it later on?


Again, thanks for your time and help.


/David


________________________________
Från: Favre Jean <jfavre at cscs.ch>
Skickat: den 16 februari 2016 11:11
Till: David Larsson; paraview at paraview.org
Ämne: RE: Cut plane average velocity over time

>> I would like to get an average over an entire cut plane (over time).

David

This sounds like a perfect case for a Python Programmable Filter, looping over timesteps, accumulating data, doing the average, and setting it as a new field. Here is a script I have tested on a single block of data with multiple timesteps.

There is an init phase, to get the number of timesteps, their values (from upstream), and the first dataset at the 0-th timestep.
There is an accumulate phase, where the filter pulls all timesteps, adding to the already existing numpy array.
There is a finish phase, where we do the average and assign it to a new field.

I am doing it for Pressure, you'll have to adapt it to your fieldnames and block structures.

-----------------
Jean M. Favre
Swiss National Supercomputing Center
CH-6900 Lugano
Switzerland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160219/5a0c6e23/attachment.html>


More information about the ParaView mailing list