This white paper focuses on the integration of computing throughout the chemical engineering curriculum. The computing experience for undergraduates in chemical engineering should have continuity and be coordinated from course to course, because a single software solution is difficult to achieve in practice. This paper covers the topics of teaching computer programming, software selection, mathematical modeling instruction, and teaching process and product design. Appendices include a recent survey of computing practices in industry and descriptions of integrated computing approaches at selected departments.
Table of Contents
Appendix A: Computing Practices in Industry: How Recent ChE Graduates Use Computing (https://cache.org/files/Appendix-A-survey.ppt)
Appendix B: Different ChE Departmental Approaches to Integration of Computing
B.1 University of Texas (https://cache.org/files/Appendix-B-1-UT.pdf)
B.2 Ben Gurion University (https://cache.org/files/Appendix-B-2-Ben.pdf)
B.3 University of Colorado (https://cache.org/files/Appendix-B-3-Colorado.pdf)
B.4 University of Kentucky (https://cache.org/files/Appendix-B-4-Kentucky.pdf)
B.5 University of Massachusetts ( https://cache.org/files/Appendix-B-5-Univ.-Mass.pdf)
B.6 Rowan University (https://cache.org/files/Appendix-B-6-RowanSD.pdf)
B.7 Lamar University (https://cache.org/files/Appendix-B-7-Lamar.pdf)
The recent Frontiers in Chemical Engineering Education Workshops (see http://web.mit.edu/che-curriculum) identified the systems area as one of the three key focus areas for the future chemical engineering curriculum. As stated in the report of the workshops, “the systems component of the curriculum equips the graduate to:
- create and understand mathematical descriptions of physical phenomena,
- scale variables and perform order-of-magnitude analyses,
- structure and solve complex problems,
- manage large amounts of messy data, including missing data and information,
- resolve complex and sometimes contradictory issues of process design: sensitivity of solutions to assumptions, uncertainty in data, what-if questions, and process optimization.”
The systems component of the curriculum trains students in computational tools for synthesis, analysis, design, and manipulation of chemical and biological processes. In the systems approach students learn how to convert scientific facts and principles of chemical and biological systems into engineering decisions. This includes computer-based methods for dynamic and steady-state simulation at multiple length and time scales, statistical analysis of data, sensitivity analysis, optimization, parameter estimation and system identification, design and analysis of feedback systems, methods for monitoring and diagnosis, and methods for design of products and processes.
In the area of computing software, there is a noticeable disconnect between industry and academia. Appendix A presents a survey of computing practices of recent graduates in chemical engineering. Typically Chemical Engineering Departments teach the use of MATLAB, MathCAD, Mathematica, or Maple but not the use of spreadsheets. Yet in industry, spreadsheet software (e.g., Excel) is the dominant computer package in use. Of course this may reflect the nature of many calculations that need to be performed by chemical engineers in industry, rather than a need to de-emphasize the teaching of sound numerical approaches in universities. There has been resistance to teaching spreadsheets, for example, it is difficult to analyze the logic in the code, but this appears to be changing. Another objection is that a spreadsheet approach can encourage the use of inaccurate or inefficient numerical calculations (no error control, etc.) For complex calculations, it may be better to program spreadsheets using Visual Basic, where programming logic is more transparent.
Many departments no longer require a course in a computer programming language such as Fortran, C, or C++. It has been suggested that teaching computer programming is analogous to teaching plane geometry. It is a way of thinking but you may not have to use it. On the other hand, without some programming ability, engineers are limited by the built-in capability of commercial software without any way to extend it.
Many chemical engineering departments are wrestling with the following questions:
When should computing be introduced to the chemical engineering student?
How should computer programming in chemical engineering be taught, and how much formal programming instruction on languages such as C should be provided (vs. usage of computing tools such as MATLAB, MathCad, spreadsheets, etc.)?
Is a numerical methods course required and when does this occur in the course seqeunce? How many credit hours are needed?
Should every course include some computing?
Since the mid-80’s two approaches have been taken toward introductory computing for engineers. “CS 101” and the engineering tools approach. The CS 101 approach was catalyzed by the growth of computer science programs, which provided instruction in computer languages. The “CS 101” courses have migrated through several programming languages: Pascal, C, C++, and Java. In the engineering branch, software vehicles such as spreadsheets (first Lotus 123, then Quattro Pro, and now Excel), TK Solver, MathCad, and MATLAB have gradually pushed out programming languages (primarily Fortran). These languages are becoming endangered species in these courses.
The “CS 101” branch would claim a number of reasons for existence (Clough, 2003):
- engineers should learn fundamental concepts of programming and computer science
- computing should be taught by computer scientists, not engineers
- engineering faculty are not interested in teaching computing languages to their students
- these courses provide a significant number of student credit hours (SCH) and budgetary resources
There are concrete benefits to an engineering education that incorporates the ability to write computer programs: They learn
- what assumptions go into the program
- what the right answer should be
- what is the input, what is the output
- clear organization of thought, logic, and calculations
- errors can exist in a program
- programming is unforgiving for ambiguities and errors
The “Engineering Tools Approach” branch believes:
- engineering students need a solid grounding in problem solving with modern computing tools
- engineering students need the knowledge and tools required in their professions
- engineering computing and problem-solving are best taught by engineers
- there is no room in the curriculum for a separate three or four SCH course in programming.
An in-depth assessment reveals that the two branches are complementary and that many/most engineering students can benefit from both courses. However, most curricula are too congested to make room for both.
A number of departments have switched from teaching C++ to using MATLAB as the programming tool. MATLAB is a structural programming language that incorporates many elements of Fortran, C, and C++. It allows for modularity, flow control, and input/output control and has the following programming features.
- Loops: like DO and WHILE in Fortran, MATLAB has for and while,
- Conditional statements: like IF in Fortran, C, and C++; MATLAB has if for testing relational operations;
- Relational operations: like C and C++, MATLAB has the expected suite of <, >, <=, >=, = =, ~=. And like C and C++, the result of the operation is 1 or 0, and can be used outside of a conditional statement;
- Logical operations: like Fortran, C, and C++, relational operations can be strung together with AND (&), OR ( | ), and NOT (~);
- Matching: like C, MATLAB has a switch/case syntax for matching string variables, integers, or logicals;
- I/O: not only can a user be prompted for input and then have results output to screen in formatted form (using fprintf, as in C), but MATLAB can read (load) and write (save) to files, in binary or ascii format;
- Modularity: like SUBROUTINE in Fortran or function in C and C++, MATLAB allows the user to create user-defined functions to be called by a main program. Any number of inputs and outputs can be associated with a user-defined function;
- Error processing: using the try/catch syntax a user can attempt calculation(s) and then gracefully continue execution if an error occurs;
- Array math: like Fortran90, MATLAB transparently accommodates scalar and array math (i.e., implied FOR loops).
Reasons given by faculty for switching from C++ to MATLAB include: ease of use and widespread availability due to an inexpensive student version. Because MATLAB is an interpreted rather than compiled language, the user can create (write), debug, and run code in the same environment. The built-in editor can pass code directly to the MATLAB application for execution. Also, MATLAB has a solid graphical interface for creating 2D and 3D plots; and plots can be created using appropriate MATLAB code from within a user’s program.
Based on informal surveys many chemical engineering departments now introduce programming and engineering problem-solving in the freshman year. The view is that these subjects are best taught by an engineering department in the context of an application. The typical introductory course has the following outline (see Appendix B.1 and B.3 for more details):
problem-solving: engineering method, units, precision in calculations
symbolic computing: algebra, calculus
spreadsheet techniques: solutions to engineering problems, VBA in Excel
programming fundamentals: data types, program-flow, modularity, object-oriented features
elementary numerical methods: linear, nonlinear equation solving, linear regression
software tools: MathCAD, MATLAB, Excel
When it comes to assessing computing needs, faculty often confuse what is important for their students with what is important for themselves. Faculty needs, more often than not, align with their research interests and activities, and these may be disconnected from the needs of their undergraduate students. Also, faculty often have an incorrect impression of the computing needs of professionals by either being out of date or out of touch. Few discussions on computing needs proceed on the basis of evidence from alumni and employer surveys. Finally, computing is not part of the daily professional existence of most faculty and is not expected to be. Their computing skills can be oxidized, and most of their computing is carried out by their students.
The survey of industrial usage of computing in Appendix A indicates that a minority of recent graduates in chemical engineering actually perform programming on the job (although there is no clear definition of what constitutes programming in industry). The use of spreadsheets in chemical engineering practice is increasing. The application of spreadsheets in university courses are attractive because of student-driven usage. David Clough (Colorado) and Brice Carnahan (Michigan) have developed many examples of spreadsheet applications, as presented at the 2002 ASEE Chemical Engineering Summer School (see www.cache.org).
The fragmented nature of software tied to leading undergraduate textbooks makes integration difficult, e.g.,
- material and energy balances: Felder and Rousseau – EZ Solve; Himmelblau and Riggs – POLYMATH
- thermodynamics: Sandler – MathCAD; Kyle – POLYMATH; Elliott and Lira – various programs
- separations: Wankat – Aspen
- process control: Seborg, Edgar, Mellichamp – MATLAB; Marlin – MATLAB; Bequette – MATLAB; Riggs – MATLAB/Excel; Control Station is a standalone package used at a number of departments
- chemical reaction engineering: Fogler – POLYMATH, Rawlings and Ekerdt – Octave/MATLAB
- product and process design: Seider, Seader, Lewin – Aspen, HYSYS, CHEMCAD, PROII
See the CACHE report (www.cache.org), “Chemical Engineering Problems with Solutions in MATLAB, POLYMATH, Excel, Mathematica, Maple, and MathCad” for a comparison of these different software packages applied to solving a number of prototypical problems in different courses in chemical engineering.
In addition to these courses, many departments are teaching a statistics course, which involves still one more software package such as JMP, SAS, or Minitab. Clearly using a subset of these textbooks sequentially through the sophomore, junior, and senior years will require a student to learn up to five or more different software packages. Adding software packages outside of chemical engineering can push the total number of packages beyond ten. It would be desirable to keep the number of software packages below three or four if possible (note that Excel is not mentioned in (a)-(f) above although it is used with many of the textbooks listed). But usually textbooks are not chosen because of the bundled software. In addition, departments must address issues of software availability, licensing, cost, and providing software in computer labs vs. student-owned computers. A textbook that is closely coupled to a software package, a CD-ROM, or a website is clearly an attractive option.
One view of academia is that the professor is a “high priest” in his/her course with a large amount of discretion to select course content as well as the textbook to be used. In some departments it is unclear if the Department chair or curriculum committees have the authority to influence the content of the core courses. It is reasonable to allow an individual faculty member to have some flexibility in coverage of certain topics in a given course. However, because of the tight coupling of prerequisite courses, there should be some way of guaranteeing that knowledge, ability, and skills (ABET KAS’s) of students who complete a given course are predictable. Most of the core curricula should be predictable but some curricula do not need to be that prescriptive. Even when KAS’s are covered, 20% of a given course can be left to the discretion of the instructor. Another issue is whether computing should be incorporated into a given chemical engineering course and be covered regardless of which faculty member teaches the course. Many departments are discussing this issue but based on a limited sample, it appears that most departments have not reached a consensus on coordinating content or incorporating computing through the curriculum.
Several departments have found that the difficulty of integration of computing tools mentioned above can be avoided by more extensive use of process simulators. At Virginia Tech, ChE undergraduates have been using Aspen Plus and Aspen Dynamics to solve problems in all subjects. It is fairly straightforward to convert a steady-state model in Aspen Plus into a dynamic model (with PID control schemes) in Aspen Dynamics. The applicability of Aspen Plus to mass and energy balances, thermodynamics (physical and thermodynamic property analysis, estimation and regression), multicomponent separations, reactor design and process flowsheet simulation are well-known. In process control Aspen Dynamics enables the students to evaluate controller tuning, process dynamics, startup and shutdown, etc. HYSYS has similar features, and has been used at Rowan University for analysis in freshman – senior years (see Appendix B.6).
Recently, Version 2.0 of a CD-ROM,
Using Process Simulators in Chemical Engineering: A Multimedia Guide for the Core Curriculum (Lewin et al., Wiley, 2003), has become available. Modules and tutorials are proved for self-paced instruction in the use of the process simulators to solve open-ended problems in courses on material and energy balances, thermodynamics, heat transfer, reactor design, separations, and product and process design. A 110-page document has been prepared for instructors suggesting the best instruction sequence and providing exercises and solutions, for each of the core courses (first introduced at the 2002 ASEE Chemical Engineering Summer School).
Historically many engineering courses have previously been taught from an analytical viewpoint, but a transition is starting to occur, where numerical experiments are being gradually added. Problems and experiments should not be so simplified that they are not realistically formulated. Students are normally exposed to idealized fluid flow cases in the curriculum, for which application of theoretical concepts results in a solution of a one-dimensional ordinary differential equation or an algebraic equation. Therefore it is very easy for them to come away with the notion that theory is useless for most real-life situations.
Students should be able to select either analytical or numerical techniques to solve a problem, hence they should learn the advantages and disadvantages of either approach. Use of more sophisticated numerical tools such as CFD (computational fluid dynamics) will reduce the need to make many simplifying assumptions because you do not need as many assumptions to solve the problem numerically. Chemical Engineering students should understand that there are both numerical experiments and physical experiments. In some cases we can make observations from numerical experiments that you cannot see in physical data, but the converse is also true. This does not suggest that every experiment can be replaced with a simulator, but there should be a balance of the two approaches. More broadly, there should be a balance of experimental fluid dynamics (EFD), analytical fluid dynamics (AFD), and CFD.
To prepare students for industrial practice, there should be a re-examination of the role of detailed analytical solutions. Is the purpose of some of these exercises the preparation of undergraduates for graduate school or industry? Today practicing engineers are not expected to carry out complex derivations in project work.
It is interesting to note that the public can run CFD simulators in science museums, therefore we ought to be able to teach this subject to chemical engineers. Once a fluid flow situation is analyzed theoretically or the governing principles are discussed, that same situation can be visualized using the computer. This visualization of the flow phenomena can significantly facilitate and enhance the learning process, especially for the visual learner. CFD software makes flow visualization easy. Students can simulate flow processes in a transient or steady state mode. Flow patterns can be displayed via velocity contours, velocity vector plots, or graphs of velocity profiles. A key element in flow visualization exercises is exploring the effect of different parameters. Using CFD, students can quickly change the size of the pipe, viscosity of the fluid, size of the particles, velocity of the feed, etc. and see the resulting changes in the flow behavior. This type of parametric analysis also ties in nicely with a discussion of dimensionless groups and geometric and dynamic similarity.
While computing and visualization can increase understanding, educators do not want students to view such simulators as black boxes. In the fluid mechanics course, simulations can become a mathematical exercise with little intuition, unless the instructor has the students solve a simple problem by hand first. More work on the software tools is needed, and it is critical to match the software tool to the student’s knowledge base.
Two specific recent packages which have been developed are FlowLab (a finite volume-based code) by Fluent, Inc. and FEMLAB (a finite element-based code) by Comsol, Inc. FlowLab allows students to solve fluid dynamics problems without requiring a long training period. Using carefully constructed examples, FlowLab allows students to get started immediately without having to spend the large time commitment to learn geometry and mesh creation skills required by traditional CFD software. Current exercises developed includes sudden expansion in a pipe, flow and heat transfer in a pipe, flow around a cylinder, and flow over a heated plate, among others. In addition, professors can create their own examples or customize the pre-defined ones.
FEMLAB provides ready-to-use application modes, where the user can build his/her own model by defining the relevant physical quantities rather than the equations directly. The software also allows for equation-based modeling, which gives the user the freedom to create his/her equations. FEMLAB’s programming language is an extension of the MATLAB language; this feature gives much flexibility to the user. FEMLAB’s graphical interface includes functions for automatic mesh generation of a user-defined geometry. Recently a k-e turbulence model has been added to its menu of options.
Seider et al. (2004) present the design of configured consumer products, which usually involves two or three-dimensional simulations. In Chapter 19, Product Design momentum and species balances in a 2-D plasma CVD reactor are employed to produce thin Si films using CFD packages such as FEMLAB. This illustrates where it is very effective for students to use CFD packages to optimize designs – even without understanding all of the physical and chemical interactions in the transport-reaction processes.
Even with these recent advances in educational CFD software, this computing technology has been slow to penetrate undergraduate transport and reactor engineering courses. A recent CACHE Survey of all chemical engineering departments in the U.S. on barriers to implementing CFD identified a lack of knowledge concerning available CFD resources, a lack of professor training in CFD, the ease of use and the long learning curve associated with using CFD software in a given course, and cost of CFD software.
Web-access of laboratory experiments enables real chemical engineering laboratory equipment to be controlled and monitored interactively by computers that are connected to the Internet, i.e., under the command of users over the Web. This capability is now available in the labs at U. Tennessee-Chattanooga as well as other schools such as U.Texas-Austin, Columbia University, University of Toledo and MIT. This would permit faculty and students from any university to run Web-connected experiments at any time of the day or night, any day of the week. The laboratory station computer operates the equipment (pumps, valves, heaters, relays, etc.), collects the data (pressure, temperature, position, speed, concentration, etc.) and sends it to the web user. The U. Tennessee site is accessed through the web address, http://chem.engr.utc.edu/, and even includes audio and video of the operating equipment.
All established chemical engineering programs are facing increased financial pressure to keep existing laboratory experiments up-to-date and in satisfactory operating condition. Major operating costs of unit operations laboratories include maintenance and teaching assistant support. Using highly automated experiments for remote operations will allow a drastic reduction in TA time requirements for those particular experiments. In addition, by sharing the operation of the experiments among several universities, there can be a pro rata reduction in maintenance costs. There is also the opportunity to add experimental assignments to a lecture class using this technology. In a lecture class, it may be desirable to have students individually or in small groups carry out an experiment, much like a homework assignment; in contrast, a traditional experiment would require continuous supervision by teaching assistants (e.g., one week of TA time for an entire class). Therefore using an internet-based experiment can greatly reduce the time commitment by the TA. However, traditional experiments will remain in the curriculum to give students “hands-on” exposure, but they can be augmented with internet labs.
Historically there has been a process design emphasis in the curriculum that is now transitioning to a dual product and process design emphasis. This means that a framework is needed to make process decisions in order to make structured products. This has added a performance layer, i.e., not just purity of the product. Given a structure, we can often predict at some level what the properties of the material are likely to be. The accuracy of the results and the methods used to treat them depend critically on the complexity of the structure as well as the availability of information on similar structures. For example, various quantitative structure property relationship (QSPR) models are available for the prediction of polymer properties. However, the inverse engineering design problem, designing structures given a set of desired properties is far more difficult. The market may demand or need a new material with a specific set of properties, yet given the properties it is extremely difficult to know which monomers to put together to make a polymer and what molecular weight the polymer should have. Today the inverse design problem is attacked empirically by the synthetic chemist with his/her wealth of knowledge based on intuition and on experience. A significant amount of work is already under way to develop the “holy grail” of materials design, namely, effective and powerful reverse-engineering software to solve the problem of going backwards from a set of desired properties to realistic chemical structures and material morphologies that may have these properties. After this is completed, a subsequent step would involve how to manufacture the desired new product.
A chapter on Molecular Structure Design in Seider et al. (2004) contains simple optimization procedures using GAMS to determine polymer repeat units, refrigrants, and solvents that have desired properties using group-contribution methods. Eventually, these will be replaced (and augmented) by molecular models.
Another subject related to product design is the scheduling of batch processes, which can be done using simple simulation techniques, as in BATCH PLUS and SUPERPRO DESIGNER. Hence design of optimal processing can be viewed as “product design” for specialty chemicals. Clearly, spreadsheets and optimization packages can also be used for many of these computations. Finally, the use of large databases and software systems for equipment sizing and purchase and installation cost estimation, such as ASPEN IPE, are being commonly used throughout the chemical industries for product and process design.
A molecular-level understanding of chemical manufacturing processes would greatly aid the development of steady-state and dynamic models of these processes. Process modeling is extensively practiced by the chemical industry in order to optimize chemical processes. However, one needs to be able to develop a model of the process and then predict not only thermochemical and thermophysical properties but also accurate rate constants as input data for the process simulation. Another critical set of data needed for the models are thermophysical properties. These include such simple quantities as boiling points and also more complex phenomena such as vapor/liquid equilibria phase diagrams, diffusion, liquid densities, and the prediction of critical points. A key role of computational chemistry is to provide input parameters of increasing accuracy and reliability to the process simulations.
Under the NSF grant, “World Wide Web-Based Modules for Introduction of Molecular Simulation into the Chemical Engineering Curriculum”, seven university experts in molecular simulations have worked with the CACHE Molecular Modeling Task Force (MMTF) to develop WWW-based modules to facilitate introduction of molecular simulation into the chemical engineering undergraduate curriculum. These teaching modules can be integrated directly into chemical engineering core undergraduate courses, supplying for the instructor and the student the appropriate linkage material between macroscopic concepts currently taught in these courses and molecular simulations designed to aid student understanding of the molecular underpinnings of the phenomena. Modules are centered around Java Applets that run the molecular simulations and provide an “experimental” simulation platform for students to explore concepts. In addition, modules contain instructor materials, fundamental tutorials, student problems, and assessment materials.
MMTF has designed a consistent web-based interface that organizes all of the material in each module and developed scripts using perl that ease the job of putting the written material into this common format. The developer of a module must construct simple text files, perhaps with HTML markup that permits inclusion of figures and tables. Then he or she runs the files through the perl script, which adds HTML formatting and links to put the set of files into the common configuration. The files are uploaded to the module site for anyone to access. This site is perhaps best accessed through the Etomica site. Etomica is a Java-based support environment developed for the modules project, which has now been expanded for other applications.
Following is a list of phenomena and concepts for which modules are completed or planned:
- Chemical reaction equilibrium
- Molecular dynamics
- Normal modes of a solid
- Chemical reaction kinetics
- Dissipative particle dynamics
- Surface tension
- Crystal viewer
- Joule-Thomson expansion
- Self assembly
- Chemical potential
- Multicomponent phase equilibrium
- Heat transfer
- Atomic billiards
Contact David Kofke at the University of Buffalo for further information.
One way to foster renewal of the curriculum is to identify departments where curriculum revision is being carried out and to evaluate best computing practices and current trends. There may not be one answer because of different constraints various universities operate under, such as number of faculty in the department and whether computing courses are taught outside the department. Appendix B presents a number of different departmental approaches to integrating computing through the curriculum.
CACHE makes the following recommendations on computing through the curriculum:
- The “systems” component of chemical engineering is tied closely to computing tools, so strengthening the systems area as recommended by the Frontiers of Chemical Engineering Workshops should also strengthen the use of computing as well.
- There is increasing pressure on the total number of hours in the curriculum, especially with the addition of life science courses. Departments should continue to re-examine whether a formal three or four credit hour computer programming course is required for the chemical engineering degree (vs. teaching how to use software or write m-files in MATLAB, for example). The chemical engineering computing course also provides students with a valuable experience in quantitative problem-solving.
- The number of software tools that implement numerical methods used by students should be minimized; departmental agreement on software used in each course should be reached within the faculty. Faculty need to reach consensus on how student computing skills can grow systematically through evaluating each course in the curriculum.
- Courses such as transport phenomena and thermodynamics offer new possibilities for introduction of computing physical and chemical behavior, such as with computational fluid dynamics or molecular modeling. Process design can add a product design emphasis by using such tools as well.
- Internet-based laboratories offer a new means of bringing live experimental data into lecture-based courses, in order to reinforce theoretical concepts.
- To prepare students to optimize process designs, it helps to expose students to process simulators for solution of a problem(s) in the core courses of the chemical engineering curriculum. Also, as software develops and product design is added at the senior level, instructors must select from among optimization packages (such as GAMS), batch process simulators (such as BATCH PLUS and SUPERPRO DESIGNER), and packages for estimating equipment sizes and installation costs (such as Aspen IPE). The use of comprehensive software packages and databases is common in industrial design and needs to be introduced in design courses and utilized for solution of design projects.
Contributors to this paper include T.F. Edgar, W.D. Seider, D.E. Clough, J. Curtis, D.S. Dandy, B.L. Knutson, P.R. Westmoreland, J.J. Siirola, Chau-Chyun Chen, G.V. Reklaitis, R. LaRoche, J.B. Rawlings, E.M. Rosen, D. Kofke, M. Cutlip, M.J. Savelski, and M. Shacham.
- Clough, D.E., “ChE’s Teaching Introductory Computing to ChE Students – A Modern Computing Course with Emphasis on Problem Solving and Programming”, ASEE Annual Meeting, 2002.
- Lewin, D.R. et al., “Using Process Simulators in Chemical Engineering”, CD-Rom for Seider et al. (2004) textbook.
- Seider, W.D., Seader, J.D., and Lewin, D.R., Product and Process Design Principles, Wiley, New York, 2004.