I’m doing some simple tests to get acquainted with PyFR.
I would like to have a time playback in Paraview? I can get the single solutions from the .pyfrs files and the export functionality to .vtu, but I’m not super clear on how to make a 4-dimensional simulation - effectively mashing all of the pyfrs solutions into one file or set of arrays which can be played back over time.
Does anyone have tips? I may just write a Python script to merge all of the data in the .pyfrs files into a time dependent vtu but I don’t want to go through the trouble if there’s some simpler solution.
You should be able to open up all of the .vtu files at once in ParaView
and then step through them using the built in UI.
In general, the kinds of simulations that PyFR is used for are of
sufficient scale that it is simply not practical to work with more than
a single solution file at a time. As such there has been no work around
merging multiple files together.
Interesting! When you say PyFR isn’t really used for simulations of sufficient scale, do you mean computationally, spatially, or based on complexity? It seems to me that the flux reconstruction approach should be scalable to many different flows, so I’m a bit confused as to what you mean.
For a simulation of reasonable scale the .vtu files are often in excess
of 10 gigabytes per file. Thus, loading 50 or so of these files into a
single instance of ParaView is not really practical. Indeed, it is
likely to take several minutes to step between each point.
Merging 50 of these files together into a single .vtu file would result
in a ~500 gigabyte behemoth and thus would be very difficult to work with.
Interesting! When you say PyFR isn’t really used for simulations of sufficient scale,
I think you mis-read Freddie’s message, which said:
In general, the kinds of simulations that PyFR is used for are of
sufficient scale that it is simply not practical to work with more than
a single solution file at a time.
Typical simulations are of such scale that lumping a time series into a single file is not practical/sensible. Typically what we do is script paraview to process a series of individual files and produce an animation. And more recently we have been working to add in-situ vis capabilities such that PyFR can generate images, to make an animation, on-the-fly as the simulation proceeds. They latter approach significantly reduces the amount of data written to disk.
So it seems like the default output behaviour of PyFR should remain as-is for the reasons mentioned above, but I’m wondering if an extra option could be added to the ini file to adjust the naming conventions of the output files so that Paraview can load it as a time series? I’d be happy to handle this change.
I’m not sure I follow. Paraview can’t, at the moment, read in native .pyfrm/s files - you have to convert them to .vtu files using pyfr export (which involves linear sub-sampling of the fundamentally polynomial solutions) - so it’s not just a case of changing output naming conventions (which I think we can control anyway?)
If I wanted to export all the timesteps (i.e. 0-40), then I would need to manually export each one, or write a script to do so.
Instead of this, can we just add a command line option for the export argument to process all output files matching the given base file name? So something similar to the following command would export all the timesteps:
If I wanted to export all the timesteps (i.e. 0-40), then I would
need to manually export each one, or write a script to do so.
Instead of this, can we just add a command line option for the
export argument to process all output files matching the given base
file name? So something similar to the following command would export
all the timesteps
Currently, the recommended way of exporting a bunch of .pyfrs files is
to use GNU parallel as:
which is a one-liner that will export everything in parallel. Thus,
there is no means in PyFR for directly exporting a batch of files. Now,
it is true that we could improve the performance if it were all done in
PyFR for we could reuse some of the interpolation matrices. However,
even for moderately sized simulations it is simply not possible to open
up a large number of .vtu files; thus we have never investigated further.
I am a PhD student at MIT and interested in parallel MPI based in-situ simulations.
You mentioned in this post from 2016 that you’re working on in-situ animation while simulation is taking place with PyFR.
Do you have any models to demo this and some tutorials on how to get it to work please?
I am new to PyFR and just got it installed and have the simple couette_flow_2d example working properly with MPI on Linux. I am also able to post-process the solution files manually by converting the *.pyfrs files into *.vtu and then animating them in Paraview.
Any guidance on doing this in-situ is appreciated.