Akash
(AV)
June 27, 2021, 6:00am
1
Hey,
I am trying to loop over my data with timestep. When I give values for n manually it works well. Here is the code:
n=34
a3d10meshfinefoam.UpdatePipeline(a3d10meshfinefoam.TimestepValues[n])
But when I do the same thing with a loop (both FOR and WHILE) the timestep is not changing.Here is the code:
n=0
while(n<=48):
a3d10meshfinefoam.UpdatePipeline(a3d10meshfinefoam.TimestepValues[n])
...
...
...
n=n+1
I checked whether n is incrementing properly and it does but still, the time is not incrementing
Akash
(AV)
June 27, 2021, 6:12pm
3
While saving the data I named it as ‘Filename_%d.csv’%n so the filenames were coming properly with different n values however all the files had the same data at timestep = 0. idk why
Akash
(AV)
June 27, 2021, 8:33pm
5
Here is the script:
script.txt (1.5 KB)
mwestphal
(Mathieu Westphal (Kitware))
June 28, 2021, 8:36am
6
You need to call UpdatePipeline(time) on the plot over line filter.
Akash
(AV)
June 28, 2021, 9:50am
7
Could you send the code line for that?
Akash
(AV)
June 28, 2021, 10:14am
9
It works. Initially it said “name ‘plotOverLine1’ is not defined” so i just defined it earlier before the loop and it works perfectly. Thanks a lot