Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
PISA's PL4 Format
Binary file byte's positions
- ?TMAX? - This field is related to TMAX, however it is not exactly TMAX. Still needs further investigation;
- DELTAT - 4 bytes IEEE 754 floating point, little endian;
- #VAR X2 - In this field there is twice the number of variables. Not including the time. (4 bytes integer);
- PL4 SIZE+1 - The PL4 file size in bytes + 1 byte (4 bytes integer);
- The 'row' 4 precedes the variables description. It is filled with zeroes;
- Every variable 'row' starts with the sequence of 202020 in the first three bytes;
- The following byte 'VT', or fourth 'column', contains the variable type (ascii encoding);
- The next 6 bytes are the "Node From" (ascii encoding);
- The next 6 bytes are the "Node To" (ascii encoding);
- In 'row' 5 + the number of variables, the actual data is recorded:
- They are composed of 4 bytes fields for IEEE 754 floating point, little endian;
- The first 4 bytes are the time for the first simulation step;
- Then comes the variables data, in the same sequence which the variables are given, for the first time step;
- The above mentioned sequence repeats for all simulation's steps.
- With the current information, the number of simulations steps can be calculated as: STEPS = (PL4 SIZE - 5*16 - #VAR*16) / ((#VAR+1)*4);
- This information allows to dynamically allocate the array to store the simulations results with the dimensions of STEPS x #VAR+1 (the +1 stands for the time column);
- As consequence, TMAX = (STEPS-1)*DELTAT;
Translation codes for VT byte. This table still needs to be filled with other variables types.
Clone this wiki locally
Press h to open a hovercard with more details.