How to subtract time(t) data from time(t-1) data

I need to visualize a displacement field with its previous time, spatially-varying displacement field subtracted off.

The displacement field after the calculation is performed should be visualized by subtracting the first non-zero spatially varying displacement field.
Essentially, at every element I want [displacement(t) – displacement(t-1)].

I read “How to subtract time(t) data from time(0) data” on Jun '18,2018,and actually I did.

I thought ‘Python Calculator’ filter and ‘Force Time’ filter may work for this but I don’t know how to set previous time with ‘Force Time’ filter.

Do you have any suggestions?

How to subtract time(t) data from time(0) data - ParaView Support - ParaView

See Temporal Array Operator filter, it is the exact use case.

Thank for reply.

I found it in the cited articles, ‘the temporal array operator does not handle working with the current timestep, it works on static timesteps.’ I found it in the cited articles, ‘However, the Python Calculater + Programmable filter would update when you change the time you are viewing, so it is animation friendly.’

I apologize for the inadequate initial explanation.
I need to visualize a displacement field with its previous time, spatially-varying displacement field subtracted off.
The displacement field after the calculation is performed should be visualized by subtracting the first non-zero spatially varying displacement field.
Essentially, at every element and any timeStep I want [displacement(present-timeStep) – displacement(previous-timeStep)].

Oh, sorry, I misread the filter doc this time …

The fact is that most filters cannot access different timesteps, so you need to find a temporal filter.

So two ways to go.

  1. First, if you have constant delta time in your data, I advise to use Temporal Shift Scale filter. And, for instance, set up Pre Shift to -delta T (whith the actual numerical value, no expression here).
    Then you can follow the linked post, and add Append Attributes and Calculator, or directly a Python Calculator with both inputs.
  2. Second option. You can animate the Temporal Array Operator to follow current time. (see this animation tutorial )

Thank you very much. The number 1 method worked.