Gadget Factory: Examples of Using ProMax® in Other Programs

ProMax is structured in an open manner that makes it relatively straightforward to harness its various capabilities using simple programming commands. With minimal coding, it is possible to integrate ProMax calculations into other programs, or to create stand-alone gadgets that wrap only the needed portions of ProMax into a simple interface. This article provides examples of three such simple gadgets, all of which can be downloaded directly from Bryan Research & Engineering (BR&E).

The first is a Microsoft Excel workbook that allows the user to quickly generate a phase envelope for a specified stream composition. The file opens up ProMax without Visio, calculates the phase envelope, and returns the results to Excel. Figure 1 provides an image of this file.

Figure 1: A simple gadget for using ProMax thermodynamics to generate phase envelopes in Microsoft Excel

This tool can be used out of the box without the need for any programming experience. However, anyone interested in taking a look behind the scenes can examine the code required to perform this straightforward calculation. Take a look at the code by opening up the Visual Basic Editor within the Excel Workbook.

The second example is another Microsoft Excel workbook that quickly generates isobaric and isothermal phase curves for binary mixtures. As with the previous example, calculations are performed by opening up ProMax invisibly, and the results are returned directly to the spreadsheet, where they are plotted using the built-in graphing features of Excel. Figure 2 demonstrates.

Figure 2: A simple gadget for using ProMax thermodynamics to generate phase curves of binary mixtures in Microsoft Excel

As with the first example, this tool can be freely used by anyone with a valid ProMax license, and the code used to generate it can be viewed directly in the Visual Basic Editor.

The third example is a simple desktop executable program that provides unit conversions between virtually all recognized engineering unit sets (e.g. English to metric). The program uses the underlying unit conversion engine in ProMax to perform the calculations. Figure 3 demonstrates.

Figure 3: A small executable file that uses the ProMax unit conversion engine to convert between virtually any set of engineering units

This utility is, of course, nothing novel; many such programs already exist and are freely available over the internet. Its primary purpose, then, is to demonstrate how a subset of ProMax features can be extracted into another program using programming commands that are relatively simple to implement.

A ProMax license includes technical support for all clients. For those interested in developing these solutions on their own, BR&E teaches a two-day programming course (BRE 331) that is open to anyone. Visit our website to register for an existing course or to request to host one in your area. For those who, instead, would like to have BR&E do the development work for any custom solutions, contact us directly. As with all ProMax Support, there is no charge for training or assistance with custom support work.