ChemCAD

ChemCAD is a valuable process simualtion tool for chemical engineers. Your senior design class will make extensive use of this software. We will use 1 week of class to familiarize ourselves with ChemCAD from a distillation perspective and use it to study multicomponent distillation.

You can download the latest ChemCAD at: Download Link

I will get you a license and add it to that sheet. Note that the license key expires – so if you generate a system key and wait a week later to put in the license key, then it probably won’t work (so please put in as soon as you get it). It isn’t terrible – but does mean we have to go through the process again (I would like to only do once per student!).

If you’re having trouble finding the system key, follow these steps:

1. You should see the License Monitor on startup. Click Setup.

ChemCAD License Monitor

2. This should pop up the License Setup window. Click System authorization.

ChemCAD License Setup

3. Copy the system key.

ChemCAD System Key

A Few Useful Links

Dr. Palmer's intro video to ChemCAD.

Chemstations Academic Institutions Page.

ChemCAD 7 User Guide.

Tutorial on linking ChemCAD to Excel 2007

ChemStations Youtube Channel.
ChemCAD Essentials Part 1 is a good intro, 2 is good for distillation column, 3 , 4 is Analysis Tools.

In Plant design you will use VBA to interface with chemcad. We will not cover that in this class, but if you want to familiarize yourself, here are some resources via Dr. Palmer:

VBA:

There are tons of resources to learn programming on the internet (web or youtube). Some are formal courses (Khan academy, Coding academy, etc.). I have some programming experience, so when I was learning Java (new to me) – it was helpful to watch some condensed videos (Derek Banas has some great ones on Java and Python, but I didn’t see VBA unfortunately) that mainly focused on differences in syntax. If you aren’t used to programing, then you need to have a little slower tutorial that describes defining variables (differences of strings/numerics), conditionals (if loops, for-next), etc. Even at this point (just yesterday when I was coding in Java), I use Google to try to find answers when I run into a particular coding issue (I had some quirky issue where I was trying to determine max columns and rows of a sheet – but it seemed to reset back to zero after testing in one condition so I kept having to re-evaluate the condition – I couldn’t determine until I setup a Logger.log to troubleshoot what the variables were at different points of my code).

Email me if you find one that you think is particularly useful – I would like to send out to the rest of the group and we can have a discussion of which were most helpful (please let me know your programming background as well – none, basic, advanced, etc.).

NOTE – the code linked below is an example I wrote showing a loop in Excel/VBA coupled with ChemCAD. This is an extremely powerful tool for optimization.

The attached code might help if you are having errors/issues adding the ChemCAD module in excel.

I was able to implement a loop pretty easily in ChemCAD. I set the starting and ending position of the loop (then used a for/next) - I had a way of capturing last Cell but thought defining it was actually better (give me more flexibility later I suppose).

I had a one sheet my datamap (ChemCAD), on another sheet a list of parameters I wanted to go through (Optimize). I just pushed the input values from "Optimize" to "ChemCAD", did a Call RunAllUnits, then pushed the output values from "ChemCAD" to "Optimize". Seems to work fine (note that setting ranges/values is more efficient than a literal copy/paste in VBA).

Note that I did have to go in the VBA editor and Tools-> References and select the ChemCAD module as code that this VBA script could reference (it couldn't find the script to Call before I did that).

VBA Example Code