Animation with multiple exodus files

I have a series of exodus files for an ALE problem and each file contains a number of timesteps for a specific version of the mesh (number of nodes/elements are different for each file due to remeshing).

Is there a way I can animate this data in paraview, only showing the appropriate mesh during the time steps it owns?

Yes, the use case of reading in a series of exodus files is supported. In fact, there are a couple of ways to do it: use a special naming convention for your files or create a “case” file that lists the sequence of files. Both cases are currently documented on the Wiki at https://www.paraview.org/Wiki/Restarted_Simulation_Readers#Exodus. However, since the Wiki is slowly being phased out, I’ll repeat the information here in case the migration is hard to find.

Exodus Naming Conventions

By default, ParaView will assume that the numbers at the end of a file represent partition numbers and will attempt to load them all at once. But there is a convention for having numbers specifying a temporal sequence instead. If the files end in .e-s.{RS} (where {RS} is some number sequence), then the numbers (called restart numbers) are taken as a partition in time instead of space. For example, the following sequence of files represents a time series.

mysimoutput.e-s.000
mysimoutput.e-s.001
mysimoutput.e-s.002

You can use any number of digits in the restart numbers, but by convention the number used should match in all files. Also by convention you can leave off the -s.{RS} of the first file. The following file sequence is interpreted the same as that above.

mysimoutput.e
mysimoutput.e-s.001
mysimoutput.e-s.002

It is possible to combine a time series sequence with a spatial partitioning sequence. For files ending in .e-s.{RS}.{NP}.{RANK}, the {RS} is interpreted as the restart number (as in the previous example), the {NP} is interpreted as the number of partitions, and the {RANK} is interpreted as a partition number, which is usually simply the rank of the simulation process that dumped the file. A set of files with four spatial partitions that has three “restarts” (time series sets) will have filenames like the following.

mysimoutput.e-s.000.0004.0000
mysimoutput.e-s.000.0004.0001
mysimoutput.e-s.000.0004.0002
mysimoutput.e-s.000.0004.0003
mysimoutput.e-s.001.0004.0000
mysimoutput.e-s.001.0004.0001
mysimoutput.e-s.001.0004.0002
mysimoutput.e-s.001.0004.0003
mysimoutput.e-s.002.0004.0000
mysimoutput.e-s.002.0004.0001
mysimoutput.e-s.002.0004.0002
mysimoutput.e-s.002.0004.0003

As before, the -s.{RS} part of the files for the first time index are optional. Thus, the following is equivalent to the previous example.

mysimoutput.e.0004.0000
mysimoutput.e.0004.0001
mysimoutput.e.0004.0002
mysimoutput.e.0004.0003
mysimoutput.e-s.001.0004.0000
mysimoutput.e-s.001.0004.0001
mysimoutput.e-s.001.0004.0002
mysimoutput.e-s.001.0004.0003
mysimoutput.e-s.002.0004.0000
mysimoutput.e-s.002.0004.0001
mysimoutput.e-s.002.0004.0002
mysimoutput.e-s.002.0004.0003

Exodus Time Series Case Files

ParaView can handle the naming issue by reading a “case” file to specify the file set of each simulation run. The case file is a simple text file with the extension .ex-timeseries where each line contains the filename of a first file of an Exodus data set. The rest of the files are automatically determined in the same manner as if you had just loaded the single file set. Do not list every file of every data set. The Exodus filenames may be given relative to the case file.

A case file can usually be generated by redirecting the output of the Unix find command. (In some circumstances, you may be able to use the simpler ls command, but there are several technical issues that will probably prevent this from working on most large data sets.) For example, let us say that every file is in a directory and has a name like the following:

mysimoutput.{RR}/mysimoutput.{RR}.{FFFF}

Where {RR} represents the restart number and {FFFF} represents the process number. Note that in this example we have placed the simulation output in different directories. We recommend this practice to limit the number of files in each directory. We can build a case file for this simulation data by running the following command.

find . –name 'mysimoutput.*.0000’ > mysimoutput.ex-timeseries

The find command will then list all the first files in all the subdirectories. Do not worry about the order in the file, ParaView will automatically order the time steps and handle overlapping time. Simply open the mysimoutput.ex-timeseries file in ParaView.

Troubleshooting tip: If all of your files are in the same directory and end with the restart number, the case file will fail to load properly. For example, if you have the following three exodus files that represent a time series (as opposed to a spatial partitioning), listing them in a case file will not work.

mysimoutput.00
mysimoutput.01
mysimoutput.02

The problem is that ParaView will incorrectly identify each entry in your case file as a file in the same partitioned set of files. You will instead have to rename the files so that ParaView will not recognize them as an Exodus partition sequence. You could, for example, append .e to all the file names. You could also convert them to the Exodus Naming Conventions described above, in which case you will no longer need the case file at all.

2 Likes