1
THERMOPTIM®
GETTING STARTED
JAVA VERSION
Rankine cycle example
VERSION 1.38
R. GICQUEL SEPTEMBER 2001
THERMOPTIM-Java Getting Started
september 2001
2
CONTENTS
BASIC NOTIONS............................................................................................................................................... 3 EXAMPLE 1: CALCULATION OF A RANKINE CYCLE .......................................................................... 5 SOLUTION OF THE PROBLEM............................................................................... ERREUR ! SIGNET NON DEFINI. Creation of the diagram.................................................................................................................................6 Definition of the points.................................................................................................................................10 Definition of the processes ...........................................................................................................................12 PLOTTING THE CYCLE ....................................................................................................................................... 14 VIEWING THE POINT VALUES IN THE DIAGRAM EDITOR .................................................................................... 13 EXPORTING RESULTS IN THE FORM OF A TEXT FILE..................................................................... 17 CREATING A NEW SUBSTANCE................................................................................................................ 18
Copyright © R. GICQUEL 1997-2001 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
THERMOPTIM-Java Getting Started
september 2001
3
GETTING STARTED
This documents intends to allow a user to get quickly used to THERMOPTIM (in less than half an hour), by using the basic elements of the software. Subsequently he or she will be able to deal with more complicated problems, especially those making use of nodes or heat exchangers. The following points will be addressed : - presentation of some basic notions which must be understood before using the software - analysis of a simple example : the calculation of a water vapor thermal power plant, which is presented in more detail in Thermoptim's examples. - plot of the cycle on a Vapor interactive chart.
Basic notions
The study of a thermodynamic system can be divided into five main tasks : - 1) the analysis of the structure of the system under investigation, which identifies its main components and their connections: for instance, a thermal machine consists of heat exchangers, compressors, turbines or expansion devices, combustion chambers... - 2) for each component, the identification of the thermodynamic fluids which are used: for instance, the fluid compressed in a gas turbine is air, which burns with a fuel in the combustion chamber. The resulting flue gases expand in a turbine. - 3) for each component, the selection of the kind of system to be considered (open or closed): for instance, the study of the compression in a piston compressor must be made in closed system, while that of the expansion in a gas turbine is to be made in open system. Let us recall that a closed system (respectively an open system) is characterized by the absence (respectively the existence) of mass transfer through its boundaries. - 4) the description of the processes which undergo the different fluids in the components, and the calculation of their evolutions in the components, taking into account their interconnections. - 5) the calculation of the overal balance of the system analysed. THERMOPTIM has been designed in order to facilitate the calculation of complex thermodynamic systems, but it cannot replace the user for making the detailed analysis of the system under investigation, which corresponds to the three first steps above. Before entering his project in the software, the user must have made this analysis. Otherwise there is a risk that the description will be done improperly. Once this analysis is made, each component can be easily defined with the points, processes, nodes and heat exchangers described below, which are grouped in a project.
THERMOPTIM makes use of three kinds os substances: pure ideal gases, composed ideal gases and condensable vapors (which are pure substances). Perfect gases are ideal gases whose specific heat is THERMOPTIM-Java Getting Started september 2001
4 independant of the temperature. A given substance may exist (under different names) as an ideal gas and a condensable vapor. The substance can be pure, in which case its properties are predefined in the software, or it can be compound. In this case (that is possible only for a gas), 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. A point designates a particle of a substance and allows the user to define intensive state variables: pressure, temperature, specific heat, enthalpy, entropy, internal energy, exergy, and quality. A point is identified by its name and the name of the associated substance. To calculate it, one may either : - enter the values of at least two state variables, generally its pressure and temperature for open systems, and its volume and temperature for closed systems. - automatically calculate them by using for instance one of the processes defined below. Processes correspond to thermodynamic evolutions undergone by a substance between two states. A process associates therefore two points such as defined previously, an inlet and an outlet point. Moreover, it indicates the mass flow rate involved, and allows one therefore to calculate extensive state variables, and notably to determine the variation of energy involved in the course of the process. Processes can be of several types: compression, expansion, combustion, throttling, heat exchange, and water vapor / gas mixtures (the latter includes six different categories of evolutions). According to each case, various characteristics of the process have to be specified, for example, in compression, its isentropic or polytropic efficiency. A cycle can thus be described as a set of points connected by processes. To the extent that the mass flow rate fluid is the same in all the evolutions, processes and points are sufficient. If this is not the case, it may be necessary to describe at least partially the network of involved fluids. Then the first elements to define are the network nodes which are described in the documentation.
THERMOPTIM-Java Getting Started
september 2001
5
Example 1: Calculation of a Rankine cycle
Objective : study the Rankine cycle of a thermal power plant, and represent it on a thermodynamic diagram. This example shows how to construct a project by defining points and connecting them by processes.
At point 1, the flow rate of liquid water is 1kg/s, at a temperature of approximately 20 °C and at low pressure (0.023 bar). A pump, whose isentropic efficiency is equal to 1, pressurizes the water to 165 bars (point 2). The pressurized water is then heated (at constant pressure) in a flame boiler (fuel-oil, coal, natural gas). The heating is comprised of three steps: - heating of the liquid water from 20 °C to approximately 355 °C, dew point temperature at 165 bars: process (23a) on the entropic diagram - vaporization at constant temperature 355 °C: process (3a-3b) - superheating from 355 °C to 560 °C: process (3b-3). The vapor is then expanded in a turbine whose isentropic efficiency is equal to 0.85 until the pressure of 0.023 bar is reached: process (3-4). The liquid-vapor mix is finally condensed to liquid water in a condenser. The cycle is thus closed.
THERMOPTIM-Java Getting Started
september 2001
6
Creation of the diagram Placement of the components
Run THERMOPTIM without loading a project, which displays the following Diagram Editor screen:
On the palette appear the components available: process-points, exchange, compression, expansion and throttling processes, mixers, dividers, separators. To represent the feedwater pump, select a compressor component on the palette and place it on the editor by clicking the crosshair cursor at the appropriate location. A property editor is opened:
THERMOPTIM-Java Getting Started
september 2001
7
Name the compressor "pump", then click on the "outlet port" tab:
By default, the flow rate is set to 1. Name the point "2". To enter the substance name, you may either type it if you know it, or get it from the list of available substances which can be displayed by double-clicking in the substance name field and expanding the type folder (here expand Vapors then click on « water »).
To validate and close the property editor, click on "Apply all". The component appears on the diagram editor, with its name below it and the outlet point above on the right:
Similarly create three exchange components corresponding to the economiser (outlet point 3a), the evaporator (outlet point 3b), and the superheater (outlet point 3), one expansion component corresponding to the turbine (outlet point 4), and one exchange component corresponding to the condenser (outlet point 1).
THERMOPTIM-Java Getting Started
september 2001
8 In all cases, the substance is water. You obtain the following result:
Connection of the components
To connect the components, click on the outlet port of one of them (e.g. the pump). The cursor becomes a crosshair and a line extends from the port if you drag the cursor. Drag the cursor to the inlet port (e.g. the economiser) of the destination component while keeping the mouse clicked, and release the mouse. A link is established. Proceed similarly for all components. You obtain the following result:
By default, all components are oriented from the left to the right. When a loop appears in a diagram, it is convenient to orient some components from the right to the left. Here, you can change the condenser orientation by selecting it and selecting item "flip vertical" of menu Edition or clicking on F1. You obtain the following diagram:
THERMOPTIM-Java Getting Started
september 2001
9
Transfer to the simulator
The diagram is now completed and you may transfer it in the simulator. To do that, select item "Interface Diagram/Simulator" in menu View, which opens a new frame. Click on button "Update the element table" :
The different components you have created appear in the table. A "x" in the " simulator" or "Diagram" column indicates that the element belongs to this environment (here all elements belong to the diagram, and none to the simulator). Click the on button "Update the simulator from the diagram". As the project has not yet been named, the following message is prompted:
THERMOPTIM-Java Getting Started
september 2001
10 Name the project and click on "OK". The different points and processes are then created:
The whole structure of the project is created, but the detailed settings have still to be made (by default, all points have the same pressure (1 bar) and temperature (300 K)).
Definition of the points
To define point 1, double-click on it in the table or on the link between the condenser and the pump:
THERMOPTIM-Java Getting Started
september 2001
11
Then enter the state of the substance at this point. Its pressure is known (0.023 bar), and it is in the liquid state at the saturation temperature. To find its temperature, click on "set Tsat". The other intensive variables can then be calculated by clicking on the button "Calculate" (by default, the quality is set to 0, which corresponds to the liquid state).
If you want to set a given temperature difference with the saturation value, enter it in the field labelled "Tsat approach". Here we set it implicitely to 0. Point 1 is now defined. Similarly define the other points. For point "2", indicate the only information known about it, its pressure p = 165 bar. In the current definition state of the cycle, both its temperature and its enthalpy are not yet known. For point 3a enter 165 bar corresponding to the beginning of vaporization. To do that, enter the pressure, and set the saturation temperature, and the quality equal to 0. As the state of point 3a is totally defined, the other variables can be calculated. Similarly, point 3b can be defined as being at the pressure 165 bar, at the saturation temperature and its quality is equal to 1. Point 3 is at 833.15 K (560 °C) and at 165 bar. It can also be calculated. The last point to define is point 4. Only its pressure is known: 0, 023 bar, and it is set to Tsat. Once this point is (partly) defined, the project screen shows now the 6 created points.
THERMOPTIM-Java Getting Started
september 2001
12
Definition of the processes
To define the processes, open their frames by double-clicking in the process table or in the diagram editor. At this stage, the compression screen looks as follows :
By default, the pump energy type is "useful", which is correct, as this energy is taken from the turbine shaft (see Reference Manual para. "Process screen"). You have the choice between four modes of compression: adiabatic or polytropic, for open systems or for closed systems. For the first ones, the compression ratio is that of pressures, for second ones, that of volumes. It can be either calculated, as it is the case here, where the outlet pressure is known, or set, in which case the latter is calculated from the inlet pressure. You can select two calculation modes. In the first case ("Set the efficiency and calculate the process"), the outlet point state is calculated from that of the inlet point and the efficiency value. For the second one ("Calculate the efficiency, the outlet point being known"), the efficiency value is calculated on the basis of both inlet and outlet points considered as set. Choose here the first case, which is selected by default. Make your selection by clicking on the appropriate checkboxes, and enter the efficiency value (isentropic or polytropic) for compression. In the present case, the inlet point is liquid, and only ideal compressions are modeled for liquids, except for water. Choose here: isentropic, isentropic efficiency equal to 1, and open systems. Click on "Calculate ". Automatically, the state of point 2 is calculated, as well as the corresponding enthalpy variation. The value of the compression ratio is displayed (here approximately 7 174). Save the form. To define the economiser, choose "purchased" for the type of energy (see Reference Manual para. "Process screen"). If you desire to calculate the process, the screen displayed is the following:
THERMOPTIM-Java Getting Started
september 2001
13
Here, the two inlet and outlet points are already defined, and the calculation of the process is nothing but the determination of the corresponding enthalpy variation selected by default. To do it, click on the button "Calculate". Save the form. Similarly define the evaporator (3a-3b) and the superheater (3b-3). You can now define the expansion (3-4). The screen that is presented is like the one for compression. Choose the type of expansion (here adiabatic of efficiency 0.85), and calculate the process. The exact state of point 4 and the enthalpy of expansion are then determined. Save the form. For the condenser, enter (in the minimum pinch field) a value of 6 K at the condenser level (boiling water). The list of the processes that you have created is displayed in the left middle part. At this stage, the cycle is totally defined, and you can calculate the balance by clicking on the "Balance" button on the left.
The energy purchased, useful energy, and the efficiency of the cycle are then determined. The example file is steam1.txt. Save also the diagram file as "steam1.dia" by selecting item "Save As" of menu File of the Diagram Editor.
Viewing the point values in the diagram editor
You can directly view the point state values on the diagram, by selecting item "Show values" in menu Special: .
THERMOPTIM-Java Getting Started
september 2001
14
In order to improve the appearance on the diagram, you can add a text, two "external source" type components , one for the boiler, and the other one for the cold source, as well as a "Balance" type component which allows you to display the balance values (the latter component only appears in menu "Components"). The enthalpies exchanged with the external sources are shown.
Plotting the cycle
To plot the cycle on the Interactive charts, act as indicated below: In the main frame, select item Interactive Charts of menu Special.
THERMOPTIM-Java Getting Started
september 2001
15
Then double-click in the field named "Chart" and select "Vapors" from among the proposed list. The following screen appears:
and the interactive chart frame is shown if the chart type is (T,s):
If the substance selected is not water, select it in menu "Substance". Then go back to the "Interactive Chart" frame, and click on "Update the point table". All the project points are displayed in the table:
The two first column show the names and the substances of the points. When a point is part of the simulator project, a "X" appears in the third column, and when it is part of the Chart cycle points, a "X" appears in the fourth one. Here, there are only simulator points.
THERMOPTIM-Java Getting Started
september 2001
16 The last table column titled "selected" shows the point status: if a "X" appears, the point is selected for being taken into account in the transfers between the simulator and the charts, otherwise not. To change a point status, double-click on the corresponding line. Here we want to plot all points, so we keep them all selected. Now, click on "Update the chart from the simulator " to have the points transferred to the chart, and select "Connected Points" in menu Cycle. If necessary, change the axis layout in menu "Chart". You get the following result:
If you prefer to have the cycle plotted on a (h,p) chart, select this item in menu "Chart":
You can now use all the features offered by the interactive charts, which are presented in the chart reference manual, such as editing the points in the cycle editor. In order to do that, select item "Edit a cycle" in the "Cycle" menu. The following frame appears:
THERMOPTIM-Java Getting Started
september 2001
17
You can now change the cycle, add new points... If you want to transfer these changes to the simulator, go back to the "Interactive Chart" frame, click on "Update the points", select the points you wish to update, and click on "Update the simulator from the charts".
Exporting results in the form of a text file
Once your project is completely calculated, all the results can be converted in a text file which can be imported to a spread-sheet. To do this, select the, select the the "Export results" item of the "Result files" menu. An ASCII text format file is created. Open it with a spread-sheet, and you obtain the following result:
THERMOPTIM-Java Getting Started
september 2001
18 All fields from points, processes, nodes and modules of the project are grouped in this document, as well as the molar and mass composition of the composed substances used.
Creating a new substance
You can create a new substance (only a composed ideal gas, as the user cannot create pure substances) by simply doing the following : enter the name of the new substance in the substance field of a point. Thermoptim browses through all the existing substances looking for that name. If it exists, it is selected. Otherwise, it considers that you want to create a new gas and opens a gas editor which enables you to select the gas composition from among the existing pure gases (which are shown in a combo-box in the component name colum).
You can enter the gas composition in either molar or mass fraction. Thermoptim will consider that the first figure column from the left contains the data (you can move a column by clicking on its headband and dragging it laterally). Line edition buttons allow you to insert, copy and paste or suppress a line. File buttons allow you to save the gas, rename and save it, export its composition in a text file, create a water vapor / gas mixture of a given absolute humidity, print the frame and cancel the edition. When you are through with entering the constituents, save the composed gas by clicking the corresponding button. If the sum of the molar or mass fractions differs from 1, you are informed by a message and the gas is not saved. The same gas editor is shown when you click on the "display" button located close to the substance name in the point frame.
THERMOPTIM-Java Getting Started
september 2001