Question about batch postprocessing
Hi all, I'm trying to post-process multiple files using FieldConvert and I run into the following issue (since slack channel is not very active, I posted it on mailing list): If we have multiple *.chk files and want to convert it to vtu/dat format to view in paraview, is there a way FieldConvert will process the files in bulk? I tried to write a script that does it in loop like this: for i in ../../../solvers/ADRSolver/Examples/UnAdvDiff_3DHom1D_*.chk; do ./FieldConvert-g ../../../solvers/ADRSolver/Examples/UnAdvDiff_3DHom1D.xml "${i%.chk}".vtu; done But it does not generate correct vtu files. Currently, I'm restricted to convert each chk to vtu file individually. I also read the module information of FieldConvert and was not able to figure out if there is a clever way to do this. Thanks in advance! Vidhi
Hi Vidhi, Unfortunately, there is not a clever way to convert more than one file in a single command! Try something like the following from the examples directory: for i in UnAdvDiff_3DHom1D_*.chk; do $NEKDIST/bin/FieldConvert-g UnAdvDiff_3DHom1D.xml \ $i `basename $i .chk`.vtu done where $NEKDIST is the nektar++/builds/dist directory. Cheers, Chris On 14/02/17 21:29, Vidhi Zala wrote:
Hi all,
I'm trying to post-process multiple files using FieldConvert and I run into the following issue (since slack channel is not very active, I posted it on mailing list):
If we have multiple *.chk files and want to convert it to vtu/dat format to view in paraview, is there a way FieldConvert will process the files in bulk? I tried to write a script that does it in loop like this: for i in ../../../solvers/ADRSolver/Examples/UnAdvDiff_3DHom1D_*.chk; do ./FieldConvert-g ../../../solvers/ADRSolver/Examples/UnAdvDiff_3DHom1D.xml "${i%.chk}".vtu; done
But it does not generate correct vtu files. Currently, I'm restricted to convert each chk to vtu file individually. I also read the module information of FieldConvert and was not able to figure out if there is a clever way to do this.
Thanks in advance! Vidhi
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
-- Chris Cantwell Imperial College London South Kensington Campus London SW7 2AZ Email: c.cantwell@imperial.ac.uk www.imperial.ac.uk/people/c.cantwell
Hi, I usually use a for look one the check file number so something like: for i in `seq 0 10`; do $NEKDIST/bin/FieldConvert-g UnAdvDiff_3DHom1D.xml UnAdvDiff_3DHom1D_$i.chk UnAdvDiff_3DHom1D_$i.vtu done Cheers, Spencer. On 15 Feb 2017, at 09:46, Chris Cantwell <c.cantwell@imperial.ac.uk<mailto:c.cantwell@imperial.ac.uk>> wrote: Hi Vidhi, Unfortunately, there is not a clever way to convert more than one file in a single command! Try something like the following from the examples directory: for i in UnAdvDiff_3DHom1D_*.chk; do $NEKDIST/bin/FieldConvert-g UnAdvDiff_3DHom1D.xml \ $i `basename $i .chk`.vtu done where $NEKDIST is the nektar++/builds/dist directory. Cheers, Chris On 14/02/17 21:29, Vidhi Zala wrote: Hi all, I'm trying to post-process multiple files using FieldConvert and I run into the following issue (since slack channel is not very active, I posted it on mailing list): If we have multiple *.chk files and want to convert it to vtu/dat format to view in paraview, is there a way FieldConvert will process the files in bulk? I tried to write a script that does it in loop like this: for i in ../../../solvers/ADRSolver/Examples/UnAdvDiff_3DHom1D_*.chk; do ./FieldConvert-g ../../../solvers/ADRSolver/Examples/UnAdvDiff_3DHom1D.xml "${i%.chk}".vtu; done But it does not generate correct vtu files. Currently, I'm restricted to convert each chk to vtu file individually. I also read the module information of FieldConvert and was not able to figure out if there is a clever way to do this. Thanks in advance! Vidhi _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk<mailto:Nektar-users@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/nektar-users -- Chris Cantwell Imperial College London South Kensington Campus London SW7 2AZ Email: c.cantwell@imperial.ac.uk<mailto:c.cantwell@imperial.ac.uk> www.imperial.ac.uk/people/c.cantwell<http://www.imperial.ac.uk/people/c.cantwell> _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users Spencer Sherwin McLaren Racing/Royal Academy of Engineering Research Chair, Professor of Computational Fluid Mechanics, Department of Aeronautics, Imperial College London South Kensington Campus London SW7 2AZ s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk> +44 (0) 20 759 45052
participants (3)
- 
                
                Chris Cantwell
- 
                
                Sherwin, Spencer J
- 
                
                Vidhi Zala