sck.5 (4203B)
1 .\" Copyright (C) 2022, 2023 |Méso|Star> (contact@meso-star.com) 2 .\" Copyright (C) 2020, 2021 CNRS 3 .\" 4 .\" This program is free software: you can redistribute it and/or modify 5 .\" it under the terms of the GNU General Public License as published by 6 .\" the Free Software Foundation, either version 3 of the License, or 7 .\" (at your option) any later version. 8 .\" 9 .\" This program is distributed in the hope that it will be useful, 10 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of 11 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 .\" GNU General Public License for more details. 13 .\" 14 .\" You should have received a copy of the GNU General Public License 15 .\" along with this program. If not, see <http://www.gnu.org/licenses/>. 16 .Dd July 28, 2023 17 .Dt SCK 5 18 .Os 19 .Sh NAME 20 .Nm sck 21 .Nd Star Correlated K file format 22 .Sh DESCRIPTION 23 .Nm 24 is a binary file format for storing the correlated K of a gas mixture. 25 The volumetric mesh to which the CKs are attached is 26 .Em not 27 described there but must be defined in a separated file via, for example, the 28 .Xr smsh 5 29 file format. 30 .Pp 31 A 32 .Nm 33 file begins with a header that describes the layout of the data. 34 Then, the spectral bands on which the CKs have been evaluated are listed. 35 Finally, the entire list of radiative coefficients is stored. 36 .Pp 37 The header consists of 3 64-bit integers. 38 The first integer is a power of two 39 .Pq usually 4096 40 that defines the 41 .Va pagesize 42 in bytes on which the radiative coefficients are aligned. 43 The remaining two integers store the number of bands and the number of nodes, 44 that is, the number of radiative coefficients per band or per quadrature point, 45 respectively, which is actually the number of nodes in the volumetric mesh to 46 which these coefficients are attached. 47 .Pp 48 After the header comes the list of spectral bands sorted in ascending order 49 relative to their interval. 50 Each spectral band begins with 2 double-precision floating-point numbers that 51 represent the lower and upper limits of the band in nanometers. 52 Another 64-bit integer then gives the number of quadrature points in the band. 53 Finally, the weights of the quadrature points are stored in a list of floating 54 numbers with double precision. 55 .Pp 56 Fill bytes follow the list of spectral bands to ensure alignment of the first 57 radiative coefficients on 58 .Va pagesize . 59 Then, for each band, the diffusion coefficients are listed before the list of 60 absorption coefficients for each quadrature point. 61 Each list of radiative coefficients is followed by a 62 .Va padding , 63 which is a list of bytes that provides memory alignment of the 64 following data to 65 .Va pagesize . 66 Bands and quadrature points are sorted according to the order in which they 67 were previously declared. 68 .Pp 69 Data are encoded with respect to the little endian bytes ordering, i.e. least 70 significant bytes are stored first. 71 .Pp 72 The file format is as follows: 73 .Bl -column (per-quad-pt-ka) (::=) () 74 .It Ao Va sck Ac Ta ::= Ta Ao Va pagesize Ac Ao Va #bands Ac Ao Va #nodes Ac 75 .It Ta Ta Aq Va bands 76 .It Ta Ta Aq Va padding 77 .It Ta Ta Aq Va rad-coefs 78 .It \ Ta Ta 79 .It Ao Va pagesize Ac Ta ::= Ta Vt uint64_t 80 .It Ao Va #bands Ac Ta ::= Ta Vt uint64_t 81 .It Ao Va #nodes Ac Ta ::= Ta Vt uint64_t 82 .It Ao Va padding Ac Ta ::= Ta Op Va int8_t ... 83 # Ensure alignment on 84 .Va pagesize 85 .It \ Ta Ta 86 .It Ao Va bands Ac Ta ::= Ta Ao Va band Ac Va ... 87 .It Ao Va band Ac Ta ::= Ta 88 .Aq Va band-low 89 .Aq Va band-upp 90 .Aq Va #quad-pts 91 .Aq Va quad-pts 92 .It Ao Va band-low Ac Ta ::= Ta Vt double 93 # Inclusive bound in nm 94 .It Ao Va band-upp Ac Ta ::= Ta Vt double 95 # Exclusive bound in nm 96 .It \ Ta Ta 97 .It Ao Va #quad-pts Ac Ta ::= Ta Vt uint64_t 98 .It Ao Va quad-pts Ac Ta ::= Ta Ao Va quad-weight Ac Va ... 99 .It Ao Va quad-weight Ac Ta ::= Ta Vt double 100 .It \ Ta Ta 101 .It Ao Va rad-coefs Ac Ta ::= Ta Ao Va per-band-k Ac Va ... 102 .It Ao Va per-band-k Ac Ta ::= Ta Ao Va ks-list Ac Ao Va per-quad-pt-ka Ac 103 .It Ao Va per-quad-pt-ka Ac Ta ::= Ta Ao Va ka-list Ac Va ... 104 .It Ao Va ka-list Ac Ta ::= Ta Ao Va ka Ac Va ... Ao Va padding Ac 105 .It Ao Va ks-list Ac Ta ::= Ta Ao Va ks Ac Va ... Ao Va padding Ac 106 .It Ao Va ka Ac Ta ::= Ta Vt float 107 # In m^-1 108 .It Ao Va ks Ac Ta ::= Ta Vt float 109 # In m^-1 110 .El 111 .Sh SEE ALSO 112 .Xr smsh 5