How to Import/Export Gas Qualities

This guide provides step-by-step instructions on how to import and export data on gas qualities. Externally processed quality data can be easily imported using a reference template. SAInt also provides an intuitive export capability to share quality data with others.

For more information on how to create, manage or delete gas qualities in the GUI of SAInt refer to Create and Edit a Gas Quality in the GUI.

1. A template to import a gas quality stream

A template named "GasQualityImport", either in Microsoft Excel© format or in text format, is available in the directory .\Documents\encoord\SAInt-v3\DataImport\Quality. The template has three sheets or sections: GQUAL, GCUS, and GCMP. We will show how to use the Microsoft Excel© template, but the same logic applies to any other supported format.

The GQUAL sheet collects the main properties of the new gas mixtures. The user must fill in for each new gas quality: the name of the gas mixture, its relative density (RHOr), the gross (GCV) and the net calorific value (NCV), the critical pressure (PC), and the critical temperature (TC). The first row must report the property’s short name, and, in square brackets, the units of measure used. As an example with SI units, we could use: Name, RHOr [-], GCV [MJ/sm3], NCV [MJ/sm3], PC [bar], and TC [C]. The order is irrelevant as long as the correct short name is used. Pressure-related units should be defined using absolute pressure. SAInt will perform all necessary unit conversions to match the ones defined in the active project. Of all these properties, Name is mandatory.

The GCUS sheet defines the composition of each gas quality in terms of the percentage of the molar mass of each component (Figure 1). In column A of the sheet, each new gas stream must start with the reserved keyword "[QUAL]", followed by the short name of the components making up the stream. In column B, the name of the gas stream must be reported next "[QUAL]" cell, followed by the numeric value of the percentage in molar mass of each component. Figures are in the range of 0.0-100.0 % and must add up to 100 %. Figure 1 shows an example with three gas streams and different gas components from the built-in SAInt library.

The optional sheet GCMP is necessary in case the user needs to add new gas components to a gas stream created during the import procedure and not available from the built-in library of SAInt. Data are organized in a table similar to GQUAL. Row number one has columns' names: Name, RHOr [-], GCV [MJ/sm3], NCV [MJ/sm3], ShortName, PC [bar], and TC [C]. The other rows collect the data indicated by the columns. The difference with the GQUAL sheet is the field "ShortName" indicating the short form of the name of the component to be used in the GCMP sheet.

If the gas properties are not defined in the GQUAL sheet then the properties will be computed from the specified gas composition by SAInt.

SAInt can accept as import/export file format beside Microsoft Excel© also comma separated files, and ascii text files.

The same three sheets of the template "GasQualityImport" are also available in the network template "Template_GNET.xlsx" in Microsoft Excel© format from the directory .\Documents\encoord\SAInt-v3\DataImport\Network of the user account.

import gas quality 01
Figure 1. An example of how to organize data describing the composition of a gas stream based on the percentage of the molar mass of its different components.

2. Import a gas quality

Once a network is available in your project, select Model Explorer  Networks  Gas Network  Qualities and choose Import Gas Quality(ies) from the context menu (Figure 2). Select the file containing the data for the new gas quality streams and specify the import format (i.e., *.xlsx, *.xls, *.csv or *.txt).

When successfully imported, the new gas qualities are reported in grey in the model explorer under qualities, as they are not yet assigned to any external (Figure 2). Otherwise, the user is informed of errors. If gas components are also imported, they will be under components.

A quick check of the correct composition of a newly created gas quality stream is performed by using the AdjustMix button in the property editor for the gas quality.

import gas quality 02
Figure 2. How to import data concerning new gas quality streams from a external source in the active model.

3. Export gas quality streams

To export a single gas quality stream, just select it and right-click. In the context menu choose Export Gas Quality(ies) (Figure 3), and specify the directory where to save the data (i.e., composition and properties) and the format type. SAInt informs the user of the outcome of the export operation.

The same steps are valid if more than one gas quality item is selected. If all qualities are to be exported, it is quicker to use Qualities  Export All Gas Qualities from the context menu (see Figure 3).

import gas quality 03
Figure 3. How to export data concerning a gas quality stream in the active model.

All properties not explicitly defined by the user but managed by SAInt will not be exported and the associated field will be empty.