6 ms·
I do simulations for a living aka numerical modelling. The results that I obtain need to be explained using plots. How behaviour changes with time, how componen
by exergy 7y ago
I do simulations for a living aka numerical modelling. The results that I obtain need to be explained using plots. How behaviour changes with time, how component sizing will affect xyz parameter etc.
What I would dearly love is some way to animate the systems I simulate. A way to show HOW MUCH flow is going through a pipe, or how much heat transfer is happening in a heat exchanger. Something that's easier to grasp than dull plots.
Sadly, a) I do not even know what to google to find solutions for this, and b) all my primitive searches seem to lead to Blender, which has a large learning curve and way too much time investment requirements.
- astrophysician 7y agohttps://yt-project.org/ https://yt-project.org/ -- yt for python was used by a few of my old colleagues for visualizing astrophysical simulations. There is yet another program that I've since forgotten but will try to come back here and comment if I remember. If you can generate a single static figure, you can manually generate animations by generating each frame separately using your favorite plotting software. You can then stitch them together using many different tools (I use matplotlib) to generate an animation (video, gif, etc.). What language do you like to use? What's your background -- are you a Matlab person?
- exergy 7y agoI am a Matlab person, among other tools as well. I do something of the sort that you suggested in your second paragraph to plot time-varying diagrams by generating successive frames and then making a gif. Matlab can also do some very nice colormap stuff. Just wish there was a method with less friction!
- mirimir 7y agoIf you use a video format, viewers can scan in a controlled way. Edit: OK, there's also gifview.
- contact_fusion 7y agoMy suspicion is that you are thinking of the tool VisIt ( https://wci.llnl.gov/simulation/computer-codes/visit/ https://wci.llnl.gov/simulation/computer-codes/visit/ ). VisIt vs yt has some tradeoffs, but by and large it is very useful for rapidly visualizing numerical simulations and supports a large variety of them. I use it daily.
- astrophysician 7y agoThank you!!! Yes! VisIt is what I was trying to remember. I don’t know VisIt, only that it exists and numerical people (at least in Astro) use it.
- mturk 7y agoI work on yt, and I just wanted to comment to say that whenever I stumble on a mention of it somewhere, I genuinely feel warm inside. Thank you for thinking of us! One of the things we've tried to do -- especially by leveraging the technology and innovations in the tools we build on (especially matplotlib!) -- is to make it easier to make visualizations and plots that are "by-default" communicative and information-rich. And, of course we have lots of room for improvement, for picking up and encouraging "best practices" at the library level, but it has been really enjoyable and illuminating to have the opportunity to explore that with the community.
- maxnoe 7y agoThanks for all the work on yt. Did you consider replacing the rainbow color map images on your front page?
- mturk 7y agoYup, and we don't use a rainbow colormap by default anymore! We do provide a few custom ones that were developed with viscm, which I believe was used by in development of viridis, magma, etc. I think the specific examples are all from the published literature, and we accepted them as submitted by users -- but a refresh would be good! I opened an issue: https://github.com/yt-project/website/issues/70 https://github.com/yt-project/website/issues/70
- xorand 7y agoI use javascript, especially with d3.js
- airstrike 7y agoAgreed. d3.js really is the answer here
- noobermin 7y agoI love javascript, honestly. Unfortunately, I'm not sure it works for HPC scale data without serious sampling to reduce the data you read in. The HPC scale data also means I need the ability to render things without X because downloading either the simulation data or X forwarding is just too slow that it makes it a grind.
- bigger_cheese 7y agoSome of my coworkers have used the open source VTK library for this sort of stuff (Heat flow in a reactor in this case). From what I saw it was C++ code so may not be the easiest thing to write.
- noobermin 7y agoVTK seems the standard, but it seems like you have to literally write a program to viz stuff. Is this true? Like everyone else I'm super busy but I've been planning on just learning it even though the times I've looked, it's a true blue 90's C++ inheritance obsessed nightmare.
- noobermin 7y agoSomeone mentioned yt, I'll go ahead and mention the imo clunky but standard in a lot of plasma/fluid physics, which is visit[0]. Not really a fan personally but a lot of people I know like it. Tbh, for 2D data, I've written scripts that sort of just make a bunch of pngs from matplotlib and string them together using ffmpeg into a movie. For 3D data, I used to use mayavi and ffmpeg to make movies, but that too is pretty clunky. Mayavi feels closest to matplotlib which is why I like it, yt feels like there is way too much boilerplate to just get a plot (for example, I have to specify units for my data before a plot a flat array, I mean wtf). [0] https://wci.llnl.gov/simulation/computer-codes/visit/ https://wci.llnl.gov/simulation/computer-codes/visit/