Presentation

This session is an introduction to using and programming Thermoptim external classes.

It is structured in three parts:

It completes session S07_init which presents an overview of the software. If you do not know Thermoptim, first view this session.

The external classes are elements of Java code that allows users to customize their work environment by creating their own components (processes, mixers, dividers and drivers) or their own substances, and facilitates interoperability of the package with the outside, including with other applications developed in Java.

Once created, the external classes become part of Thermoptim screens as the elements of the core, and can be used to model complex energy systems. This way of doing limits the modeling work and allows one to benefit of the features of the Thermoptim environment, which has the effect of making modeling easier and safer.

You will find more information firstly in the small note on the use of external classes which can be downloaded from the link below, and also in the third volume of the reference manual of the software. To program external classes, you will need to refer to it.

Thermoptim is distributed with two types of Java environments, corresponding to versions 1.3 to 1.7 (from 2000 to 2011), and 2.5 to 2.8 (from 2011).

Accordingly, there are two sets of extension files: firstly extThopt.zip and extUser.zip, and secondly extThopt2.zip and extUser2.zip.

This session was originally prepared for the first set, which is no longer up to date. However its content can be transposed to the second one, provided the names of the extension files are modified.

(Session realized on 06/16/11 and 10/16/18by Renaud Gicquel)

External components

External components

External substances

Practical use

We will now show how to use an external class in practice.

We will show:

Using an external process

Default instantiation

Selection of the class

Instantiation of the class choosen

Configuration of Thermoptim (versions 1.5 to 1.7)

Configuration of Thermoptim (versions 2.5 to 2.8)

Loading extUser.zip with Winzip

Basic Concepts

We will now present, for those who are not familiar with the Java language, some basic concepts that will later be used regularly.

We will explain:

As these explanations are necessarily short, you will find additional information in the third volume of the reference manual of the software

Programming in Java

Compilation of a class

Classes grouped in packages

External class archives

External class viewer

Thermocouplers

Thermocouplers

Thermocoupler screen

Programming

We now show how to develop an external class.

We will present:

Java environnement

Two modes of operation

Thermoptim emulation

Structure of the external class mechanism

SolarCollector class

SolarCollector class

Calculations

Backup / reading of parameters

External nodes

Sequence of operations:

  1. consistency check and updating of the node before calculation
  2. reading the parameters on the external component screen
  3. updating the processes connected to the external node
  4. updating and calculating the associated thermocouplers
  5. updating the screen of the external component
  6. saving and loading the parameters of the model

Consistency check