n-dim home

Designing and Implementing a Flowsheet Application with n-dim


Erika Fleckenstein

The goal of my project, funded by the Small Undergraduate Research Grant summer fellowship at Carnegie Mellon University, was to design and implement a computer based support system for chemical engineers using flowsheets to design chemical processes. Flowsheets are used to sketch out a picture of what the process will look like by using a diagram of the machinery that will be used and how it will all be connected. Flowsheets can be drawn out using pen and paper or by using a computer program made for this purpose. Process design is usually not done by one person working alone. A team of designers faces several problems when using a computer as a design tool. Current flowsheeting software allows no easily visible way to track the history of the design as it evolves. It is up to the user to keep track of changes they have made, and save different versions as different files with a unique and easy to understand name. Also, a record of design rationale, and explanations for failed designs is usually kept in the designers private notes, if they are recorded at all. I hoped to design and implement a computer application that would allow a team of designers to work together to solve a problem. There are a wide range of units that can be used in the chemical process industry, and a fully robust program would support all of them in any combination. I looked at a small subset of this larger system, a flowsheet consisting of three distillation columns. The user specifies the initial state of the columns and their connectivity. I used n-dim as a modeling environment, and existing models in ASCEND to make the necessary calculations on how the system would behave. A custom user interface allows the user to easily interact with the system. By showing that this system is useful, I can extrapolate to say that the fully robust system would also be useful.

To decide on the functionality of my application, I interviewed several chemical engineering graduate students. I asked them how they approached a design problem, and they steps they would usually take in the design process. I asked them what they would want from a computer based design environment. From this I was able to write use cases to decide the exact functionality of the system and how best to model and implement it. Use cases consist of all the actions a user will need to take and a detailed list of the steps the user will need to take for each action.

I used n-dim to create a model of my application. n-dim is a computer based support system for collaborative design. It is based on the idea that design is a collaborative process, and that a system to support design must also support interactions between people of different intellectual and cultural backgrounds. n-dim’s approach to dealing with this challenge is an architecture which has three critical features: a flat object space, flexible persistence, and modeling languages. There is no universally specified structure inherent to the objects. The users must define their own order to the information. Also, objects in n-dim are persistent in that users may only delete or change their own private objects. Once an object is made public, it is visible to everyone and can only be added to, not changed. Once an object is published, it is visible to everyone and cannot be altered in any way. It can be extended by making a private copy. In this way a record of the object’s history is kept. The modeling objects are used to encapsulate the data, the information models, and the actions that can be taken on them, the operations. When the modeling object is used as a language for a new object, the new object is restricted in what it can contain, how it’s contents can be connected, and what actions may be performed on the comments.

To model my application, it was very easy to extend and build on the functionality of n-dim. I used n-dim to build a modeling language for my application. The language contained all of the parts required, and how they could be connected. Also, each language had a set of operations defined on it, which allowed the user to manipulate the objects in a prescribed manner.

I used ASCEND to make the necessary calculation for the flowsheet. During the design process it is important to be able to calculate the properties of the product and at intermediate steps in the process, and compare them to the specifications. This is one of the main criterion for whether the design is feasible or not. ASCEND is a flexible modeling environment for creating and solving non-linear problems. In order to use the models already in ASCEND, my application needed to create a script that specified the connectivity of the flowsheet and the columns to be used. The columns as individual entities were considered “solved”, but the flowsheet as a whole was not. I took the columns specified by the user and generated a script that sourced those files. I also took the connectivity specified by the user and generated a file that ASCEND read to connect the streams leaving and entering the columns.

I created a custom user interface for the user to interact with the model. The UI was created by looking at pre-existing user interfaces in n-dim. I looked at their code to learn how they work and how they could be adapted to my needs. I designed the UI by considering what actions the user is likely to take and in what order. I tried to design a user interface that would be as intuitive and easy to use as possible.

I was able to design and implement a computer-based application to support the collaborative design of a three distillation column system. The user can create a project with an initial flowsheet associated with it. This initial flowsheet is the root of the design history tree for that process. The design history is the hierarchical representation of the different versions of the flowsheet. Each node on the tree represents an instance of the flowsheet. See Figure 1.

a picture of the design history window
Figure 1. A picture of the design history window.

Each flowsheet in the tree has a status associated with it. The status list displays the current status, denoted by a "c", as well as any previous status, denoted by numbers, with "1" being the first comment. The user also has the option to update the status. Each flowsheet can also have comments associated with it, and the user has the option to add a comment here. The comment title list displays the list of titles, and the user views the comment text by selecting the title. In this window the user also has the option to search over the tree for a flowsheet with a particular creator, status, date created, or date modified. Results from a search are displayed in the collection results list. Selecting a flowsheet from this list will highlight that flowsheet in the tree, making it easy to see it’s place in the history. When a flowsheet in the tree is highlighted, the user can select the option to view the flowsheet. This displays the flowsheet window.

The flowsheet window is where the user sees and adjusts the flowsheet connectivity. However, it is not possible to change the components of the flowsheet. Every flowsheet has three columns, each with a mixer, a distillate product, and a bottom product. Also, every flowsheet has an input, three outputs, and a separator. The flowsheet window is also where the user can set and view the initial data files for the columns. The user can also search over all of the columns in the project by the date created, the date modified, the status, or any comments on the column. Also, the user can make a new version, which makes the current flowsheet public and creates a copy of it that is private and changeable. The user can clear all of the connections in the flowsheet, or they can remove the connections one link at a time. There are many ways to connect the three columns in the flowsheet. When they are all connected (see Figure 2), the user can choose to run the flowsheet.

a picture of the flowsheet window
Figure 2. A picture of the flowsheet window.

This will generate the script for ASCEND to read. It will produce a file with new values for each of the columns if the flowsheet converged. The user can view one of the three initial columns by selecting a column in the flowsheet and selecting View Columns, or by selecting View Results, the user can see the initial columns and the columns that resulted from a run. A flowsheet can be run many different times with different initial column values, but the connectivity must be the same.

The Results View allows the user to see the results from different runs that have been performed on a flowsheet. The user is shown a list of runs. Clicking on a run displays the input and resulting columns in the input and output lists. Also, a list of any comments is shown for each run. The user can also comment on a run in this window. In this window, the user can choose to view the flowsheet that produced these runs, or the history of that flowsheet. Also, the user can select a column and choose to view the information for the column. This will display the column window.

The column window displays the column status, comments, and any flowsheets that use the column. The user is able to modify the status and add a comment to the column. Also, the user can choose to view any flowsheet(s) associated with the column.

There are many ways that my system could be improved upon. The three distillation column system I implemented is a very small subset of all chemical engineering design projects. A fully functional system would need to have support for many more units. Also, a way for the user to create an initial value file to their specifications would be very useful, but is not supported in this version. However, as a proof of concept exercise, my applications shows that capturing the version history can be very useful during and after the design process. Therefore, it is very likely that a fully extended version would also be useful.

n-dim home