A NUMERICAL SOLUTION OF ONE DIMENSIONAL HEAT EQUATION USING CUBIC B-SPLINE BASIS
FUNCTIONS
1SHARANJEET DHAWAN, 2SHEO KUMAR
1Department of mathematics
2Dr. B.R.Ambedkar National Institute of Technology, Jalandhar-144011, India
ABSTRACT
In this paper one dimensional heat equation is solved using Galerkin B-spline Finite Element. Solution is obtained by reducing the initial boundary value problem to the set of Ordinary differential equations.
Discretization of the spatial domain is made using cubic B-spline functions as basis functions. The numerical results obtained from the two test problems are compared with the analytical solution available in the literature. Observations give a good agreement between the exact solution and the numerical solution obtained from the proposed technique.
1. INTRODUCTION
In this paper we consider the One-dimensional time dependent heat conduction equation
ρc k , x, t Ω 0, T (1) where Ω 0, L , with initial condition
u x, 0 u x for 0 x L, (2) and boundary conditions
u 0, t f x for 0 t T (3)
u L, t g x for 0 t T (4) where ρ, c, k are density, thermal conductivity in the direction of x -axis and heat capacity respectively.
f, g, u are known functions and u x, t is unknown. It’s a well- known second order linear partial differential equation (PDE). Unlike other equations, it is not preserved when t is replaced by – . It shows that heat equation describes irreversible process and makes a distance between the previous and next steps.
Such equations arise very often in various applications of science and engineering describing the variation of temperature (or heat distribution) in a given region over some time. Marwaha & Chopra [1] give a numerical solution for transient thermal distribution ina slab where chemical, electrical or nuclear energy is converted into thermal energy. To describe temperature profile, Elimoel and Rogerio [2] uses exponential- sinusoidal one-dimensional analytical model demonstrating that heat equation can still be solved analytically. Monte [3] applied a natural analytical approach for solving the one dimensional transient heat conduction in a composite slab. He studied the transient response of one dimensional multilayered composite conducting slab to the sudden variations of the temperature of surrounding fluid. In a one dimensional hollow composite cylinder with time dependent boundary conditions, Lu [4] gave a novel analytical method applied to the transient heat conduction equation. Splines are a kind of piecewise polynomials that are easy to use for the approximations by breaking an interval into a number of subintervals [5]. In general, we consider a piecewise polynomial, let a, b be a finite interval and x x x be the partition of a, b into n elements and x ; i 0,1, … n are the nodes. These nodes are the parameter values where the polynomial function constituting spline curve joining each other [6]. A
particular class of splines is - B-splines. B-spline (bell-shaped splines) is piecewise polynomial functions that are connected continuously by the smaller curve segments that takes care of the continuity having a direct impact on the basis functions. B-spline functions are very popular for the smooth approximations and are being used by various researchers for different problems ([7], [8] , [9], [10], [11]). In 1946, Schoenberg first proposed the theory of B-splines. Cox(1971) and de Boor(1972) gave recurrence relations for the purpose of computing coefficients ([12], [13]). Yang [14] used a technique to deal with the boundary conditions using splines. Many others [15], [16] has used B-splines for various applications where B- splines has been proved a useful tool for approximations. In addition to this Thomas [17] presented extensive use of splines for Boeing. Qiu [18] applied a trivariate B-spline for volume reconstruction saying that the B-spline reconstructions are often superior to the existing methods. In the present method we proposed a cubic B-spline FEM for the solution of one dimensional heat conduction equation. Because B- spline curve has superior properties making them suitable for shape representations and analysis purpose.
Using the values of B-splines, nodal values at the knots are expressed in terms of the element parameters.
Temperature distribution over the subintervals will be approximated by the combination of cubic B-splines and unknown element parameter. The system is reduced to the matrix form and further handled by method of lines.
2. SOLUTION PROCEDURE
A spline is a piecewise polynomial of order k (degree k-1 at the most) defined on the intervala, b ; a x x x b, whereh x x ; i 0,1, … N 1. The spline u x commonly described in the B-spline representation is as
u x α B x
Where B x is a special function of order k called B-spline. It has a particular property of having compact support [19]. B-spline of order one are step functions defined by
B 1 ; x x , x 0; otherwise
It introduces the knotst ; i 1, … N k. The cubic B-spline finite element method has been presented in this paper. The technique is based on the Galerkin formulation of the given problem and then using B- spline basis functions. Thus the approximation to the solution is given by
u ∑ a t B x (5) where B are linearly independent basis functions and a are the unknowns, yet to be determined. We start with the weak formulation of the one dimensional heat equation (1)-(4) forf g 0. Multiplying equation (1) with the test function N x we get
N x ρc∂u
∂t k∂ u
∂x dx 0
N x ρc k dx N L k L, t N 0 k 0, t 0 (6) Which is known as the weak formulation of equation(1). Using (5) in (6) we have
, 0 0, 0 (7) Using the given boundary conditions (3)-(4), we get
0 (8)
For the Galerkin procedure, test function and the trial functions are same, thus we have . Where every test function is a linear combination of the test functions ∑ . So, the equation (8) reduces to the sset of ordinary differential equations. To construct the spline approximation function for one dimensional case, the interval 0,1 is discretized into ( 1 intervals with number of nodes. Let , be portioned into a mesh with points a= < < … < = b. A cubic B-spline covering four successive finite elements are covered by the shape functions defined as
=
, ,
3 3 3 , , ,
3 3 3 , , ,
, , 0 ,
(9)
Thus the variation of over each element , is expressed as
, ∑ , 0,1, … (10) Where are element parameters and ; 1, , 1, 2 are element shape functions.
Each finite element is defined on the interval , and the element nodes are defined for the knots , . Using (9) and (10) in (8) gives
∑ ∑ 0 (11)
For each element we have
0 (12) Where , , , are the element parameters and , are element matrices given by
and
Where , 1, , 1, 2 and assembling together all the elements, we have the final matrix formulation in assembled form as
0 (13) Where , are assembled forms of , . Discretizing the temporal domain as interval
is the partition of the temporal domain and defining ∆ as the length of the time interval. We apply backward differencing technique using
∆ ∆
For the time derivative, we have ∆
∆ ∆ ∆
Taking 0 we can start with the solution procedure by finding ∆ from and the solution procedure is carried till we reach the final time.
3. NUMERICAL RESULTS
For the numerical solutions of one dimensional heat conduction equation using the above technique we consider two cases.
Case (1): For equation (1) we consider an iron bar of length 50cm with specific heat c 0.437J/ gK , densityρ 7.88g/cm and thermal conductivity k 0.836W/ cmK κ subject to the following initial condition
u x, 0 5 1
5|x 25| for 0 x 50 With the boundary conditions
u x, t u 50, t 0 The analytical solutionto this problem can be expressed as
u x, t A sin nπx 50
Where A / e
Case (2): An iron bar of length 50cm being heated at a constatnt temperature 40c and both the ends are maintained at 00c and 40c respectively. Mathematical modeling of the given phenomenon is represented in the form of governing PDE with the initial condition as u 4 c and boundary conditions u x, t
u 50, t 0. Whose analytical solution is given by
u x, t 4
50x 8 sin nπx/50
nπ e
The proposed technique leads to the final matrix formulation which is solved using Crank-Nicolson technique. To observe the accuracy of the numerical technique, weighted kek1norm is used defined by
e defined as
e 1
N
U x , t U,
U x , t , e e , e , … , e
Table 1 shows the numerical results of case 1 for different meshes. Numerical results have been found in a very good agreement with the exact solution. For case 2 numerical solutions are given in Table 2. Results obtained from the present (B-spline FEM) technique are compared with the exact solutions at different times. It gives the numerical results very much closer to the respective exact solutions. Graphical representation of the results is presented in the figures. Fig. (1) shows the results obtained at different times for case1. In Fig. (2) Temperature profile for case 2 is studied for different times. At the initial level (Initial condition) temperature is 40c. When the effect of boundary condition comes into picture, the temperature profile is representing a semi parabolic shape at time t = 0.1. Temperature at left side is 00c and reached other side at 40c. With the passage of time, shape is being changes to the inclined line. No
Table 1: Comparison of numerical results for various mesh sizes at time . for ∆ .
h=0.01 h=0.05 h=0.0125 h=0.0075 Exact
0.2 0.38630792 0.38621124 0.38621121 0.38621285 0.3861138 0.4 0.79882014 0.79880779 0.79880771 0.79879717 0.7987952 0.6 1.21446063 1.21456219 1.21456212 1.21464900 1.2146644 0.8 1.60250762 1.60253483 1.60253467 1.60255810 1.6025622 1.0 1.98371982 1.98306842 1.98306827 1.98351013 1.9834930 1.2 2.39583207 2.39578394 2.39578387 2.39573553 2.3957351 1.4 2.82001012 2.82014674 2.82014671 2.82026342 2.8202841 1.6 3.20636820 3.20645434 3.20645431 3.20665280 3.2065410 1.8 3.57160873 3.57147525 3.57147514 3.57125437 3.5712254 2.0 3.99148371 3.99130194 3.99130160 3.99114595 3.9911182 2.2 4.45392610 4.45432583 4.44325832 4.45432583 4.4547253 2.4 4.78214992 4.78320477 4.78320471 4.78320471 4.7842690 2.6 4.78214992 4.78320477 4.78320471 4.78320471 4.7842690 2.8 4.45392610 4.54325835 4.54325832 4.45432583 4.4547253 3.0 3.99148371 3.99130194 3.99130160 3.99114595 3.9911182 3.2 3.57160873 3.57147525 3.57147514 3.57125437 3.5712254 3.4 3.20636820 3.20645434 3.20645431 3.20665280 3.2065410 3.6 2.82001012 2.82014674 2.82014671 2.82026342 2.8202841 3.8 2.39583207 2.39578394 2.39578387 2.39573553 2.3957351 4.0 1.98371982 1.98306842 1.98306827 1.98351013 1.9834930 4.2 1.60250762 1.60253483 1.60253467 1.60255810 1.6025622 4.4 1.21446063 1.21456219 1.21456212 1.21464900 1.2146644 4.6 0.79882014 0.79880779 0.79880771 0.79879717 0.7987952 4.8 0.38630792 0.38621124 0.38621121 0.38621285 0.3861138
e 0.00031 0.00007776 0.00000195 0.00000117
Table 2: Comparison of numerical results for various mesh sizes at time . for ∆ .
h=0.001 h=0.0005 h=0.00025 h=0.00001 Exact
02 0.304685 0.304685 0.304682 0.304721 0.304721
04 0.606601 0.606601 0.606600 0.606671 0.606671
06 0.903055 0.903055 0.903054 0.903155 0.903157
08 1.191551 1.191551 1.191550 1.916361 1.916364
10 1.469613 1.469613 1.469611 1.469759 1.469764
12 1.735313 1.735313 1.735311 1.735490 1.735493
14 1.986861 1.986861 1.986762 1.987056 1.987064
16 2.222863 2.222863 2.222853 2.223071 2.223073
18 0.442271 0.442271 0.442268 2.442563 2.442567
20 2.644431 2.644431 2.644430 2.644661 2.644663
22 2.829044 2.829044 2.829041 2.829258 2.829265
24 2.996124 2.996124 2.996121 2.996339 2.996348
26 3.146043 3.146043 3.146014 3.146252 3.146254
28 3.279422 3.279422 3.279421 3.279598 3.279638
30 3.397151 3.397151 3.397150 3.397343 3.397349
32 3.500345 3.500345 3.500341 3.500467 3.500473
34 3.590083 3.590083 3.590080 3.590231 3.590235
36 3.667854 3.667854 3.667852 3.667982 3.667985
38 3.735032 3.735032 3.735037 3.735157 3.735159
40 3.793131 3.793131 3.793130 3.793281 3.793283
42 3.843583 3.843583 3.843581 3.843599 3.843663
44 3.887991 3.887991 3.887987 3.888051 3.888052
46 3.927851 3.927851 3.927846 3.927891 3.927891
48 3.964681 3.964681 3.964676 3.964768 3.964768
e 0.00013832 6.09296e-05 4.5977e-05 3.07261e-05
4. CONCLUSION:
Temperature variation studied using the cubic B-spline FEM in this paper, gives satisfactory results. Both the case studies gave sufficiently good agreements with the exact solutions. Algorithms are developed to evaluate B-spline basis functions as well as to use them for the evaluation of temperature distribution.
Performance of the algorithms is investigated by means of comparison with the analytical solutions and weighted e norm. It can be said that the method is good enough to study the temperature distribution in one dimension. For the future work we aim at finding numerical solutions for the comparatively complex problems using the similar technique.
5. REFRENCES:
[1] I.J.Marwah and M.G.Chopra, “Transient Heat Transfer in a slab with Heat Generation”, Def. Sci J, Vol. 32, No. 2,1982, pp.143-149.
[2] Elimoel A.Elias, Rogerio Cichota, Hugo H.Torriani and Quirijn De Jong van Lier, “Analytical Soil- Temperature Model: Correction for Temporal Variation of Daily Amplitude”, Soil Sci.Soc.Am.J.
Vol. 68, 2004, pp. 784-788.
[3] F.de Monte, “Transient heat conduction in one-dimensional composite slab: A ’natural’ analytic approach”, International Journal of Heat and Mass Transfer, Vol. 43, 2000, pp. 3607-3619.
[4] X Lu, P Tervola and M Viljanen, “An efficient analytical solution to the transient heat conduction in one dimensional hollow composite cylinder”, J. Phys. A. Math. Gen. Vol. 38, 2005, pp. 10145- 10155.
[5] J.H.Ahlberg, E.N.Nilson, J.L.Walsh, “The Theory of Splines and their Applications”, Acadamic Press, 1967.
[6] Klaus H¨olling, “Finite Element Method with B-splines”, SIAM, Philadelphia, 2003.
[7] Masashi Kashiwagi, “A B-spline Galerkin scheme for calculating the hydroelastic response of a very large floating structure in waves”, Journal of Marine Science and Technology, Vol. 3, 1998, pp. 37- 49.
[8] Hartmut Prautzsch, “A round trip to B-spline via de Casteljau”, ACM Transactions on Graphics(TOG), Vol. 8, No. 3, 1989, pp. 243-254.
[9] A.R.Bahadir, “Application of cubic B-spline finite element technique to the thermistor problem”, Applied Mathematics and Computation, Vol. 149 , 2004, pp. 379-387.
[10] Liang Xuebiao, “The B-spline finite elemenet method applied to axisymmetrical and nonlinear field problems”, IEEE Transactions on Magnetic, Vol. 24, No. 1, 1988, pp.27-30.
[11] Ni Guangzheng, Xu Xiaoming, Jian Baidun, “B-spline Finite Element Method for Eddy Current field analysis”, IEEE Transactions on Magnetic, Vol. 26, No. 2, 1990, pp.723-726.
[12] C.de Boor, “A Practicle guide to splines”, Applied Mathematical Sciences, Springer-Verlag, 2001.
[13] Carl de Boor, “On Calculating with B-splines”, Journal of Approximation Theory, Vol. 6,1972, pp.50- 62.
[14] L.F.Yang, “The Spline Matrix Method”, J. Guangxi Univ. Vol. 18, No. 2, 1994, pp.61-65.
[15] Z.Zong,K.Y.Lam, “ Estimation of complicated distributions using B-spline functions”, Struct. Safety, Vol. 20, 1998, pp.341-355.
[16] Y.K.Cheung, S.C.Fan, C.Q.Wu, “Spline finite strip in structural analysis”, Proceedings of Intrnational Conference on Finite Element Method, 1982, pp.704-709.
[17] Thomas A.Grandine, “The Extensive use of Splines at Boeing”, SIAM News, Vol. 38, No. 4, 2005.
[18] Qiu Wu, Chandrajit L. Bajaj , “B-spline Representation for Volume Reconstruction”, [19] P.M.Prenter, “Splines and Variational Methods”, Wiley, New York, 1975.