Subtract from one slice result to another slice result

Dear ParaViewers,

I have got a question about subtracting slice results. I have two simulation results: results.foam-1 and results.foam-2. And I sliced those results at 1.5m of Z axis for each: Slice1 and Slice2.

Slice1 from results.foam1

Slice2 from results.foam2

I want to have the result that Slice 2 is subtracted by Slice 1. So, I’d visualise the difference of Umagnitudes between them. And I’d represent Umagnitude based on Cells, not points.

Do I have to do with calculator filter or python calculator filter? If so, how can I do that? Can anyone please let me know the fomula for the calculator or python calculater?

Please help.

If the geometries in Slice1 and Slice2 match exactly, including the order of Cell Id, apply the AppendAttributes filter and then use the Calculator filter to take the difference “U-U_input_1” of the Vectors of the Cell Data.

If only the order of Cell Id is different between Slice 1 and Slice 2, you should take the difference to Point Data instead of Cell Data in the Calculator filter, and then apply the PointDatatoCell Data filter.