Reference and scaling data are used in common files to provide a mechanism for applications to exchange data even if they use different sets of units for dimensional data. The understanding and use of this concept is key when creating applications that read and/or write common files.
Two pairs of numbers are required. The first pair is the reference data, and specifies how the data is non-dimensionalized. Both a reference non-dimensionalization factor and a reference offset value are required. The offset value allows data to be stored in the form of a difference from some value, such as p − p∞. The second pair of numbers is the scaling data, and specifies how to convert the dimensional data to SI units. Again, both a scaling factor and a scaling offset value are required. The basic SI units are meters, kilograms, seconds, and degrees Kelvin, for length, mass, time, and temperature, respectively. The derived SI units newtons and joules are used for force and energy.
Thus, for any variable V, if the value stored in the file is Vfile a dimensional value may be computed from
Note that when dimensional data is stored in the file, the value of the reference factor RF will be 1.0. Note also that when reading a common file, the units for a variable may be determined by the value of its scaling factor SF. For example the units for the x coordinate are meters if its scaling factor is 1.0, inches if its scaling factor is 0.0254, etc.
Reference and scaling data are attached to a specific variable name. At the current time, the data are applied on a file-wide basis. I.e., like-named variables under different nodes use the same reference and scaling data. (At some point in the future reference and scaling data may be applicable on a node-by-node basis.)
For current common files (i.e., Version 3) the reference and scaling data are stored in a subnode of the root node named RefScl00000001_CFF. There are two arrays there, VSCLST and REFARR. VSCLST is a character array containing the names of the variables in the file, with room for 512 names and 32 characters per name. REFARR is an array of 512 single-precision real values containing the reference and scaling data for the variables in VSCLST. For each variable, the values in REFARR are ordered as SO, SF, RO, RF.
For example, if temperature is stored in the file non-dimensionally as (T − T∞) / T∞, where all values are in degrees Rankine, the reference and scaling data would be:
Last updated 27 Nov 2006