I am a full beginner at Paraview, and I just started to play with python for automating tasks (insertion of particle tracers in my domain).
The issue I currently have is that, the Force Reinjection Every Nth Steps does not work for me. Either at 0 it only inject a single particle, or at 1 it injects it every timestep. But I can not get to do it for every 2,3,4,5,etc… time steps… Any reason why?
The only particularity of my case is that I use a TemporalInterpolator, is that an issue? I tried of different cases and always the same issue.
Thanks for the quick answer!
I am sorry, I am not sure of which file to include. I exported the pvd and pvsm, but I believe without the mesh it will not be useful?
Now the thing is, when I apply it it seems to work, but when I check the methods and attribute through the python shell, they do not display the one that I can find online (for example, the methods from the parent class like SetTerminationTime(double t).
I would love to use it on my new vtk-imported filter, but I have no idea how. The GUI shows no option, and I do not know how to proceed through python.
Right now I can access the object through the command “myParticleTracker1 = GetActiveSource()”
The .pvsm file you sent link to an OpenFOAM data I do not have access to.
Your .pvd/.vtp file do not seem to contain any interesting data.
problemNthStep_0_0.vtp contains a single point.
problemNthStep_0_1.vtp contains no point.
Please share the data you are trying to post process with ParaView.
Sorry, I am fairly unaware, and confused, on how to share data from paraview.
On the bright side, I just found out my issue while trying to reproduce the case to send it to you.
I was applying the particle tracer directly on my “initial” foam file. Instead, I just tried to apply it on the temporal interpolator filter as the source, and it works! Sorry for the complicated thread while the solution was fairly straightforward.
To be a bit more clear, let me explain what I am trying to do.
I would like to create “fake” time steps. Right now, what I am doing is loading twice the same timestep, but “faking” paraview into thinking they are different, by simply copying my folder “200” to “300” and reloading. I then apply a temporal interpolator to get the deltaT I like.
I do understand that this is highly inneficient, because through the interpolator, a lot of calculation are made for interpolating between two state that are exactly the same. But I am not sure if there is a better way to go, I could deep dive into the code and try to create a modified TemporalInterpolator so that it does not recalculate the field between the timesteps, but that seems quite a daunting task for a beginner. Would you have a better way in mind?
Thanks again!
But shouldn’t it be more efficient to have a filter acting very similar to the current temporal interpolator, but only the “fake” timestep creation?
Or since the timestep are not the same, even though their associated data is similar, paraview will try to re-read the whole field everytime? Would it be possible to avoid this?
Ah, I see! Good, hopefully its not too hard to fix
Let me come back to the ParticleTracer vtk, depite reading examples and the link you shared, I really have trouble setting up the XML for vtkParticleTracer that would allow me to use things like " SetStartTime()". Is there any chance there is an example close to implementing this somewhere?
I am reverting after a while.
I have been trying but can not find a way to solve my issue of generating timesteps.
If I apply the particle tracer on the particle generator, they go everywhere randomly, I guess from the bug you noticed. But if I generate a time generator but still apply the particle tracer on the original field, I get this weird bug:
The workaround of saving on disk is not successful, since the loadtime of each timestep is quite slow.
Finally, I tried to create a programmable filter creating time-step, with no success since the particle tracer seems not to take into account the generated timesteps (maybe just because I can’t create a proper filter, raised another topic on that… Create a programmable filter along timesteps)
At this point I am not sure which route I should go. The only one working so far is the temporal interpolate, but the fact that for each time step it calculates a new field make it too slow…
If you have any clue on any of these issues, It’d be more than welcome! Thanks!