Moving frame of reference with a moving object

Dear community,

I couldn’t find any similar topics in the forum, but I am rather new to Paraview so please bear with me if this has already been answered.

I am simulating a viscous flow front moving in the x direction (2D) in an eulerian frame of reference and would like to know if paraview has built-in functions to dynamically transform the frame of reference to follow the flow front (making it lagrangian).

So for example something that’s like origin(time)=[max_position_X(time),0,0], so that the flow is immobile to the observer.
(Note that I am using a particle based method (SPH) so accessing the point of maximum X position shouldn’t be a big issue! )

I tried my hand at a programmable filter doing this but have been unsuccessful.

Thanks a lot in advance!

The only tool I can think of here would be the LagrangianParticleTracker that give tools for users to simulate this kind of things, however it requires some C++ coding.

Other than that, programmable filter would be the right way to go.

Thank you for your reply, I figured out my issue was with my data point management, I think I was using the input/output formats incorrectly, as I had only learned how to use them for meshed situations.

The following code solved it :

max_x=max(inputs[0].PointData[“coords”][:,0])
output.Points[:,:]=[-max_x,0,0]+inputs[0].PointData[“coords”][:,:]

Thanks a lot !
Regards