7. Connecting CHEMCAD to a Machine Learning Model on the Wolfram Cloud

Published: 11 June 2024| Version 1 | DOI: 10.17632/ch7yy7xbgz.1
Contributors:
,
,
,
,

Description

CHEMCAD is a suite of process design software and Mathematica is a powerful computer algebra system for theoretical or numerical solution of advanced mathematical problems. In previous publications, we provided detailed instructions and examples for connecting Mathematica running locally or on the cloud to CHEMCAD. In References 1-3, we showed how to connect CHEMCAD to Excel using Mathematica Link for Excel running locally on the desktop computer. References 4 and 5 explain how to deploy functions to the cloud and then connect them to CHEMCAD. Once deployed to the cloud, functions can be accessed over the internet in Excel, which in turn is connected to CHEMCAD through data mapping. Reference 6 extends the procedure to Aspen Plus. This data set further extends the study to supervised machine learning using a rudimentary proof-of-concept predictive model for the membrane process. The example is a simple well-mixed membrane calculation with a fully specified feed stream split by the membrane into retentate and permeate streams similar to References 7 and 8. To arrive at a solution, we used the model in Reference 5 to generate a table of data that is used in Mathematica to train the model. The model is not very flexible because the feed flow rate, retentate, and permeate pressures are fixed. However, the model can be generalized by adding additional data sets. The results are interesting because a wide range of advanced AI and machine learning tools are available in the Wolfram language that could further extend this technique to problems in modeling and process control. For example, we envision streams of data fed to CHEMCAD through the OPC server to enable application of reinforced learning models.

Files

Steps to reproduce

We took the following steps to verify that the software connectivity, data maps, and calculations are working correctly. The work was verified by replicating a published example problem [7,8], achieving the exact same answers as in the published solutions. We also had each contributor download the files and follow the procedure in the instructions file to make sure the guidance is correct. Problem statement[7,8]: Air containing only nitrogen and oxygen is continuously separated into a nitrogen-enriched retentate stream and an oxygen-enriched permeate stream by gas permeation through a low-density polyethylene membrane. The membrane is in the form of a thin-film composite with a 0.2-μm-thick membrane skin. A total of 20,000 SCFM of clean dry air with composition 79 mol% nitrogen and 21 mole% oxygen at 150 psia and 78 degrees F is sent to the separator. The solubilities and diffusivities of nitrogen and oxygen are taken from Table 14.6 in Reference 5. The material balance and molar flux equation are used to calculate the retentate and permeate flow rates and mole fractions given the membrane area and system pressures. Pressures of 150 psia on the retentate side and 15 psia on the permeate side are assumed, with perfect mixing on both sides of the membrane, such that compositions on both sides are uniform and equal to exit compositions. A function giving the permeate cut (moles in the permeate divided by moles in the feed) is also determined. Pressure drops and any mass transfer resistances external to the membrane are neglected. References [1] Biaglow, Andrew; Cowart, Sam; Yuk, Simuck; James, Corey; Nagelli, Enoch (2024), “1. Simple Flash Unit in Mathematica Linked to CHEMCAD,” Mendeley Data, V1, doi: 10.17632/smzy2998df.1. [2] Biaglow, Andrew; Cowart, Sam; James, Corey; Nagelli, Enoch; Yuk, Simuck (2024), “2. Simple Membrane Unit in Mathematica Linked to CHEMCAD,” Mendeley Data, V1, doi: 10.17632/cdcgbsrrhc.1. [3] Biaglow, Andrew; Cowart, Sam; Yuk, Simuck; Nagelli, Enoch; James, Corey (2024), “3. Improved Membrane Unit in Mathematica Linked to CHEMCAD,” Mendeley Data, V1, doi: 10.17632/nz7p8bhhs3.1. [4] Biaglow, Andrew; Yuk, Simuck; James, Corey; Nagelli, Enoch; Cowart, Sam (2024), “4. Connecting CHEMCAD to the Wolfram Cloud for Flash Calculations,” Mendeley Data, V1, doi: 10.17632/3b8n72m28v.1. [5] Biaglow, Andrew; Yuk, Simuck; James, Corey; Nagelli, Enoch; Cowart, Sam (2024), “5. Connecting CHEMCAD to the Wolfram Cloud for Membrane Calculations,” Mendeley Data, V1, doi: 10.17632/6gw5m5d7pn.1 [6] Biaglow, Andrew (2024), “6. Connecting Aspen Plus to the Wolfram Cloud for Flash Calculations,” Mendeley Data, V1, doi: 10.17632/fhwzyk3n6g.1. [7] Seader, J.D.; Henley, E.J.; Roper, D.K.; Separation Process Principles, New York: Wiley, 2011, pp. 518-519. [8] Peters, M.S; Timmerhaus, K.D.; West, R.E.; Plant Design and Economics for Chemical Engineers, 5th Edition, New York, New York: McGraw-Hill, 2003, pp. 822-824.

Institutions

US Military Academy

Categories

Chemical Engineering, Artificial Intelligence, Cloud Computing, Chemical Process, Machine Learning, Membrane, Chemical Processing, Computer Simulation, Unit Operations, Equipment Design, Industrial Chemical, Unit Operations for Gaseous System, Chemical Engineering Design

Licence