Ideal gas chart user's manual

Table of contents

© R. GICQUEL 1998 - 2022. All rights reserved. This document may not be reproduced in whole or in part without the author’s express written permission, except for the personal licensee’s use and solely in accordance with the contractual terms indicated in the software license agreement.

Information in this document is subject to change without notice and does not represent a commitment on the part of the author

Overall presentation

The THERMOPTIM ® series (www.thermoptim.org) is a set of software tools dedicated to the learning and better understanding of applied thermodynamics. It is comprised of easy to use interactive charts: ideal gases, vapors mixtures of an ideal gas and of water vapor (psychrometrics), and a modeling software package including four closely interconnected working environments : a diagram editor (synoptic screen), a simulator, the interactive charts, and an optimization tool.

The interactive charts have been developed with a view to replace classical paper thermodynamic charts. Indeed, whatever care is taken by editors in the choice of color sets for distinguishing the various curves shown on the classical charts, it is always difficult to read them, and interpolation may lead to significant errors. New THERMOPTIM charts allow one, by a simple mouse click, to display all relevant thermodynamic properties of the fluid, thus providing better accuracy. Their main asset is to be very easy to use: the thermodynamic properties are immediately displayed on the screen, a user-friendly point editor allows the user to refine his/her cycle analysis and to export the values in spreadsheets or text editors.

THERMOPTIM is applied thermodynamics software whose objective is to allow one to easily calculate complex thermodynamic cycles without making very simplistic hypotheses or without being involved in tedious calculations. Initially it has been developed to help solve problems encountered in teaching applied thermodynamics. Its present functionalities make it possible to use it for also solving much more complicated problems such as industrial schematic design (for instance it has been used for the system integration of advanced electricity generation production plants involving several hundreds of components).

In this manual, we shall present the ideal gas entropy charts, successively showing how to :

Thermodynamic properties of substances

The software includes a data base with the thermophysical properties of the substances considered. It makes use of two kinds of substances: pure and compound ideal gases. Perfect gases are ideal gases whose specific heat is independant of the temperature (let us recall that the equation of state of an ideal or perfect gas is Pv = rT).

The gas can be pure, in which case its properties are predefined in the software, or it can be compound. In this case, the user has to define the composition from the other gases present in the database, by indicating for each of them, its name and its molar or mass fraction. Properties of the composed substance are then determined from those of its constituents. Two sets of compound gases exist: protected and non protected gases. This difference has been introduced in order to avoid that some gases whose composition dos not vary, such as air, be inadvertantly modified by a user. Only non protected gases may be modified and saved.

The accuracy of the calculations is excellent for ideal gases (error on the specific heat lower than 0.5 % as compared with Janaf tables).

Detailed information on the equations used can be found in the following reference:

Energy Systems, A New Approach to Engineering Thermodynamics, 2011

Energy Systems, A New Approach to Engineering Thermodynamics, 2nd Edition, 2021

Internationalisation, number formatting

The interactive charts exist in several languages (english, french, spanish, portuguese, catalan). They are configured in the language corresponding to the inth.zip file located in the installation directory.

Numbers are automatically formatted in accordance with the language selected in the computer system. For instance, in english, the decimal separator is the dot, and the thousand one the comma ; in french the decimal separator is the comma, and the thousand one the space.

If you enter an ill-formated number, it is truncated at the level of the first non numerical character.

Chart use, display and recalculation of a point

Using the interactive charts is quite simple: position the crosshair cursor at the point whose thermodynamic properties you wish to get, and click so that they may be displayed on the screen. For the ideal gas entropy charts these properties are: pressure (bar), temperature (K or °C), enthalpy (kJ/kg), entropy (kJ/kg/K), mass volume (m3/kg) and specific heat (kJ/kg).

As the cursor positionning accuracy is a function of the screen resolution and is generally not very high, it is possible to make more precise calculations either by moving a target with the keyboard arrows, or by creating and editing points (named cycle points as a set of points usually represents a thermodynamical cycle).

Using keyboard arrows

It is possible to refine the positionning of the cursor with the keyboard arrows. To do that, click close to the point whose properties you wish to get. The values are displayed in blue above the chart. If you press one of the keyboard arrows, a red target appears and is moved in one of the four cardinal directions by an increment equal to 1/1000 of the horizontal or vertical scale depending on the arrow key used. The point properties are recalculated, so that you can gradually get closer to the desired point. By changing the chart scale as indicated in the section entitled "Changing the axes layout", you can change the displacement sensitivity.

As soon as the red target appears, the mouse click is disabled, and the target can only be moved by the keyboard arrows. To take control again on the cursor, you can either :

Point creation

To create a point, double-click at the requested location. A dialog frame asks you to enter a name to identify the point.

Once the point is named it is displayed on the screen in the form of a little cross and its label.

You can open an editor which allows you to modify the point and recalculate it. To do that, select the menu item "Edit a cycle" of menu "Cycle" or type Control C.

The cycle editor is then displayed. In its upper zone there are text fields which allow you to add comments on the cycle if you wish to do so, in particular for saving the cycle. The title is used for identifying the cycle in the cycle manager (see below). If you simply wish to recalculate a point, this is not necessary. In the lower part of the screen is a table comprising in columns the name of the point and its thermodynamic properties, and in lines each point entered (only one at this stage).

All the possibilities offered by the cycle point editor will be presented in detail later. For the time being, we will just show how to recalculate a point.

The point table has a particular feature: you can change the column order by clicking and dragging one of them by its label. For instance, if you click on the label "Temperature T" and that, keeping the mouse pressed, you move it on the right, the pressure column automatically is shifted to the second location.

If you keep on moving in the right direction, the enthalpy column is shifted in turn, and so on. After two moves, you get this result.

THERMOPTIM interactive charts make use of this editor property to specify the input variables used when a point is calculated: the two first figure columns from the left are considered by the software as designing the known state variables from which the other thermodynamic properties are calculated.

Suppose that you wish to calculate a point with a pressure of 15 bars and a temperature of 340 °C. Enter these values in the corresponding cells, making sure to indicate that the cell editing is finished by pressing enter or clicking in another cell. Click then on button "Recalculate" located in the lower right part of the editor. The point is recalculated and the values displayed :

If you wish the point with a pressure of 15 bars and an entropy of 0.15 kJ/kg/K, move the entropy column in second or third position, enter this value, then click on button "Recalculate". You get the following result:

As you can see, calculating a point with accuracy is very easy.

All variable couples comprising the pressure can be calculated, except for the specific heat.

Once the point is recalculated as you wish, the modifications made in the editor can be transferred on the chart by clicking on button "Validate". Automatically, the editor table points are then repositionned on the screen.

When you are back in the main chart window, you can enter additional points. If you want to display them in the cycle points editor, you must select again menu item "Edit a cycle" of menu "Cycle". If the editor was previously opened, a message informs you that the points will not be validated if you continue.

The reason for this is that the software cannot guess which values are the right ones: those from the chart or those from the editor. If you do not want to validate the points previously modified, click on "OK". Otherwise cancel, and then go into the editor, validate the old points, and iterate.

Customizing the working environnement

The working environnement of THERMOPTIM interactive charts can be customized in several ways so that you can adapt it to your own taste. When you first run the software, default values are used. Subsequently, your modifications are automatically saved in various configuration files, so that your selections are kept between two sessions.

Choice of the temperature unit

Temperatures can be expressed either in Kelvin or in Celsius degrees. To select the unit chosen, click on menu item "K" or "°C" of menu "Temperature".

Gas selection

The software contains about fifteen pure gases which can be used to constitute as many compound gases as you wish:

The compound gases can either be defined in an editor, or chosen from among the list of existing gases.

In either case, to modify the selected gas, you select the menu item "parameters" of menu "Chart", and this window is displayed.

Choosing a gas in the data base

If you select the checkbox "Load a gas from the data base", the list of available pure and compound gases is displayed.

Select the gas whose chart you wish to build, then click on "OK".

Definition of a new compound gas

If you select the checkbox "Define a new compound gas ", the software asks you first to name it, and then opens the gas composition editor, which is similar to the cycle point editor we saw previously, with however some differences.

There are only three columns in this editor: the first one contains the pure gases available in the data base, and the two other ones are used to enter the molar and mass fractions. Thermoptim considers that the first column of numbers on the left contains the data to be taken into account, the others being calculated from those (you can move a column by clicking on its headband and dragging it laterally). However, if you choose to enter the mass fractions, it is necessary that the values ​​of the molar fractions are set to 0. Obviously, the sum of the mole or mass fractions must be equal to 1.

To define a compound gas, choose from along the list of pure gases in the constituent column (which is displayed when you click in the corresponding cell), then enter its molar or mass fraction.

Insert then a new line by clicking on button "Insert", and define similarly a second constituent, a third one, etc.

When you are done with entering constituent lines, validate by clicking on "Save". The software checks that the sum of the molar or mass fractions is equal to 1. If this is not true, the gas cannot be saved and a message informs you.

You can however ask the software to complement to 1 the sum of the molar or mass fractions, by calculating that of one of the components that you leave undetermined, by entering no value in the corresponding field. Only the first undetermined value is taken into account, the other ones being set to 0. Furthermore, molar or mass fractions must obviously be positive.

If the gas composition is consistent, the gas is saved and its molar and mass fractions recalculated, as in the following example. Then the chart is built and displayed.

The gas editor is equipped with other buttons which will be presented later.

Selection of the chart type

The substance properties can be displayed in several coordinate systems used by thermodynamicians.

For ideal gases the following charts are available:

To select one of the types, click on the corresponding menu item. The screen is immediately updated.

Choosing the line width

By default, the curves are plotted in bold line.You can reduce the line width by clicking on the menu item "narrow line" of the menu "Chart". It is then labelled "bold line". If you select it subsequently the lines are again plotted in bold lines.

Modifying drawing and screen background colors

The whole set of colors used for plotting curves and for the screen background can be customized. To modify a color, double-click on one of the small rectangles where it appears in the legend on the right of the screen:

The following color editor is displayed (this example retates to the screen background color).

Three cursors corresponding to the red, green and blue components of the color allow you to customize the color. In the rectangle located center left, the original color is displayed, whereas the new one is shown in the right one, reflecting the cursor moves. When you have made your selection, click on "OK". The color is saved.

Changing the axes layout

The abscissa and ordinate axes layout can be modified by selecting the menu item "X Axis" ou "Y Axis" of menu "Chart". The following window is then displayed:

If you select checkbox "Grid", vertical lines for the abscissa axis and horizontal lines for the ordinate axis are plotted on the chart, at the main unit tick.

If you select checkbox "automatic scale", the software searches a scale covering the whole range of values. The scale is logarithmic if you select the corresponding checkbox, linear otherwise.

When the "automatic scale" checkbox is not selected, you can enter the minimum and maximum values that you wish. The values of the main and minor units can be either automatically calculated, either entered by you, depending whether the corresponding "Auto" checkbox is selected or not. If the unit values are not consistent with those of the minimum and maximum or between themselves, a beep warns you.

Watch out: if the "automatic scale" checkbox is selected, your values will be replaced by those that the software will calculate.

When you are done with your modifications, click on "OK" to save the new layout, or on "Cancel" to go back to the previous values.

Other chart parameters

The parameter frame allows you to choose the temperature and pressure range for which the chart is plotted. Enter the minimum and maximum values of the temperature and pressure you are interested with and the chart will be drawn accordingly.

Lastly you can edit the composition of the gas for which the chart is built. To do this select the checkbox "Show the gas composition" of the parameter window. The gas composition editor is then displayed. You can modify it if you wish. To save these modifications, click either "Save", which modifies accordingly the composition of the selected gas, or "Save as", which allows you to save your modifications by creating a new gas.

Cycle handling

You have previously learnt how to create and modify points. In next pages, we shall refer to a set of points as a cycle.

Point creation from the cycle editor

In addition to the recalculation and validation functions discussed previously, the cycle editor is equipped with five other buttons : "Insert", "Copy" and "Suppress", which allow you to add, copy or suppress one table line, and "Print" and "Cancel" which allow you to print the table or to close the frame. Furthermore, on the right of the frame appear two small arrows which can be used to move a line to the next above or below position.

To add a new point, select one line, then click on "Insert". The software inserts a new line just above the previous one, all the values being set to zero. Name this new point, choose two input variables, move the corresponding columns on the left and enter their values, then click on "Recalculate" to get all the point thermodynamical properties.

Once the new line is inserted, you can also copy another line and paste it. To do that, select the line corresponding to the point that you wish to copy, and click on "Copy". The button label is modified and becomes "Paste". Select the destination line, and click on "Paste". The values are copied.

To suppress a line, select it then click on "Suppress".

Once the points are created as you wish, click on "Validate" to have them transferred on the chart and displayed.

To print the table, click on "Print" and select the paper format from the printer dialogs, then confirm the printing.

Connecting points

When the points are displayed on the chart, they are disconnected by default. It is possible to connect them by a broken line by selecting the menu item "Connected points" of menu "Cycle". This way of doing is widely used for representing a thermo-dynamical cycle. This example represents an air gas turbine cycle.

The software connects the points in the same order as they appear in the editor, starting from the first line. If this order is not the right one, you may have to sort the points in the cycle editor.

To do that you can move the points using the arrows which appear in the right of the editor:

Improvements in cycle plotting

Version 1.4 brings a number of improvements in cycle plotting:

Linking points by iso-value lines

Let us consider the gas turbine cycle we have previously displayed. When the cycle is first plotted on (T, s) chart, the cycle appears as shown above: the points are connected by straight lines. Opening the cycle point editor displays the cycle elements as below.

It is possible to connect points "compressor outlet" and "turbine inlet" by an isobaric line: select both lines at the same time, and click on "Insert". A combo box with various iso-value choices is shown. Select "iso-pressure". You are requested to give the number of points you want to insert. Enter 10. The new points are created in the cycle point editor. Click on "Validate": the plot now follows the iso-pressure 16 bars line.

The number of points entered determines the number of segments with which the iso-value line is approximated. The larger their number, the better the accuracy.

Important notice: the points added are of course recalculated assuming that the associated substance is that for which the chart is plotted. If it happens that the initial points were determined for one or two other substances, the iso-value line added may look discontinued, which may appear surprizing but can be perfectly explained. This is indeed what happens if you try to plot, for example on the air chart, the cycle of an internal combustion motor calculated with Thermoptim, the combustions being duly taken into account: the changes in the composition of the fluid which flows through the machine in principle forbid to plot it on a single chart…

All the points inserted can be recalculated one by one if need be (i.e. if one of them does not exactly correspond to the user requirements). If necessary they can be suppressed either one by one or as a group, by selecting them and clicking on "Suppress".

If you want to save this cycle, just open the cycle point editor, enter any title and description you may wish and save it as explained below.

Cycle manager

A new menu line named "Cycle manager" has been added in menu "Cycle". If you select it you open this frame. If you click on "Update the cycle table", all cycles already loaded are displayed. Here, two cycles are loaded: the default one which is active, and a second one which has been loaded from a file.

The title defined in the cycle point editor is displayed as the cycle name.

You select the active cycle by choosing its line and clicking on "Set as active cycle". The active cycle has the following properties:

If you double-click on a line, you change the column "selected" status: if it is checked, the cycle is plotted on the chart, otherwise not. You can deselect all cycles by clicking on "Uncheck all cycles". You can suppress a cycle in the list by selecting its line and clicking on "Suppress". Its plot is also suppressed from the chart.

In the upper right of the screen is a multiple choice list that lets you choose the kind of plot of the selected cycle: solid line, dotted or dashed.

Changing the cycle color

Until version 1.3, all cycles were plotted in black. It is now possible to select any color in the same way as you do it for the chart curves. To change a cycle color, select its line and click on "Change the cycle color". A frame allowing you to choose its color is displayed. If you want to save the new color, set the cycle as the active one and save it. Suppressing the active cycle is equivalent to erasing it from the chart menu. You generate a new active cycle either by setting another cycle as the active one, or by interactively creating points in the chart, opening the cycle point editor and validating.

Superposition of several cycles on a chart

To plot several cycles on a chart, just load them together and set them as selected in the cycle manager screen.

Erasing a cycle

It is possible to erase a cycle displayed on the screen: to do that, select menu item "Erase the cycle" of menu "Cycle". This operation suppresses the corresponding point values, which cannot be displayed again if the cycle has not been saved. If you just wish to hide a cycle from the screen, unselect it in the cycle manager frame by double-clicking on its line.

Saving a cycle

Once a set of points has been entered, and possibly recalculated and validated, it can be saved as an ASCII text file, in order to be subsequently processed either by the software, or by a spreadsheet or a text editor. To do that, select the menu item "Save the cycle" of menu "Cycle".

A dialog window allowing you to name the file is shown. Name it and click on "Save" to save the cycle.

Loading a cycle

You can import in the software, either for displaying it or to process it, a cycle which has been saved previou-sly, or created in another working environment. To do that you just have to configure a data file structured as shown here.

In this example the file has been created by the software, but any file structured similarly can be read and processed. The line separator is the 'Enter' character, and the column separator the tabulation.

The two first lines are not taken into account (but they must exist). The third one provides various information: here the cycle is in colour and has been saved in a universal way (i.e. with the english format).

The fourth and fifth lines give in second column the cycle title and a comment describing it. If the first column cells are empty, these informations are not read.

The sixth line first column must include a text in which appears the name of the substance used (in order to warn the user if the substance selected for the chart is not the same as that for which the cycle has been calculated). The second column indicates the temperature unit.

The seventh line first column must be a non-empty text, and the second one the number of points.

The eighth line is not taken into account (but it must exist)

The following lines give the name and the state values of the points, in the order given in the above example: name, temperature, pressure, enthalpy, entropy, specific heat, volume.

The two last lines define the cycle color with a RGB coding.

Any file structured similarly can be read by the software.

To import a cycle file, select the menu item "Load a cycle" of menu "Cycle". A dialog window allows you to select the file.

Compound gas editor

The software includes a compound gas editor which we rapidly presented when introducing the definition of a new gas. In this section, we shall give details on the different possibilities of this editor, as well as on the functions of menu "Gas Editor". We have explained previously how a compound gas can be defined or modified. We shall present here the available functions for saving, suppressing, exporting or importing compound gases in the software data base.

You can open several compound gas editors at the same time, and the gases which they display are not necessarily the one which corresponds to the psychrometric chart.

The three first lines of menu "Gas Editor" operate in the same way as the actions available in the parameter screen.

Loading a gas from the data base

The first line opens the pure and compound gas selection window, in which you select a new gas whose chart is then plotted.

Displaying the gas composition

The second line allows you to display the composition of the selected gas.

Creation of a new gas

The third line allows you to create a new gas.

Editing a gas, functions of the gas editor

To edit a gas, select the menu item "Edit a gas…" of menu "Gas Editor".

A screen similar to that which allowed to choose the gas for the chart is displayed. There are two differences:

If you select a gas and click on "OK", its composition appears in the editor.

You can modify the gas composition, by choosing the constituent names in the list of pure gases which is shown when you click in the first comlumn cells, and entering either the molar or the mass fractions. Once it is defined, the compound gas can be:

Importing a gas

As you can export a gas in the form of a text file, it is possible to import one by selecting the menu item "Import a gas" of menu "Gas Editor". The file format must be the same as that which is used for export files.

The data which are read are the following : the second cell of the fourth and fifth lines, which give the name of the gas and the number of constituents, and the three first cells of lines seven and next, depending on the number of constituents, which give their names and molar and mass fractions.

The first cells of the fourth and fifth lines are not read, but must not be blank. Lines 1 to 3 and 6 must also exist and not be blank.

Printing a chart, end of session

Printing a chart

Printing a chart can be done either from the menu item "Print" of menu "File", or by the keyboard accelerator Control P. A printer selection screen is then displayed.

End of session

To quit the application, you can do it either from the menu item "Quit" of menu "File", either using the keyboard accelerator Control Q. A confirmation screen is displayed. The environnement parameters are automatically saved.

Selecting isovalue curve display

Menu "View" allows you to select the isovalue curves which are displayed on the screen.

Only those isovalues whose name is checked are plotted. If for instance you check only temperatures, the Clapeyron chart looks as follows: