[yt-dev] Streamlines in FLASH

Benny Tsang bthtsang at astro.as.utexas.edu
Fri Jun 30 11:58:42 PDT 2017


Hi yt developers,

I'm trying to produce 3D streamlines using the AMR data from FLASH following the yt-project tutorial http://yt-project.org/doc/visualizing/streamlines.html. However, the execution was very slow (in particular, at the 'Streamlines' call). The code didn't complete one single streamline after an hour.

Here's the excerpt of my code:
—————
c = ds.domain_center

streamlines = Streamlines(ds, c, 'velx', 'vely', 'velz', length=1.0*pc, get_magnitude=False)
streamlines.integrate_through_volume()

fig=plt.figure()
ax = Axes3D(fig)
for stream in streamlines.streamlines:
  stream = stream[np.all(stream != 0.0, axis=1)]
  ax.plot3D(stream[:,0], stream[:,1], stream[:,2], alpha=0.1)

plt.savefig('streamlines.png')
—————

I have two thoughts:
1. My FLASH file is quite large (~10GB). It may just be slow because of the large AMR grid size. Are there any ways to read only the velocities off the grid or only a subsection of the grid?
2. FLASH's octree data structure may be incompatible with the AMRKDTree construction (first step in streamlines creation). In the doc string of AMRKDTree, it says "Not applicable to particle or octree-based datasets.". If it's the case, I may have to find another way out.

Thank you very much for your time! Have a great weekend!

Best,
Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20170630/f42ec70b/attachment.htm>


More information about the yt-dev mailing list