Online course and simulator for engineering thermodynamics

Models available as external classes

Models available as external classes

This page allows you to directly access the Thermoptim model library, which includes five categories of external classes:

  • External substances

  • External processes

  • External dividers

  • External mixers

  • Drivers

For each model, various documents define the external class (the number varies depending on the complexity of the model):

  • Presentation of the model

  • Instructions for use of the class

  • Java code of the external class

  • extUser.zip or extUser2.zip file containing the class

  • Project and diagram files of an example

Historically, external classes began to be developed for Thermoptim versions 1.3 to 1.5, then, from 2012, Thermoptim versions 2.51, 2.61, 2.71 and 2.81 were developed, as some operating systems, such as MacOS, no longer allowed us to run versions 1.3 to 1.5.

A few years later, from October 2018, a change in the Java libraries forced us to modify the source code of external classes and Thermoptim, leading to versions 2.52, 2.62, 2.72 and 2.82.

In principle, these versions of the external classes can also be run with Thermoptim versions 2.51, 2.61, 2.71 and 2.81, but the reciprocal is not true.

Three versions of the external classes should therefore be used, depending on the version of Thermoptim you have. If you do not know it, it is indicated in the screen that appears when you click on the line "About Thermoptim" in the "Help" menu of the simulator.

When external classes are available for versions 2.5 to 2.8, three sets of files are available for download, reported by:

  • V1 for versions 1.3 to 1.5

  • V2.51 for versions 2.51, 2.61, 2.71 and 2.81

  • V2.52 for versions 2.52, 2.62, 2.72 and 2.82

Note

As explained below, for ease of use, all the classes of the different models have also been grouped into a single extUser2 file.zip downloadable with the corresponding version of extThopt2.zip.

Volume 3 of the Thermoptim reference manual will explain how to use and design external classes and Diapason session S07En_ext will guide you through your first steps. However, if you just want to use external classes, just learn how to load them in the software package, which is explained below in this page

The links below give you access to pages where you can download extUser2.zip or extUser.zip files containing external classes. For these classes to appear in Thermoptim, you must either replace the file with the same name in the installation directory of the package or extract the compiled class files (extension .class) and place them in your old extUser. zip or extUser2.zip file.

If you are using a version of Thermoptim after 2.51, you can use for this the external class manager . Otherwise, refer to the guidance provided in Volume 3 of the Thermoptim reference manual .

Archive containing all models

Historically, external classes began to be developed for Thermoptim versions 1.3 to 1.5, then, from 2012, Thermoptim versions 2.51, 2.61, 2.71 and 2.81 were developed, as some operating systems, such as MacOS, no longer allowed us to run versions 1.3 to 1.5.

A few years later, from October 2018, a change in the Java libraries forced us to modify the source code of external classes and Thermoptim, leading to versions 2.52, 2.62, 2.72 and 2.82.

In principle, these versions of the external classes can also be run with Thermoptim versions 2.51, 2.61, 2.71 and 2.81, but the reciprocal is not true.

Three versions of the external classes may therefore be used, depending on the version of Thermoptim you have. If you do not know it, it is indicated in the screen that appears when you click on the line "About Thermoptim" in the "Help" menu of the simulator.

The need to develop the external classes corresponding to versions 2.52 and later resulted in multiple versions of the extUser2.zip and extThopt2 files.zip corresponding to each model.

To simplify things, we have gathered all the available models (except those requiring special libraries like CTPLib ou IF97) in the extUser2.zip files of the archives below, for the four versions 2.51 and 2.61, 2.52 and 2.62, 2.71 and 2.81, as well as 2.72 and 2.82. The files offered for download for each model will provide you with additional documentation and examples.

As each extUser2.zip file must be used with the corresponding version of the extThopt2.zip file, the download links below give access to an archive containing both files.

Download the archive corresponding to your needs, extract the two files extUser2.zip and extThopt2.zip, and place them in the Thermoptim installation directory, after taking the precaution of creating a backup of the initial directory so that you can return to it in case of difficulty.

2.51.zip

2.52.zip

2.81.zip

2.82.zip

External substances

External substances allow you to introduce new substances. These substances may be pure, in which case you must define the methods for calculating the complete state of the substance knowing its temperature and pressure, as well as inversion functions of some of its state variables.

You will find here some examples of pure external substances. Although they are not listed here, a series of water glycol coolants and brines are available in standard libraries of external classes provided with the package. They appear in the list of external substances of the screen points with their compositions as "prop. 40% glycol water" or "23% NaCl brine."

The external substances may also be external mixtures. Until 2005 in fact, the only Thermoptim substances whose composition could be user-defined were ideal gases: it was impossible to represent mixtures of real fluids. The mechanism of the external substances has been set in order to do so, with the introduction of a new substance type, called "external mixture", former external substances being renamed "pure external substances".

An external mixture is made from an external system, that is to say, from a given set of pure substances (and you can also access their pure properties), and from its composition specified in a new editor of external mixtures.

It is important to note that the distinguishing feature of external mixtures is to generate a set of substances from one system of pure substances. They are similar in that to the compound gases, the difference being that the interactions between real fluids are much more complex than between ideal gases, so that it is necessary to specify not only the pure components involved, but also their models, the mixing rules and a set of additional parameters.

External processes

The external processes are the simplest external components. They correspond to the case where the component is crossed by a single stream of matterl (whose composition may change, however). In the diagram editor, such a component has only two connections, one upstream and one downstream. An example of such a component is a solar collector, through which flows a fluid that heats up.

External dividers

An external divider receives one upstream flow of matter, but at least two exit. In the diagram editor, such a component has at least three connections, one upstream, two downstream. It is a 1-n component, where n is the number of branches coming out.

External mixers

An external mixer receives at least two upstream flows of matter, but only one exits. In the diagram editor, such a component has at least three connections, two upstream and one downstream. This is an n-1 component, n being the number of incoming branches.

Quadrupoles  

A number of components, such as a fuel cell, receive multiple streams of material upstream, and several exit downstream. As such components cannot be represented by a single Thermoptim element, they are modeled by the coupling of an external mixer upstream and an external divider downstream. Since the coupling of two nodes is structurally impossible, it is necessary introducing a linking process-point, whose role is purely passive.

Drivers

A driver is an external class allowing you to drive Thermoptim from another application, or to guide a user (smart tutorial) or to control the execution of the code (control or regulation, access to thermodynamics libraries). Thermoptim external drive has two main applications:

  • firstly facilitate the development of external classes by testing them as and when they are defined

  • Secondly provide access to all the non protected libraries for different purposes (making external treatments between recalculations, guide a user in a training...).

One limitation of Thermoptim is that the automatic recalculation engine provides only very limited linkages between components, and almost only when they are connected in the diagram editor.

An external driver allows you to overcome this limit. It can:

  • Observe the thermodynamic state of all points and processes

  • Execute a search algorithm to solve a set of equations corresponding to a strong coupling between different components

  • Change the settings of a whole project based on the solution found

  • Make backups complementary to those of Thermoptim

It is these features that are put into practice when using a driver to perform off-design operation simulations

Loading external classes

To load an external transformer (for an external node, the procedure is similar), you can operate in two ways, the first one being the simplest:

  • Either, from the diagram editor, build the external component graphically, and then update the simulator from the diagram

  • Or, from the simulator screen, double-click the headband in the table of processes, then choose "external" and finally select the type of external process you want from the list that is offered

In the case of an external process, the default type is "source / sink." Once the default process created, double-click on "source / sink," which gives you access to the list of all available external processes. Choose the one you want, which is then loaded.

Of course, this operation is performed only during when the class is loaded for the first time. Its references are then stored in the project file, which allows to automatically load it when you reopen your project.

To learn more about using external classes, read the document below.

UtilExterneUS.pdf

Adiabatic diffuser

An adiabatic diffuser is a fixed component that serves to convert into pressure a portion of the kinetic energy available in a gas. The initial relative velocity of the outside air can thus achieve a dynamic compression in the inlet diffuser of a jet engine: the kinetic energy of intake air is converted into pressure.

Adiabatic nozzle

An adiabatic nozzle is a fixed component that allows one to convert in kinetic energy the pressure of a gas.

Turbojet driver

The turbojet driver allows one to coordinate updates to the diffuser, the nozzle and the compression ratio in the whole project, to calculate the values ​​of specific thrust and consumption per unit thrust, which are not directly provided by Thermoptim, and perform sensitivity studies by saving the results to a file.

External substance "Dowtherm A"

This external substance is used to model a thermal oil used as a transfer fluid, particularly in solar concentrators.

External substance "LiBr_H2O"

This external substance is used to model the pair (LiBr-H2O) used especially in absorption chillers.

External substance "liquid sodium (Na)"

This external substance is used to model the liquid sodium used as a transfer fluid, especially in nuclear reactors.

External substance "EauSolute"

This external substance is used to model a water-solute solution with a boiling point elevation.

External substance "EauSalee" (salt water)

This external substance is used to model a salt water solution with a boiling point elevation.

Solar concentrator

The solar flux received by the collector is first reflected on the mirrors of the concentrators, then it generally passes through a glazing material for thermally insulating the receiver where it is absorbed by a suitable surface. Reflection, transmission through the glazing, and absorption result in optical losses, generally characterized by an effectiveness t. In high concentration collectors, only the direct component of solar radiation can be directed to the receiver, as the diffuse component cannot be concentrated.

The absorber heats up and loses heat to the outside mainly in the form of radiation and convection. This loss can be characterized by a coefficient of thermal losses U. A thermal fluid cools the absorber, taking useful heat that is then converted or transferred for different uses.

Direct and indirect contact cooling towers

direct contact

indirect contact

A cooling tower is a heat exchanger of a particular type that discharges heat in the surrounding air in the form of both sensible heat and latent heat due to the increase of its moisture. By working this way, it is possible to cool a fluid at a temperature a few degrees above the ambient air wet bulb temperature (and possibly below its dry bulb temperature), at the cost of a water consumption of about 5% of that which water cooling would require.

There are two main types of cooling towers, called direct or open-cycle, and indirect contact or closed-cycle.

The models we built are based on a global enthalpy reasoning in which are assumed known the inlet and outlet conditions air side and the inlet ones on the side of the fluid to be cooled. In the indirect contact tower, cooling is provided via a thermocoupler.

Mixed ionic-electronic conducting MIEC

At high temperatures (above 700 °C), the mixed ionic-electronic ceramic membrane is a conductor, through which pass simultaneously O2-ions and electrons, oxygen being adsorbed on the surface.

Cooling and condensation of a moist gas

The cold battery external divider is used to model the cooling and condensation of water in the moist gas. This is a simplified model, which has two parameters, the water temperature and the water extraction effectiveness, which represents the percentage (by volume) of the condensed water related to the incoming water.

Cooling coil with condensation

The dehumidifying coil external divider is used to model the cooling and condensation of water in moist gases. This is a specific model, the parameter epsilon is the effectiveness of the cooling coil.

CO2 emissions

This external process can be placed downstream of any combustion chamber. The CO2 flow-rate is calculated from the CO2 concentration and the gas flow-rate, in the same unit. CH4 and N2O are calculated from the CO2 flow-rate, by returning to the corresponding energies.

Saturation of a moist gas model

This model is of quadrupole type. The saturator behaves like a moist mixer, and is calculated as such. Saturator class is a variant of the water quench gas humidification model in which we do not know a priori the temperature of moist air nor that of the outgoing water.

CO shift reactor

The water gas shift reaction is often used to convert CO to CO2

CO2 + H2 <-> CO + H2O

It is a catalytic reaction carried out in one or more reactors, slow kinetics, strongly influenced by temperature. It will usually convert the bulk of the CO, but there remains too much for some fuel cells.

Biomass combustion

This is a simplified model that allows one to simulate different types of biomass combustion , in which it is possible to vary in a fairly flexible way the composition and moisture of the fuel and the conditions of combustion. Class BiomassCombustion can be used both to simulate a boiler and a downdraft gasifier.

Gas humidification by water quench

This quadrupole type model is used to wash a synthesis gas at the outlet of a biomass gasifier.

Reactor for CLC cycle (Chemical Looping Combustion)

The CLC ( Chemical Looping Combustion ) cycle is one of the innovative power generation cycles using oxy-combustion, where the combustion chamber is replaced by a chamber with two compartments between which flows a metal oxide such as NiO. In one of the chambers, the air is oxygen-depleted due to oxidation of the metal. In the other, the oxide is reduced and the oxygen released burns with fuel. The reactor model we built is purely global. We consider that the temperature and composition of the depleted air are set. It then becomes possible to determine the flow of oxygen transferred between the two reactor compartments.

Models of ejectors

An ejector or injector receives as input two fluids normally gaseous but which may also be liquid or two-phase:

  • the high pressure fluid called primary fluid or motive;

  • the low pressure fluid, called secondary fluid or aspirated.  

The primary fluid is accelerated in a converging-diverging nozzle, creating a pressure drop in the mixing chamber, which has the effect of drawing the secondary fluid.

  • The first is for condensing vapors (refrigerants, steam...)

  • The second is for the case where the same ideal gas is used as motive and secondary fluid

  • The third is a generalization of the second in case the motive and secondary fluids are two different ideal gases.

Absorber for LiBr-H2O absorption cycle

An absorber is a component in which enter the vaporized coolant and the weak solution preheated in the solution exchanger, and out of which leaves the rich solution, the heat removed being rejected to the surroundings

Desorber for LiBr-H2O absorption cycle

A desorber is a component that receives a heat flux from the heat source, in which enter the rich solution at high pressure, preheated in the solution exchanger. Fluids exiting are the almost pure refrigerant vapor (H2O), and the weak solution.

Evaporator

An evaporator acts as a divider receiving as input the product to concentrate, and from which exit two fluids: mists (water vapor) and the concentrated product.

Desuperheater

A desuperheater is a device that reduces or nullifies the steam superheating. This model determines the flow of desuperheating liquid required to obtain a set outlet temperature, taking into account potential pressure drops.

Flash chamber

During an operation of desalination, a process is to perform a flash of salt water, which has the effect of vaporizing a fraction of the total flow-rate and to increase the concentration of the solute.

A flash chamber acts as a divider receiving as input the product to concentrate, and from which exit two fluids: water vapor and the concentrated solution. The room being adiabatic, the enthalpy of vaporization is taken from the aqueous solution, whose temperature drops.

This class makes use of external substances "EauSolute" or "EauSalee" that allow you to take into account the boiling point elevation. They are supplied in the archive.

Reverse osmosis unit

During an operation of desalination, a process is to perform a reverse osmosis.

A reverse osmosis unit acts as a divider receiving in input the salt water under pressure, and from which exit two fluids, the permeate corresponding to the purified water and the concentrated solution.

This class makes use of external substances "EauSolute" or "EauSalee" that allow you to take into account the boiling point elevation. They are supplied in the archive.

Cooled air compressor driver

This driver was built to study the behavior of a cooled air compressor that fills a compressed air storage of given volume under variable pressure. The compressed air is cooled before storage thanks to a water heat exchanger.

Refrigeration machine driver taking into account the refrigerant charge

This driver allows one to study a fairly complex problem, that of the adaptation of a refrigeration machine to changes in the outside temperature or the compressor rotation speed.

In this example, the various components are coupled by non-linear equations:

  • First, pressure levels are set by the thermal equilibrium of two phase-change heat exchangers, the evaporator and condenser, which set the saturation temperatures;

  • The compressor sets the volumetric flow of refrigerant (depending on its rotation speed and compression ratio that determine its volumetric efficiency), and thus the mass flow rate (depending on the specific volume of refrigerant at the inlet).

The main parameters of the refrigeration machine, namely the pressure levels and flow-rate, are set by several components strongly coupled whose calculation cannot be done independently.

In addition, we set two additional constraints:

  • we take into account the pressure drops in heat exchangers;

  • sub-cooling is determined by ensuring the conservation of total mass of refrigerant contained in the machine.

Steam power plant off-design driver

This driver allows to study a fairly complex problem, that of the adaptation of a steam power plant to changes in temperature of the coolant or in the maximum pressure of the cycle.

In this example, the various components are coupled by non-linear equations:

  • First, the condensing pressure is set by the heat balance of the condenser, phase change exchanger, which sets the saturation temperature;

  • The turbine sets the steam flow-rate (depending on the expansion ratio and the upstream pressure, as well as its rotation speed if we take it into account).

The main parameters of the steam power plant, namely the pressure levels and flow-rate, are set by several components strongly coupled whose calculation cannot be done independently.

UtilExterneUS.pdf

PWR reactor steam generator driver

This driver makes it possible to study a relatively complex problem: the adaptation of a PWR reactor steam generator to the variation of its supply conditions.

Stirling engine driver

This driver calculates the energy balance of the solar Stirling engine.

copyright R. Gicquel v2024.2

Created with Scenari (new window)