ATRTP(5) File Formats Manual ATRTP(5)

atrtpAsToRia: Thermodynamic Properties

atrtp is a binary file format to store a set of thermodynamic porperties for each node of 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 consist of 2 integers. The first integer is a power of two (usually 4096) that defines the size of the memory page in bytes (pagesize) on which the thermodynamic properties are aligned. By aligning data to pagesize, and depending on system requirements, memory mapping can be used to automatically load/unload pages on demand (see mmap(2)). The other integer stores the number of elements in the list. In the following, we'll call it #nodes, for "number of nodes", in reference to the mesh nodes to which these properties will be attached.

Fill bytes follow the file header to align thermodynamic properties to pagesize. Properties are then listed with 8 double-precision floating-point numbers per element (i.e. per node). The data per node are as follows:

  • The pressure in Pascal
  • The temperature in Kelvin
  • The molar fraction of H2O in mol(H2O)/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 m^3(soot)/m^3
  • The number of soot primary particules per agregate
  • The soot primary particles diameter in nm

Finally, fill bytes are added 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.

The file format is as follows:

atrtp ::= pagesize⟩ ⟨#nodes
padding
thermo-props
padding
pagesize ::= uint64_t
#nodes ::= uint64_t
 
padding ::= [int8_t ...] # Ensure alignment on pagesize
 
thermo-props ::= thermo-prop...
thermo-prop ::= pressure⟩ # In Pascal
temperature
xH2O⟩ # Molar fraction of H2O
xCO2⟩ # Molar fraction of CO2
xCO⟩ # Molar fraction of CO
vf-soot⟩ # Volumic fraction of soot
np-soot⟩ # Soot particles per agregate
dp-soot⟩ # Soot particles diameter
 
pressure ::= double # In Pascal
temperature ::= double # In Kelvin
xH2O ::= double # In mol(H2O)/mol(mixture)
xCO2 ::= double # In mol(CO2)/mol(mixture)
xCO ::= double # In mol(CO)/mol(mixture)
vf-soot ::= double # In m^3(soot)/m^3
np-soot ::= double
dp-soot ::= double # In nm

mmap(2)

August 30, 2023 UNIX