htrdr 0.8.1



atrtp - AsToRia: Thermodynamic Properties


atrtp is a binary file format to store a set of thermodynamic porperties for each node a volumetric mesh representing a medium in combustion. An atrtp file begins by a header that describes the data layout followed by a list of per node properties.

The header is made up of 2 64-bit integers. The first integer is a power of two (usually 4096) that defines the <pagesize> in bytes to which the thermodynamic properties are aligned. The remaining integer store the number of items in the list. In the following grammar, we name it <#nodes>, for "number of nodes", in reference to the mesh nodes to which these properties would be attached.

Note that by aligning the thermodynamic data to <pagesize>, and depending on the system requirements, memory mapping can be used to automatically load/unload those data on demand (see for example the POSIX C function mmap(2)).

Padding bytes follow the file header to ensure alignment of the thermodynamic properties to <pagesize>. These properties are then listed with 8 double precision floating point numbers per item (i.e. per node). The set of per node data are:

* The pressure in Pascal
* The temperature in Kelvin
* The molar fraction of H20 in mol(H20)/mol(mixture)
* The molar fraction of CO2 in mol(CO2)/mol(mixture)
* The molar fraction of CO in mol(CO)/mol(mixture)
* The volumic fraction of soot in m3(soot)/m3
* The number of soot primary particules per agregate
* The soot primary particles diameter in nm

Finally, additional padding bytes are added after the listed properties to align the overall file size to <pagesize>.


Data are encoded with respect to the little endian bytes ordering, i.e. least significant bytes are stored first.

<atrtp>         ::= <pagesize> <#nodes>

<pagesize>      ::= INT64
<#cells>        ::= INT64
<padding>       ::= [ BYTE ... ]

<thermo-props>  ::= <thermo-prop>
                  [ <thermo-prop ... ]
<therm-prop>    ::= <pressure>

<pressure>      ::= <double> # Pressure in Pa
<temperature>   ::= <double> # Temperature in K
<xH2O>          ::= <double> # Molar fraction of H2O in mol(H2O)/mol(mixture)
<xCO2>          ::= <double> # Molar fraction of CO2 in mol(CO2)/mol(mixture)
<xCO>           ::= <double> # Molar fraction of CO in mol(CO)/mol(mixture)
<vf-soot>       ::= <double> # Volumic fraction of soot in m^3(soot)/ m^3
<np-soot>       ::= <double> # Number of primary particles per agregate
<dp-soot>       ::= <double> # Primary particles diameter in nm