solving two-dimensional chemical engineering...
TRANSCRIPT
1
Solving Two-Dimensional Chemical Engineering Problems
using the Chebyshev Orthogonal Collocation Technique
Housam Binous*1, Slim Kaddeche2and Ahmed Bellagi3
1Department of Chemical Engineering,
King Fahd University of Petroleum & Minerals, Dhahran 31261, KSA
2 University of Carthage, National Institute of Applied Sciences and
Technology, Département Génie Physique et Instrumentation, Laboratoire
Matériaux, Mesures et Applications, LR-11-ES-25, 1080, Tunisia
3Département de Génie Energétique (Energy Engineering Department), Ecole
Nationale d’Ingénieurs de Monastir–ENIM, University of Monastir, Tunisia
*Corresponding author
Key words: Orthogonal Collocation, Chebyshev Polynomials, Momentum – Heat – Mass
Transfer, Numerical Methods, Graduate-level education, MATHEMATICA©.
Abstract
The present paper describes how to apply the Chebyshev orthogonal collocation technique to
solve steady-state and unsteady-steady two-dimensional problems. All problems are solved
using one single computer algebra, MATHEMATICA©. The problems include: (1) steady-state
heat transfer in a rectangular bar, (2) steady-state flow in a rectangular duct, (2) steady-state
heat transfer in a cooling cylindrical pin fin, (4) steady-state heat conduction in an annulus, (5)
unsteady-state heat transfer in a rectangular bar, and finally (6) unsteady-state diffusion
2
reaction system. Whenever possible the results obtained with orthogonal collocation are
compared to the analytical solution in order to validate the applied numerical technique.
Introduction
Many interesting problems in transport phenomena and generally engineering education are
governed by partial differential equations (PDE) such as the heat equation, the Laplace
equation and the wave equation. These equations are often solved analytically using separation
of variables in graduate-level courses. However, these courses frequently do not address the
more realistic nonlinear problems, which admit only numerical solutions. In addition, in many
cases, it is actually nowadays simpler and faster to find a numerical solution to a particular
problem. The objective of the present paper is to show how one can readily solve partial
differential equations for two-dimensional problems using the Chebyshev orthogonal
collocation technique in association with MATHEMATICA©. Although, the usage of computer
software such as MATHEMATICA©, MAPLE, MATLAB
®, POLYMATH, MATHCAD, JAVA, ASPEN-
HYSYS or EXCEL is common in chemical engineering pedagogical literature [1-12], only one
paper applies this technique[12]. And the paper (i.e., Ref. 12) is restricted to only one-
dimensional problems.
Several research papers using the orthogonal collocation technique can be found in the
literature [13-16]. Here, a special emphasis is given to the utilization of this technique in the
classroom in order to solve miscellaneous graduate-level problems. Also, we choose to
implement this numerical technique with MATHEMATICA©. However, one can easy apply the
same solution methodology with Matlab®. The present work is expected to achieve the goal
that the present treatment of two-dimensional problems will motivate more chemical
engineering students, faculties, and professionals to use this versatile orthogonal collocation
method.
3
The present paper is divided into three main parts:
1- Description of the application of the 2D Chebyshev orthogonal collocation technique
in solving steady-state and unsteady-state two dimensional problems,
2- Resolution of six chemical engineering problems related to momentum, heat, and
mass transfer, and
3- Conclusion giving our thought about this technique as a teaching tool in the chemical
engineering graduate-level curriculum.
Theoretical Consideration about 2D Chebyshev Orthogonal
Collocation
The spectral collocation method using Chebyshev orthogonal polynomial basis is known for
its efficiency in term of accuracy. This is despite the fact that a relatively small number of
collocation points, 𝑁, are used to solve many engineering problems. Indeed, the associated
error is of the order of 𝑂(1/𝑁𝑁), which is better than finite difference or finite element methods
[16-17]. The main difficulty in the transition from a one-dimensional case to a two-dimensional
case lies in building the derivative matrix. Let 𝐷𝑁 (N is the number of collocation points) be
the first order derivative matrix for a one-dimensional problems, the partial first order
derivative matrix relative to the first space variable is obtained by performing the Kronecker
product of 𝐼𝑁 and 𝐷𝑁 denotes by 𝐼𝑁 ⊗ 𝐷𝑁. On the other hand, the second space variable first
order derivative matrix is obtained by performing the Kronecker product of 𝐷𝑁 and 𝐼𝑁
denotes by 𝐷𝑁 ⊗ 𝐼𝑁. The same procedure is used to compute the p order derivative for 2D
problems by replacing 𝐷𝑁 by 𝐷𝑁𝑝
where 𝐷𝑁𝑝
is the one dimensional p order derivative for 1D
4
problem. For the mixed derivatives (of order p with respect to the first variable and q with
respect to the second variable), one has to form the following Kronecker product: 𝐷𝑁𝑝⊗ 𝐷𝑁
𝑞.
Explicitly, the first order derivative matrix 𝐷𝑁 writes [17-18]:
𝐷𝑁 = [𝑑𝑖𝑗]0 ≤ 𝑖, 𝑗 ≤ 𝑁
{
𝑑𝑘𝑗 =
𝑐𝑘(−1)𝑗+𝑘
𝑐𝑗(𝜉𝑘 − 𝜉𝑗) , for 𝑗 ≠ 𝑘
𝑑𝑘𝑘 = −−𝜉𝑘
2(1 − 𝜉𝑘2) , for 𝑘 ≠ 0 and 𝑘 ≠ 𝑁
𝑑00 =2𝑁2 + 1
6= −𝑑𝑁𝑁
where,
𝑐𝑘 = {2 𝑘 = 0 or 𝑁1 otherwise
and the p order derivative 𝐷𝑁𝑝
is equal to the product of 𝐷𝑁 𝑝 times .
𝐷𝑁𝑝 = 𝐷𝑁 × 𝐷𝑁 × … . .× 𝐷𝑁
The two dimensional spectral collocation method consists in finding the values of the unknown
function 𝜓 such that 𝜓(𝜉𝑖, 𝜂𝑗) = 𝜓𝑖𝑗 on Gauss-Lobatto-Chebychev points, namely: 𝜉𝑖 =
𝑐𝑜𝑠 (𝑖𝜋
𝑁) and 𝜂𝑗 = 𝑐𝑜𝑠 (
𝑗𝜋
𝑁) where 0 ≤ 𝑖, 𝑗 ≤ 𝑁 with 𝜉𝑖 and 𝜂𝑗 belonging to the mapped
numerical domain [−1,1]. If the physical space is a the rectangle [−𝐴𝑥, 𝐴𝑥] × [−𝐴𝑦, 𝐴𝑦], the
2D−Cartesian coordinates can be written as following:
{𝑥(𝜉) = 𝐴𝑥𝜉
𝑦(𝜂) = 𝐴𝑦𝜂
The unknown function 𝜓 is the interpolated into a polynomial basis:
𝑃𝑁𝑁𝜓(𝜉, 𝜂) =∑∑𝑎𝑖𝑗
𝑁
𝑗=0
𝑇𝑖(𝜉𝑖)𝑇𝑗(𝜂𝑗)
𝑁
𝑖=0
where 𝑇𝑖 and 𝑇𝑗 are the Chebyshev orthogonal polynomial of degree 𝑁. The derivatives of
𝑃𝑁𝑁𝜓(𝜉, 𝜂) with respect to 𝜉 and 𝜂 at the collection points write:
5
𝜕𝑃𝑁𝑁𝜓(𝜉, 𝜂)
𝜕𝜉= (
1
𝐴𝑥 𝐼𝑁 ⊗ 𝐷𝑁)𝑃𝑁𝑁𝜓(𝜉, 𝜂)
𝜕𝑃𝑁𝑁𝜓(𝜉, 𝜂)
𝜕𝜂= (
1
𝐴𝑦 𝐷𝑁 ⊗ 𝐼𝑁)𝑃𝑁𝑁𝜓(𝜉, 𝜂)
This method makes it possible the resolution of any partial differential equation by finding the
expansion coefficients, 𝑎𝑖𝑗, which allow us to find the values of the unknown function 𝜓 on
Gauss-Lobatto-Chebychev points 𝜉𝑖 and 𝜂𝑗 , namely: 𝜓𝑖𝑗 = 𝜓(𝜉𝑖, 𝜂𝑗).
For example, the 2D−Laplacian in the rectangle [−𝐴𝑥, 𝐴𝑥] × [−𝐴𝑦, 𝐴𝑦] is then:
∆= (1
𝐴𝑥2 𝐼𝑁 ⊗ 𝐷𝑁
2) + (1
𝐴𝑦2𝐷𝑁2 ⊗ 𝐼𝑁)
The above presentation makes it clear that the derivative matrix 𝐷𝑁 plays a key role in the
implementation of the spectral collocation technique. Its calculation, for any number of nodes
N using MATHEMATICA©, is straightforward as can be seen in the Appendix. Authors compare
for N =5 the matrices 𝐷5 and 𝐷52 with page 7 of Ref. [19]. To evaluate the partial derivative
matrices, the built-in functions IdentityMatrix and KroneckerProduct are used, for
instance and in the case of N =3 in both directions (𝑥 and 𝑦), the first order partial derivate
matrices relative to 𝑥, 𝔻𝑥 = 𝐼4 ⊗ 𝐷3 and to 𝑦, 𝔻𝑦 = 𝐷3 ⊗ 𝐼4 are evaluated by the instruction
sequences respectively,
KroneckerProduct[IdentityMatrix[4], dM[3]]
KroneckerProduct[dM[3],IdentityMatrix[4]]
and the second order partial derivate matrices relative to 𝑥, 𝔻𝑥2 = 𝐼4⊗𝐷3
2 and to 𝑦,
𝔻𝑦2 = 𝐷3
2 ⊗ 𝐼4 respectively by the instruction sequences
6
KroneckerProduct[IdentityMatrix[4], dM[3].dM[3]]
KroneckerProduct[dM[3].dM[3],IdentityMatrix[4]]
The results of these calculations can be compared with those given in page 79 of Ref. [19].
Chemical Engineering Case Studies
1- Heat Transfer in a Bar of Rectangular Cross Section
Let us consider a bar of rectangular cross section subject to both temperature and heat flux
boundary conditions (see Figure 1). The governing equation and boundary conditions in
dimensionless form are as follows:
𝜕2𝜃
𝜕𝑥2+𝜕2𝜃
𝜕𝑦2= 0
With 0 ≤ 𝑥 ≤ 𝐿 and 0 ≤ 𝑦 ≤ 𝑊
(𝜕𝜃
𝜕𝑥)𝑥=0
= −𝑞𝑤𝑎𝑙𝑙
𝑘 (Continuity of heat flux at 𝑥 = 0 boundary)
𝜃(𝑥 = 𝐿) = 0 (Constant temperature 𝑇0 at 𝑥 = 𝐿 boundary)
𝜃(𝑦 = 0) = 0 (Same constant temperature 𝑇0 at 𝑦 = 0 boundary)
𝜃(𝑦 = 𝑊) = 𝜃𝑏 (Different constant temperature 𝑇𝑏 at 𝑦 = 𝑊 boundary)
For this case study an analytical solution can be obtained using the separation of variables
technique (Ref. [20]):
7
𝜃 = ∑2
𝐿 𝜆𝑛[𝜃𝑏 sin(𝜆𝑛 𝐿) sinh(𝜆𝑛 𝑦)
sinh(𝜆𝑛 𝑊)
∞
𝑛=0
+𝑞𝑤𝑎𝑙𝑙𝑘
(1 −sinh(𝜆𝑛 𝑦) + sinh(𝜆𝑛 (𝑊 − 𝑦))
sinh(𝜆𝑛 𝑊))] cos(𝜆𝑛 𝑥)
with
𝜆𝑛 =(2 𝑛+1) 𝜋
2𝐿 for 𝑛 = 0, 1, 2, …
The Chebyshev orthogonal collocation method implemented in MATHEMATICA© with 𝑁𝑝 = 41
collocation points delivers the temperature distribution in the bar represented in Figure 2. The
solution steps are as follows. First, the spatial variables (i.e., 𝑥 and 𝑦) are discretized to
transform the partial differential equation (PDE) into a systems of 1681linear algebraic
equations where the unknowns are the values of 𝜃 at the nodes. This linear equations system is
then readily solved using the built-in command NSolve. Table 1 shows that the numerical
technique and the analytical solution agree almost perfectly. The summation in the analytical
solution is truncated up to 𝑛 = 200.
2- Fluid Flow through a Rectangular Duct
Consider the fluid flow through a rectangular duct (see Figure 3). The flow velocity in the
cross section obeys the following governing equation with the associated boundary
conditions:
𝜕2𝑣𝑧𝜕𝑥2
+𝜕2𝑣𝑧𝜕𝑦2
= (𝜕𝑃
𝜕𝑧) /𝜇
With 0 ≤ 𝑥 ≤ 𝐿 and 0 ≤ 𝑦 ≤ 𝑊
(𝜕𝑣𝑧
𝜕𝑥)𝑥=0
= 0 (Symmetry condition)
8
𝑣𝑧(𝑥 = 𝐿) = 0 (No slip condition)
(𝜕𝑣𝑧
𝜕𝑦)𝑦=0
= 0 (Symmetry condition)
𝑣𝑧(𝑦 = 𝑊) = 0 (No slip condition)
The separation of variables technique yields the following analytical solution (Ref. [20]):
𝑣𝑧 =2
𝜇(−𝜕𝑃
𝜕𝑧)∑
(−1)𝑛
𝐿 𝜆𝑛3 [1 −
cosh(𝜆𝑛 𝑦)
cosh (𝜆𝑛 𝑊)]
∞
𝑛=0
cos(𝜆𝑛 𝑥)
with
𝜆𝑛 =(𝑛+1/2) 𝜋
𝐿 for 𝑛 = 0, 1, 2, …
This 2D−problem is readily solved using Chebyshev orthogonal collocation with 𝑁𝑝 = 41
collocation points. The procedure is similar to that applied in case study 1: Discretization of
the spatial variables to transform the PDE into a system of 1681 linear algebraic equations
where the unknowns are now the values of 𝑣𝑧 at the nodes followed by its numerical solution
using the built-in MATHEMATICA© command NSolve. Figure 4 gives the velocity distribution
in the rectangular duct. The comparison between both solution techniques (Table 2) makes
clear that the numerical techniques and the analytical solution agree very well. Again, the
summation in the analytical solution is truncated up to 𝑛 = 200.
3- Cooling by a Cylindrical Pin Fin
Let us consider now a problem with a cylindrical geometry. In electronic systems, a fin is a
heat sink or a passive heat exchanger that cools a device by dissipating heat into the surrounding
medium (i.e., air). A cylindrical pin fin, used to maximize heat transfer to a fluid between two
walls, is depicted in Figure 5. The walls are at a high temperature 𝑇𝑤. The fluid flowing over
the pin has a free stream temperature 𝑇∞. The heat transfer coefficient between pin wall and
9
surrounding medium is labeled ℎ (W/(m2 K)). If one introduces the dimensionless
temperature, 𝜙 =𝑇−𝑇∞
𝑇𝑤−𝑇∞, the governing equation writes (see figure 6):
1
𝑟
𝜕
𝜕𝑟(𝑟
𝜕𝜙
𝜕𝑟) +
𝜕2𝜙
𝜕𝑧2= 0
0 ≤ 𝑟 ≤ 𝑟0 and 0 ≤ 𝑧 ≤ 𝐿
The associated boundary conditions are then as follows
(𝜕𝜙
𝜕𝑧)𝑧=0
= 0 (Axial symmetry condition)
(𝜕𝜙
𝜕𝑟)𝑟=0
= 0 (Radial symmetry condition)
(𝜕𝜙
𝜕𝑟+ℎ
𝑘𝜙)
𝑟=𝑟0= 0 (Continuity of heat flux at the boundary fin/surrounding air)
𝜙(𝑧 = 𝐿) = 𝜙𝑤 = 1 (Constant temperature at the wall)
𝑘 (W/(m K)) is the thermal conductivity of the cylindrical pin fin.
The analytical solution of the differential equation obtained using the separation of variables
technique (Ref. [20]) is given by:
𝜙 =∑2 Bi 𝐽0(𝜆𝑛 𝑟)cosh (𝜆𝑛 𝑧)
cosh(𝜆𝑛 𝐿) 𝐽0(𝜆𝑛𝑟0)[(𝜆𝑛𝑟0)2 + Bi2]
∞
𝑛=1
Where Bi is the Biot number
Bi =ℎ 𝑟0𝑘
And 𝜆𝑛 the zeros of the nonlinear function
𝑓(𝜆) = (𝜆 𝑟0)𝐽1(𝜆 𝑟0) − 𝐽0(𝜆 𝑟0) Bi
10
A plot of 𝑓(𝜆) vs. 𝜆 is shown in Figure 7. To find out all zeros of 𝑓(𝜆) the systematic graphical
approach developed by Wagon [21] is adopted (See Table 3 for the first 16 roots of this
equation).
The numerical solution of this 2-D problem obtained using our MATHEMATICA©
implementation of the Chebyshev orthogonal collocation with 𝑁𝑝 = 41 collocation points is
depicted in Figure 8. Again, the consecutive steps in the solution procedure are the same as in
both foregoing case studies. First, one discretizes the spatial variables 𝑧 and 𝑟 to transform the
partial differential equation (PDE) into a system of 1681 linear algebraic equations, where the
unknowns are the values of 𝜙 at the nodes. Then, this is followed by the resolution of the
algebraic system. The comparison of the numerical and analytical solutions for a particular
value of the axial position 𝑧 (Table 4) shows that the results are in almost perfect concordance.
Here, the summation in the analytical solution was truncated up to 𝑛 = 16 rather than 200 (i.e.,
the value of 𝑛 used in study cases 1 and 2). Two reasons motivated this choice: (1) in case
study 3, increasing of the value of 𝑛 beyond 14 did not have a substantial effect on the accuracy
of the obtained results, and (2) only in case studies 1 and 2, straightforward expressions are
available for the eigenvalues, 𝜆𝑛 (i.e., in case study 3, one has to solve a complicated
transcendental algebraic equation).
4- Steady-State Heat Conduction in an Annulus
All three problems treated above admit a straightforward analytical solution using separation
of variables. Let us consider a bit trickier problem: steady-state heat conduction in an annulus
with periodic boundary condition, which analytical solution may be more difficult to derive. In
such a case, a numerical solution will require much less effort.
11
The governing equation of the problem is given by:
1
𝑟
𝜕
𝜕𝑟(𝑟
𝜕𝑢
𝜕𝑟) +
1
𝑟2𝜕2𝑢
𝜕𝜃2= 0
2 ≤ 𝑟 ≤ 4 and −𝜋
2≤ 𝜃 ≤
𝜋
2
The boundary conditions (see Figure 9) are:
(𝜕𝑢
𝜕𝜃)𝜃=
𝜋
2
= 0 (Symmetry condition)
(𝜕𝑢
𝜕𝜃)𝜃=−
𝜋
2
= 0 (Symmetry condition)
𝑢(𝑟 = 2, 𝜃) = 0 (Temperature condition at the cylindrical inner wall)
𝑢(𝑟 = 4, 𝜃) = 4 sin (5 𝜃) (Periodic temperature condition at the circular outer wall)
The dimensionless temperature, 𝑢, can be found using either directly the MATHEMATICA© built-
in command NDSolve or the Chebyshev collocation technique. In the latter case and with
𝑁𝑝 = 31 collocation points in both spatial directions 𝑟 and 𝜃, the discretization yields a system
of 961 algebraic equations where the unknowns are the values of 𝑢𝑖,𝑗 at the nodes (1 ≤ 𝑖 ≤
𝑁𝑝, 1 ≤ 𝑗 ≤ 𝑁𝑝). This equation system is solved in a matter of few seconds using the command
NSolve. Figure 10 gives the contour plot of the obtained solution. As can be noted by
comparing the results of both numerical solution methods for 𝜃 = −0.92329 in Table 5, the
temperature distributions are almost identical. In the present case study and the ones thereafter,
only 𝑁𝑝 = 31 collocation points were taken. This leads to a reduction of the computational
time without affecting much the accuracy of the obtained results.
5- Transient Heat Conduction in a Bar of Rectangular Cross Section
12
For an infinitely long quadratic bar, the transient two-dimensional heat conduction is described
by the partial differential equation (PDE)
1
𝛼
𝜕𝑢
𝜕𝑡=𝜕2𝑢
𝜕𝑥2+𝜕2𝑢
𝜕𝑦2
𝑡 ≥ 0 and 0 ≤ 𝑥, 𝑦 ≤ 1.
Without loss of generality, one can take the thermal diffusivity, 𝛼, equal to 1 cm2/s. The
associated boundary conditions are set as follows: The dimensionless temperature, 𝑢, is equal
to 0 on all the edges of the quadratic domain:
𝑢(𝑥 = 0, 𝑦, 𝑡) = 0 and 𝑢(𝑥 = 1, 𝑦, 𝑡) = 0 for 𝑡 ≥ 0
𝑢(𝑥, 𝑦 = 0, 𝑡) = 0 and 𝑢(𝑥, 𝑦 = 1, 𝑡) = 0 for 𝑡 ≥ 0
The initial condition is given by
𝑢(𝑥, 𝑦, 0) = 1 for 0 ≤ 𝑥, 𝑦 ≤ 1.
It is then a transient cooling process of a solid bar. The dimensionless temperature distribution
in the solid can be found using either directly the MATHEMATICA© built-in command NDSolve
or the Chebyshev collocation technique. If we adopt the latter method with a number of
collocation points 𝑁𝑝 = 31 in both directions, the discretization of the spatial variables
transform the PDE into a systems of 441 linear and coupled first-order ordinary differential
equations (ODEs) where the unknowns are the time dependent values of 𝑢𝑖,𝑗(𝑡) at the nodes
(1 ≤ 𝑖 ≤ 𝑁𝑝, 1 ≤ 𝑗 ≤ 𝑁𝑝). This system of ODEs is then solved in a matter of few seconds
using the built-in MATHEMATICA© command NDSolve. As illustration of the results of this
numerical procedure a typical map of the obtained dimensionless isotherms (for 𝑡 = 0.1) is
depicted in Figure 11. Table 6 on the other hand compares the dimensionless temperature data
obtained for 𝑡 = 0.1 and at 𝑥 = 0.421782 by both numerical methods considered, NDSolve
and the Chebyshev collocation. As can be noted the two methods give almost same results.
6- Reaction-Diffusion System
13
In the last decades, developmental biologists have extensively used the reaction–diffusion
model to explain the pattern formation in living organisms. Turing proposed the original model
in 1952 [22]. The model is based on the idea that the pattern formation results from two
fundamental mechanisms: (1) coupled catalytic and autocatalytic reactions in a space element
between two species, an activator and an inhibitor, and (2) transfer of the interacting species to
and from the neighboring space elements through a diffusional transport mechanism. Under
appropriate reaction and diffusion conditions, a periodic pattern is formed from an initially
homogeneous spatial distribution of activator and inhibitor [23, 24].
Examples of pattern formation can be found in Biology, Chemistry (the famous Belousov–
Zhabotinskii reaction!), Physics and Mathematics [25, 26].
To illustrate the mechanism of pattern formation let us consider the following hypothetical
activator-inhibitor reaction set:
2𝐴 + 𝐶 → 3𝐴 (R1)
2𝐴 + 𝐷 → 2𝐴 + 𝐵 (R2)
𝐵 + 𝐶 ⇄ 𝐸 (R3)
𝐴 → 𝐹 (R4)
𝐵 → 𝐺 (R5)
The species 𝐷, 𝐸, 𝐹 and 𝐺 are supposed so abundant in the reaction mixture that their respective
concentrations [𝐷], [𝐸], [𝐹] and [𝐺] can be considered constant. The activator 𝐴 reacts with
species 𝐶 to produce more 𝐴 by the autocatalytic reaction R1– 𝐴 is reactant, catalyst and
product– but it also promotes the production of the inhibitor 𝐵 by the catalytic reaction R2– 𝐴
is here catalyst. Both activator and inhibitor decay with time (Reactions R4 and R5).
14
Because of the equilibrium reaction R3, the concentrations of 𝐵 and 𝐶 are such that: [𝐵] ∝
1/[𝐶]. Denoting by 𝑘𝑗 the reaction constant of reaction 𝑗 we have for the reaction rates of 𝐴
and 𝐵
𝑟𝐴 = 𝑘1[𝐴]2[𝐶] − 𝑘4[𝐴] = 𝑘1
′ [𝐴]2[𝐵]−1 − 𝑘4[𝐴]
𝑟𝐵 = 𝑘2[𝐴]2 − 𝑘5[𝐵]
As can be noted from the last expression of the reaction rate of 𝐴, 𝑟𝐴, the species 𝐵 inhibits the
activator production, hence its name: the larger its concentration the lower is the production
rate of 𝐴.
Introducing the variables 𝑢 ∝ [𝐴] and 𝑣 ∝ [𝐵] the governing equations of the reaction-
diffusion system in 2D can be written in the following non-dimensional form:
𝜕𝑢
𝜕𝑡= 𝒟𝐴 (
𝜕2𝑢
𝜕𝑥2+𝜕2𝑢
𝜕𝑦2) + 𝑢2 𝑣⁄ − 𝛽𝑢
𝜕𝑣
𝜕𝑡= 𝒟𝐵 (
𝜕2𝑣
𝜕𝑥2+𝜕2𝑣
𝜕𝑦2) + 𝑢2 − 𝑣
With 0 ≤ 𝑥, 𝑦 ≤ 1. In the present study we set 𝛽 = 1. For the formation of spatial patterns the
diffusion rates of activator and inhibitor should be very different: We set for the diffusion
coefficients respectively 𝒟𝐴 = 0.0005 cm2/s and 𝒟𝐵 = 0.01 cm2/s. For the numerical
solution of the ODEs system, we adopt further (1) periodic boundary conditions as well as (2)
the initial conditions:
𝑢(𝑥, 𝑦, 𝑡 = 0) = 𝜓𝑢𝑥𝑦,
𝑣(𝑥, 𝑦, 𝑡 = 0) = 0.1 + 𝜓𝑣𝑥𝑦,
Where 𝜓𝑢𝑥𝑦 and 𝜓𝑣𝑥𝑦 are numbers taken randomly in the interval [0, 1].
15
The Chebyshev orthogonal collocation method applied with 𝑁𝑝 = 31 nodes in both spatial
directions transforms the system of two coupled nonlinear PDEs into a system of 1922
nonlinear coupled first-order ordinary differential equations. This system of ODEs is solved in
a couple of seconds using the built-in MATHEMATICA© command NDSolve. Figures 12a and
12b show as illustration of the obtained results the 2D inhibitor concentration distribution
𝑣(𝑥, 𝑦) at two different times, 𝑡 = 0 and at 𝑡 = 100, respectively. It is interesting to note in
particular the emergence of Turing patterns, similar to the “leopard spots”, in the concentration
distribution at 𝑡 = 100.
Conclusion
We illustrated in this paper by several examples how one can use the Chebyshev orthogonal
collocation method for solving complex two-dimensional linear and nonlinear partial
differential equations from the field of chemical engineering education. Both steady-state and
unsteady-state problems were considered. This numerical technique is used in combination
with an appropriate computer algebra; in the present work we adopted the software
MATHEMATICA©.
This numerical technique is usually applied by students in order to work out long term-projects
in graduate-level courses such as Transport Phenomena, Reaction Engineering or Numerical
Methods. The authors do think that these term-project assignments are more profitable, if
students tackle problems that are more realistic and not limited to the few cases where
analytical solution exist using separation of variables or similarity transform. We hope that the
present paper will help the students and faculties focus more attention on this powerful
numerical technique.
Finally, the various MATHEMATICA© codes written for the considered six case studies in this
paper are available upon request from the corresponding author.
16
References
[1] R. Baur, J. Bailey, B. Brol, A. Tatusko and R. Taylor, “Maple and the art of
thermodynamics,” Computer Applications in Engineering Education, 6(4), 1998
pp.223-234.
[2] F. Cruz-Peragón, J. M. Palomar, E. Torres-Jimenez and R. Dorado, “Spreadsheet for
teaching reciprocating engine cycles,” Computer Applications in Engineering
Education, 20(4), 2012 pp.681-691.
[3] N. Brauner and M. Shacham, “Numerical experiments in fluid mechanics with a tank
and draining pipe,” Computer Applications in Engineering Education, 2(3), 1994
pp.175-183.
[4] H. Binous, E. Al-Mutairi and N. Faqir, “Study of the separation of simple binary and
ternary mixtures of aromatic compounds,” Computer Applications in Engineering
Education, 22(1), 2014 pp.87-98.
[5] H. Binous and M. A. Al-Harthi, “Simple batch distillation of a binary
mixture,” Computer Applications in Engineering Education, 22(4), 2014 pp.649-657.
[6] T. Castrellón, D. C. Botía, R. Gómez, G. Orozco and I. D. Gil, “Using process
simulators in the study, design, and control of distillation columns for undergraduate
chemical engineering courses,” Computer Applications in Engineering Education,
19(3), 2011 pp.621-630.
[7] J. F. Granjo, M. G. Rasteiro, L. M. Gando-Ferreira, F. P. Bernardo, M. G. Carvalho and
A. G. Ferreira, “A virtual platform to teach separation processes,” Computer
Applications in Engineering Education, 20(1), 2012 pp.175-186.
17
[8] S. X. Liu and M. Peng, “The simulation of the simple batch distillation of multiple-
component mixtures via Rayleigh's equation,” Computer Applications in Engineering
Education, 15(2), 2007 pp.198-204.
[9] L. M. Porto and R. H. Ogeda, “Java applets for chemical reaction
engineering,”Computer Applications in Engineering Education,6(2),1998 pp. 67–77.
[10] R. Rodrigues, R. P. Soares, and A. R. Secchi, “Teaching chemical reaction engineering
using EMSO simulator,” Computer Applications in Engineering Education, 18(4),2010
pp. 607–618.
[11] H. Binous and A. A. Shaikh, “Introduction of the arc-length continuation technique in
the chemical engineering graduate program at KFUPM,”Computer Applications in
Engineering Education, 23(3), 2015 pp. 344–351.
[12] H. Binous, A. A. Shaikh and A. Bellagi, “Chebyshev Orthogonal Collocation Technique
to Solve Transport Phenomena Problems With Matlab and Mathematica,” Computer
Applications in Engineering Education, 23(3), 2015 pp. 422–431.
[13] D. A. Benson, G. T. Huntington, T. P. Thorvaldsen and A. V. Rao, “Direct Trajectory
Optimization and Costate Estimation via an Orthogonal Collocation Method,” Journal
of Guidance, Control, and Dynamics, 29(6), 2006 pp. 1435-1440.
[14] C. R. Schneidesch and M. O. Deville, “Chebyshev collocation method and multi-domain
decomposition for Navier-Stokes equations in complex curved geometries,” Journal of
Computational Physics, 106(2), 1993 pp. 234–257.
[15] R. W. Serth, “Solution of a viscoelastic boundary layer equation by orthogonal
collocation,” Journal of Engineering Mathematics, 8(2), 1974 pp. 89-92.
[16] A. H.-D. Cheng, M. A. Golberg, E. J. Kansa and G. Zammito, “Exponential convergence
and H-c multiquadric collocation method for partial differential equations,” Numerical
Methods for Partial Differential Equations, 19(5), 2003 pp. 571–594.
18
[17] N. L. Trefethen, Spectral Methods in MATLAB, Philadelphia: SIAM, 2000.
[18] J. P. Boyd, Chebyshev and Fourier Spectral Methods: Second Edition, Mineola: Dover,
2001.
[19] W. Guo, G. Labrosse and R. Narayanan, The Application of the Chebyshev-Spectral
Method in Transport Phenomena, Berlin: Springer-Verlag, 2012
[20] T. D. Bennett, Transport by Advection and Diffusion, New York: Wiley, 2013.
[21] S. Wagon, Mathematica in Action: Problem Solving through Visualization and
Computation, Third Edition, Berlin: Springer–Verlag, 2010.
[22] A.M. Turing, The chemical basis of morphogenesis., Phils. Trans. R. Soc. B, 237(641),
1952 pp. 37–72.
[23] H. Meinhardt, The Algorythmic Beauty of Sea Shells. Berlin: Springer-Verlag, 1995.
[24] T. Miura and P. K. Maini, Periodic pattern formation in reaction–diffusion systems: An
introduction for numerical simulation, Anatomical Science International, 79(3), 2004
pp. 112–123.
[25] J.D. Murray, Mathematical Biology I: An introduction., Third Edition, New York:
Springer, 2001.
[26] J.D. Murray, Mathematical Biology I: Spatial Models and Biomedical Applications.,
Third Edition, New York: Springer, 2003.
20
Figure 2 – Case study 1: Temperature distribution 𝜃(𝑥, 𝑦) obtained using Chebyshev
orthogonal collocation
(𝐿 = 1, 𝑊 = 1, 𝑘 = 0.01, 𝑞𝑤𝑎𝑙𝑙 = 1, and 𝜃𝑏 = 20)
21
Figure 3 – Case study 2: Boundary conditions for the rectangular duct problem
(Only the domain [0, 𝐿] × [0,𝑊]is considered).
22
Figure 4 – Case study 2: Velocity distribution 𝑣𝑧(𝑥, 𝑦) obtained using Chebyshev orthogonal
collocation
(𝐿 = 1, 𝑊 = 1, and (𝜕𝑃
𝜕𝑧)
𝜇= −10)
24
Figure 6 – Case study 3: Boundary conditions for the cylindrical pin fin problem
(Only the domain [0, 𝐿] × [0, 𝑟0] is considered).
25
Figure 7 – Case study 3: Plot of 𝑓(𝜆) for 𝑟0 = 1 and Bi = 1
(Red dots, the loci of the first 16 zeros of 𝑓(𝜆))
26
Figure 8 – Case study 3: Temperature distribution 𝜙(𝑧, 𝑟) obtained using Chebyshev
orthogonal collocation
(For 𝐿 = 1, 𝑟0 = 1, and Bi = 1)
27
Figure 9 – Case study 4: Geometry and boundary conditions of the heat transfer in an annulus
problem
28
Figure 10 – Case study 4: Temperature distribution in the first quadrant
for the heat transfer in annulus problem
30
(a) 𝑡 = 0
(b) 𝑡 = 100
Figure 12 – Case study 6: Inhibitor concentration distribution 𝑣(𝑥, 𝑦, 𝑡) at two different
times.
31
𝒚 − position Chebyshev Analytical
0 -1.6156 10-9 0
0.00615583 0.75737 0.757661
0.0244717 3.00066 3.00096
0.0544967 6.5918 6.5921
0.0954915 11.1934 11.1937
0.146447 16.299 16.2993
0.206107 21.3945 21.3948
0.273005 26.0737 26.074
0.345492 30.0519 30.0522
0.421783 33.1408 33.1411
0.5 35.2237 35.224
0.578217 36.2405 36.2408
0.654508 36.1814 36.1817
0.726995 35.0925 35.0928
0.793893 33.0908 33.0911
0.853553 30.392 30.3923
0.904508 27.3389 27.3392
0.945503 24.3912 24.3915
0.975528 22.0123 22.0126
0.993844 20.5087 20.5097
1. 20. 20.0312
Table 1 – Case study 1: Numerical and analytical values of 𝜃(𝑥 = 0.119797 , 0 ≤ 𝑦 ≤ 𝑊)
for 𝐿 = 1, 𝑊 = 1, 𝑘 = 0.01, 𝑞𝑤𝑎𝑙𝑙 = 1, and 𝜃𝑏 = 20.
32
𝒚 − position Chebyshev Analytical
0 2.91088 2.91088
0.00615583 2.91079 2.91079
0.0244717 2.90941 2.90941
0.0544967 2.90357 2.90357
0.0954915 2.88841 2.88841
0.146447 2.8579 2.8579
0.206107 2.80553 2.80553
0.273005 2.72495 2.72495
0.345492 2.61066 2.61066
0.421783 2.45868 2.45868
0.5 2.26719 2.26719
0.578217 2.0372 2.0372
0.654508 1.77313 1.77313
0.726995 1.48319 1.48319
0.793893 1.17947 1.17947
0.853553 0.877396 0.877396
0.904508 0.594772 0.594772
0.945503 0.350128 0.350128
0.975528 0.160816 0.160816
0.993844 0.0410119 0.0410119
1. 0 0
Table 2 – Case study 2: Numerical and analytical values of 𝑣𝑧(𝑥 = 0.119797 , 0 ≤ 𝑦 ≤ 𝑊)
for 𝐿 = 1, 𝑊 = 1, and (𝜕𝑃
𝜕𝑧)
𝜇= −10.
33
𝒏 𝝀𝒏
1 1.25578
2 4.07948
3 7.1558
4 10.271
5 13.3984
6 16.5312
7 19.6667
8 22.804
9 25.9422
10 29.0812
11 32.2207
12 35.3606
13 38.5007
14 41.6411
15 44.7817
16 47.9223
Table 3 – Case study 3: The first 16 zeros of 𝑓(𝜆) for 𝑟0 = 1 and Bi = 1.
34
Radial position Chebyshev Analytical
0 0.632547 0.632547
0.00615583 0.632539 0.632539
0.0244717 0.632421 0.632421
0.0544967 0.63192 0.63192
0.0954915 0.630621 0.630621
0.146447 0.628013 0.628013
0.206107 0.623555 0.623555
0.273005 0.616743 0.616743
0.345492 0.607178 0.607178
0.421783 0.594632 0.594632
0.5 0.579107 0.579107
0.578217 0.560873 0.560873
0.654508 0.540486 0.540486
0.726995 0.518768 0.518768
0.793893 0.496748 0.496748
0.853553 0.475574 0.475574
0.904508 0.456401 0.456401
0.945503 0.440289 0.440289
0.975528 0.428122 0.428122
0.993844 0.420554 0.420554
1. 0.417987 0.417987
Table 4 – Case study 3: Numerical and analytical values of 𝜙(𝑧 = 0.119797 , 0 ≤ 𝑟 ≤ 𝑟0)
for 𝐿 = 1, 𝑟0 = 1, and Bi = 1.
35
Radial position Chebyshev NDSolve
2. 0 0
2.02185 0.0135411 0.0134794
2.08645 0.0531012 0.0531242
2.19098 0.117569 0.117529
2.33087 0.209848 0.20979
2.5 0.339275 0.339125
2.69098 0.520965 0.520787
2.89547 0.772515 0.772214
3.10453 1.10861 1.10829
3.30902 1.53406 1.53364
3.5 2.03661 2.03602
3.66913 2.58221 2.58157
3.80902 3.1157 3.11502
3.91355 3.56867 3.56793
3.97815 3.87382 3.87317
4. 3.98161 3.98085
Table 5 – Case study 4: Chebyshev and NDSolve values of 𝑢(2 ≤ 𝑟 ≤ 4, 𝜃 = −0.92329).
36
𝒚 − position Chebyshev NDSolve
0 0 0
0.00615583 0.00422514 0.00422414
0.0244717 0.016781 0.016777
0.0544967 0.037224 0.0372151
0.0954915 0.0645645 0.0645498
0.146447 0.0970036 0.0969833
0.206107 0.131769 0.131743
0.273005 0.165202 0.165168
0.345492 0.193177 0.193141
0.421783 0.211828 0.211786
0.5 0.218382 0.218343
0.578217 0.211828 0.211786
0.654508 0.193177 0.193141
0.726995 0.165202 0.165168
0.793893 0.131769 0.131743
0.853553 0.0970036 0.0969833
0.904508 0.0645645 0.0645498
0.945503 0.037224 0.0372151
0.975528 0.016781 0.016777
0.993844 0.00422514 0.00422414
1. 0 0
Table 6 – Case study 5: Chebyshev and NDSolve values of 𝑢
(𝑥 = 0.421782 , 0 ≤ 𝑦 ≤ 1, 𝑡 = 0.1).