0% found this document useful (0 votes)
11 views

Discretization of Unknown Functions - A New Method To Solve Partial Differential Equations With Mixed Boundary Conditions

sgfhgfjh

Uploaded by

Sgk Manikandan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Discretization of Unknown Functions - A New Method To Solve Partial Differential Equations With Mixed Boundary Conditions

sgfhgfjh

Uploaded by

Sgk Manikandan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Journal of Mathematical Chemistry 25 (1999) 321–344 321

Discretization of unknown functions: A new method


to solve partial differential equations with mixed
boundary conditions
A. Grassi a , G.M. Lombardo a and A. Raudino b
a
Dipartimento di Scienze Chimiche, Facoltà di Farmacia, Università di Catania, V. le A. Doria 6,
95125 Catania, Italy
b
Dipartimento di Scienze Chimiche, Facoltà di Scienze Mat. Fis. & Nat., Università di Catania,
V. le A. Doria 6, 95125 Catania, Italy

Received 21 September 1998; revised 13 May 1999

In this paper, we develop a new numerical technique to obtain an approximate solution of


partial differential equations subject to mixed boundary conditions (MBCs). The approach
has been applied to a class of differential equations which frequently arise in a large variety
of problems such as heat conduction, potential theory, and diffusion-controlled chemical
reactions. In our approach, based on the discretization of unknown functions (DF), the
solution is expressed as a series expansion and the determination of the series coefficients is
reduced to the solution of a system of algebraic equations. The main advantages of the DF
procedure are: (a) the smoothness of the function and of its first derivative in the different
domains, whereas the other numerical methods generally show a highly oscillating behavior;
(b) the fast convergence of the series expansion. This method has been applied to solve
diffusion problems in different coordinate systems (trigonometric, cylindrical and spherical).
The obtained results have been compared with the analytical solution (when available) as
well as with other numerical methods commonly used to solve MBCs problems.

0. Introduction

Mixed boundary conditions (MBC) frequently arise in various areas of chemistry,


physics and biology. A typical example of mixed boundary problem is the diffusion of
reactant through the intercellular solution and the subsequent reaction with a receptor
located at the cell membrane surface. Being the receptors located in restricted areas
of the membrane surface, the reactants are adsorbed inside these areas and reflected
outside, as schematically depicted in figure 1. Several studies devoted to this topic
have been performed by our [2–8,15] and other groups [1,12,21,28,30,31,36,37,39].
Potential theory is another area where mixed boundary problems frequently arise. One
of the simplest problems we can conceive in electrostatics is that of calculating the
electrostatic potential of a circular disk which is charged to a fixed potential. The
continuity condition and the constancy of the potential on the disk impose that the

 J.C. Baltzer AG, Science Publishers


322 A. Grassi et al. / Discretization of unknown functions

(a) (b)
Figure 1. Schematic representation of the mixed boundary conditions for the diffusion equation (equa-
tion (1) in the main text). (a) Three-dimensional case; (b) two-dimensional case.

derivative of the potential on the disk is proportional to the charge density. The
solution of the problem requires solving Laplace’s equation subject to MBCs. This
latter problem and many others taken from the potential theory have been widely treated
in the book of Sneddon [29]. Finally, heat conduction in a plate whose top surface
is both partially insulated and partially exposed to a fluid medium is another example
of a mixed boundary value problem [11,18]. These are just only a few examples; we
refer to the specialized literature for a full discussion of physical problems which lead
to MBCs [10,13,20,22,27].
A general mixed boundary problem can be written as follows. Let
L(f ) = ∇2 f − g(x)f = 0, ∀x ∈ R, (1)
be a generic second-order PDE (partial differential equation) defined into domain R,
where f = f (x) and x = (x1 , x2 , x3 ).
The mixed boundary conditions of equation (1) can be represented as
f (x1 , x2 , 0) = w1 (x1 , x2 , 0), ∀(x1 , x2 ) ∈ DA , (2a)
∇f (x1 , x2 , x3 )|x3 =0 = w2 (x1 , x2 , 0), ∀(x1 , x2 ) ∈ DB , (2b)
where D ≡ DA ∪ DB . Moreover, w1 (x) and w2 (x) are generic prescribed functions.
The general solution of equation (1) can be often expressed in terms of an infinite
series consisting of products of functions, which are solutions of equation (1), mul-
tiplied for undermined coefficients. If one applies the boundary conditions (2a) and
(2b), a pair of so-called dual-series equations is obtained from which the coefficients
can be calculated. Unfortunately, the analytical solution of the pair of dual series
equations is known in all but a few cases, depending on the analytical structure of
the wi (x) functions in equation (2). On the contrary, several approximate analytical,
as well as purely numerical techniques, are available to solve dual-series equations,
A. Grassi et al. / Discretization of unknown functions 323

for instance, finite difference methods [35], artificial interface techniques [17,38] or
weighted residual methods (MWR) [14,32–34,40].
Generally, purely numerical techniques show two disadvantages: (a) the solution
is not obtained in a closed form; (b) there is the need of small mesh sizes near the
discontinuity region at the DA , DB boundary, in order to achieve some degree of
accuracy. These circumstances produce a computational effort, especially in two- or
three-dimensional PDEs, as it will be discussed in the next section.
Among the approximate analytical methods we mention the artificial interface
method (AIM), first proposed by Wilson [38], where an artificial interface is introduced
at the boundary separating the DA and DB regions. The solutions found in both regions
are matched at the artificial interface in order to find the series coefficients. As pointed
out by Mills and Dudukovic [13], this method is often not satisfactory for problems
in cylindrical or spherical coordinates.
Some years ago, Mills and Dudukovic [13,22–26] in a interesting series of papers
have compared different approximate analytical techniques, based on the weighted
residual method, with the above mentioned AIM methods as well as with the exact
analytical solution (when available). In particular, they compared the solutions of
mixed boundary value problems for different series including trigonometric, Bessel’s
cylindrical and Legendre’s spherical functions. The MWR techniques, which embody
Galerkin, collocation points and least-square methods, show a satisfactory accuracy in
reproducing the MBCs in all the coordinates systems, and, in particular the least-square
method (LS) seems to be the most accurate among the MWR techniques.
In this paper we compare the MWR methods with another approach developed
by us and based on the discretization of two unknown functions (DF) which are the
solutions of the MBCs into the two DA and DB sub-domains. This method has some
resemblance with the AIM technique, but the procedure to obtain the series coefficients
is completely different.
In section 2 we develop the MWR and DF methods, and in section 3 we apply
these techniques to find the solution of a MBCs problem which arises from a simple
diffusion equation. This problem has been solved in trigonometric, cylindrical and
spherical coordinates in order to compare the efficiency of the DF method in different
coordinates.
Here we anticipate that the results obtained by the DF method are comparable
in all coordinate systems with those found by the MWR methods as well as with the
analytical solution (which, for the cases where it is known, in always expressed as a
slowly converging series). The main advantage of our DF method, when compared
with the others, is the smoothness of the derivative function throughout the entire
domain, where the other methods show an highly oscillating behavior (especially in
the DA domain), even by inserting a large number of terms in the series expansion.
Therefore, in section 4 we will demonstrate that the DF method well reproduces mixed
boundary conditions and that it is a useful and rapid approach when the analytical
solution is lacking.
324 A. Grassi et al. / Discretization of unknown functions

1. The convergence problem

Let us discuss in more detail the usefulness for a rapid converging series repre-
sentation of MBCs solution.
Consider, for instance, the problem of calculating the diffusion controlled chem-
ical kinetics onto a patterned surface consisting of an ordered array of reactive (re-
ceptors) and inert regions as discussed in the introduction. When the freely diffusing
chemical substance (treated either as a point-like particle or as a rigid body undergoing
rotational and translation Brownian motion) impinges at the receptor site is destroyed
(or chemical transformed), otherwise it is reflected. Let d be the dimension of the
diffusion equation and X1 , X2 , . . . , Xd the variables (including time), it is easy to
prove that for this MBCs problem the concentration C of the diffusing particles can
be always expressed by a converging series:
∞ X
X ∞ ∞
X
C(X1 , X2 , . . . , Xd ) = ··· Am1 ,m2 ,...,md−1 f (X1 , X2 , . . . , Xd ), (3)
m1 m2 md−1

where f (X1 , X2 , . . . , Xd ) is a solution of equation (1) and is a function of the d


coordinates. In all the available solution methods, the coefficients Am1 ,m2 ,...,md−1 are
obtained by solving a system of linear algebraic equations. For practical reasons only
a limited number N of coefficients are calculated because it can be easily shown that
the size of the matrix associated to the equation system grows with d as

n = N 2(d−1) (4)

with n the number of matrix elements. Let us estimate n for the diffusion problem
discussed above. Considering only the translational diffusion motion, limiting the
analysis to the steady state case (∂C/∂t = 0) and assuming a circular shape for the
adsorbing sites, it follows a two-dimensional diffusion equation in cylindrical coordi-
nates r and z. Hence, according to equation (4), the number of matrix elements n
grows as N 2 . For a fast converging series, N is of the order 10, hence n = 102 , but
for slowly converging series, N = 100 say, then n = 104 . In both cases, there are
no technical difficulties or exceedingly large computation times for routine computers.
But when one considers even the slightly more complex case of an irregularly shaped
(e.g., elliptical) adsorbing site, the associated diffusion equation becomes three dimen-
sional (r, z and φ). In that case, the number of matrix elements is 104 for N = 10,
but reaches the astonishing value of 108 matrix elements for N = 100. Finally, if we
want to explore also transient effects (∂C/∂t 6= 0) or investigate the reactant rotational
motion (described by a roto-translational diffusion equation with, at least, one angular
variable at the lowest approximation), the fast and slowly converging series require
the handling of matrices with 108 and 1016 elements, respectively!
It is obvious than even simple physical problems involving MBCs may becomes
computationally intractable unless one is able to get very fast converging series.
A. Grassi et al. / Discretization of unknown functions 325

2. DF (discretization functions) and MWR (method of weighted residuals


methods)

Let
X
an µ1n ψ(x) = f1 (x), ∀x ∈ [a, b] ≡ DA , (5a)
n
X
an µ2n ψ(x) = f2 (x), ∀x ∈ [b, c] ≡ DB , (5b)
n

be a pair of dual-series equations, with D ≡ DA ∪ DB . In this case ψ(x) represents


a complete set of orthogonal functions in D. The two series µ1n and µ2n and the two
function f1 (x) and f2 (x) in general may be entirely different in form. The general
problem is to find the an coefficients which satisfy conditions (5a) and (5b) over DA
and DB domains, respectively.

2.1. MWR methods

Let
X
ε(x) = an µn ψn (x) − f (x) (6)
n

be the boundary residual. ε(x) will be equal to zero for the set of an coefficients
found from the exact solution. The error can be forced to zero in the average sense
by setting the weighted integrals of the residual equal to zero, i.e.,
Z Z
hε|wi i = 0 = dx ε(x)wi (x) + dx ε(x)wi (x). (7)
DA DB

This task can be accomplished for by one of the following techniques.

Galerkin. In the Galerkin method, the residual of equation (6) is orthogonalized with
respect to the function ψm (x), i.e.,
X  Z Z 
an µ1n dx ψn (x)ψm (x) + µ2n dx ψn (x)ψm (x)
n DA DB
Z Z 
− dx f1 (x)ψm (x) + dx f2 (x)ψm (x) = 0, m = 1, . . . , N. (8)
DA DB

Setting
Z Z
Bn,m ≡ µ1n dx ψn (x)ψm (x) + µ2n dx ψn (x)ψm (x) (9)
DA DB

and
Z Z
Fm ≡ dx f1 (x)ψm (x) + dx f2 (x)ψm (x), (10)
DA DB
326 A. Grassi et al. / Discretization of unknown functions

one obtains a system of linear equations:


X
Bn,m an = Fm . (11)
n
The unknown coefficients an are obtained by solving equation (11), once the inte-
grals (9) and (10) have been calculated.
Least-square. In the least-square method, the inner product of the residual,
Z X 2
hε|εi = an µn ψn (x) − f (x) dx
D n
Z X 2
= an µ1n ψn (x) − f1 (x) dx
DA n
Z X 2
+ an µ2n ψn (x) − f2 (x) dx, (12)
DB n
is minimized with respect to the unknown coefficients an , i.e.,
∂hε|εi
= 0. (13)
∂an
By applying equation (13) to equation (12) one obtains
X Z X Z
an µ1n µ1m dx ψn (x)ψm (x) + an µ2n µ2m dx ψn (x)ψm (x)
n D1 n D2
Z Z
= µ1m dx f1 (x)ψm (x) + µ21m dx f2 (x)ψm (x). (14)
DA DB

Setting
Z Z
Bm,n ≡ µ1n µ1m dx ψn (x)ψm (x) + µ2n µ2m dx ψn (x)ψm (x), (15)
DA DB
Z Z
Fm ≡ µ1m dx f1 (x)ψm (x) + µ2m dx f2 (x)ψm (x) (16)
DA DB

as for equation (11), one gets a system of linear equations for the unknown coeffi-
cients an .
Collocation method. In this method, the residual is forced to zero at N arbitrary
points inside the domain D and the an coefficients are obtained by solving of the
resulting system of linear equations. Then
X
an µ1n ψn (xi ) − f1 (xi ) = 0, i = 1, . . . , N1 , x ∈ DA , (17a)
n
X
an µ2n ψn (xi ) − f2 (xi ) = 0, i = 1, . . . , N2 , x ∈ DB , (17b)
n
A. Grassi et al. / Discretization of unknown functions 327

with N = N1 + N2 . Solving system (17a)–(17b), one obtains the an coefficients.


The points can be chosen in an equidistant way, i.e., by dividing the domain D
into N identical intervals:
i−1
xi = , (18a)
N −1
or in an orthogonal way, where the xi points are calculated by the formula

2i − 1
xi = . (18b)
2N − 1

2.2. DF method

Here we proposed a different technique based on the discretization of unknown


functions in the intervals DA and DB . The starting point is the pair of dual-series
equations (5a) and (5b), for which we have

X
N 
f1(x) ∀x ∈ DA ,
an µ1n ψn (x) = (19a)
n=1
U2 (x) ∀x ∈ DB ,

X
N 
U1 (x) ∀x ∈ DA ,
an µ2n ψn (x) = (19b)
n=1
f2(x) ∀x ∈ DB ,

where U1 (x) and U2 (x) are unknown functions to be determined.


Now, if we discretize the unknown functions U1 (x) and U2 (x), by dividing the
DA domain into M intervals and the DB domain into (N − M ) intervals, we can
approximate

U1 (x) ∼
= pi , ∀x ∈ (xi−1 , xi ) ≡ dA
i , i = 1, . . . , M , (20a)

U2 (x) ∼
= pi , ∀x ∈ (xi−1 , xi ) ≡ dB
i , i = M + 1, . . . , N , (20b)

where the total number of pi is N , so that we may rewrite

1 ∪ d2 ∪ · · · ∪ dM ,
DA = dA M +1 ∪ dM +2 ∪ · · · ∪ dN .
A A
DB = dB B B

Taking into account equations (20a) and (20b), equations (19a) and (19b) become
X 
f1 (x) ∀x ∈ DA ,
an µ1n ψn (x) = (21a)
n
pi ∀x ∈ dBi , i = M + 1, . . . , N ,

X 
pi ∀x ∈ dA
i , i = 1, . . . , M ,
an µ2n ψn (x) = (21b)
n f2 (x) ∀x ∈ DB .
328 A. Grassi et al. / Discretization of unknown functions

According to equation (21a), the an coefficients can be expressed as


(Z Z )
1 X
N
an = dx f1 (x)ψn (x) + pi dx ψn (x) , (22)
µ1n Qn DA dB
i=M +1 i
R
where Qn is the normalization factor, i.e., Qn = D dx ψn2 (x).
Analogously, from equation (21b), the an coefficients are calculated as
(Z Z )
1 XM
an = dx f2 (x)ψn (x) + pi dx ψn (x) . (23)
µ2n DB dA
i i=1
Finally, by equating (19) to (20), we obtain a system of linear equations, where
the N unknown are the values of pi , i.e.,
X
N X
M
B A
pi Wi,n + pi Wi,n = RnB + RnA , (24)
i=M +1 i=1

where
Z
B 1
Wi,n = dx ψn (x), (25a)
µ1n dB
Zi
1
A
Wi,n =− dx ψn (x), (25b)
µ2n dA
Z i
1
RnA = − dx f1 (x)ψn (x), (25c)
µ1n DA
Z
B 1
Rn = dx f2 (x)ψn (x). (25d)
µ2n DB
By solving system (24), the calculated pi values are inserted back into equation (22)
(or equation (23)) to find the unknowns an .
From equations (21a) and (21b), it is clear that the numerical values of the
unknown coefficients an depend on the M/N ratio. In all cases we have tested, the
best M/N ratio has been found to be 1/3, even if the W matrix (equations (25a) and
(25b)) obtained from this ratio is less determined, i.e., it is close to a singular matrix.
This problem does not appear when the ratio M/N is 1/2. In the following, we will
name DF1 the solution with the ratio M/N equal to 1/3 and DF2 the solution with
M/N = 1/2.

3. Results

3.1. Steady diffusion over an infinite plate

We have applied the DF method to a problem concerning the two-dimensional


diffusion equation, which has been carefully studied by Mills and Dudukovic some
A. Grassi et al. / Discretization of unknown functions 329

years ago [23]. The problem consists in calculating the function that satisfies the
Laplace equation:
 2 
∇x + ∇2y u(x, y) = 0, ∀x ∈ (0, π), ∀y > 0, (26)
with the conditions
u(π, y) = P0 , (27a)
∂u(x, y)
= 0, (27b)
∂x x=0
u(x, 0) = 0, 0 < x < c (Dirichelet condition), (27c)
∂u(x, y)
= 0, c<x<π (Neumann condition), (27d)
∂y y=0
u = P0 as y → ∞. (27e)
The general solution of equation (26), satisfying conditions (27a), (27b) and (27c) can
be written as
X    
u(x, y) = P0 + an cos (n − 1/2)x exp −(n − 1/2)y . (28)
n

Applying the Dirichelet and Neumann conditions, one obtains


X  
an cos (n − 1/2)x + P0 = 0, 0 < x < c, (29a)
n
X  
an (n − 1/2) cos (n − 1/2)x = 0, c < x < π. (29b)
n

We solved this pair of dual-series equations (Dini series) by using the analytical
solution, our DF1 and DF2 methods, and the MWR methods (embodying the least-
square (LS), the Galerkin and the equidistant collocation points (ECP)). In all the
calculations, we have set P0 = 1 and c = π/2.
In figure 2(a), the Neumann condition, equation (29b), is plotted over the entire
domain D ≡ DA ∪ DB , with the coefficients an obtained by the analytical, DF1
and LS methods, taking into account a limited number of coefficients (N = 20). As
shown in the figure, the Neumann condition is well reproduced both by DF1 and LS
techniques, contrary to the analytical solution which shows a very oscillating behavior
for small N . This trend is confirmed by the QSD (quadratic standard deviation, σ 2 )
of the derivative into the domain DB (π/2 < x < π), reported in column 6 of table 1.
The highest QSD values for the analytical solution indicates a more oscillating behavior
in comparison with the DF1 and LS solutions. But the main feature is the smoothness
behavior of the DF1 solution in the first domain DA (0 < x < π/2). Contrary
to the LS and analytical solutions (the first one being much more oscillating), the
DF1 solution evidences a much reduced Gibbs effect. As shown in figure 2(b), for
high values of N (= 200), the analytical and DF1 solutions become almost identical
330 A. Grassi et al. / Discretization of unknown functions

(a)

(b)

Figure 2. (a) Dini series: plot of (∂F (x, y)/∂y)|y=0 over the entire domain D ≡ DA ∪DB (0 < x < 180)
for N = 20 terms of the series. Dotted line: analytical solution, continuous line: DF1 solution, dashed
line: least-square solution. (b) The same as in (a), but for N = 60 terms of the series.

in the DA domain, whereas, on increasing the terms of the series, the oscillations
of the LS solution increase. In figures 3 and 4 the analytical, the various MWR
and the DF1 solutions of equations (29a) and (29b) are compared for N = 20 and
N = 60, respectively. As appears from the figures, the DF1 solution is very smooth
in both cases. Exception for the LS technique, which well reproduces the Neumann
condition as the DF1 one, the other methods give much more oscillating solutions
than those obtained by the DF1 technique. Columns 1–4 of table 1 report the averaged
value of equation (29a), f¯, and the corresponding QSD for N = 20 and N = 60.
Analogously, columns 5–8 report the averaged value of equation (29b), f¯0 , together
with the corresponding QSD. As far as f¯ is concerned, the highest value corresponds
A. Grassi et al. / Discretization of unknown functions 331

Table 1
Averaged values and quadratic standard deviation of the function into domain DA (columns 1 and 2)
and of its first derivative into domain DB (columns 3 and 4). The function and its derivative have been
calculated at y = 0 accounting for 20 and 60 terms in the trigonometric series, respectively.
N = 20 N = 60 N = 20 N = 60
hF (x, 0)iDA σ2 hF (x, 0)iDA σ2 h ∂F∂y
(x,y)
|y=0 iDB σ2 h ∂F∂y
(x,y)
|y=0 iDB σ2
≡ f¯ ≡ f¯ ≡ f¯0 ≡ f¯0
Analyt. 0.00075 0.00008 0.00014 0.00001 0.04227 0.05220 0.02482 0.05338
DF1 0.00870 0.00096 0.00175 0.00012 0.01182 0.00564 0.00687 0.00584
DF2 0.00230 0.00025 0.00046 0.00003 0.01961 0.01974 0.01143 0.02183
LS 0.00190 0.00147 0.00035 0.00029 0.00271 0.00044 0.00055 0.00006
Galer. 0.00560 0.00077 0.00148 0.00014 0.00641 0.00412 0.00145 0.00130
OCP −0.00074 0.00012 −0.00013 0.00001 0.04308 0.05807 0.02530 0.06726
ECP 0.00130 0.00026 0.00025 0.00003 0.01130 0.02215 0.00640 0.02616

to the DF1 solution indicating that, in spite of the smoothness of the solution, this
procedure does not well reproduce the Dirichelet condition near the discontinuity point.
This trend can be extracted also from figures 3(a) and 4(a), where the function F (x, 0),
calculated by the DF1 procedure, increases starting from 75 (N = 20) or 80 (N = 60)
degrees, at variance of the other methods, where the increase begins near 80 (N = 20)
or 85 (N = 60) degrees. The best f¯ is obtained from the analytical, DF2 and OCP
solutions, which also determine the best QSD. Similarly, the DF1 method does not well
reproduce the Neumann condition near the discontinuity point. Indeed, the calculated
values of f¯0 indicate that LS and Galerkin solutions are the best approximations, even
if the QSDs of the DF1 method suggest the smoothness behavior in comparison with
the other methods. Finally, the coefficients an calculated by the various techniques
for N = 60 are plotted in figure 5 as a function of n. It is worth noting the faster
convergence of the series calculated by the DF1 procedure with respect to all the other
analytical and numerical techniques.

3.2. Steady diffusion in cylindrical coordinates

The second problem we have studied is the two-dimensional steady-state


diffusion equation in cylindrical coordinates. In this case, the Laplace equation
[∇2r + ∇2z ]u(r, z) = 0 is subject to the following conditions:

u(r, ∞) = P0 , (30a)
u(R0 , z) = 0, (30b)
u(r, 0) = 0, 0 < r < a (Dirichelet condition), (30c)
∂u(r, z)
= 0, 0 < r < R0 (Neumann condition). (30d)
∂z z=0

In the calculations we have set a = 1, P0 = 1 and R0 = 2.


332 A. Grassi et al. / Discretization of unknown functions

(a)

(b)
Figure 3. Dini series: (a) Plot of the Dirichelet condition, F (x, 0), over the domain DA (0 < x < 90)
for N = 20 terms of the series. (b) Plot of the Neumann condition, (∂F (x, y)/∂y)|y=0 , in the domain
DB (90 < x < 180) for N = 20 terms of the series. In each frame, the continuous line represent the
DF1 solution, while the dashed lines describe the solutions calculated by other methods, as indicated in
the figure.
A. Grassi et al. / Discretization of unknown functions 333

(a)

(b)

Figure 4. (a) The same as in figure 3(a), but for N = 60 terms of series. (b) The same as in figure 3(b),
but for N = 60 terms of series.
334 A. Grassi et al. / Discretization of unknown functions

Figure 5. Dini series: plot of the coefficients an for N = 60 terms of the series. In each frame,
the continuous lines represent the DF1 solution, the dashed lines are the solutions calculated by other
methods, as indicated in the figure.

The general solution satisfying equations (30a) and (30b) can be written as
X
u(r, z) = P0 + an J0 (λn r) exp(−λn z), (31)
n

where J0 (λn r) is a Bessel function of zero order. Because of the condition (30b), λn
are the zeros of J0 (λn R0 ) = 0.
Applying the Dirichelet and Neumann conditions, we obtain the pair of dual-
series equations:
X
u(r, 0) = P0 + an J0 (λn r) = 0, 0 < r < a, (32a)
n
∂u(r, z) X
=− an λn J0 (λn r) = 0, a < r < R0 . (32b)
∂z z=0 n

The analytical solution of equations (32a) and (32b) can be found in the book of
Sneddon [29]. As for the previous problem, in figure 6 we plot the derivative, equa-
tion (32b), over the entire domain D, with the coefficients an calculated by analytical,
DF1 and LS methods, for N = 20. The Neumann condition, equation (30d), is well
reproduced both by DF1 and LS techniques, while the analytical solution is much more
A. Grassi et al. / Discretization of unknown functions 335

Figure 6. Bessel series: plot of (∂F (x, z)/∂z)|z=0 over the entire domain D ≡ DA ∪ DB (0 < r < 2)
for N = 20 terms of the series. Continuous line: analytical solution, dashed line: DF1 solution, dotted
line: least-square solution.

Table 2
As table 1, but for Bessel’s series.
N = 20 N = 60 N = 20 N = 60
hF (x, 0)iDA σ2 hF (x, 0)iDA σ2 h ∂F∂y
(x,y)
|y=0 iDB σ2 h ∂F∂y
(x,y)
|y=0iDB σ2
≡ f¯ ≡ f¯ ≡ f¯0 ≡ f¯0
Analyt. −0.00052 0.00003 −0.00002 2.559E−6 −0.28760 −1.00300 −0.20710 −1.19700
DF1 0.01108 0.00158 0.00399 0.00020 −0.02512 −0.02720 −0.01406 −0.02693
DF2 0.00282 0.00042 0.00037 0.00005 −0.04151 −0.09065 −0.02352 −0.09806
LS 0.00376 0.00325 0.00017 0.00061 −0.00185 −0.00050 0.00031 0.00043
Galer. 0.01419 0.00526 −0.00016 0.00038 0.02189 −0.03704 0.00226 −0.03129

oscillating, as confirmed also by the standard deviation values reported in column 6 of


table 2. Similarly to the Dini series previously described, the figures show very smooth
DF1 solutions in the first domain DA (0 < r < 1), contrary to the LS and analytical
solutions. It could be shown (we have omitted the figure for saving space) that also
in this case, the analytical and DF1 solutions coincide inside the DA domain for high
N (=200). On the contrary, on increasing the terms of the series, the oscillations of the
LS solution increase. In figures 7 and 8, the analytical and MWR solutions of equa-
tions (32a) and (32b) are compared with the DF1 solution for N = 20 and N = 60,
respectively. The curves relative to the collocation methods, OCP and ECP, are not re-
ported because their solutions diverge. It is important to recall that the LS and Galerkin
Rb
methods require the calculation of integrals like a ρ dρ J0 (λn ρ)J0 (λm ρ), which are
not analytical. We have used a numerical procedure, the Romberg’s method [9,19].
Generally, the accuracy of the numerical integration techniques depends on the struc-
ture of the integrand function. In this case, the Bessel functions Jn (x) become rapidly
oscillating on increasing the index n or, for fixed n, on increasing x. Then, on raising
the number of terms of the series, equation (31), the numerical value of the integrals
336 A. Grassi et al. / Discretization of unknown functions

(a)

(b)
Figure 7. Bessel series: (a) Plot of the Dirichelet condition, F (r, 0), over the domain DA (0 < r < 1)
for N = 20 terms of the series. (b) Plot of the Neumann condition, (∂F (x, z)/∂z)|z=0 , over the domain
DB (1 < r < 2) for N = 20 terms of the series. In each frame, the continuous lines are the DF1
solution, while the dashed lines are the solutions calculated by other methods, as indicated in the figure.
A. Grassi et al. / Discretization of unknown functions 337

(a)

(b)
Figure 8. (a) The same as in figure 7(a), but for N = 60 terms of series. (b) The same as in figure 7(b),
but for N = 60 terms of series.
338 A. Grassi et al. / Discretization of unknown functions

Figure 9. Bessel series: plot of the coefficients an for N = 60 terms of the series. In each frame, the
continuous line represents the DF1 solution, while the dashed lines are the solutions calculated by other
methods, as indicated in the figure.

becomes less accurate. It should be possible to improve the accuracy, but this re-
quires a large computational time. As appears from figures 7 and 8, the DF1 solution
for both f and f 0 is very smooth, but on raising the terms of the series, the solu-
tion for the Dirichelet condition remains positive over the entire domain DA . The
situation is not improved by inserting many terms of the series, because the LS and
the Galerkin methods do not satisfy the Dirichelet condition, probably because of the
poor accuracy in the calculation of the integrals. Table 2 reports the mean values and
the corresponding QSD. In this case, the DF1 method is not able to contemporary
reproduce the Dirichelet and Neumann conditions near the discontinuity. For small
terms of the series, the DF2 method better approximates the analytical result for the
Dirichelet condition, while the Neumann condition is better approximated by the LS
technique. A comparison of the coefficients an obtained by the various methods is
reported in figure 9 for N = 60. The plot of the coefficients as a function of n
evidences also in this case a faster convergence for the series calculated by the DF1
technique.

3.3. Steady diffusion in spherical coordinates

Finally, the third problem we have studied is the two-dimensional steady-state


diffusion equation in spherical coordinates. In this case, the Laplace equation [∇2ρ +
∇2θ ]u(ρ, θ) = 0 is subject to the conditions
u(∞, θ) = C0 , (33)
u(R0 , θ) = 0, 0 < θ < c (Dirichelet condition), (34a)
∂u(ρ, θ)
, c<θ<π (Neumann condition). (34b)
∂ρ ρ=R0

In the calculations we have set c = π/2, C0 = 1 and R0 = 1.


A. Grassi et al. / Discretization of unknown functions 339

Figure 10. Legendre series: plot of (∂F (x, y)/∂y)|y=0 over the entire domain D ≡ DA ∪ DB (0 < x <
180) for N = 20 terms of the series. Continuous thin line: ECP solution, continuous thick line: the DF1
solution, dotted line: least-square solution.

The general solution of the diffusion equation satisfying condition (33) is


X an
u(ρ, θ) = C0 + Pn (cos θ), (35)
n
ρn+1

where Pn (cos θ) are Legendre polynomials.


Applying the Dirichelet and Neumann conditions, we obtain the pair of dual-
series equations:
X
u(ρ, θ) = C0 + an Pn (cos θ) = 0, 0 < θ < c, (36a)
n
∂u(ρ, θ) X
=− an (n + 1)Pn (cos θ) = 0, c < θ < π. (36b)
∂ρ ρ=R0 n

The analytical solution of the pair of equations (36a) and (36b) is unknown. Therefore,
we have solved equations (36) by the DF1, DF2, LS, Galerkin and collocation point
methods. As for the previous cases, in figure 10 we plot equation (36b) over the entire
domain D = DA ∪ DB , with the coefficient an obtained by the DF1, LS and ECP
methods for N = 20. The smoothness of the function into the first domain (0 < θ <
π/2) calculated by the DF1 approximation, is noticeable even in spherical coordinates,
indicating that this feature is intrinsic of the DF1 technique and independent of the
type of coordinates employed in the calculations. Figures 11 and 12, which report
the Dirichelet and Neumann conditions calculated with N = 20 and N = 60, show
that the Dirichelet condition is well reproduced by DF1, DF2 and ECP techniques, the
solutions corresponding to the DF1 method being less oscillating. Also in this case,
the Neumann condition is better reproduced by the LS method, even if the DF1 and
340 A. Grassi et al. / Discretization of unknown functions

(a)

(b)
Figure 11. Legendre series: (a) Plot of the Dirichelet condition, F (x, 0), over the domain DA (0 < x <
90) for N = 20 terms of the series. (b) Plot of the Neumann condition, (∂F (x, y)/∂y)|y=0, over the
domain DB (90 < x < 180) for N = 20 terms of the series. In each frame, the continuous line is the DF1
solution, while the dashed lines are the solutions calculated by other methods, as indicated in the figure.
A. Grassi et al. / Discretization of unknown functions 341

(a)

(b)
Figure 12. (a) The same as in figure 11(a), but for N = 60 terms of series. (b) The same as in
figure 11(b), but for N = 60 terms of series.
342 A. Grassi et al. / Discretization of unknown functions

Table 3
As table 1, but for Legendre’s series.
N = 20 N = 60 N = 20 N = 60
hF (x, 0)iDA σ2 hF (x, 0)iDA σ2 h ∂F∂y
(x,y)
|y=0iDB σ2 h ∂F∂y
(x,y)
|y=0 iDB σ2
≡ f¯ ≡ f¯ ≡ f¯0 ≡ f¯0
DF1 0.01002 0.00137 −0.00018 0.00012 0.0188 0.01584 0.01117 0.01575
DF2 0.00293 0.00038 0.00059 0.00005 0.02751 0.04471 0.01550 0.04256
LS 0.00374 0.00265 0.00064 0.00051 0.00374 0.00107 0.00064 0.00013
Galer. 0.00754 0.00146 0.00198 0.00024 0.00754 0.00644 0.00198 0.00263
OCP −0.00093 0.00014 −0.00017 0.00002 0.06201 0.1256 0.03462 0.12840
ECP 0.00172 0.00039 0.00032 0.00004 0.01637 0.05353 0.00878 0.05195

Figure 13. Legendre series: plot of the coefficients an for N = 60 terms of the series. In each frame, the
continuous line is the DF1 solution, while the dashed lines are the solutions calculated by other methods,
as indicated in the figure.

Galerkin solutions have a comparable accuracy. The mean values of the function f ,
reported in table 3, indicate that for small N , the collocation point, the DF1 and
ECP methods (this latter only for high N ) give the best results both for f¯ and its
QSD, while the LS and Galerkin methods give the best results both for f¯0 and the
corresponding QSD. Unfortunately, also in spherical coordinates the DF1 procedure is
not able to contemporary reproduce the two conditions near the discontinuity. Finally,
a comparison of the series coefficients an obtained by the various methods, for N = 60,
A. Grassi et al. / Discretization of unknown functions 343

is reported in figure 13. The plot of an as a function of n evidences also in this case
a faster convergence for the series calculated by the DF1 technique.

4. Conclusions

In this paper, we have developed a new numerical method to solve the general
problem of MBCs. This approach, based on the discretization of unknown functions
(DF), has been applied to MBCs problems expressed in different coordinate systems
(trigonometric, cylindrical and spherical) and has been compared with existing numer-
ical methods as well as with the analytical solution (when available). The new method
reveals to be the most efficient one in solving MBCs problems in all coordinate sys-
tems. In fact, our procedure can be applied to problems involving series of Bessel’s
function, as the well-known LS and Galerkin methods, where the collocation points
technique fails. The DF technique gives a good approximation of the exact solution
for both Dirichelet and Neumann conditions, while the LS and Galerkin methods,
which reproduce very well the Neumann condition, are worse approximations for the
Dirichelet condition. Moreover, all the integrals contained in the DF procedure are
analytical, whereas other procedures (e.g., LS and Galerkin) require integrals contain-
ing product of functions, which in some cases (as in the case of Bessel’s functions)
are not analytical and must be numerically solved, with a loss of accuracy and an
increase of the calculation time. However, the main features of our procedure are
twofold: (a) a very fast convergence of the resulting series; (b) the very smooth be-
havior of the function and of the derivative function throughout the entire domain D,
even for a small number of terms in the series, whereas other methods, including
the analytical, show oscillating solutions, unless a very large number of terms are
considered. The only drawback of the DF approach is its behavior near the disconti-
nuity point. Because of this limit, the mean values calculated for the Dirichelet and
Neumann conditions look in some cases less accurate than those calculated by other
methods.
Concluding, we believe that the DF approximation can be inserted in a list of very
efficient numerical techniques usable to solve MBCs problems. Finally, starting from
the DF approach it is possible to develop other numerical procedures by combining
together the techniques typical of DF and weighted residual methods. Work is in
progress along this line.

Acknowledgements

We are very grateful to Dr. P.L. Mills (Dupont Central Research and Devel-
opment) for his useful suggestions and comments. We are also grateful to Professor
M.P. Dudukovic (Department of Chem. Eng., Washington University) for his courtesy.
This work was supported by MURST (40% and 60%) and by CNR.
344 A. Grassi et al. / Discretization of unknown functions

References

[1] U.S. Agarwal and D.V. Khakas, J. Chem. Phys. 96 (1992) 7152.
[2] M. Baldo, A. Grassi, G.M. Lombardo and A. Raudino, J. Chem. Phys. 105 (1996) 8404.
[3] M. Baldo, A. Grassi and A. Raudino, J. Chem. Phys. 91 (1989) 4658.
[4] M. Baldo, A. Grassi and A. Raudino, Phys. Rev. A 39 (1989) 3700.
[5] M. Baldo, A. Grassi and A. Raudino, Phys. Rev. A 40 (1989) 1017.
[6] M. Baldo, A. Grassi and A. Raudino, J. Chem. Phys. 93 (1990) 6034.
[7] M. Baldo, A. Grassi and A. Raudino, J. Phys. Chem. 95 (1991) 6734.
[8] M. Baldo, A. Grassi and A. Raudino, J. Math. Phys. 33 (1992) 2329.
[9] B. Carnahan, H.A. Luther and J.O. Wilkes, Applied Numerical Methods (Wiley, New York, 1969).
[10] C. Chu and K. Chon, J. Catal. 17 (1970) 71.
[11] J. Crank, The Mathematics of Diffusion (Clarendon, Oxford, 1970).
[12] C. DeLisi, in: Cell Surface Dynamics, eds. A.S. Perelson, C. DeLisi and F.W. Wiegel (Dekker,
New York, 1984) p. 135.
[13] M.P. Dudukovic and P.L. Mills, in: Proc. 5th Int. Symp. Chem. React. Engng., ACS Symp. Ser.,
Vol. 65 (1978) p. 387.
[14] B.A. Filayson, Br. Chem. Eng. 14 (1969) 53.
[15] A. Grassi and A. Raudino, J. Phys. Chem. 100 (1996) 16934.
[16] R.B. Kelman, J. Math. Phys. 46 (1967) 333.
[17] R.B. Kelman, Quart. J. Mech. Appl. Math. 23 (1970) 549.
[18] H. Levine, Appl. Sci. Res. 39 (1982) 261.
[19] J.H. Mathews, Numerical Methods for Mathematics, Science and Engineering, 2nd ed. (Prentice-
Hall, NJ, 1992).
[20] W.W. Mayer, L.L. Hegedus and R.K. Aris, J. Catal. 42 (1976) 135.
[21] J.A. McCammon, R.J. Bacquet, S.A. Allison and S.H. Northrup, Faraday Discuss. Chem. Soc. 83
(1987) 213.
[22] P.L. Mills and M.P. Dudukovic, Ind. Eng. Chem. Fund. 18 (1978) 129.
[23] P.L. Mills and M.P. Dudukovic, Chem. Eng. Sci. 35 (1980) 1557.
[24] P.L. Mills and M.P. Dudukovic, Comput. Chem. Eng. 6 (1982) 141.
[25] P.L. Mills and M.P. Dudukovic, Math. Modelling 5 (1984) 171.
[26] P.L. Mills, S.S. Lai and M.P. Dudukovic, Ind. Eng. Chem. Fund. 24 (1985) 64.
[27] P.A. Ramachandran and J.M. Smith, AIChE J. 25 (1979) 538.
[28] D. Shoup, G. Lipari and A. Szabo, Biophys. J. 36 (1981) 697.
[29] I.N. Sneddon, Mixed Boundary Value in Potential Theory (North-Holland, Amsterdam, 1966).
[30] A. Szabo, D. Shoup, S.H. Northrup and J.A. McCammon, J. Chem. Phys. 77 (1982) 4484.
[31] S.D. Traytak, J. Phys. Chem. 98 (1994) 7419.
[32] J.V. Villadsen and M.L. Michelsen, The Method of Weighted Residual and Variational Methods
(Academic Press, New York, 1972).
[33] J.V. Villadsen and M.L. Michelsen, Solution of Differential Equation Models by Polynomial Ap-
proximation (Prentice-Hall, NJ, 1978).
[34] J.V. Villadsen and W.E. Stewart, Chem. Eng. Sci. 22 (1967) 1967.
[35] J.R. Whiteman and J.C. Webb, Nordish Tidskr. Informations Behandling (BIT) 10 (1970) 366.
[36] F.W. Wiegel, Phys. Rep. 95 (1983) 283.
[37] F.W. Wiegel, in: Cell Surface Dynamics, eds. A.S. Perelson, C. DeLisi and F.W. Wiegel (Dekker,
New York, 1984) p. 135.
[38] H.A. Wilson, Proc. Cambridge Philos. Soc. 12 (1904) 406.
[39] H.X. Zhou and A. Szabo, J. Phys. Chem. 100 (1996) 2597.
[40] D. Zwillinger, Handbook of Differential Equations (Academic Press, New York, 1989).

You might also like