Results superposition


how can I add together results from 2 different output databases (with the same geometry) or 2 different frames within a single database ? In the case of linear structural FEA it’s often necessary to add together results from separate analyses performed on the same model or from independent frames of a single analysis. I don’t know which filters in ParaView could help with that (I assume that two different filters will be needed depending on whether databases or frames are considered). To make it clear what I mean - here’s an example: if a point has a value of a particular variable equal to 3 in one database/frame and 5 in another database/frame then this point should have a value of 8 as a result of superposition.

Hi @FEngineer

PythonCalculator should be the right filter to use.


I selected two data sets in the tree, added Python Calculator and typed this:


However, the result is just the value from the first data set, not a sum from both of them. Should I do it differently ?

That sounds correct, could you share a statefile ?

Sure, here’s the state file:

Superposition.pvsm (454.8 KB)

I’m unable to reproduce your issue with your statefile and my own data, please share your data.

Here are both data sets:

Pipe2D.vtk (2.8 MB)
Pipe2D_PR0.vtk (2.8 MB)

I tried with different data sets and the same behavior can be observed - instead of summing, values from the first data set are shown. Can it be a bug ?

I’ve found a different way to do this - using Programmable Filter with this code:

v_0 = inputs[0].PointData['Displacement Magnitude']
v_1 = inputs[1].PointData['Displacement Magnitude']
output.PointData.append(v_1 + v_0, 'sum')