DCOL: A Prode function for simulating staged columns
A couple of Prode Physical Properties (PPP) routines were left out of the dll built to link Mathcad with PPP. At the time, it appeared that the number of options might be difficult to accommodate within Mathcad's parameter exchange constraints. I came to that conclusion primarily because I have little experience with C++. I have proven myself wrong. DCOL has been added to the Mathcad 15 and Prime prode.dll's available for free on this page.
DCOL appears to be a very good program. I haven't tried all of it's capabilities, but it appears to solve even large problems quickly. It can handle multiple feed and side draw streams, and heat can be added or removed from each stage. If you have the Extended PPP license, DCOL can be used for single and two liquid phase distillation and liquid-liquid extraction columns. The Basic PPP license will limit you to single liquid phase VLE.
A test file for DCOL
Instead of adding a DCOL example to the test_ppp_1-2b files, I created a file, DCOL test.xmcd, to test DCOL by itself. That file can be found using the same page link above. Prime users may convert that file to test the Prime version of the prode.dll. The example is based on the Excel example that is delivered with the PPP software. However, the specifications for that example are different: the specifications now demonstrate a component recovery constraint. You may explore other specification combinations by editing the DCOL test file.
A new look for DCOL input
People that have been using DCOL/PPP without Mathcad will notice that the argument list for the mc_DCOL function is different from the PPP arguments. The original DCOL function has 24 arguments, but Mathcad has a limit of 10 arguments. My work-around was to group arguments into matrices. The example shows how those matrices are created from the original variables which are named as shown in the PPP manual.
The output of mc_DCOL is a matrix containing the molar flow rates of each component in the phases leaving each stage and a column of stage temperatures. The last column of the output matrix also contains the computed condenser and reboiler heat loads when present.
Additional output is placed in the PPP archive. Computed overhead and bottom product streams and side streams are placed in the archive streams designated in the input list.
Additional possibilities for you
The example is in what I would call a raw state. I will probably create a new Mathcad function that consolidates input specification and output extraction. I think the example given should allow you to do the same.
The DCOL routine includes the major specification options but you may want to specify something else, say bottom or top temperature. It should be possible to build a controller program to adjust one of the DCOL specs until the desired spec is met.
I built the DCOL link to handle all options, including those only available to people with Extended PPP licenses. However, I only have a Basic license, so I can't test those options. If you experience errors with those options, please comment on the blog site or contact me via the form.