Sohag J Math, o, 9-35 5 9 Sohag Journal of Mathematcs An Internatonal Journal http://dxdoorg/785/sm/5 Legendre Gauss Lobatto Pseudo spectral Method for One Dmensonal Advecton Dffuson Equaton Galal I El Baghdady, M S El Azab and W S El Beshbeshy Department of Engneerng Physcs and Mathematcs, Faculty of Engneerng, Mansoura Unversty, El Gomhera St, Mansoura, Daahla, 3556, Egypt Receved: 7 Jun, Revsed: Sep, Accepted: 3 Sep Publshed onlne: Jan 5 Abstract: In ths paper, we present a Legendre pseudo spectral method based on a Legendre Gauss Lobatto zeros wth the ad of tensor product formulaton for solvng one dmensonal parabolc advecton dffuson equaton wth constant parameters subect to a gven ntal condton and boundary condtons Frst, we ntroduce an approxmaton to the unnown functon by usng dfferentaton matrces and ts dervatves wth respect to x and t Secondly, we convert our problem to a lnear system of equatons to unnowns at the collocaton ponts, then solve t Fnally, several examples are gven and the numercal results are shown to demonstrate the effcency of the proposed technque Keywords: One-dmensonal parabolc partal dfferental equaton, Spectral method, Legendre Pseudo spectral method, Legendre Dfferentaton matrces, Kronecer product Introducton In ths paper, we are concerned wth an effcent numercal approxmaton scheme of the mathematcal model of a physcal phenomena nvolvng the one dmensonal tme dependent advecton dffuson equaton of the form u t + β u x α u = fx,t, x where x a,b R, t,t], T >, assocated wth ntal condton and Drchlet boundary condtons, respectvely: ux, = u x, x, ua,t = g t, ub,t=g t, t, 3 where fx,t, u x, g t and g t are nown functons, whereas u s the unnown functon ote that α and β are consdered to be postve constants quantfyng the dffuson and advecton processes, respectvely One dmensonal verson of the partal dfferental equatons whch descrbe advecton dffuson of quanttes such as mass, heat, energy, vortcst, etc [, ] Equaton has been used to descrbe heat transfer n a dranng flm [3], water transfer n sols [4], dsperson of tracers n porous meda [5], the ntruson of salt water nto fresh water aqufers, the spread of pollutants n rvers and streams [6], the dsperson of dssolved materal n estuares and coastal seas [7], contamnant dsperson n shallow laes [8], the absorpton of chemcals nto beds [9], the spread of solute n a lqud flowng through a tube, long range transport of pollutants n the atmosphere [], forced coolng by fluds of sold materal such as wndngs n turbo generators [], thermal polluton n rver systems [], flow n porous meda [3] and dsperson of dssolved salts n groundwater [4] In the present contrbuton, we construct the soluton usng the pseudo spectral technques [5, 6] wth Legendre bass Pseudo spectral methods are powerful approach for numercal soluton of partal dfferental equatons [7,8,9], whch can be traced bac to 97s [] If one wants to solve an ordnary or partal dfferental equaton to hgh accuracy on a smple doman and f the data defnng the problem are smooth, then pseudo spectral methods are usually the best tool They can often acheve dgts of accuracy where a fnte dfference scheme or a fnte element method would get 3 or 4 At lower accuraces, they demand less computer memory than the alternatves Correspondng author e-mal: amoun973@yahoocom c 5 SP atural Scences Publshng Cor
3 G I El Baghdady et al : Legendre Gauss Lobatto Pseudo spectral Method In pseudo spectral methods [], there are bascally two steps to obtanng a numercal approxmaton to a soluton of dfferental equaton Frst, an approprate fnte or dscrete representaton of the soluton must be chosen Ths may be done by polynomal nterpolaton of the soluton based on some sutable nodes However, t s well nown that the Lagrange nterpolaton polynomal based on equally spaced ponts does not gve a satsfactory approxmaton to general smooth functons In fact, as the number of collocaton ponts ncreases, nterplant polynomals typcally dverge Ths poor behavor of the polynomal nterpolaton can be avoded for smoothly dfferentable functons by removng the restrcton to equally spaced collocaton ponts Good results are obtaned by relatng the collocaton ponts to the structure of classcal orthogonal polynomals, such as the well-nown Legendre-Gauss-Lobatto ponts The second step s to obtan a system of algebrac equatons from dscretzaton of the orgnal equaton In the case of dfferental equatons, ths second step nvolves fndng an approxmaton for the dfferental operator see [] Many authors have consdered ths technque to solve many problems In [, 3], pseudospectral scheme to approxmate the optmal control problems Also, a Legendre pseudospectral Penalty scheme used for solvng tme doman Maxwells equatons [4] The method of Hermte pseudospectral scheme s used for Drac equaton [5], and nonlnear partal dfferental equatons [6], respectvely In [7], multdoman pseudospectral method for nonlnear convecton dffuson equatons was presented Fnally, [8] also pseudospectral methods used n Quantum and Statstcal Mechancs The organzaton of the rest of ths artcle s as follows In Secton, we present some prelmnares and drve some tools for dscretzng the ntroduced problem Secton 3 summarzes the applcaton of pseudo spectral Legendre method to the soluton of the problem 3 As a result a set of algebrac lnear equatons are formed and a soluton of the consdered problem s dscussed In Secton 4, we present some numercal examples to demonstrate the effectveness of the proposed method Prelmnares and otatons The well-nown Legendre polynomals [9, 3] are defned on the nterval [-,] and can be determned wth the ad of the followng recurrence formulas: L z=, L z=z, L + z= + + zl z + L z,, 4 Let L z denote the Legendre polynomal of order, then the Legendre Gauss Lobatto nodes LGL nodes wll be z,,z, where these nodes defned by z =,z = and for z } = are the zeros of z Unfortunately, there are no explct formulas for L the LGL nodes s nown However, they can be computed numercally [3] Let φ z} = be the Lagrange polynomals based on LGL nodes, that are expressed as [3,33]: φ z= =, z z z wth the Kronecer property z φ z,, =δ =, =, =,,, 5 It s more convenent to consder an alternatve expresson [3,33], for =,,, φ z = + L z z L z z z Any defned functon f on the nterval [, ] may be approxmated by Lagrange polynomals as fz = 6 c φ z, 7 where c = fz } = Equaton 7 wll be exact when f s a polynomal of degree at most Equaton 7 can be expressed n the followng matrx form where = fz F, [ φ z,,φ z ] and F=[ fz,, fz ]T The frst dervatve to equaton 7 can be expressed as f z = c φ z, 8 where φ z s a polynomal of degree, whch can be wrtten as φ z= = φ z φ z, =,, 9 Equaton 9 can be expressed n the followng matrx form: d dz Φ z= zd +, where D + s the so called dfferentaton matrx wth dmenson + From the last two equatons 9, we get [D + ], = φ z The entres of the dfferentaton matrx can be defned for LGL ponts cf c 5 SP atural Scences Publshng Cor
Sohag J Math, o, 9-35 5 / wwwnaturalspublshngcom/journalsasp 3 [33] as the followng L z L z z z,, + [D + ], =, ==, 4 +, ==, 4, otherwse ow, we ntroduce the second order dfferentaton matrx as D + whch s the dervatve to dfferentaton matrx D + The entres to the second order dfferentaton matrx can be defned for LGL ponts cf [34] as the followng [D + ], [D + ], [D + ] z z,, = [D + ],, = =, Also, any defned functon hx on an arbtrary nterval [a, b] may be approxmated by mang transformaton from z [,] to x [a,b] as: hx = hx φ x a, 3 where x = z + +a} = are the shfted LGL nodes assocated wth nterval [a, b] Equaton 3 can be expressed n the followng matrx form: hx [a,b]xh 4 In vew of equatons and 3, we conclude that d dx Φ [a,b] x= [a,b] xd +, 5 For an arbtrary and M, any functon of two varables u :[a,b] [c,d] R may be approxmated by ux,y M = = where U, = u z U, φ φ M x a y c, 6 d c + +a, d c zm + +c 7 Equaton 6 can be expressed based on Kronecer product n the followng matrx form: ux,y Φ U, [a,b] x ΦM [c,d] y 8 where U s the + M+ vector as the followng form: U=[U,,,U,M U,,,U,M ] T 9 The prevous representatons that are based on Kronecer product, provde some smplfcaton n calculatons when we deal wth our orgnal problem Also by usng frst and second dfferentaton matrces we can approxmate relatve dervatves of any functon from ts expanson as we can see next For example let u be approxmated as n 8, now we can wrte the frst dervatve to u wth respect to x as the followng: d u x x,y U dx Φ [a,b] x ΦM [c,d] y = [a,b] xd + Φ M [c,d] U y = [a,b] x ΦM [c,d] y D + I M+ U In a smlar way, we can conclude that the frst dervatve to u wth respect to y as the followng: u y x,y d c [a,b] x ΦM [c,d] y I M+ D M+ U 3 Legendre Pseudo spectral Approxmaton In order to solve problem 3, we approxmate ux, t as: ux,t [a,b] x ΦM [,T] U, t where the postve and nteger numbers and M are dscretzaton parameters correspondng to space and tme dmensons, respectvely Also we wll consder x } = and t } M = as the LGL nodes correspondng to the ntervals[a, b] and[, T], respectvely By usng and dfferentaton matrces, we can wrte the dervatves to ux,t as the followng u x x,t 4 u xx x,t [a,b] xd + Φ M [,T] t U, 3 [a,b] xd + ΦM [,T] t U, 4 u t x,t T [a,b] x ΦM [,T] td M+ U 5 ow, by substtutng from the prevous equatons n equaton, we obtan [ T [a,b] x ΦM + β [,T] td M+ [a,b] xd + Φ M [,T] t 4α [a,b] xd + Φ M [,T] t ]U= fx,t 6 c 5 SP atural Scences Publshng Cor
3 G I El Baghdady et al : Legendre Gauss Lobatto Pseudo spectral Method ow, for < < and < < M, we collocate the above equaton at the collocaton ponts x,t }, ote that these collocaton ponts are the nteror ponts not le n ntal or boundary condtons After collocatng, equaton 6 becomes: [ e + + T em+ + D M+ + β 4α e + + D + e M+ + e + + D + e M+ + ] U = fx,t, =,,, =,,M, 7 where e p s the th row of p p dentty matrx Equaton 7 can be represented n the followng matrx form usng dentty matrx: [ [I] T [I]M+ D M+ + β 4α [I] D + [I]M+ whch can be formed as [I] D + [I] M+ ] U = F, 8 A U = F, 9 where F and U are the M vectors they tae the followng forms: F = [ f,,, f,m f,,, f,m ] T, U = [U,,,U,M U,,,U,M ] T, and A s a matrx of dmenson M+, that can be defned as [ A = [I] T [I]M+ D M+ + β [I] D + [I] M+ 4α [I] D + [I]M+ ] For dscretzaton the ntal condton, we substtute 6 n gettng the followng Φ U=u [a,b] x ΦM [,T] x, a x b, ow, for <<, we collocate the above equaton at the collocaton pontsx,} After collocatng, the prevous equaton becomes: e + + em+ U = u x, 3 then n matrx form usng dentty matrx [I] + e M+ U = U, 3 whch can be formed as A U = U, 3 where U and U are the + vectors, they can be descrbed as the followng forms: U = [u x,,u x ] T, U = [U,,,U, ] T, and A s a matrx of dmenson + +, that has the followng form A = [I] + e M+ Fnally, to dscrete the boundary condtons, we substtute 6 n 3 Frst, we deal wth the left boundary to fnd the reduced form, then dong the same wth the rght boundary Equaton 3 wll be [a,b] a ΦM [,T] U=g t t, 33 ow, for < < M, we collocate the above equaton at the collocaton ponts a,t } for the frst boundary condton After collocatng, the prevous equaton becomes: e + e M+ + U 3 = g t, 34 then n matrx form usng dentty matrx e + [I] M+ U 3 = G, 35 whch can be formed as A 3 U 3 = G, 36 where G and U 3 are the M vectors, they can be descrbed as the followng forms: G = [g t,,g t M ] T, U 3 = [U,,,U,M ] T, and A 3 s a matrx of dmenson M M+, that has the followng form A 3 = e + [I] M+ Smlarly, we can wrte the equaton of the second boundary condton as the followng form e + + [I]M+ U 4 = G, 37 whch can be formed as A 4 U 4 = G, 38 where G and U 4 are the M vectors, they can be descrbed as the followng forms: G = [g t,,g t M ] T, U 4 = [U,,,U,M ] T, c 5 SP atural Scences Publshng Cor
Sohag J Math, o, 9-35 5 / wwwnaturalspublshngcom/journalsasp 33 and A 4 s a matrx of dmenson M M+, that has the followng form A 4 = e + + [I]M+ The resultng system of equatons can be descrbed, from collectng equatons 9, 3, 36 and 38, as the followng AU=F, 39 where A s a matrx of dmenson + M+, that has the form A = [A A A 3 A 4 ] For U and F, each one s a vector wth dmensonm+, and tae the followng form U = [U U U 3 U 4 ] T, F = [F U G G ] T After solvng the lnear system descrbed n 39, we can fnd the approxmated soluton to our problem Table : Max E errors wth dfferent values of for Example α =,β = α =,β = 4 86778E-5 6735E-5 5 383E-6 6473E-6 6 9853E-8 63779E-8 7 48358E-9 88885E- 8 5485E- 4574E- 9 83335E-3 8357E-3 33955E- 36599E- 4 umercal Examples In order to test the utlty of the proposed method, we apply the new scheme to the followng examples whose exact solutons are provded n each case For both examples, we tae = M and to show the effcency of the present method for our problem n comparson wth the exact soluton, we calculate for dfferent values of the maxmum error defned by E = max M U, ux,t All the computatons are carred out n double precson arthmetc usng Matlab 79 R9b To obtan suffcent accurate calculatons, varable arthmetc precson vpa s employed wth dgt beng assgned to be 3 The code was executed on a second generaton Intel Core 54M, 3 Ghz Laptop Example [] Consder the problem 3 wth the ntal condton ux, = x, x, and the boundary condtons are gven as u,t=, t, u,t=expt, and the exact soluton ux,t = x expt, n ths case the forcng functon wll be fx,t=x + β x αexpt Example [] Consder the problem 3 wth the ntal condton ux, = snx, x π, and the boundary condtons are gven as u,t=, t, uπ,t=, and the exact soluton ux,t=snxexp t, n ths case the forcng functon wll be fx,t = snxexp tα +β cosxexp t a Exact soluton b umercal soluton Fg : Exact and umercal solutons for α =, β = wth x [,] and t [,] at = for Example Table : Max E errors wth dfferent values of for Example α =,β = α = 5,β = 5 953E-3 38377E-3 6 5459E-5 7785E-5 7 497E-5 38543E-5 8 539E-7 5946E-8 9 659E-7 785E-7 4436E- 9388E- 64E-9 688776E- 9676E- 88836E-3 Example 3[] Consder the problem 3 wth the ntal condton ux, =, x, and the c 5 SP atural Scences Publshng Cor
34 G I El Baghdady et al : Legendre Gauss Lobatto Pseudo spectral Method a Exact soluton a Exact soluton b umercal soluton b umercal soluton Fg : Exact and umercal solutons for α = 5, β = wth x [,π] and t [,] at = for Example Fg 3: Exact and umercal solutons for α = 9, β = wth x [,] and t [,] at = for Example 3 boundary condtons are gven as u,t=, t, uπ,t=, and the exact soluton ux,t=t snπx, n ths case the forcng functon wll be fx,t = snπxt+ απ t + β πt cosπx Table 3: Max E errors wth dfferent values of for Example 3 α =,β = α = 9,β = 5 975E- 5358E- 6 6E-4 6E-4 7 99E-4 896E-5 8 78E-7 5939E-7 9 4869E-6 35475E-7 348E-9 7858E-9 638E-9 335E-9 69E- 944E- 5 Concluson In ths wor, we apply Legendre Pseudo spectral method for one-dmensonal advecton dffuson equaton wth Legendre Gauss Lobatto nodes The dfferentaton matrces are used to represent the unnown functons Several examples are ntroduced n ths artcle show that the proposed numercal procedure s effcent and provdes very accurate results even wth usng a small number of collocaton ponts The Pseudo spectral scheme s a powerful approach for the numercal soluton of parabolc advecton dffuson equaton Acnowledgement The authors are very grateful to both revewers for carefully readng the paper and for ther comments and suggestons whch helped to mprove the paper References [] B J oye, umercal Solutons of Partal Dfferental Equatons, Elsever Scence Ltd, Unted Kngdom, 98 [] B J oye, umercal Soluton of Partal Dfferental Equatons, Lecture otes, 99 [3] J Isenberg and C Gutfnger, Heat transfer to a dranng flm, Int J Heat Transf 6, pp 55 5 97 [4] J Y Parlarge, Water transport n sols, Ann Rev Fluds Mech, 77 98 c 5 SP atural Scences Publshng Cor
Sohag J Math, o, 9-35 5 / wwwnaturalspublshngcom/journalsasp 35 [5] Q Fattah and J A Hoopes, Dsperson n ansotropc homogeneous porous meda, J Hydraul Eng, pp 8 87 985 [6] P C Chatwn and C M Allen, Mathematcal models of dsperson n rvers and estuares, Ann Rev Flud Mech 7, pp 9 49 985 [7] F M Holly and J M Usseglo Polatera, Dsperson smulaton n two dmensonal tdal flow, J Hydraul Eng, pp 95 96 984 [8] J R Salmon, J A Lggett and R H Gallager, Dsperson analyss n homogeneous laes, Int J umer Meth Eng 5, pp 67 64 98 [9] L Lapdus and R Amundston, Mathematcs of absorpton n beds, J Physcal Chem 56 8, pp 984 988 95 [] Z Zlatev, R Berowcz and L P Prahm, Implementaton of a varable stepsze varable formula n the tme-ntegraton part of a code for treatment of long-range transport of ar pollutants, J Comput Phys 55, pp 78 3 984 [] C R Gane and P L Stephenson, An explct numercal method for solvng transent combned heat conducton and convecton problems, Int J umer Meth Eng 4, pp 4 63 979 [] M H Chaudhry, D E Cass and J E Ednger, Modellng of unsteady flow water temperatures, J Hydraul Eng 9 5, pp 657 669 983 [3] Kumar, Unsteady flow aganst dsperson n fnte porous meda, J Hydrol 63, pp 345 358 988 [4] V Guvanasen and R E Voler, umercal solutons for solute transport n unconfned aqufers, Int J umer Meth Fluds 3, pp 3 3 983 [5] C Canuto, M Y Hussan, A Quarteron, and T A Zang, Spectral Methods n Flud Dynamcs, Sprnger Verlag, ew Yor, 988 [6] C Canuto, M Y Hussan, A Quarteron, and T A Zang, Spectral Methods: Fundamentals n Sngle Domans, Sprnger Verlag, 6 [7] A Canuto and A Quarteron, eds, Spectral and hgher order methods for partal dfferental equatons proceedng of the Icosahom 989 Conference Como, Italy Elsever Scnce 99 [8] M H Carpenter and D Gottleb, Spectral methods on arbtrary grds, Journal of Computatonal physcs 9, pp 74 86 996 [9] J Shen, T Tang, Spectral and Hgh Order Methods wth Applcatons, Scence Press, Beng, 6 [] L Trefethen, Spectral Methods n MATLAB, Socety for Industral and Appled Mathematcs SIAM, Phladelpha, PA, [] B Fornberg, A Practcal Gude to Pseudospectral Methods Cambrdge Unversty Press 996 [] Mchael Ross and Farba Fahroo, Legendre Pseudospectral Approxmatons of Optmal Control Problems, Lecture otes n Control and Informaton Scence Computatonal physcs, Sprnger Verlag 95, 3 [3] M Shams, modfed pseudospectral scheme for accurate soluton of Bang Bang optmal control problems, Optm Control Appl Meth, 3, pp 66868 [4] Chun-Hao Teng and et al, A Legendre Pseudospectral Penalty Scheme for Solvng Tme Doman Maxwells Equatons, J Sc Comput 36, pp 3539 8 [5] Ben yu Guo, Je Shen and Cheng long Xu, Spectral and pseudospectral approxmatons usng Hermte functons: applcaton to the Drac equaton, Advances n Computatonal Mathematcs, 9, pp 35-55 3 [6] Ben yu Guo and Cheng long Xu, Hermte Pseudospectral Method for onlnear Partal Dfferental Equatons, Mathematcal Modellng and umercal Analyss, 34, pp 85987 [7] Yuan- yuan JI and et al, Multdoman pseudospectral methods for nonlnear convecton dffuson equatons, Appl Math Mech -Engl Ed 3, pp 5568 [8] Joseph Qun Wa Lo, Pseudospectral Methods n Quantum and Statstcal Mechancs, Ph D, The Unversty of Brtsh Columba August, 8 [9] D Funaro, Polynomal Approxmaton of Dfferental Equatons SprngerVerlag Berln Hedelberg 99 [3] B C Carlson, Specal Functons of Appled Mathematcs Acadmc Press, 977 [3] K Krsten, Spectral Functons n Mathematcs and Physcs Chapman & Hall, [3] M Dehghan and M Shams, umercal soluton of two dmensonal parabolc equaton subect to nonstandard boundary specfcatons usng the Pseudospectral Legendre Method, umer Methods Partal Dfferental Eq, pp 55 66 6 [33] J S Hesthaven, S Gottleb and D Gottleb, Spectral Methods for Tme Dependent Problems, Cambrdge Unversty Press, 7 [34] B D Welfert, Generaton of pseudo spectral dfferentaton, SIAM J umer Anal 34, pp 64 657 997 c 5 SP atural Scences Publshng Cor