
OpenProcessSim (OPS) is an open source process simulator. As an open source project, OPS can be a learning tool enabling a deeper understanding of the process equipment being simulated as well as how the simulation system works.
The Programmer Manual is for users who want to understand the implementation of OpenProcessSim in order to modify it, or those who want to view the implementation of the simulated equipment in order to gain a better understanding of the equipment. The manual is split into three sections;
OpenProcessSim Release 0, is based on a university project I did many years ago in FORTRAN, ported to C++. As I used this as a hommage to the starting of my career in process simulation I kept as much of the original project as possible. The project required that the mixing point be modelled as a subroutine, so in C++ this is the Mix Class. I have kept the stream flows as an array, which is actually more convenient than using a Vector. In my original FORTRAN model, I coded it so that the streams to be mixed had to contiguous and the simulation engineer had to specify the start and end stream number of the streams being mixed. However for the Mix Class I make use of Object Oriented nature of C++ to use a member function to set the stream flow of each of the inlets, and then a second member function to calculate the outlet flow.
Like the original project, the simulation is hard coded into the program and the Tee is not modelled with a subroutine (Class).
When I did the project I was concerned about the execution order and coded the mixing points so that all the known feeds would be mixed (i.e. calculated) before the "internal" streams were mixed. The work to handling the calculation of modules ordered out of sync from the specified data, was not justified for a fixed model.
As we are only calculating the stream flows the order of calculation isn't important, but it will be when we are mixing compositions and temperatures.
Consequently OpenProcessSim R0 has the following problems,
Additionally,
These will be addressed in subsequent releases of OpenProcessSim.
OpenProcessSim Release 0 sets the following two project coding standards;
As described above, OpenProcessSim Release 0 only supports a hard coded model and a single item of process equipment, Mixer.
All items of equipment are called using a common interface. The flow rate of each inlet is specified by a call to the member function inletflow(inlet number, flow rate). Member function outletflow returns the outlet flow.
Can mix up to three process streams. The specified inlet flow is stored in an array and summed to calculate the outlet flow.
The ModelLoader Class reads the user entered stream flows from a text file with a fixed filename. As the hard coded model and the Mix Equipment will be changed in OpenProcessSim R1, ModelLoader is a "bare bones" implementation. Although the text file contains a text entry for the stream name, this is not used to assign the specified value to the stream. The flow values of streams 1 to 5, are set based on the order of the entries. There is no data configuration error checking or handling, incorrect data and too little data may crash the program.