10
Chebyshev Orthogonal Collocation Technique to Solve Transport Phenomena Problems With Matlab W and Mathematica HOUSAM BINOUS, 1 ABDULLAH A. SHAIKH, 1 AHMED BELLAGI 2 1 Department of Chemical Engineering, King Fahd University of Petroleum & Minerals, Dhahran 31261, Saudi Arabia 2 De´partement de Ge´nie Energe´tique (Energy Engineering Department), Ecole Nationale d’Inge´nieurs de Monastir, University of Monastir, Tunisia Received 11 June 2014; accepted 30 July 2014 ABSTRACT: We present in this pedagogical paper an alternative numerical method for the resolution of transport phenomena problems encountered in the teaching of the required course on transport phenomena in the graduate chemical engineering curricula. Based on the Chebyshev orthogonal collocation technique implemented in Matlab 1 and Mathematica ß , we show how different rather complicated transport phenomena problems involving partial differential equations and split boundary value problems can now readily be mastered. A description of several sample problems and the resolution methodology is discussed in this paper. The objective of the incorporation of this approach is to develop the numerical skills of the graduate students at King Fahd University of Petroleum & Minerals (KFUPM) and to broaden the extent of transportphenomena problems that can be addressed in the course. We noted with satisfaction that the students successfully adopted this numerical technique for the resolution of problems assigned as term projects. ß 2014 Wiley Periodicals, Inc. Comput Appl Eng Educ 9999:110, 2014; View this article online at wileyonlinelibrary.com/journal/cae; DOI 10.1002/cae.21612 Keywords: transport phenomena; orthogonal collocation; Chebyshev; Matlab 1 ; Mathematica INTRODUCTION The teaching of Transport Phenomena and Numerical Methods is typical of graduate programs in chemical engineering. We need not elaborate on the different phases in the teaching of the Numerical Methods course; however, it is fair to suggest that there are three distinct phases: (1) development of Fortran programs [1,2]; (2) application of IMSL codes; and (3) application of commercial software codes. The great revolution in computational power has allowed most users to focus on the third phase, where software codes, such as Matlab, Mathcad, or Mathematica can be used to attack a variety of engineering problems in reaction analysis and transport phenomena. The integration of such software codes in chemical engineering education, both at the undergraduate and graduate levels, has been discussed in the literature in several articles; see for example, Loughlin and Shaikh [3] and Parulekar [4]. Further examples for solutions of typical problems in transport phenomena using different numerical approaches and appropriate software can be found in Refs. [514]. In the present paper, we address ourselves to the numerical solution of highly nonlinear problems in the graduatelevel Transport Phenomena course. As described in the syllabus (see Appendix A), the graduatelevel transport phenomena course taught at KFUPM uses the textbook written by Bird et al. [15]. A short mathematical introduction on how to use tensors, gradients (Appendix A of BSL), etc. is given during the rst week of instruction. Later, the instructor reviews the three constitutive equations (Newtons law of viscosity, Fouriers law, and Ficks law; Chapters 1, 9, and 17 of BSL). Shell momentum, heat and mass balances are rapidly reviewed (Chapters 2, 10, and 18). Then, the equation of motion (Chapter 3 of BSL) is thoroughly taught. Correspondence to: H. Binous ([email protected]). © 2014 Wiley Periodicals, Inc. 1

chebychev

Embed Size (px)

DESCRIPTION

matlab engineering chemical material balances

Citation preview

Page 1: chebychev

Chebyshev OrthogonalCollocation Technique toSolve Transport PhenomenaProblems With MatlabW

and MathematicaHOUSAM BINOUS,1 ABDULLAH A. SHAIKH,1 AHMED BELLAGI2

1Department of Chemical Engineering, King Fahd University of Petroleum & Minerals, Dhahran 31261, Saudi Arabia

2Departement de Genie Energetique (Energy Engineering Department), Ecole Nationale d’Ingenieurs de Monastir,

University of Monastir, Tunisia

Received 11 June 2014; accepted 30 July 2014

ABSTRACT: We present in this pedagogical paper an alternative numerical method for the resolution of

transport phenomena problems encountered in the teaching of the required course on transport phenomena in the

graduate chemical engineering curricula. Based on the Chebyshev orthogonal collocation technique implemented

in Matlab1 and Mathematica �, we show how different rather complicated transport phenomena problems involvingpartial differential equations and split boundary value problems can now readily be mastered. A description of severalsample problems and the resolution methodology is discussed in this paper. The objective of the incorporation of thisapproach is to develop the numerical skills of the graduate students at King Fahd University of Petroleum & Minerals(KFUPM) and to broaden the extent of transport‐phenomena problems that can be addressed in the course. We noted withsatisfaction that the students successfully adopted this numerical technique for the resolution of problems assigned as termprojects. � 2014 Wiley Periodicals, Inc. Comput Appl Eng Educ 9999:1–10, 2014; View this article online atwileyonlinelibrary.com/journal/cae; DOI 10.1002/cae.21612

Keywords: transport phenomena; orthogonal collocation; Chebyshev; Matlab1; Mathematica

INTRODUCTION

The teaching of Transport Phenomena and Numerical Methods istypical of graduate programs in chemical engineering. We need notelaborate on the different phases in the teaching of the NumericalMethods course; however, it is fair to suggest that there are threedistinct phases: (1) development of Fortran programs [1,2]; (2)application of IMSL codes; and (3) application of commercialsoftware codes. The great revolution in computational power hasallowed most users to focus on the third phase, where softwarecodes, such as Matlab, Mathcad, or Mathematica can be used toattack a variety of engineering problems in reaction analysis andtransport phenomena. The integration of such software codes in

chemical engineering education, both at the undergraduate andgraduate levels, has been discussed in the literature in severalarticles; see for example, Loughlin and Shaikh [3] andParulekar [4]. Further examples for solutions of typical problemsin transport phenomena using different numerical approaches andappropriate software can be found in Refs. [5–14].

In the present paper, we address ourselves to the numericalsolution of highly nonlinear problems in the graduate‐levelTransport Phenomena course. As described in the syllabus (seeAppendix A), the graduate‐level transport phenomena coursetaught at KFUPM uses the textbook written by Bird et al. [15]. Ashort mathematical introduction on how to use tensors, gradients(Appendix A of BSL), etc. is given during the first week ofinstruction. Later, the instructor reviews the three constitutiveequations (Newton’s law of viscosity, Fourier’s law, and Fick’slaw; Chapters 1, 9, and 17 of BSL). Shell momentum, heat andmass balances are rapidly reviewed (Chapters 2, 10, and 18). Then,the equation of motion (Chapter 3 of BSL) is thoroughly taught.

Correspondence to: H. Binous ([email protected]).

© 2014 Wiley Periodicals, Inc.

1

Page 2: chebychev

The equations of change for non‐isothermal and multi‐componentsystems are also introduced (Chapters 11 and 19 of BSL). Finally,problems involving more than one independent variable are treatedwith emphasis on the analytical methods of solution such as theseparation of variables and the similarity transform techniques(Chapters 4, 12, and 20 of BSL).

In the graduate‐level transport phenomena course at KFUPM,several performance assessment tools are used by the instructor.These include bi‐weekly assignments, midterm and final exami-nations, as well as term projects. In the term projects, each studentis asked to solve a transport‐phenomena problem usingMatlab1 orMathematica© and the Chebyshev orthogonal collocation method.

In the fall semester of 2013, these term project problems (eachproblem assigned to a group of two students) have involved

� transient Couette flow,� transient Poiseuille flow,� steady‐state flow of non‐Newtonian fluids in a pipe,� unsteady‐state evaporation of liquids,� 1‐D transient heat conduction in a cylinder,� the Falkner–Skan Equation,� 1‐D steady‐state heat diffusion with temperature‐depend heatconductivity, and finally,

� unsteady state convection‐diffusion.

A set of seven typical transport phenomena problems isdiscussed in the present paper. We begin with a short description ofthe Chebyshev orthogonal collocation method and illustrate thesolution technique through two examples. We conclude with ourexperience in teaching advanced topics in chemical engineeringusing the computational tools described here.

THE CHEBYSHEV ORTHOGONAL COLLOCATIONMETHOD

The Derivative Matrix

In the discrete Chebyshev–Gauss–Lobatto orthogonal collocationmethod, the grid points are defined by

yj ¼ cosjp

N; j ¼ 0;…;N ð1Þ

and represent the locations of the extrema of the first kindChebyshev polynomials, TN(x). The (Nþ 1)� (Nþ 1) Chebyshevderivative matrix D at the quadrature points is [16–18]:

D ¼ ðdjkÞ0�j;k;�N ð2Þwith

d00 ¼ 2N2 þ 1

6

dNN ¼ � 2N 2 þ 1

6

djj ¼ � yj2ð1� y2j Þ

for 1 � j � N � 1

8>>>>>>><>>>>>>>:

For 0� j, k�N with j 6¼ k, the element djk writes

djk ¼ cjð�1Þjþk

ckðyj � ykÞwith

cm¼ 1 for 1�m�N� 1 and c0¼ cN¼ 2.

If n is the vector formed by the values of the function u(y) atthe locations yj, j¼ 0,…,N the values of the approximations n0 andn00 of the derivates u0 and u00 of u at the grid points yj are calculatedas follows:

n0 ¼ Dn; n00 ¼ D2n

where D is the differentiation matrix. The Mathematica© code forbuilding D is given in Appendix B. A similar code, this time basedon Matlab1, can be found in the textbook by Trefethen [18].

ILLUSTRATION OF THE CHEBYSHEV COLLOCATIONTECHNIQUE USING MATLABW OR MATHEMATICATHROUGH TWO SIMPLE EXAMPLES

A Simple Split Boundary Value Problem

Consider the following nonlinear boundary value problemencountered in a graduate‐level applied mathematics course:

uu0 � u00 ¼ 1 ð3Þwith the boundary conditions

uð�1Þ ¼ 0; uð1Þ ¼ 2:

It is possible to find the solution u(�1� y� 1) at the locationsyj¼ cos(jp/N) for j¼ 0,…,N, by solving the following system of(Nþ 1) nonlinear algebraic equations:

ujXNk¼0

djkuk

!�XNk¼0

bjkuk ¼ 1; j ¼ 1;…; ðN � 1Þ

u0 ¼ 2

uN ¼ 0

8>>>><>>>>:

ð4Þ

where (djk)0�j,k�N are the elements of the derivation matrixD givenin the previous section and (bjk)0�j,k�N the elements of D2¼D�D.Such system of nonlinear algebraic equations is readily solvedusingMathematica© andMatlab1 built‐in functionsFindRoot andfsolve respectively. For N¼ 20 the solution, u, at the collocationpoints, yj, j¼ 0,…, 20, is given in Table 1 and plotted in Figure 1.We intentionally represent for all the treated cases the calculationresults in graphical and table forms especially for readers who wantto rework the problems and are interested not only in solutiontrends but also in exact numerical solution of these potentialbenchmark problems in transport phenomena processes. A solutionof this problem can be found using the shooting technique. Thedata obtained using this later method, are also given in Table 1 forcomparison purposes.

A Simple Partial Differential Equation

Consider the following partial differential equation (PDE):

@u

@t¼ @2u

@y2ð5Þ

with the initial and boundary conditions

uðt ¼ 0; yÞ ¼ 1

uðt; y ¼ 0Þ ¼ 0

uðt; y ¼ 1Þ ¼ 0

2 BINOUS, SHAIKH, AND BELLAGI

Page 3: chebychev

This is the well‐known one‐dimensional diffusion equation.It is possible to find the solution u(t, 0� y� 1) at yj¼ (1þ cos(jp/N))/2, j¼ 0,…,N, by solving the following system of (Nþ 1)differential algebraic equations (DAEs):

u0 jðtÞ ¼ 4XNk¼0

bjkukðtÞ; j ¼ 1;…;N � 1

u0ðtÞ ¼ 0

uN ðtÞ ¼ 0

8>>>><>>>>:

ð6Þ

where D2¼D�D¼ (bjk)0�j,k�N is the square of the derivativematrix, D. The initial conditions for the DAEs are uj(t¼ 0)¼ 1 forj¼ 0,…,N. Such system of differential algebraic equations isreadily solved usingMathematica© andMatlab1 built‐in functions

NDSolve and ode15s, respectively. The solution, u, at t¼ 0.0126and at the collocation points, yj, j¼ 0,…,N for N¼ 20 is given inTable 2 and plotted in Figure 2. This transport problem admitsan analytical solution derived using the separation of variabletechnique given by:

uðt; yÞ ¼X1n¼1

2

npð1� cosðnpÞÞe�n2p2 tsinðnpxÞ: ð7Þ

The data obtained, using the analytical solution, are alsopresented in Table 2 for comparison purposes.

CASE STUDIES

The Arnold Problem

Consider as a first case the unsteady evaporation of a liquid A innon‐diffusing gas B. The migration of the molecules of A in thegas phase is described by the equation [19]:

@cA@t

¼ DAB@2cA@z2

þ DAB

1� ðcA0=ctÞ@cA@z

� �z¼0

� �@cA@z

ð8Þ

where DAB is the gas diffusion coefficient, cA0, the interfacial gas‐phase concentration, z, the vertical gas phase position andct¼ cAþ cB.

The initial and boundary conditions for this problem are:

t ¼ 0; cAðz; 0Þ ¼ 0

z ¼ 0; cAð0; tÞ ¼ cA0ðInterface liquid–vapor equilibrium conditionÞz ¼ 1; cAð1; tÞ ¼ 0

Equation (8) has an analytical solution:

cAðjÞcA0

¼ 1� erfðj� wÞ1þ erf ðwÞ ; ð9Þ

Table 1 Values at the Collocation Points of the Solution of the

Nonlinear Boundary Value Problem of Illustration 1

j yj uja uj

b

0 1.0000 2.0000 2.1 0.9877 1.9837 1.98362 0.9511 1.9366 1.93653 0.8910 1.8634 1.86344 0.8090 1.7704 1.77045 0.7071 1.6634 1.66346 0.5878 1.5471 1.54707 0.4540 1.4243 1.42438 0.3090 1.2969 1.29699 0.1564 1.1656 1.165610 0.0000 1.0310 1.030911 �0.1564 0.8938 0.893712 �0.3090 0.7552 0.755113 �0.4540 0.6170 0.617014 �0.5878 0.4822 0.482215 �0.7071 0.3545 0.354416 �0.8090 0.2385 0.238517 �0.8910 0.1399 0.139818 �0.9511 0.0642 0.064119 �0.9877 0.0164 0.016320 �1.0000 0 �2.4087� 10�21

aChebyshev collocation.bShooting method.

Figure 1 Solution of the nonlinear boundary value problem of illustration1. (Red dots: Chebyshev collocation, blue curve: shooting method.)[Color figure can be viewed in the online issue, which is available atwileyonlinelibrary.com.]

Table 2 Values at the Collocation Points of the Solution of the

Diffusion Equation of Illustration 2 at t¼ 0.0126

j yj uja uj

b

0 1.0000 0 0.1 0.9938 0.0307 0.03092 0.9755 0.1218 0.12253 0.9455 0.2670 0.26864 0.9045 0.4500 0.45255 0.8536 0.6407 0.64376 0.7939 0.8029 0.80587 0.7270 0.9124 0.91458 0.6545 0.9693 0.97049 0.5782 0.9914 0.991810 0.5000 0.9965 0.996711 0.4218 0.9914 0.991812 0.3455 0.9693 0.970413 0.2730 0.9124 0.914514 0.2061 0.8029 0.805815 0.1464 0.6407 0.643716 0.0955 0.4500 0.452517 0.0545 0.2670 0.268618 0.0245 0.1218 0.122519 0.0062 0.0307 0.0309320 0 0 0.aChebyshev collocation.bSeparation of variables.

CHEBYSHEV ORTHOGONAL COLLOCATION TECHNIQUE 3

Page 4: chebychev

where j ¼ z=ffiffiffiffiffiffiffiffiffiffiffiffi4DABt

p� �, and w is obtained by solving the following

nonlinear equation:

w ¼ 1ffiffiffip

p cA0=ctð1� ðcA0=ctÞÞ

e�w2

ð1þ erf ðwÞÞ : ð10Þ

The numerical solution of Equation (8) using aMathematica©

implementation of the Chebyshev orthogonal collocation involvesusing NDSolve to solve the system of (Nþ 1) DAEs:

cA;N ðtÞ ¼ cA0

c0A;jðtÞ ¼ DAB2

L

� �2 XNk¼0

bjkcA;kðtÞ !

þ DAB

1� ðcA0=ctÞ2

L

� �

�XNk¼0

d0kcA;kðtÞ !

2

L

� � XNk¼0

djkcA;kðtÞ !

;

for j ¼ 1;…;N � 1

cA;0ðtÞ ¼ 0

where (djk)0�j,k�N are the elements of the derivative matrix D,(djk)0�j,k�N, the elements of its square, D2¼D�D, and L¼ 8.

The initial conditions for the DAEs are cA,j(z,0)¼ 0 forj¼ 0,…,N.

The solution cA(t, 0� z� L¼ 8) is found at the grid pointszj¼ L(1þ cos(jp/N))/2 for j¼ 0,…,N.

The numerical solution, cA(z, t), thus obtained (red dots inFig. 3) can be compared to the analytical solution represented bythe blue curve on the same figure. Excellent agreement betweenboth solutions is observed.

The built‐in Mathematica© command Manipulate allowsstudents to create interactive programs with sliders, check boxes,controls, etc. Here, one can vary the values of t,DAB, cA0 as well asthe number of the Chebyshev collocation points, (Nþ 1), andinstantaneously see the effect of variables and parameters.

Unsteady-State Convection-Diffusion Problem

Consider the unsteady 1‐D convection‐diffusion problem de-scribed by the equation:

@c

@t¼ Df

@2c

@x2� n

@c

@x; ð11Þ

where Df is the diffusion coefficient, v the velocity, c theconcentration of the diffusing species, and x is the position in thedirection of flow.

With the following initial and boundary conditions:

t ¼ 0; cðx; 0Þ ¼ 0;

x ¼ 0; cð0; tÞ ¼ 1;

x ¼ 1; cð1; tÞ ¼ 0:

Equation (11) has an analytical solution that can be readilyfound using Laplace transforms:

cðx; tÞ ¼ 1

2erfc

x� vt

2ffiffiffiffiffiDt

p� �

þ eðvxÞ=Derfcxþ vt

2ffiffiffiffiffiDt

p� �� �

: ð12Þ

In Figure 4 the evolution of the concentration c(x, t)represented by the analytical solution (blue curve) and thenumerical solution c(t, 0� x�L¼ 10) obtained using theimplementation of the Chebyshev orthogonal collocation inMathematica© (red dots) are compared. Again, an excellentagreement between the two solutions is observed.

As noted in the previous case study, the built‐in Mathema-tica© commandManipulate allows creating interactive numericalsolutions of Equation (11) by varying the values of t,Df, v as well asthe number of the Chebyshev collocation grid points (Nþ 1).

The Falkner–Skan Equation

The flow past a wedge at an angle of attack b from some uniformvelocity field U0 is governed by a non‐linear ODE known as theFalkner–Skan equation [20], named after V. M. Falkner and S. W.Skan [21]:

f ð3Þ þ f f ð2Þ þ bð1� ðf 0Þ2Þ ¼ 0 ð13Þ

Figure 2 Solution of the diffusion equation of illustration 2. (Red dots:Chebyshev collocation, blue curve: analytical solution.) [Color figure canbe viewed in the online issue, which is available at wileyonlinelibrary.com.]

Figure 3 Composition profile for the Arnold problem. (Red dots:Chebyshev collocation, blue curve: analytical solution.) [Color figure canbe viewed in the online issue, which is available at wileyonlinelibrary.com.]

4 BINOUS, SHAIKH, AND BELLAGI

Page 5: chebychev

with the limit conditions

f ð0Þ ¼ f 0ð0Þ ¼ 0 and f 0ð1Þ ¼ 1:

Equation (13) admits only a numerical solution whichrequires the application of an appropriate numerical algorithm(shooting method, Chebyshev orthogonal collocation, etc.)

Figure 5 shows the velocity or f 0 obtained with the help ofMatlab1 for a wedge angle b ¼ ðp=4Þ. Applying the shootingtechnique leads to the blue curve while the red dots represent thevelocity obtained using the Chebyshev orthogonal collocationmethod by solving a system of (Nþ 1) nonlinear algebraicequations using the built‐in command fsolve.

The equations system is the following

PNk¼0

d0kfk ¼ 1

PNk¼0

dNkfk ¼ 0

fN ¼ 0

2L

3 PNk¼0

ejkfk

!þ 2

L

2fj

PNk¼0

bjkfk

!þ b 1� 2

L

PNk¼0

djkfk

!20@

1A ¼ 0

for j ¼ 1; . . . ;N � 2

8>>>>>>>>>>>>>><>>>>>>>>>>>>>>:

where (djk)0�j,k�N are the elements of the derivative matrix D,(bjk)0�j,k�N, the elements of its square, D2¼D�D, and (ejk)0�j,k�N

those of its cube D3¼D�D�D.The function values f(0� y� L¼ 4) are found at the grid

points yj¼ L(1þ cos(jp/N))/2, for j¼ 0,…,N.The well‐known Blasius equation (flow past a flat plate with a

wedge angle, b¼ 0) appears as a particular case in this study.

Planar stagnation flow is also found by setting the wedge attackangle b¼p.

Pipe Flow of Power-Law and Carreau fluids

A non‐Newtonian fluid has a viscosity that changes with theapplied shear force. For a Newtonian fluid (such as water),the viscosity is independent of how fast it is stirred, but for anon‐Newtonian fluid the viscosity is dependent on the stirringrate. It gets either easier or harder to stir faster for different typesof non‐Newtonian fluids. Different constitutive equations, givingrise to various models of non‐Newtonian fluids, have beenproposed in order to express the viscosity as a function of the strainrate.

In power‐law fluids, the relation

m ¼ k _gn�1 ð14Þis assumed, where n is the power‐law exponent and k is thepower‐law consistency index. Dilatant or shear‐thickening fluidscorrespond to the case where the exponent in this equation ispositive, while pseudo‐plastic or shear‐thinning fluids are obtainedwhen n< 1. The viscosity decreases with strain rate for n< 1,which is the case for pseudo‐plastic fluids (also called shear‐thinning fluids). On the other hand, dilatant fluids are shearthickening. If n¼ 1, the Newtonian fluid behavior can berecovered. The power‐law consistency index is chosen to bek¼ 1.5� 10�5. For the pseudo‐plastic fluid, the velocity profile isflatter near the center, where it resembles plug flow, and is steepernear the wall, where it has a higher velocity than the Newtonianfluid or the dilatant fluid. Thus, convective energy transportis higher for shear‐thinning fluids when compared to shear‐thickening or Newtonian fluids. For flow in a pipe of a power‐lawfluid, an analytical expression is available [22,23]. According tothe Carreau model for non‐Newtonian fluids, first proposed byPierre Carreau,

mð _gÞ � m1 ¼ ðm0 � m1Þð1þ l2 _g2Þðn�1Þ=2 ð15Þ

Figure 4 Composition profile for the unsteady‐state convection‐diffusionproblem. (Red dots: Chebyshev collocation, blue curve: analyticalsolution.) [Color figure can be viewed in the online issue, which isavailable at wileyonlinelibrary.com.]

Figure 5 Velocity profile for flow past a wedge (b¼ (p/4)). (Red dots:Chebyshev collocation, blue curve: shooting technique.) [Color figure canbe viewed in the online issue, which is available at wileyonlinelibrary.com.]

CHEBYSHEV ORTHOGONAL COLLOCATION TECHNIQUE 5

Page 6: chebychev

For l _g� 1, this reduces to a Newtonian fluid with m¼m0.For l _g� 1, we obtain a power‐law fluid with m ¼ k _gn�1.

The infinite‐shear viscosity m1 and the zero‐shear viscositym0 of the Carreau fluid are taken equal to 0 and 2.04� 10�3,respectively. The relaxation parameter l is set equal to 0.2. For theflow of a Carreau fluid in a pipe, only numerical solutions areavailable. The velocity profile versus radial position is obtained forthe steady‐state laminar flow of power‐law and Carreau fluids in apipe. The pipe radius is R¼ 1 and the applied pressure gradient isððDPÞ=LÞ ¼ 1. For both the power‐law and Carreau fluids, thered dots represent the solutions obtained using the Chebyshevcollocation technique (see Fig. 6a and b). The velocity profile for apower‐law fluid (the blue curve) is obtained from the analyticalsolution given by Binous [22] and Wilkes [23]:

vðrÞ ¼ DP

2Lk

� �1=n R1þ1=n � r1þ1=n

1þ 1=n: ð16Þ

The velocity profile for a Carreau fluid (the blue curve) isobtained using the shooting technique and the built‐in Mathema-tica function NDSolve. For both fluids, you can vary the exponent.

The Chebyshev orthogonal collocation technique requiresthe solution of a system of (Nþ 1) nonlinear algebraic equations.Here, the Mathematica© methodology is based on the usage of thebuilt‐in command FindRoot.

Free Convection Past an Isothermal Vertical Plate

Consider the free convection past a vertical flat plate or wallmaintained at a constant temperature Tw with Tw>T/, where T/ isthe fluid temperature far from the wall.

The governing equations for such a problem in steadystate [20,24] are:

Fð3Þ þ 3FF 0 � 2ðF 0Þ2 þQ ¼ 0

Qð2Þ þ 3PrFQ0 ¼ 0

with the B:C:

Fð0Þ ¼ F 0ð0Þ ¼ 0

F 0ð1Þ ¼ 0

Qð0Þ ¼ 1;Qð1Þ ¼ 0

8>>>>>>>>><>>>>>>>>>:

ð17Þ

whereQ ¼ ððT � T1Þ=ðTw � T1ÞÞ is the dimensionless temper-ature, Pr ¼ ðv=aÞ the Prandtl number (a dimensionless numbergiving the rate of viscous momentum transfer relative to heatconduction), and F is the modified stream function

FðhÞ ¼ c

4v½ðgbðTw� T /ÞÞ=ð4v2Þ1=4x3=4

of the similarity variable h

h ¼ Grx4

� �1=4 yx

The derivative F0 of F is proportional to the fluid velocity.Grx ¼ ððgbDTx3Þ=v2Þ is the Grashof number. To solve this splitboundary value problem one has to apply an appropriate numericalprocedure such as the shooting and/or relaxation technique. In thisstudy we make use of the Chebyshev orthogonal collocationmethod that we implemented in Mathematica© and—for compari-son purposes—the classical shooting technique. The obtainedtemperature and velocity profiles versus h for Pr¼ 10 are

Figure 6 Velocity profile for (a) the power‐law fluid and (b) the Carreaufluid. (Red dots: Chebyshev collocation, blue curve a: analytical solution,blue curve b: shooting method.) [Color figure can be viewed in the onlineissue, which is available at wileyonlinelibrary.com.]

6 BINOUS, SHAIKH, AND BELLAGI

Page 7: chebychev

represented in Figure 7a and b as red dots for the results of theChebyshev integration approach and blue curves for the shootingmethod. The Chebyshev collocation procedure requires thesolution of a system of 2(Nþ 1) nonlinear algebraic equationsusing FindRoot in Mathematica©.

As can be noted, only qualitative agreement is obtained forthe velocity profile using the shooting and the orthogonalcollocation approach. One however can verify that if the Pr isreduced, the dimensionless temperature curve extends farther awayfrom the wall as an indication of higher rates of heat conduction.

Start-Up of Poiseuille Flow in a Newtonian Fluid

The governing equation, in dimensionless form, for Poiseuille flowfor a Newtonian fluid in a tube is given by:

@u

@t¼ 4þ 1

j

@

@jj@u

@j

� �; ð18Þ

where the dimensionless time is t ¼ ððtvÞ=R2Þ, the dimensionlessradial position, j ¼ ðr=RÞ and the dimensionless velocity,u ¼ ððuzðrÞÞ=uz maxÞ.

The boundary and initial conditions are:

uðj ¼ 1; tÞ ¼ 0;

@u

@jðj ¼ 0; tÞ ¼ 0;

uðj; t ¼ 0Þ ¼ 0:

v ¼ ðm=rÞ is the kinematic viscosity with m the fluid’s viscosityand r, its density. The radius of the pipe is R, and uz;max ¼�ð1=4mÞð@p=@zÞR2 is the velocity at the center of the pipe atsteady state. Figure 8 depicts the velocity profile obtained usingMatlab1 at t¼ 0.1359. Here one has to solve a system of DAEsusing the built‐in Matlab1 command ode15s.

This problem admits an analytical solution given by:

u ¼ uzðrÞuz;max

¼ 1� r

R

2� ��X1k¼1

AkJ 0 lkr

R

e�ððvðlk Þ2Þ=R2Þt

where

Ak ¼ 2

ðR2J 1ðlkÞÞ2ZR0

rJ 0 lkr

R

ðR2 � r2Þdr

and lk are the roots of the zeroth order Bessel function of the 1stkind (i.e., J0(lk)¼ 0).

Table 3 gives a list of these values and Table 4 shows acomparison between the analytical solution (truncated up to k¼ 7)and our Chebyshev numerical solution.

Transient Couette Flow

This aim of this section is to show how the Couette flow in a slotdevelops. Initially the fluid and both walls are stationary. To start

Figure 7 (a) Temperature profile and (b) velocity profile for freeconvection past an isothermal vertical plate in the case of Pr¼ 10. (Red dots:Chebyshev collocation, blue curve: shooting technique.) [Color figure canbe viewed in the online issue, which is available at wileyonlinelibrary.com.]

Figure 8 Velocity profile of a Poiseuille flow in a Newtonian fluid att¼ 0.1359. (Red dots: Chebyshev collocation, blue curve: analyticalsolution.) [Color figure can be viewed in the online issue, which is availableat wileyonlinelibrary.com.]

CHEBYSHEV ORTHOGONAL COLLOCATION TECHNIQUE 7

Page 8: chebychev

the flow the lower wall is brought to a constant velocity, u(0)¼U¼ 1m/s.

The momentum equation and the no‐slip boundary conditionare:

@u

@t¼ n

@2u

@y2ð19Þ

and u(1)¼ 0 where v is the kinematic viscosity.The steady‐state solution is the linear velocity profile given

by u(y)¼U(1� y). The analytical solution of Equation (19) can befound by applying the separation of variables technique [25]:

uðt; yÞ ¼ Uð1� yÞ � 2

pUX1k¼1

1

ksinðkpyÞe�k2p2nt

Using Matlab1, we plot in Figure 9 the velocity profile att¼ 1.1255 and v¼ 0.1. Here also one has to solve a system ofDAEs using the built‐inMatlab1 command ode15s. A comparisonbetween the numerical and analytical results (truncated up tok¼ 100) for t¼ 0.1255 and v¼ 0.1 is given in Table 5. For verysmall kinematic viscosities, the response is slower. This result is tobe expected since the momentum transport is governed here solelybymolecular momentum exchange, characterized by the kinematic

viscosity (unit is cm2/s) which is just like molecular diffusion andheat conduction in gases a very slow process.

CONCLUDING REMARKS

In this paper, we have described how two software packages havebeen gainfully employed in conjunction with the orthogonal‐collocation technique in the teaching of the graduate transportphenomena course. We have illustrated these numerical codes bypresenting details of some of the highly nonlinear problems thatwere selected as illustrative examples.

Table 4 Values at the Collocation Points of the Solution of the

Transient Poiseuille Flow Problem at t¼ 0.1359

j yj uja uj

b

0 1.0000 0 �0.00001 0.9938 0.0084 0.00842 0.9755 0.0326 0.03263 0.9455 0.0706 0.07064 0.9045 0.1188 0.11885 0.8536 0.1732 0.17316 0.7939 0.2295 0.22947 0.7270 0.2839 0.28388 0.6545 0.3335 0.33339 0.5782 0.3764 0.376210 0.5000 0.4117 0.411411 0.4218 0.4394 0.439012 0.3455 0.4602 0.459813 0.2730 0.4751 0.474714 0.2061 0.4852 0.484715 0.1464 0.4916 0.491116 0.0955 0.4952 0.494717 0.0545 0.4970 0.496518 0.0245 0.4977 0.497219 0.0062 0.4979 0.497320 0 0.4979 0.4973aChebyshev collocation method.bSeparation of variables method.

Table 3 The Seven First Values of the Zeroth of J0

k lk

1 2.40482 5.52013 8.65374 11.79155 14.93096 18.07117 21.2116

Figure 9 Velocity profile of a Couette flow of a Newtonian fluid at(t¼ 0.1255; n¼ 0.1) (Red dots: Chebyshev collocation, blue curve:analytical solution.) [Color figure can be viewed in the online issue, whichis available at wileyonlinelibrary.com.]

Table 5 Values at the Collocation Points of the Solution of the

Transient Couette Flow Problem at t¼ 0.1255 for n¼ 0.1

j yj uja uj

b

0 1.0000 0 �0.00001 0.9938 0.0000 0.00002 0.9755 0.0000 0.00003 0.9455 0.0000 0.00004 0.9045 0.0000 0.00005 0.8536 0.0000 0.00006 0.7939 0.0000 0.00007 0.7270 0.0000 0.00008 0.6545 0.0000 0.00009 0.5782 0.0003 0.000310 0.5000 0.0016 0.001611 0.4218 0.0079 0.007812 0.3455 0.0295 0.029213 0.2730 0.0854 0.084914 0.2061 0.1940 0.193315 0.1464 0.3561 0.355416 0.0955 0.5474 0.546717 0.0545 0.7313 0.730918 0.0245 0.8775 0.877319 0.0062 0.9691 0.969020 0 1.0000 1.0000aChebyshev collocation.bSeparation of variables.

8 BINOUS, SHAIKH, AND BELLAGI

Page 9: chebychev

In the recent past, the teaching of transport phenomenarevolved around two issues: setting up mathematical models andassociated initial and boundary conditions, and derivation ofanalytical solutions mostly for asymptotic cases of the mathemati-cal models. Nowadays, the integration of powerful and rather user‐friendly numerical codes, such as Matlab and Mathematica, inchemical engineering education is worthwhile. This integration ofsuch codes allows the instructor and the student to broaden theirhorizons by attempting to tackle nonlinear problems typical of real‐life engineering problems with relative ease.

Needless to say, educators should exhibit considerableflexibility in their curriculum and need to move rapidly to keepup with the rapidly changing computational environment. Thework described here is presented in that spirit.

Finally, all the codes are available upon request from thecorresponding author.

ACKNOWLEDGMENT

The support of King Fahd University of Petroleum & Minerals isduly acknowledged.

APPENDIX A

Advanced Transport Phenomena I (CHE 501)First Semester 2013–2014 (Term 131)

APPENDIX B

The implementation can be tested for Np¼ 5 throughcomparison with the results given in Ref. [16]:

REFERENCES

[1] B. Carnahan, H. A. Luther, and J. O. Wilkes, Applied numericalmethods. New York, Wiley, 1969.

[2] W. S. Dorn andD. D.McCracken, Numerical methods with Fortran IV—Case studies. New York, Wiley, 1972.

[3] K. F. Loughlin and A. A. Shaikh, Evolution of integration of computereducation in the chemical engineering curriculum. In: Proceedings ofthe Symposium of Engineering Education, King Abdulaziz Universi-ty, Jeddah, November, 2001.

[4] S. J. Parulekar, Numerical problem solving using Mathcad inundergraduate reaction engineering, Chem Eng Educ 40 (2006),14–23.

[5] D. Adair and M. Jaeger, Integration of computational fluid dynamicsinto a fluid mechanics curriculum, Comput Appl Eng Educ 22 (2014),131–141.

[6] N. Brauner and M. Shacham, Numerical experiments in fluidmechanics with a tank and draining pipe, Comput Appl Eng Educ2 (1994), 175–183.

[7] A. Campo and C. H. Amón, A simple way to determine the twoasymptotic Nusselt number expressions for in‐tube, laminar forcedconvective flows employing the method of lines, Comput Appl EngEduc 6 (1998), 79–87.

Topics: Chapters in BSL

1 Introduction to transport phenomenaIntroduction to molecular transport

Chapters 0, 1, 9, 17 andAppendix A of BSL

2. Velocity distribution in laminar flow Chapters 2, 10, 18 of BSL3. Development of mass, momentum

and energy conservation equations—Navier–Stokes equations and inviscid flow

Chapters 3, 11, and19 of BSL

4. Velocity distribution with more thanone independent variable.

Chapter 4 of BSL

Grading System:HWAssignments 10%Mid Term 30%Project 20%Final Exam 40%

Objective: Continuum theory of momentum, energy and mass transfer.Viscous behavior of fluids. Molecular transport mechanisms. Generalproperty balance. Laminar and Turbulent flow. Convective transport.Momentum, heat and mass applications of transport phenomena.

Prerequisites: Graduate StandingOutcomes:

Understand the similarities between the different types of transportphenomenaApply knowledge of advanced mathematics, science, and engineeringprinciples in solving chemical engineering problems.Formulate transport phenomena problems and set boundary conditionsfor solving differential equations.Conduct independent research projects.Communicate effectively orally and in writing.Use Matlab and Mathematica to solve problems related to momentum,heat and mass transfer.

Textbook: Transport Phenomena, by Bird, Steward and Lightfoot, 2ndEdition, Wiley, 2007.

CHEBYSHEV ORTHOGONAL COLLOCATION TECHNIQUE 9

Page 10: chebychev

[8] K. D. Cole, Computer programs for temperature in fins and slab bodieswith the method of Green’s functions, Comput Appl Eng Educ 12(2004), 189–197.

[9] F. Del Cerro Velázquez, S. A. Gómez‐Lopera, and F. Alhama, Apowerful and versatile educational software to simulate transient heattransfer processes in simple fins, Comput Appl Eng Educ 16 (2008),72–82.

[10] T. C. Hung, S. K. Wang, S. W. Tai, and C. T. Hung, An innovativeimprovement of engineering learning system using computationalfluid dynamics concept, Comput Appl Eng Educ 13 (2005), 306–315.

[11] R. J. Ribando and G. W. O’Leary, Numerical methods in engineeringeducation: An example student project in convection heat transfer,Comput Appl Eng Educ 2 (1994), 165–174.

[12] R. J. Ribando and G. W. O’Leary, Teaching module for one‐dimensional, transient conduction, Comput Appl Eng Educ 6 (1998),41–51.

[13] R. J. Ribando, K. A. Coyne, and G. W. O’Leary, Teaching module forlaminar and turbulent forced convection on a flat plate, Comput ApplEng Educ 6 (1998), 115–125.

[14] A. J. Valocchi and C. J. Werth, Web‐based interactive simulation ofgroundwater pollutant fate and transport, Comput Appl Eng Educ 12(2004), 75–83.

[15] R. B. Bird, W. E. Stewart, and E. N. Lightfoot, Transport phenomena,2nd edition, New York, John Wiley & Sons, 2002.

[16] W. Guo, G. Labrosse, and R. Narayanan, The application ofthe Chebyshev‐Spectral method in transport phenomena (lecturenotes in applied and computational mechanics). Berlin, Springer;2012.

[17] P. Moin, Fundamentals of engineering numerical analysis. CambridgeUK, Cambridge University Press, 2001.

[18] L. N. Trefethen, Spectral methods in MATLAB. Philadelphia,SIAM, 2000.

[19] J. H. Arnold, Studies in diffusion: III. Unsteady‐state vaporizationand adsorption, Trans Am Inst Chem Eng 40 (1944), 361–378.

[20] W. M. Deen, Analysis of transport phenomena. New York, OxfordUniversity Press, 1998.

[21] V. M. Falkner and S. W. Skan, Some approximate solutions ofthe boundary layer equations. Aero Res Coun Rep Mem No. 1314(1930).

[22] H. Binous, Introducing non‐Newtonian fluid mechanics computationswith Mathematica in the undergraduate curriculum, Chem Eng Educ41 (2007), 59–64.

[23] J. O. Wilkes, Fluid mechanics for chemical engineers. Upper SaddleRiver, NJ, Prentice Hall, 1999.

[24] L. A. Glasgow, Transport phenomena: An introduction to advancedtopics. Hoboken, NJ, John Wiley & Sons, 2010.

[25] E. V. Martínez, http://www.mechens.org/wiki/index.php?title¼Transient_Plane_Couette_Flow, accessed March 2014.

BIOGRAPHIES

Dr. Housam Binous, a visiting associateprofessor at King Fahd University Petroleum& Minerals, has been a full time faculty memberat the National Institute of Applied Sciences andTechnology in Tunis for eleven years. He earneda Diplôme d’ingénieur in Biotechnology fromthe Ecole des Mines de Paris and a PhD inChemical Engineering from the University ofCalifornia at Davis. His research interests includethe applications of computers in chemical

engineering.

A. A. Shaikh is professor of chemical engineer-ing at King Fahd University of Petroleum &Minerals. He obtained his PhD from theUniversity of Notre Dame, USA, in 1984. Hismain research interests include dynamics ofreactive systems, catalytic fluidized‐bed reactors,and applied and computational mathematics.Prof. Shaikh is a senior member of the AmericanInstitute of Chemical Engineers, and member ofS c Scientific Research Society, among other

international and local professional societies.

Ahmed Bellagi is a professor of chemical andenergy engineering at the Ecole Nationaled’Ingénieurs de Monastir, University of Monas-tir, Tunisia since 1992. Prior to that, he has been aprofessor of chemical engineering at the EcoleNationale d’Ingénieurs de Gabès. He receivedhis PhD in 1979 from the Rheinisch‐WestfälischeTechnische Hochschule at Aachen – Germany.His research interests mainly focus on ProcessThermodynamics, Absorption Refrigeration and

Solar Cooling, Modeling and Simulation of Unit Operations and Processes.He has supervised 35 Master degree and 20 PhD theses. Professor Bellagihas written over 100 publications. Recently his pedagogical interests focuson the development of Demonstrations for chemical engineers using thesoftware Mathematica1 in collaboration with Dr. H. Binous and ProfessorB. G. Higgins. (http://demonstrations.wolfram.com/author.html?author¼HousamþBinous).

10 BINOUS, SHAIKH, AND BELLAGI