PISA's PL4 Format

Leonardo M. N. de Mattos edited this page Jan 18, 2019 · 32 revisions

Binary file byte's positions

PL4 Description


  • ?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;

Variables Types

Translation codes for VT byte. This table still needs to be filled with other variables types.

Integer Description PL4 WideNN Adopted
4 Node voltage V-node V-node
7 Branch energy I-bran E-bran
8 Branch voltage V-bran V-bran
9 Branch current I-bran I-bran
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.