Lakner 2008
Lakner 2008
Lakner 2008
a r t i c l e i n f o a b s t r a c t
Article history: A relatively simple and efficient symbolic-numerical procedure based on the finite differences method
Received 8 August 2007 for solving partial differential equations on systems of irregular shapes is presented. The new concept is
Received in revised form 1 February 2008 based on the spline parameterization of the irregular domain. The curvilinear domain of the real system
Accepted 17 February 2008
is transformed to the rectangular domain by spline functions where the finite differences method is used
Available online 23 February 2008
to solve the transformed system of depended variables. The numerical results are then transported back
to the original irregular shape of the system. In order to present the symbolic-numerical technique effec-
Keywords:
tively, the Laplace’s equation of heat transfer with the Dirichlet and the Neumann boundary conditions
Finite differences
Irregular shapes
in different 2D curvilinear domains is considered. The proposed technique is applied for the non-steady-
state heat transfer by conduction as well. Numerical experiments were performed to justify the proposed
method.
© 2008 Elsevier Ltd. All rights reserved.
0098-1354/$ – see front matter © 2008 Elsevier Ltd. All rights reserved.
doi:10.1016/j.compchemeng.2008.02.005
2892 M. Lakner, I. Plazl / Computers and Chemical Engineering 32 (2008) 2891–2896
2. Theoretical background
2.1. Splines
bijective picture of the rectangular P formed by the mapping: partial differential equation of the second-order (Eq. (6)) yields:
˚ : (s, t) → (u(s, t), v(s, t)) (5) vt3 (−uss gs + us gss ) + u3t (vss gs − vs gss ) − (u2s + vs2 )
(−utt vs + us vtt )gt + u2t (vt (−uss gs + us gss ) + uss vs gt
where the coordinative functions u(s, t) and v(s, t) are a two times + us (−2vst gs + 2vs gst − vss gt )) + vt2
continuously partial differentiable on P (Fig. 2). (vs (2ust gs + uss gt ) − us (2vs gst + vss gt ))
In order to simplify the introduction of the new procedure apply- (10)
+ ut ((u2s + vs2 )vtt gs + vt2 (vss gs − vs gss ) − 2vt
ing the numerical method of finite differences on irregular shapes, 2
(−us ust gs + us gst + vs (vst gs − vs gst )) − 2us ust vs gt
the well-known Laplace’s equation for steady-state heat transfer + 2u2s vst gt − u2s vs gtt − vs3 gtt ) + vt
with the prescribed boundary conditions on the 2D curvilinear (−utt (us 2 + vs 2 )gs − 2ust vs2 gt + u3s gtt + us vs (2vst gt + vs gtt ) = 0
domain is considered (Fig. 3). Accordingly, the partial differential
equation of the second order for all (x, y) ∈ D and boundary condi- The upper equation (Eq. (10)) represents the PDE of the unknown
tions on ∂D is given function g(s, t) on the rectangular P, where the finite differences
can now be applied. The brackets with the coordinates (s, t) were
∂2 f ∂2 f omitted again in the upper equation (Eq. (10)). The standard finite
(x, y) + 2 (x, y) = 0 (6)
∂x 2 ∂y differences technique was applied to find the numerical solution
of g(s, t) on P from the upper second-order PDE (Eq. (10)) with
where f represents the temperature as a dependent variable (unit
appropriate boundary conditions. The derivatives in differential
K), and x, y the independent variables on the domain (x, y) ∈ D (unit
equations are written in terms of discrete quantities of dependent
m), respectively.
and independent variables, resulting in simultaneous algebraic
In the first step we transmit the PDE from D (Eq. (6)) on the
equations with all unknowns prescribed at discrete mesh points
rectangular P for the unknown function g:
for the entire domain on P. When the unknown function g(s, t) on
g(s, t):=f (u(s, t), v(s, t)) (7) P is found, the function f(x, y) on the domain D is evaluated by
f (x, y) = g(˚−1 (x, y)) (11)
Now we have to express the partial derivatives of the function f(x,
y) by applying the repeated chain rule on g(s, t) (Eq. (7)). Admit- In other words, because of the bijective characteristic of ˚, the
tedly, it is rather tedious to try to find the correct expressions by solution of the equations system u(s, t) = x and v(s, t) = y gave us
hand. It is quite understandable that the finite volume methods or only one point (s, t) ∈ P for the given point (x, y) ∈ D and finally
the finite element methods were suggested instead to avoid this
cumbersome procedure (Chung, 2002). However, the remarkable f(x, y) = g(s, t).
progress of the symbolic computational tools has made it possible
2.3. Numerical experiments
to find solutions to many tedious mathematical calculating pro-
cedures with no mistakes and practically at once. The relatively In order to verify the stability and the accuracy of the proposed
simple mathematical code in the Mathematica computational tool finite differences numerical procedure for solving partial differen-
was developed by applying the repeated chain rule on g(s, t). The tial equations on systems of irregular shapes, the numerical results
partial derivatives of the function f(x, t) can now be expressed (Eqs. at different mesh densities of 2D domain were compared with
(8) and (9)): the analytical solution. As an example of 2D domain a horseshoe-
gs vt − gt vs shaped domain D is used as presented in Fig. 4. Let us consider the
fx (u(s, t), v(s, t)) = (8)
vt us − ut vs
u2s · (−gt vtt us + vt · (−gs utt + gtt us ) + gt utt vs ) + ut us · (gs vtt us − gtt us vs − 2gt vs ust + vt · (−2gst us + 2gs ust )
+ 2gt us vst ) + u3t · (−gss vs + gs vss ) + u2t · (gt vs uss + vt · (gss us − gs uss ) + us · (2gst vs − 2gs vst − gt vss ))
fyy (u(s, t), v(s, t)) = (9)
(vt us − ut vs )3
as examples for first derivative fx (u(s, t), v(s, t)) and second deriva-
tive fyy (u(s, t), v(s, t)), respectively. Note that the brackets with the harmonic function:
coordinates (s, t) of the functions g(s, t), v(s, t), and u(s, t) on the
y
T̃ (x, y) = 1 + 100 ex/5 cos (12)
right sides of the upper equations (Eqs. (8) and (9)) were omit- 5
ted for better clarity. Similar expressions were easily found for
which exactly solves Laplace’s equation:
fy (u(s, t), v(s, t)), fxx (u(s, t), v(s, t)) and fxy (u(s, t), v(s, t)).
Applying the expressions for second derivatives ∂2 T̃ ∂2 T̃
(x, y) + (x, y) = 0 (13)
fxx (u(s, t), v(s, t)) and fyy (u(s, t), v(s, t)) (Eq. (9)) to the original ∂x 2 ∂y2
2894 M. Lakner, I. Plazl / Computers and Chemical Engineering 32 (2008) 2891–2896
Table 1
Comparison between exact and numerical approximations of the temperature distribution on domain D at different sizes of linear systems (mesh densities) with the computer
calculations times (ordinary AMD 64 processor, 3500+)
Size of the linear system Calculation time (s) ımax ıave εmax (K) εave (K)
for all (x, y) ∈ R2 . According to the proposed numerical procedure The domain of a selected shape formed by spline patches is pre-
described in the Theoretical background, the 2D steady-state heat sented in Fig. 5.
transfer equation: As example, the numerical results of the steady-state heat
transfer by conduction for selected boundaries conditions on the
∂2 T ∂2 T domains of the irregular shapes are graphically presented in Fig. 6.
(x, y) + (x, y) = 0 (14)
∂x 2 ∂y2 The temperature profiles in the form of contours on the horseshoe-
was solved on domain D together with the boundary condition: shaped domain and on the corresponding rectangular domain are
presented in Fig. 6b and a, respectively, while the 3D graphical sim-
T (x, y) = T̃ (x, y) for (x, y) ∈ ∂D (15) ulation of the same temperature profile on the horseshoe-shaped
curvilinear domain is presented in Fig. 6c.
An exact solution T̃ (Eq. (12)), which represents the temperature The very good agreement is observed between the numeri-
distribution on domain D, is then compared with the numerical cal results of the proposed method, based on finite differences
approximations at given boundary condition (Eq. (15)) calculated (FDM), and FEM. The temperature profiles in the form of isotherms
at different mesh densities. The comparison results are presented for the same arbitrary irregular domain are graphically presented
in Table 1, where the relative deviation ı and the absolute error ε in Fig. 7. The system based on FDM was solved by Mathematica
between the exact and the numerical values are defined as follows: 6.0 with the computational time of few seconds for creating and
T̃ (x, y) − T (x, y)
0.12 s for solving the linear system of size 16,756 (Fig. 7a and b).
ı:=
, ε:=|T̃ (x, y) − T (x, y)|; (x, y) ∈ D (16)
T̃ (x, y)
The computational time for solving the same problem with FEM
(COMSOL 3.3) was 1.16 s (the size of the linear system was 16,815)
Note that that the parameters in harmonic function T̃ (Eq. (12)) (Fig. 7c).
were selected in order to assure significant variations (approxi- The proposed technique works with the Dirichlet and Neumann
mately between 40 and 200 K) of the simulated exact temperature boundary conditions. As example, the graphical presentation of
profile on the chosen domain D. the steady-state heat transfer by conduction for mixed boundary
conditions for an arbitrary irregular domain is presented in Fig. 8.
The Neumann type of the boundary condition at the lower side of
3. Results and discussion
curvilinear domain was used in the form:
Besides the horseshoe-shaped 2D domain (Fig. 4), an arbitrary
∂T h
geometrical shape is chosen to graphically demonstrate the appli- = − (T − T∞ ) (17)
∂n
cation of the finite differences method for solving systems on
irregular shapes by the proposed symbolic-numerical procedure.
Fig. 4. Horseshoe-shaped domain D formed by spline patches (2 × 13) defined by Fig. 5. Arbitrary geometrical domain D formed by spline patches (1 × 6) defined by
dots. dots.
M. Lakner, I. Plazl / Computers and Chemical Engineering 32 (2008) 2891–2896 2895
Fig. 6. Graphical presentation of the steady-state heat transfer by conduction for selected boundaries conditions: (a) temperature profiles in the form of contours on the
rectangular domain P, (b) temperature profiles in the form of contours on the horseshoe-shaped curvilinear domain D and (c) 3D graphical simulation of the temperature
profile on the horseshoe-shaped curvilinear domain D.
Fig. 7. Graphical presentation of the steady-state heat transfer by conduction for selected boundaries conditions: (a) temperature profiles in the form of contours on the
rectangular domain P, (b) temperature profiles in the form of contours on the arbitrary curvilinear domain D (FDM) and (c) temperature profiles in the form of contours on
the same arbitrary curvilinear domain (FEM).
Fig. 8. Graphical presentation of the steady-state heat transfer by conduction for mixed boundary conditions (hair = 10 W/(m2 K); porcelain = 1.5 W/(m K); T∞ = 10 ◦ C): (a)
temperature profiles in the form of contours on the rectangular domain P, (b) temperature profiles in the form of contours on the arbitrary curvilinear domain D and (c) 3D
graphical simulation of the temperature profile on the curvilinear domain D.
2896 M. Lakner, I. Plazl / Computers and Chemical Engineering 32 (2008) 2891–2896
Acknowledgments
References
Bartels, R., Beatty, J., & Barsky, B. (1987). An introduction to splines for use in computer
graphics and geometric modeling. Los Altos: Morhan Kaufman.
Beji, S., & Nadaoka, K. (2004). Fully dispersive nonlinear water wave model in curvi-
linear coordinates. Journal of Computational Physics, 198, 645.
Cebeci, T., Shao, J. P., Kafyeke, F., & Laurendeau, E. (2005). Computational fluid dynam-
Fig. 9. Graphical presentation of the time dependent heat transfer by conduction for ics for engineers. New York: Springer.
Chung, T. J. (2002). Computational fluid dynamics. Cambridge University Press.
selected boundaries conditions (˛porcelain = 5.83 × 10−7 ; initial temperature T = 0 ◦ C):
Foley, J. D., van Dam, A., Feinere, S. K., & Hughes, J. F. (1996). Computer graphics:
(a) temperature profiles on the curvilinear domain in the form of contours after
Principles and practice, second edition in C. Addison-Wesley.
0.33 min, (b) 0.83 min, (c) 16.67 min and (d) 33.33 min. He, H., Fan, J., & Cen, K. (2000). A numerical method for orthogonal grid generation
by Laplace system. Journal of Zhejiang University Science, 1, 125.
Jie, Y., Jie, G., Mao, Z., & Li, G. (2004). Seepage analysis based on boundary-fitted
where h and are the heat transfer coefficient (W/(m2 K)) and the
coordinate transformation method. Computers and Geotechnics, 31, 279.
thermal conductivity (W/(m K)), respectively, and T∞ is the sur- Koo, M. H., & Leap, D. I. (1998). Modeling three-dimensional groundwater flows
rounding temperature. by the body-fitted coordinate (BFC) method: I stationary boundary problems.
Transport in Porous Media, 30, 217.
The application of the proposed method for the non-steady-
Knupp, P., & Steinberg, S. (1993). Fundamentals of grid generation. Boca Raton: CRC
state heat transfer by conduction: Press.
Lee, K. K., & Leap, D. I. (1994). Application of boundary-fitted coordinate transfor-
∂T ∂2 T ∂2 T mations to groundwater flow modeling. Transport in Porous Media, 17, 145.
=˛ + (18)
∂t ∂x 2 ∂y2 Lisejkin, V. D. (1999). Grid generation methods. New York: Springer.
Ramanathan, S., & Kumar, R. (1988). Comparison of boundary-fitted coordinates with
where ˛ denotes the thermal diffusivity (˛ = /cp ), is graphically finite element approach for solution of conduction problems. Numerical Heat
Transfer, 14, 187.
presented in Fig. 9. Thompson, J. F., Warsi, Z. U. A., & Mastin, C. W. (1982). Boundary-fitted coordinate sys-
tems for numerical solution of partial differential equations—A review. Journal
4. Conclusions of Computer Physics, 47, 1.
Thompson, J. F., Warsi, Z. U. A., & Mastin, C. W. (1995). Numerical grid generation:
Foundations and applications. New York: Elsevier.
The numerical solutions based on finite differences method of Tsay, T. K., & Hsu, F. S. (1997). Numerical grid generation of an irregular region.
Laplace’s equation and time dependent problem of heat transfer by International Journal for Numerical Methods in Engineering, 40, 343.
You, D., Rajat, M., Wang, M., & Moin, P. (2006). Analysis of stability and accuracy of
conduction on different 2D curvilinear domains were performed finite-difference schemes on a skewed mesh. Journal of Computational Physics,
and theoretically described. The methodology of the proposed 213, 184.
symbolic-numerical solution procedure for solving the partial dif- Widjaja, E., Liu, N.-C., Li, M., Collins, R. T., Basaran, O. A., & Harris, M. T. (2007).
Dynamics of sessile droplet evaporation: A comparison of the spine and the
ferential equations on the systems of irregular shapes is based on elliptic mesh generation methods. Computers & Chemical Engineering, 31, 219.
the parameterization of the curvilinear region of physical domain Wolfram Research. (2006). Mathematica, version 6.0. Champaign.