Obtain average pressure over a range of slices?
I am trying to post-process some data in an irregular geometry with internal flow.
I have created a range of x-normal slices, and would like to calculate the average pressure over each slice. However, when I apply the 'Integrate Variables' filter in paraview, I obtain the average pressure over the entire range instead of the average pressure over each slice. I could of course manually move a single slice and write down data points, but this is tedious if I want the average at say 100 different x-positions. Is there a faster way to do this? Thanks! -Nuc |
Quote:
|
Hmmm.. This isn't exactly what I'm looking for. The advantage of doing this is in Paraview is that I can clip the geometry so that the slice only passes through the region in which I am interested.
I have been trying to accomplish my goal by: 1) Creating a slice, say at x = 0 2) Applying the 'Integrate Variables' filter to the slice 3) Animating the slice offset, so that it moves from x = 0 to x = 10 over 10 seconds 4) Applying 'Plot selection over time' to the result of 'Integrate Variables' This ALMOST works. The variables in the 'Integrate Variables' table update during the animation as desired. However, the plot (step 4) does not work, and the data from the table is not saved during the animation. Edit: Basically I'm trying to do the same thing as what was discussed here: http://www.paraview.org/pipermail/pa...er/019544.html It looks like programming an extra filter is the best way to go? Any ideas on how to save the results from 'Integrate Variables' at each animation time step? |
Quote:
|
Got it:
Code:
pdi = self.GetInputDataObject(0,0) |
Hello,
I'd like to apologize for posting on this older thread. It seems to be exactly what I'm trying to do, but I have a few questions. I'm looking to generate ### slices (I have been using the slice offset feature in ParaView) and look at the Surface Flow through each of them. Instead of going through each slice and manually calculating flow > exporting to Excel > doing this ### of times, I'd like to get the Surface Flow through the set of slices--for each individual slice. Has there been an addition of an easier way to do what this thread describes? I'm not getting the code to work for my case just yet. Thought I would reach out for some help! Joseph |
Hi Joseph,
I'm not familiar with the "Surface Flow" filter, but if it outputs scalars, you should be able to create a "Programmable Filter" to export the results to a file relatively easily: Code:
pdi = self.GetInputDataObject(0,0) It's a bit of a hack, but it might work for you. Alternatively, you could use the sample utility as others in this thread suggested. -Nuc |
Hello Ken,
Thank you for advice. I'll keep at it and try this code. Hopefully I'll be able to get it to work! Joseph |
Quote:
|
All times are GMT -4. The time now is 20:13. |