GiD - The personal pre and post processor
Binary format
The postprocess binary format is strongly based in the ascii format.
Each line of the Mesh and Result headers are stored as a 4-byte integer with the length of the string followed by the 0-terminated string-line.
Mesh coordinates, connectivities and result values are stored as binary data, 4-byte integers and 4-byte floating point values.
Finally the whole binary data file is compressed with z-lib.
You can debug the file following these steps:
- rename the file for instance to .post.res.gz
- un-compress it with your favourite compressor
- you can 'edit' the file with emacs, notepad++ or any other editor
- you can also look for the 'Result' header with CLI tools like:
grep -a Result ./test.post.bin | awk ' BEGIN { RS ="\0" } ; { printf "\n%s\n", $0 }' | grep -a Result | less
Output example:
Result "PRESSURE" "Kratos" 1 Scalar OnNodes^Y Result "VELOCITY" "Kratos" 1 Vector OnNodesE Result "PRESSURE" "Kratos" 2 Scalar OnNodes^Y Result "VELOCITY" "Kratos" 2 Vector OnNodesE Result "PRESSURE" "Kratos" 3 Scalar OnNodes^Y Result "VELOCITY" "Kratos" 3 Vector OnNodesE ...
Use the freely available GiDPost library to write post-process data files in ascii, binary or hdf5 format. Switching between these formats only requires a couple of modifications. The source code and some pre-built binaries can be downloaded from www.gidsimulation.com --> GiDPlus --> GidPost.
COPYRIGHT © 2022 · GID · CIMNE