foamFormatConvert messing up files
Summary
When converting a Lagrangian case from binary to ascii with foamFormatConvert, it's messing up some values, notably the origID of the particles in the particleTracks. While they are fine in binary, or when running the case in ASCII from the beginning, they are set to -1 when converting the case.
Steps to reproduce / Example
This can be reproduced using the tutorial case /tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel
- Edit the controlDict to have
writeFormat binary;
(instead of the defaultascii
) - Run the case (at least until it writes one step, that's a matter of a few seconds)
- Do a quick
touch a.foam
and check the particleTracks in Paraview. The tracks have a value in the origId. This is how it should be. - Change the controlDict back to
writeFormat ascii;
- run
foamFormatConvert
- Go to verticalChannel/20/lagrangian/reactingCloud1Tracks, and have a look at the file origId (no need for Paraview, as it's ascii now), it now says
6202{-1}
, i.e. all origId entries in the track are-1
(which is not very useful).
What is the current bug behaviour?
origID becomes -1
What is the expected correct behavior?
No change in the file contents.
Relevant logs and/or images
Environment information
- OpenFOAM version : v2306
- Operating system : Ubuntu 22.04.3 LTS
- Hardware info :
- Compiler :
Possible fixes
Edited by Franz D