Post processing file convertion from .pyfrs to .vtu

Hi,

Is there any way to convert all the files into once.
For example, I have couette_flow_2d-000.pyfrs up to 050.pyfrs.

There is a script to convert the files:
pyfr export mesh.pyfrm solution.pyfrs solution.vtu

I do not want to do one by one, I would like to
do all in once.

Best regards,
Mathi

Hi Mathi,

You can accomplish this pretty quickly by looping over all the files in a UNIX shell:

for file in *.pyfrs ; do pyfr export -p double -g -d 16 my_mesh_filename.pyfrm ${file} ${file%.*}.vtu ; done

I imagine something similar could be accomplished under a Windows platform using the command line or PowerShell.

Best Regards,

Hi Zach,

Thanks! this one as well work in sort of parallel with available threads on the node or CPU.
for file in .pyfrs ;
do
pyfr export -p double -g -d 16 my_mesh_filename.pyfrm ${file} ${file%.
}.vtu &
done
wait

Cheers,
Mathi