virtual applications using a web platform to teach chemical engineering

7 downloads 1161 Views 1MB Size Report
engineering subjects, the integration of the new information technologies in classroom context has been faced as one of the many possibilities to enhance the ...
VIRTUAL APPLICATIONS USING A WEB PLATFORM TO TEACH CHEMICAL ENGINEERING: THE DISTILLATION CASE A. C. Rafael1, F. Bernardo1, L. M. Ferreira1, , M. G. Rasteiro1 and J. C. Teixeira2 1 Department of Chemical Engineering, University of Coimbra, Po´lo II - Pinhal de Marrocos, Coimbra, Portugal. 2 Mathematics Department, University of Coimbra, Largo D. Dinis, Coimbra, Portugal

Abstract: The question we will address here is how to integrate computational tools, namely the more modern and interactive ones, in the teaching of Chemical Engineers by means of the World Wide Web. The case study presented concerns the development of a web application for the simulation of multicomponent distillation columns running at steady state condition using the MATLAB WebServer. The application allows a remote user to login into a web site, choose several operating parameters and perform on-line simulations. In short, we believe that the introduction of this new perspective of teaching chemical engineering can result in ample benefits, leading students to a better and wider understanding of the processes involved. Keywords: distillation; MATLAB; unit operations; virtual teaching; Web platform.

INTRODUCTION

 Correspondence to: Dr L. M. Ferreira, Department of Chemical Engineering, University of Coimbra, Po´lo II - Pinhal de Marrocos, 3030-290 Coimbra, Portugal. E-mail: [email protected]

DOI 10.1205/ece06007 0000–0000/07/ $00.00 Education for Chemical Engineers Trans IChemE: Part D, Month 2007 # 2007 Institution of Chemical Engineers

Computers are, nowadays, a widespread teaching tool for engineering courses. In fact, with the increase of computational capacity, computers can easily be used to explore the new world of the virtual applications. During the last years, computer packages developed to extend traditional lecture-based courses have increased in number, and computer applications can now be used to demonstrate engineering processes that are unreachable through traditional laboratory experiments. As a result of the growing concern with the learning outcomes of students when studying engineering subjects, the integration of the new information technologies in classroom context has been faced as one of the many possibilities to enhance the capacity of the students to approach complex engineering problems. With the evolution of computer graphical capacities new pedagogical ways are open. One of the problems often faced by students is the difficulty of associating concepts, given in the classroom, with the adequate physical models (Clement, 1982). Educational tools based on immersive graphics, like the ones available through virtual reality technologies, are becoming more and more recognized as useful to help the students forming correct conceptual models (Dede, 1995). In fact, if adequately monitored by the teachers,

they enable performing ‘experiments’ in distinct situations and, as a consequence, understanding through experience how the process reacts to different conditions, and relate that to the prevailing physical phenomena and concepts. Furthermore, the application of process simulators on chemical engineering education has gained considerable importance, allowing an increased teaching effectiveness with significant cost reductions. The use of simulators gives the students the possibility of performing a greater number of experiments (simulated) in a shorter time than in the case of laboratory experiments. Commercial simulators are often used in chemical engineering teaching, however, those simulators, like Aspen or HySys, for instance, often come as ‘black boxes’ making it difficult for the student to understand the complexity of the mathematical models necessary to describe chemical processes. On the other hand, the application of realistic models in simulators is essential to understand how the process reacts to changes in operating conditions, feed characteristics, and so on. Considering that engineering is a ‘hands on’ profession, it is desirable to allow the access of the students to experiences with real processes, to achieve an education of quality. However, laboratorial equipment is extremely costly requiring, in general, the existence of several teaching modules to accommodate all students in one single Vol 2 (D0) 2007 1–9

2

RAFAEL et al.

class, with the consequent cost increase. Therefore, the scheduling of laboratory time can be a difficult task, more so with the new trend of working adults that return to the university in part-time. Some of the previous problems can be solved applying the concept of interactive distance learning. This concept includes the access to remote computers that facilitate the learning according to the individual capacity of each student. Moreover, Internet supplies a real time connection eliminating time and space restrictions; it allows the access to education at any time, from any place. Besides, due to the multi-task and multi-user nature of the software packages, several students can benefit from the software at the same time (Palanki and Kolavennu, 2003).In this context, ˙ the development of virtual laboratories presents a wide potential to enable the access of the students to experiments that are either unreachable or very difficult to implement in the laboratory. Recent advances on informatics software technology are bringing the virtual laboratories to the reach of educational budgets and to students themselves. The advances of internet and the turn out of new tools such as VRML (virtual reality modelling language) and XML (extra markup language) have facilitated the development of educational and laboratorial systems based on virtual reality with relatively low costs. Therefore, the development of real contents and of standardized virtual educational systems (how to teach ‘virtually’) that satisfy the needs of each specific domain, has deserved an increasing attention in engineering disciplines (Shin et al., 2000). However, one needs to be aware of some dangers in the use of virtual laboratories as teaching aids. In fact, students have to be carefully monitored in their tasks, so that using the tool just to produce ‘numbers’ ignoring the analysis of the simulated situations, based on conceptual models, is avoided. Moreover, it is our opinion that virtual laboratories can never substitute, completely, real laboratory work. It is essential that students go on receiving education in experimental work, though this may be directed to simple experimental set ups aimed at the evaluation of the physical and chemical phenomena common to chemical processes. In the case of Unit Operations, a fundamental subject in Chemical Engineering, virtual laboratories will enable overcoming many obstacles in the traditional teaching of this subject at laboratory level: limitations of time and space, safety risks and resources reduction. Our goal is to develop a set of computational programs for chemical processes simulation using remote access capabilities, by means of the Internet. In the work to be reported here, we have chosen the simulation of multicomponent distillation systems, using the MATLAB computational tool. The reasons that took us to select the distillation process are as follows: . Distillation is one of the more common unit operations in the chemical industry accounting for 10% of the energy spent in chemical processes. . In process simulators the distillation unit is one of the more detailed and better known processes, being a typical example of the use of the equilibrium stage model (Biegler et al., 1997). The design of multicomponent distillation columns is a complex problem that involves iterative procedures based on tedious calculations of a high number of equations and variables. This problem is a good example to be solved by a computational tool. This

strategy leads the students to a better understanding of the cause –effect relationships between the process parameters and, thus, allows an easier perception of the physical phenomena behind distillation.

METHODOLOGY The Computational Platform---MATLAB MATLAB (MathWorks, Inc.) is a high level programming language that functions under an interactive environment with hundred of intrinsic functions for calculus, graphics and animations. This platform has got a package, the MATLAB WebServer, which allows the use of MATLAB’s graphics, calculations and animations in HTML applications. These applications are a combination of MATLAB files (M-files), HTML code and graphics. It is required to the development of this type of applications the knowledge of the two programming languages MATLAB and HTML. The MATLAB WebServer allows creating MATLAB applications that use the web capacities for sending data to MATLAB to perform calculations and to show the results on the web browser. The MATLAB WebServer depends on the network data-communication protocol TCP/IP between the MATLAB and the user’s system. In a normal configuration, the web browser runs in the user’s computer while the MATLAB, the MATLAB WebServer (matlabserver) and the web provider (http) run in another machine, the server.

Developing the Virtual Application: Distillation Case The application was designed to be used in tutorial classes as well as to be used by students when studying at home or in the university campus. The main characteristics of the application developed are: to allow the remote access to several users; to allow performing different simulations of the unit operation for a large range of operation conditions; the final user, student or teacher, does not need to have MATLAB installed in his own machine or to know about the computational language, since the application runs in one single remote machine—the server. In terms of security the access to the system files can be restricted, to prevent non-authorized access to the source code and to the MATLAB’s command line. Basically, the development of the application involved the following steps: (1) Creating of the HTML documents to collect the data input from the user and to show the results. (2) Listing the application name and configuration settings associated to the configuration file matweb.conf. (3) Writing the M-file in MATLAB which performs the following steps: (a) receives the data input from the HTML input form; (b) performs the calculations and generates the graphics; (c) places the output data (results) on a MATLAB structure; (d) calls a MATLAB function, htmlrep, to place the output data on the output HTML file. To the normal user, the application displays a web page that allows performing the simulation of a distillation column in steady state and studying its behaviour, visualizing the

Trans IChemE, Part D, Education for Chemical Engineers, 2007, 2(D0): 1–9

VIRTUAL APPLICATIONS USING A WEB PLATFORM TO TEACH CHEMICAL ENGINEERING design results by means of graphics and numeric tables. It was developed to allow easy operation by the user and easiness for exporting data. It includes a database with 18 entries chosen from the most common components in industrial applications (see Table 1), such as cyclic aromatic compounds, volatile hydrocarbons, alcohol compounds and water. The thermodynamic parameters required to describe the non-ideal liquid state by applying the UNIFAC model are also included. The maximum number of components in the feed mixture is five, in order to prevent extremely high calculation times and to diminish the possibility of forming complex mixtures, as for example azeotropic mixtures, and of obtaining impossible thermodynamic conditions. The application presents two simulation options: (a) Firstly, to run the short-cut methods Fenske–Underwood–Gillilland–Kirkbride (FUGK) (Douglas, 1988; Henley et al., 1981) to obtain the first estimates of the number of equilibrium stages, location of the feed plate and limiting operation conditions (minimum number of equilibrium stages and minimum reflux ratio). After that, the application runs the rigorous design method of Wang–Henke (Monroy-Loperena, 2003), which solves material and energy balances combined with equilibrium relations, for all the stages in the column. The input values for the solution of the Wang–Henke method are the results from the previous run (FUGK). In order to solve the system of equations the program builds N matrixes of material balances, N being the number of stages. (b) To run exclusively the rigorous design method of Wang – Henke. In this case the user must insert a larger number of input data, since in option (a) that data was supplied by the short-cut methods. Both options allow the user to select which components to recover in each product (top or bottom), the thermodynamic model for the liquid phase (ideality or non-ideality) and the tolerances for the convergence of the numerical schemes used.

3

Using the Virtual Application The virtual application developed has been used in the course of Unit Operations (7th semester of the Chemical Engineering degree at Coimbra University) during the last two school years. Distillation is one of the chapters in this course. Traditionally, students have to use computational tools in this course, namely MATHEMATICA or MATLAB, to solve design problems (Rasteiro et al., 2005). The distillation virtual laboratory is mainly directed to the study of the design of the more complex cases, where multicomponent feeds have to be treated. We will now describe the application in more detail, to give the reader an idea of the features available. The virtual application has got two main sections as can be seen in the flowsheet in Figure 1: the concepts and modelling strategy and the simulation page. Once in the simulation page the user is led through the data input steps, without permission to pass to the following step before having completed the previous step, as shown in Figure 2. The input page includes the following steps: (1) defining the composition of the feed stream (the next step will only appear when the sum of the molar fractions is 1); (2) defining simulation option A or B (FUGK þ Wang Henke or just Wang Henke); (3) defining the input data for the selected simulation option. On a didactic perspective the suggestion is to execute simulation option (A) (running both short-cut and rigorous methods) and then, after analysing the results, to execute the simulation option (B) (running only the Wang–Henke method) in order to optimize the operation conditions of the column (to obtain less perturbations in the feed stage and/or less energy expenditure) and compare the results of both methods. The application has an invalid input detection system, to prevent the introduction of illegal characters or unrealistic physical conditions (such as molar fractions higher than 1 or negative values), that sends error messages to the user, explaining the invalid situation. It allows going back to the previous step or even to change the data introduced in the

Table 1. Database of chemical components.

Methane Ethene Ethane Propene Propane n-Butane Pentane Methanol Hexane Ethanol Benzene Propanol 2-Butanol Water Methilcyclohexane Toluene Butanol Acetic acid

Normal boiling point, Tb K21

Critical temperature, Tc K21

Critical pressure, Pc bar21

Acentric factor, w

Temperature range, K

111.66 169.41 184.55 225.46 231.11 272.65 309.22 337.85 341.88 351.44 353.24 370.35 372.70 373.15 374.08 383.78 390.81 391.05

190.56 282.34 305.32 364.90 369.83 425.12 469.70 512.50 507.60 514.00 562.05 536.80 536.20 647.13 572.10 591.75 563.00 591.95

45.99 50.41 48.72 46.00 42.48 37.96 33.70 80.84 30.25 61.37 48.95 51.69 42.02 220.55 34.80 41.08 44.14 57.86

0.0115 0.0862 0.0994 0.141 0.152 0.200 0.252 0.566 0.301 0.644 0.210 0.620 0.577 0.345 0.236 0.264 0.589 0.467

354–506 311–600 337–600 396–600 405–600 455–600 498–600 490–600 167–490 133–481 159–523 142–499 160–506 116–600 176–540 176–560 160–532 151–550

Trans IChemE, Part D, Education for Chemical Engineers, 2007, 2(D0): 1–9

4

RAFAEL et al.

Figure 1. Flowsheet of the distillation virtual application.

Figure 2. Input window (adapted from window in Portuguese). Trans IChemE, Part D, Education for Chemical Engineers, 2007, 2(D0): 1–9

VIRTUAL APPLICATIONS USING A WEB PLATFORM TO TEACH CHEMICAL ENGINEERING

5

Figure 3. Output windows (in Portuguese).

are immediately presented on the distillation column scheme (Figure 3). The results can be exported in several formats. The graphical images of the profiles can be stored in PS format (Post Script file) or in JPEG format. To visualize the list of numeric values, the user has the button ‘List’. Those lists can also be saved in txt format. In a similar way, the input and output numerical data from each simulation option can be visualized and stored. In general, the application allows the student to design the equipment for the feed to be separated, for a large range of operation conditions, in a short time. By doing so, the student can visualize easily the effect of the

same step. Each step of the input form has a help button with several instructions and suggestions. After concluding the introduction of all the input data required, the simulation can start (the simulation time can take a few seconds or several minutes depending on the complexity of the feed mixture). If any of the numerical methods does not converge, error messages are given on the browser. The results’ page has got buttons leading to the graphical representation of the results (temperature, pressure, flow rate and molar fractions profiles in the distillation column) and also to tables with the numerical results of each method, as shown in Figure 3. Some numerical outputs

Table 2. Summary of the operating conditions tested for the separation of a benzene/water/toluene feed. Feed

Case 1 2 3 4 5 6 7

Benzene (mole %)

Water (mole %)

Toluene (mole %)

Flow rate (Kmoles h21)

Temp.

RR/Rmin

P (bar)

Benzene rec. (%)

Toluene rec. (%)

55 55 55 55 55 60 55

5 5 5 5 10 0.0 5

40 40 40 40 40 40 40

500 500 500 500 500 500 500

Sat. Sat. Sat. Sat. Sat. Sat. Cold

1.3 1.5 1.3 1.3 1.3 1.3 1.3

1 1 0.8 1 1 1 1

98 98 98 99 98 98 98

95 95 95 98 95 95 95

Trans IChemE, Part D, Education for Chemical Engineers, 2007, 2(D0): 1–9

6

RAFAEL et al. Table 3. Simulated results for a distillation column for the separation of a benzene/water/toluene feed. Distillate comp. (mole %)

Case 1 2 3 4 5 6 7

Residue comp. (mole %)

Benzene

Water

Toluene

Benzene

Water

Toluene

D (Kmoles h21)

B (Kmoles h21)

RR

N

NF

Qc (Kw)

QB (Kw)

94.0 94.0 94.5 96.9 89.6 97.4 94.2

2.3 2.4 2.0 1.9 5.5 0.0 2.3

3.7 3.6 3.5 1.2 4.8 2.6 3.4

2.2 2.2 2.1 2.4 2.3 1.8 1.9

8.6 8.5 9.0 8.9 15.4 0.0 8.6

89.2 89.3 90.0 88.7 82.3 98.2 89.5

287.2 287.2 285.6 278.1 270.5 304.0 287.0

212.8 212.8 214.3 221.9 229.5 196.0 213.0

1.24 1.43 1.22 1.52 1.31 1.23 1.3

18 16 17 20 18 18 18

9 8 9 12 9 10 9

19 970 21 692 19 427 21 656 19 803 20 578 20 471

17 918 19 630 17 586 19 512 18 072 18 108 18 391

operating conditions on the design and performance of distillation equipment. The theory page complements the simulation page and was constructed in order to help students to get the correct understanding of the distillation principles. This page presents the fundamentals of distillation including the underlying physical principles, along with descriptions of the numerical methods used to perform the simulations within this application, and also a list of bibliographical references. This

leads the user to better understand and analyse the results obtained.

RESULTS AND DISCUSSION This application has been used in the classroom, for the first time, during the school year 2004/2005 in the course of Mass Transfer Operations (Unit Operations II) at Coimbra University, with around 90 students. The application was first

Figure 4. Output of the distillation virtual laboratory for case 1 (benzene/water/toluene feed). (a) Column scheme; (b)–(f) temperature, flowrates and composition profiles; (g) results table. Trans IChemE, Part D, Education for Chemical Engineers, 2007, 2(D0): 1–9

VIRTUAL APPLICATIONS USING A WEB PLATFORM TO TEACH CHEMICAL ENGINEERING

7

Figure 4. Continued Figure 4. Continued

introduced in a tutorial class. The main features of the application were presented and its potentialities were exploited by performing simulations of some case-studies. The influence on the design of the column of changing such parameters as feed temperature; operating pressure; reflux ratio; purity of the products, and so on, was exploited. This allowed a better visualization of the influence of operating conditions on the dimensioning of a distillation column. The results were discussed with the students in the class. As referred, the students had already been exposed in tutorial classes to the use of computational tools to solve small design problems. In previous years we have been using MATHEMATICA for that purpose (Rasteiro et al.,

2005) though, more recently, since 2004/2005, we started using MATLAB. We start first with a class in the computers room recalling the facilities of MATLAB, where students (15 –18 per class) are organized in groups of three, and then they go on using MATLAB to solve vapor/liquid equilibrium problems and simplified binary distillation design problems. It is only when we move to more complex multicomponent distillation problems that the ‘Virtual Laboratory for Distillation’ is introduced only after the basic notions have been given in the theory lectures. After the first introductory session on the Virtual Laboratory in the lecture class, with all the students present, the students will also have to use the tool in the tutorials (around 20 students per class) to solve

Trans IChemE, Part D, Education for Chemical Engineers, 2007, 2(D0): 1–9

8

RAFAEL et al.

Figure 4. Continued

some design problems which are discussed among themselves and with the teachers. After the first sessions, the students have free access to the application in the computer rooms, and even from home, and can use it as a tool to better understand distillation principles. Moreover, the students can also use the virtual application to test their own computational programs, based on the Matlab software, to simulate the distillation of multicomponent mixtures. This project has been proposed to the students for quite sometime, in the aforementioned course, as project work, though it is possible that, in the near future, in the new curriculum that is being designed to fulfill with the Bologna Declaration, the project work will become optional, since it is necessary to compromise to give time to other subjects that are becoming important in Chemical Engineering, like, for instance, the bio-fields. In this case, the need for virtual applications like the ‘Distillation Virtual Laboratory’, that allows the students to contact with more complex and realistic engineering problems, on their own, will become altogether more imperative.

Simulation Examples In this section an example of a distillation design problem solved using the virtual laboratory, will be presented, to better illustrate the capabilities of this application. Table 2 summarizes the problem formulation. The objective is to separate a benzene/toluene mixture, where water is present as an impurity, in order to obtain a distillate rich in benzene and a residue rich in toluene. The column is equipped with a total condenser and a partial reboiler and the reflux has been assumed saturated. The effect, on the column design, of changing the reflux ratio, recovery of the two main components (benzene and

Figure 4. Continued

toluene), operating pressure and percentage of the impurity in the feed stream, has been studied. Table 2 summarizes the different conditions tested and Table 3 gives the simulation results obtained. In Figure 4 we present the outputs obtained with the virtual application developed (temperature profile, both liquid and vapor flow rate profiles, composition profiles and table results using both the FUGK and the rigorous Wang –Henke methods), just for case 1 in Table 2. In Tables 2 and 3 and in Figure 4 the variables have the following mean: RR is the reflux ratio; D, B, L, V and F are the distillate, residue, liquid, vapour and feed flowrates, respectively; LK and HK are the light and heavy keys, respectively; NT is the total number of stages, NF is the feed stage, P is the operating pressure, Qc is the heat removed in the condenser and QR is the heat supplied in the reboiler. This example shows clearly how the student can easily see the implications on the column design of changing the different operating parameters. These results can be used in the class room to provoke discussion among the different groups. This discussion will then be directed by the teacher to the fundamentals of distillation (vapour/liquid equilibrium, mass and energy transfer principles).

Assessing the Use of the Application in the Classroom After this first year of using the ‘Virtual Laboratory’ the general opinion of the students was quite positive. The students stressed both the benefits to the understanding of distillation

Trans IChemE, Part D, Education for Chemical Engineers, 2007, 2(D0): 1–9

VIRTUAL APPLICATIONS USING A WEB PLATFORM TO TEACH CHEMICAL ENGINEERING fundaments and to an easier development of each group distillation project. These opinions were collected in an oral discussion with each group, no formal survey having been conducted. It must also be mentioned that the overall pass rate in the course on Mass Transfer Operations increased from the usual average of 60%, in previous years, to 85% in 2004/2005 and to 70% in 2005/2006 (Chemical Engineering students).

CONCLUSIONS The application here presented refers to a Web-based interactive virtual system to integrate, in the teaching of Chemical Engineering, the new technologies and computational tools. We believe that there are several benefits on the use of these applications: it stimulates the students to formulate new operation conditions for the simulation of process units and surpasses several obstacles on performing laboratorial experiments. The computational tool selected, MATLAB WebServer, allows the application to be employed in class context and to be used by students as a tool in individual study. Regarding the distillation case study, this application allows the students to learn actively and to acquire knowledge by interacting with the system, by means of the Internet, without time and space restrictions. They can combine an infinity of input parameters, each student carrying out different simulations. In addition, the students can study and visualize the effect of changes in the process parameters and initial conditions on the distillation column design and performance. The students can repeat the simulation several times and discuss the results among them, what can lead them to higher levels of understanding about the distillation process. Thus,

9

the application offers a good environment to illustrate a wide range of situations and to stimulate discussion among the students. Moreover, it allows an easy graphical representation of the column profiles and of the numerical results, which then become more perceptive to students.

REFERENCES Biegler, L., Grossman, I. and Westerberg, 1997, Systematic Methods of Chemical Process Design (Prentice Hall, Englewood Cliffs, USA). Clement, J., 1982, Student’s preconceptions in introductory mechanics, Am J Phys, 50: 66. Dede, C., 1995, The evolution of constructivist learning environments: Immersion in distributed virtual worlds, Educational Technology, 35: 46. Douglas, J., 1988, Conceptual Design of Chemical Processes (McGraw-Hill, New York, NY, USA). Henley, E., Seader, E. and Rasmussen, 1981, Equilibrium-Stage Separation Operations in Chemical Engineering (John-Wiley & Sons, New York, NY, USA). Monroy-Loperena, R., 2003, Simulations of multicomponent multistage vapour-liquid separations. An improved algorithm using the Wang-Henke tridiagonal matrix method, Ind Eng Chem Res, 42(1): 175. Palanki, S. and Kolavennu, S., 2003, Simulation of control of a CSTR process, Int J Eng Ed, 19(3): 398. Rasteiro, M.G., Bernardo, F.P. and Saraiva P.M., 2005, Using MTHEMATICA to teach process units: A distillation case study, Che Eng Education, Spring: 116. Shin, D., Yoon, E., Sang, J. and Lee, E., 2000, Web-based interactive virtual laboratory system for unit operations and process systems engineering education, Computers & Chemical Engineering, 24: 1381. The manuscript was received 3 March 2006 and accepted for publication after revision 27 November 2006.

Trans IChemE, Part D, Education for Chemical Engineers, 2007, 2(D0): 1–9

Q1

Q2

ECE06007 Queries A. C.Rafael, F.Bernardo, L.M. Ferreira, M.G. Rasteiro and J.C. Teixeira Q1

Inital for Westerberg?

Q2

Initial for Rasmussen?

Suggest Documents