Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
43 views
35 pages
4th Unit Notes Mathematical Methods
4th unit
Uploaded by
ARIF K F
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save 4th unit notes Mathematical methods (2) For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
43 views
35 pages
4th Unit Notes Mathematical Methods
4th unit
Uploaded by
ARIF K F
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save 4th unit notes Mathematical methods (2) For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 35
Search
Fullscreen
Chapter 1 Numerical solution of partial differential equations Objectives 1, When we model the realistic phenomena, we always have nonlinear partial dif- ferential equations that are not, in principle, solvable, 2. For the solution of these equations numerically, we use finite difference methods and test these schemes for the standard PDEs, 3. We develop finite difference schemes to parabolic, hyperbolic and elliptic equa- tions 4, We also study the stability analysis of the finite difference schemes for both parabolic and hyperbolic equations. 1.1 Introduction It is well known that the differential equations that can be solved by explicit analytical formulae are very few even accurate numerical approximation schemes is essential for extracting quantitative information as well as qualitative understanding of the various behaviours of their solutions. Indeed we can accurately test a proposed numerical algorithm running it on a well known equation and comparing their solu- tions. In the numerical solutions of partial differential equation, we first develop the finite difference schemes that are obtained by replacing the derivatives in the differ- ‘ential equation by appropriate numerical differentiation formulae. We thus start with 4 brief discussion of sum elementary finite difference schemes need to numerically approximate first and second order derivatives of functions. Eventually we establish and analyse finite difference schemes to heat, wave, Laplace, Poisson's equations and 3many other equatioins.Point to be noted that not all finite difference approximations Jeads to accurate numerical solutions and therefore one must also study stability and convergence of the schemes. The process includes: * Replacing differential equations by suitable finite differences, * Applying boundary conditions, * Converting into system of equations, * Solutions of the algebraic equati s, + Analysis of the solution numerically. We start with first order derivative. Assuming the function S(a), are to be approximated, is sufficiently smooth, then by the Taylor w whose derivatives theorem Ha0+) = S20) + Fae) +B pas) 4-4 *s\@)+RT, (1a) where RT is a reminder term, denotes the difference between the Ta of degree m and the original function. For the frst order xylor polynomial Neo+h) = f(20)+A/'ce) +0184) Fe) = LGe*N=I69 «guy When h < 1, we have Ie) = Lot = sla) (1.1.2) Similarly, we have 1-1) = Hao) Bry) ‘Therefore, + (or yore) +RT. (1.1.3) H20) = L0= Sch), when h< 1. (1.1.4) Difference of (1.1.1) and (1.1.3), we get {(@o+h)— f(@—h) = 2hf'(z0) + RTH) 0+ A) — flay — A = fm) = Feet Seo 1) when h<1. (1:5) ‘Thus, for the first order | fe) Gott) = Seo) + Forward finite difference operator (0) ~ flo ~ h - Led =Seo=1) + Backward difference operator 0+ A) = flzo— hy . Hert = Heo- 1) + Central difference operator.To test the accuracy of the above schemes, let us consider f(z) = cosz. At ro 1 J'(1) = cos 1 = 0.5403023, By the forward difference operator, we have inz, then f'(2) = J'(z0) = 00829 = cos 1 => Soot He) _sin(1 + 4 ~sin(1) Now h is the only variable. Therefore for different values of h, we have ‘Table 1: Comparison of forward finite difference scheme with that of exact solution: | Exact | Forward | Error 0.1 _[0.5403023 | 0.497364 | -0.042930 ‘.01 | 0.5403025 | 0.536086 | -0.004216 O.001 | 0.5403023 | 0.539881 | -0.000421 O.o007 | 0.5403023 | 0.540260 | -0.000042 From the table 1, we observe that as h decreases the error decreases. Similarly for central scheme ‘Table 2: Comparison of central finite difference scheme with that of exact solution: h_| Central scheme Error O.1_| 0.53940022 | 0:000900053 ‘.01 | _0.54029330 | _0.000009004 ‘d.001 | _0.54030221 | 0.000000009005 O.0001 | 0.54030023 Dever Therefore from tables 1 and 2, it is observed that the results of central difference schemes are more accurate than forward finite difference as h decreases. To approximate any order derivatives, we need to evaluate the function at more than two points. In general, an approximation to an n™ order derivative f(z), approximate second order derivative, addition of (1.1.1) and (1.1.3) gives Float) + flaa—A) = 24(ee) +2 fleeynt + 0104) 2 ey = HEetA=2l +f), oy = sa) = Hert N= 2flea)+ fe) | he 1.1.6)"his is second order finite difference scheme to second order differential equation. ‘To assess the ncctracy of the scheme, we let Fx) =e?) F(a) = A(e? +2)e", and at x = 1, we have £'Q) = Ge = 16.30969097 And by (1.1.6), we have ECA — 26h 4. o(t“H? sr) = 7 ‘Table 3: Comparison of second order finite difference scheme with an exact solution and corresponding error: T__[ second order scheme [ Error OT 16.48280823 __-0.17320726 oor 16.31141205 __ F0.00172108 0.001 16.30970819__-0.00001722 ‘O.0001 | _16.30060115 _F-0.00000018 Note that again as h decreases error also decreases making this scheme second order accurate. We assume throughout our discussion that the the given partial differential equation is well posed (i.e if the solution exist then it is unique and depends continuously on the given conditions ) In finite difference method, we discretize the given region as follows: In one dimension : z = zp+nh, n=O0(1)N In two dimension : 2 = ap+nhy, n=O(1)N Ym = wtmhy, m=0(1)M where hy, are grid sizes in x and y directions, ond N= 242%, Af = 29-10, In temporal direction : ty = mk, for, n = O(I)N. Thus, the resulting grits in the space and time domain are as follows: We have from the Taylor's theorem that U( to fo) + hite(‘0, 0) Free, ta) + O(K and u(t ~hylo) = ul; to) — hue( toy la) ‘eet to) 9) 4. 0(n8)‘The above implics that u(to + Ay to) + (tq = hy to) = 2u(ro, to) + APues(to + ta) + - — —s and when h <1, uzs(to)to) = lsat ta) = Dal sovts) + ulgo— Into), (11.7) For general z, t, we have u(e,t) = MEER = 2ute 1) + ule — hy to) = Une = Bina taste (118) Similarly, in temporal direction, we have from the Taylor series expansion that . uldo,ta-+ 4) = uleouta) + kuz, 4)+ Stott) +——— (1.9) a -4 (Ay, 2 > Uetrejr) = Co ose)? u(zo,to — ) = u(zo,to) — Kus( ro, to) + Fy ue(osto) + — — (1.1.10) ‘Therefore addition of (1.1.9) and (1.1.10) gives 70, to + k) — 2u(zo, to) + ), to — ky} tua(a0,to) = 2 eats) + wet 8) For general z and t, we have fide) = Sate axe +u(z,t—h) = tena Pina tine, wath In general we define that, we define that ‘u(z,t) = u(zo + mh, to-+ nk) = U(tmyte) = tin OF UN. 1.2. Parabolic partial differential equation Parabolic differential equations arise in various branches of science and engineering such as fluid dynamics, heat flow, diffusion, elastic vibrations, ete. ‘The model equa- tion used to illustrate the above finite difference scheme for parabolic equation is the one-dimensional unsteady heat conduction equation. In the following, we derive different finite difference schemes for the parabolic equation. Consider the parabolic equation du _ Ou an : (124)ditions, where R = in an arbitrary range 2 with suitable initial and boundary con pala ee Ly $x$ Lat > 0, Ly and Ly are boundary conditions for 2. As d the grid points in time and space directions are given by th = mk, n= 0,1,2,—--) Im = Ly+mh, m=0(1)M. The spatial nodes on the n™ time grid result into an n‘* layer or level. . shall define uj, to be a function defined at the point (mh,nk). Therefore ut, will be our appropriate solution to the given equation. Plugging the above appropriate finite difference schemes into (1.2.1) » @),.-@) ’ ot, (mite) O27, Cemta)” ‘we get the following schemes in finite difference solutions WB Bau, aan SBS = a He oa aa, (123) aoe ee OE = ant oF (1.2.4) ‘The term O(-) in the above expression denotes the order of the method. Neglecting these terms and on simplification of the above schemes, we get the following different schemes: 1.2.1 Schmidt method From equation (1.2.2), we have unt = (1 20)u, + (un gs tut) (1.2.5) ‘which is two-level formula and an explicit finite difference scheme. It will be that this method has a conditional s of the method. shown tability. The following figure illustrates the form. 1.2.2 Laasonen method From equation (1.2.3), we have ~Auhg (2+ Tut, = aut (1.2.6)9 Figure 1.1: Schmidt two-level explicit. scheme. is also a two-level formula but an implicit finite difference scheme. ‘The scheme (1.2.6) can be rewritten, for convenience after n is replaced by (n +1) as — Aunhh + (1+ 2a)upt! — Aunt, = un. (1.2.7) ‘The following figure illustrates tlie form of the method, = HP Need jas P ter! hoot lot lott favor Figure 1.2: Laasonen two-level implicit scheme. 1.2.3. DuFort-Frankel method From equation (1.2.4), we have uh = (uly — Qu, + uh) +t (1.28) ‘which is three-level formula and an explicit finite difference scheme. The following figure illustrates the form of the method. lasnes oo lmsnnes brim a) mtn sha Pte eL m1 S | la-tP tev Figure 1.3: DeFort-Frankel three-level explicit scheme. In the above formulae, we have >= fy10 1.2.4 Crank - Nicolson scheme The solution at (m,n+ 1) and at its neighborhood points can be expressed in terms of average of (n+ 1)* and n'* levels in spatial direction as Soe pia beat eae eed. ‘Therefore, parabolic equation (1.2.1) becomes for forward finite difference scheme aos - See t-te, up, + U4] 4 ae > Grae Fa aaah edu, (29) ‘The schematic diagram of the Crank-Nicolsoa scheme is given below. : | Li ee las Le Pint fens les bet Cap Figure 14: Crank-Nicolson two-level implicit scheme. Explicit schemes: ‘The schemes (1.25) and (1.2.8) for the solution ofthe partial difterential equation + 1,m,m—1) on (n +1)" level fra ee nat Simaltaneously in tems ofthe known solution at (men) onthe ne implicitly, these are known 1.2.5 Treatment of boundary conditions Let the initial condition for the parabolic ‘equation (1.2.1) be given by ulz,t = to) = f(z).In finite difference notation: tufitms te fo) = S(t) Similarly, the boundary conditions are ues Lid) = a(t) ula = Lay ty = Wem Mes Lat) = (0) ht = San: Thus, we have now converted the given partial differential equation into a complete finite difference scheme by deseretization. Example: Solve the one-dimensional heat conduction equation Ou Fu oes : = B= pat OS TSU IDO with conditions u(x, 0)=sin2nz, O
09, = Given boundary conditions become (0,1) =0= ug =0, and u(ie)=0 + uy We have that = 2% ‘The Schinidt method whieh is an explicit scheme is given by A= 2A)um + Aig + Ur) form = 1,2,3.12 For n=0 and m= 1,m=2,m = 3, we get 1) 04 4(u9 + uf) (1-28) ats depeng = (j) ate pede = fx t+ $040) = oan loi 40 1 4. = w= gut git ut) = 5x04 5(-141) = 0 1 ut 0 J 4 1 4 =-l whos sult felted) = g(-1)+ 50+0) = -o1nnt The first solution level are u} = —u} = 0.1111, uh =0. For n= 1,m=1,m = 2,m=3, we get Ane ies 4 = git g(u+m) = (0.1111) + 5(0 +0) = 0.01234 2 ty nay — 1044 w= tal B+il) = 5045.0) =0 eee fy fai 1d 7 = MBs gibt (ube) = 5 x (0.1111) +5040) = — 0.01234 The second solution are: u? = uj* = 0.01234 , ul = 0 ‘The Laasonen method which is an im plicit scheme for the give partial differential equation is given by TAR + (L+ 2a — ath = an ‘The frst level solutions are obtained by solving the above system of algebraic equa- tions > uh =u} = 0.520412, ut =13 Similarly, the second level solutions are 2 uj = 3 = 0.28027 , up = 0. ‘The Crank-Nicolson implicit scheme for the riven partial differential equation is” d (Le AyuR = Sumit — Bunt = (1 aug + 3 Juan +d du, forn=0; m=1,m=2,me=3, we have’ ime god = 4 4 ue ota 2 on zng . 8 pitt putt ju = 3 T+ 5x045x0 = 3 5 2 2 = gXO+ 5x 145 x (-1)=0 - Fx Cn+2x042x0= ‘The above system ean conveniently be written as B-bofu 48 3{lal- op retlal [4 ‘The first level solutions are obtained by solving the system of algebraic equations as 4 uj = 0.384615, ub =0 Similarly, aoa ub=—ug= 147929, i =0. 1.2.6 Treatment of the derivative boundary conditions Suppose us(0,¢) = a(¢) and tus = (1,1) = b(¢) are given then, there are three different ways to treat such boundary conditions. © Forward Scheme: Let u,(0,t) = a(t) Let sue(ayt) = MEH MD = wat Atz=0: Thus, ut = Ara(t) 4+uf or uf = uf - Aza(t). Use any method to compute uf and use implicit scheme, then derivative of boun (1.2.10) (1.2.10) to compute ug at x = 0. Ifit is dary conditions adds one moreMW « Backward Scheme: This is usod vary rarely in the literature. © Central Scheme: 2 ule +h) = ule 0) = g¢y, 2dr = upsul,+2Aza(t) or u,(z,t) = = uf — 2Aza(t). (1.2.11) Now use usual explicit method to compute uf and use (1.2.11) to compute u2. If implicit scheme is used, this introduces one or more unknown and one more equa- tion in the system of algebraic equation and replace u-1n is the system by equation (1.2.11). Thus, the grid appearing just outside the boundary and it is called Ghost Point and fictitious point. Similarly for at other boundary is us(1,t) = (0). In implicit scheme, if only derivative condition is given, then we need to solve Mf system of equations and if two derivative conditions are given, (M + 1) system of equstion has to be solved. Example: — Solve the initial-boundary value problem ty = tee u(z,0) = 1 u,(0,1) = 0 = u(1,8), ¢>0 using Crank-Nicolson scheme. Take Az =}, At level. Solution: Let we have that \= 2% 4. Obtain solution at second u2(0,¢) u,(1,t) u,(z,0) = ‘Thus, from Crank-Nicolson scheme, we have that — Sunt + a+ ayes — Aus (+ A)uE + Aun. Now forn=0 m=0 Ft dg ae zut Fo m=z pata m=3 a+ ie2 24 Aut = : 3 Ta 1 “pit Poa aide ea pedi = Rusty = oes -} 0 o]fu $-2o[|u]_ 0 - § -] fa oo-g ¢] ly ‘The solutions are given by => uh =.0909, uf = 3636, u} = 1.3636, u3 = 1.0909 Similarly, the second-time level solutions are given by uj = 1.3264 , uj = 1.7603 , uf = 1.7603 , u3 = 1.3264. Example: Solve the non-homogencous initial boundary value problem: du _ u Rape th@), reli, +20 subjected to the conditions u(z,0) = 2(1-2), 2€ (0,1) u(0,t) = 10sint u(l,t) = 4sin6t and take F(z,t) = sin2nzsin4nt , k= 0.01, h = 0.25 using explicit and implicit methods for two time levels. Example: Solve the initial value problem ty = tZ€ (1), t>0 u(z,0) = os F 2€ (0,1) u,(0,t) = O=u(1,t), 20 with Az = 0.25, At = 0.01 using implicit and explicit schemes for two-time levels,16 Example: Solve the initial-boundary value problem 0.25 , At = 0.01 , using C-N scheme for two two level scheme. Example: Solve the partial differential equation 4 _ oy Ot ax? subjected to = Oatz=Oand1 2x for0
At= 0.02 Example: Solve the partial differential du _ Oy Begg O
0, |é| <1 satisfies automatically. If there is no condi scheme is said to be unconditionally stable. yn on A, then the 14 Examples Solve the initial-boundary value problems using any explicit and implicit methods: Me = tee, OSEE1, #30 u(z,0) 2,2 € [0,05] and u(z,0) =20-2),2 € (05,1] u(0,t) = u(1t)=0, t>0 Take Az = 0.2, At = 0.01 , obtain the solution for second time level. Solve the initial-boundary value problem % = Us, OSTS1, t20 ulz,0) = x,2€/0,0.) and u(z,0)=1~2,2€ (05,1) u(0,t) = u(i,2) Take Az = 0.25, 4 = 0.5 , obtain the solution for second time level. Solve the initial-boundary value problem = te, OSE<1, t20 u(z,0) = sin@2nz), O<2<1 ‘u(0,t) u(1,t)=0, t>0 Take As 0.2, A=0.25 , obtain the solution for second time levelai 1.5 Introduction ections, i In the previous Aimpier we have studied the finite difference methods for the solution of only parabolic partial differentia! equations and we also studied stability criterion for some of the explicit and implicit schemes. The finite difference schemes that are derived for the parabolic equation can easily be extended to hyperbolic and elliptic, equations. In this chapter we use the same finite difference schemes to solve the two-dimensional parabolic equations and sec that the clegant and efficient Crank- Nicolson scheme for one-dimensional parabolic equation now becomes laborious for two-dimensional parabolic equation, and produces a pentadiagonal matrix, We shall derive the ADI method to avoid having a pentadiagonal matrix. 1.6 Two-dimensional parabolic equation We can readily extend the finite difference scheme used for one-dimensional heat equation to second and higher dimensional parabolic equations. Let. us consider two dimensional heat equation = Fees, o
0: u(Lisyst) = gi(ust) , u(Larust) = g2(vt) (1.6.3) u(s, Ly?) ga(t,t) , u(z, Layt) = ga(z,t). Define the co-ordinates (z, yt) at the nodal points of the solution domain by poids, y=jhy, t=ndt ‘Then u(z,y,t) = uliAz,jAy,ndt) = uf, (1.6.4) Using an appropriate finite difference schemes discussed previously in the equation (2.2.1), we get ot oun, wyt= wy Lyn pee fa Bt Bat (Whang — Daly tubing) + a (whan — 200s + uly) sui) = Mulag + uhagl + 21 — 2da)ut + Aoluey ys + uly a.6.5) whereer” ‘This method is an explicit method for two-dimensional and is computationally ex- pensive when Az and Ay — 0. Hence it is impractical for most of the problem. However, as in ease of one-dimensional parabolic equation, the Crank-Nicolson scheme Tor the two-dimensional heat conduction can be obtained by approximating spatial \ Variables on (n+ 1)" and n! level, io, approximate the above two-dimensional heat equation as oi am fu uN /oty ata” Sus 1) (le Btu ea ) 1.66) ' ar a | ort * az), * lot az), (aa) Substituting appropriate finite difference ‘operators for derivatives at (n +1) and n‘* levels, we get (14 AL + aadunft — met gymtty Aerie ne Bits + UA) — Pung tuft, Gone Betas tut Bt Feta) (102) which is Crank-Nicolson implicit scheme for two-dimensional heat. equation. It re- auires the solution of (AM — 1)(V ~ 1) simultaneous algebraic equations for each time-level. Also it forms a Pentadiagonal matrix on each time level which becomes laborious with simple methods. So, to avoid the solution of pentadiagonal ‘matrix, Peaceman and Rachford in 1955 introduced a method called Alternating Direction Implicit(ADI) method and solved success! fully two-dimensional parabolic equation. In this method, itis required to solve tridiagonal system as it is required to solve Pentadiagonal system in two-dimensional Crank-Nicolson method, 1.7 Alternating Direction Implicit method ‘We shall divide (n + 1)* and n levels into two levels from n to n +}andn+t fon +1. In the first instance, from n ton + 4, use an implicit scheme for one of the second derivatives say $2 and an explicit scheme for other one say Ee which results into a tridiagonal system. In the next instance, use implicit scheme for a and explicit scheme for #¥ which also results into tridiagonal scheme, more clearly (7a) (17.2)28 ‘Therefore, from equation (2.3.1), we have wi ay (ath = tals wan = 2a tn a ‘Ax? By? Z meh Mn Ain dain dyn eA SE Banh — Sat = = Aaduty + Miy + 7.8) 2 gt Similarly from (2.3.2), we have wt aT ath auth al wth = aut ere Az? Ay Mees nth dg nth | dnt Sa dunt — Bugs, = Bangs = = aaa + Aan + antl za) where in co At re ‘Thus, system (2.3.3 and (2.3.4) results into tridiagonal system. The system (2.3.3) produces solution along lines parallel to z-axis and (2.3.4) produces solutions along lines parallel to y-axis. The schematic diagram of the ADI method is given in the following figure. Alternating direction implicit method reduces the computational work by 25 times than the explicit method and by 7 times than Crank-Nicolson scheme. Example: Find the solution (at first level) of two-dimensional heat equation ou_ Fu Fu 5 Bae top OSnYSI\ With conditions u(z,y,0) = sinaz sinzy, OS ty S1 u = Oon the boundary for ¢ > 0 using ADI method, with Az = Ay = Lash Solution: Given that, Ar=dy Defining the initial condition as Hy a yt uy = sin(riAz)sin(njAy) = sin(i)sin(i5) wy = o= yh, vg = om ut, For n =0: equation (2.3.3) becomes ‘This forms system of equations as “LE FILS }-(S] ‘The solution of the above system gives solutions along the z-axis as for j=2,i=1 and 2: 9 ae
Oand0 < sin? 4 , sin? s < 1. Thus, the alternating direction implicit method is always unconditionally stable. 1.8 Hyperbolic partial differential equation Hyperbolic equation are used to made a large class of applications namely aerody- namic flows, flow of fluids through a porous media, atmospheric flows, the solution of28 hyperbolic equations tends to be more complicated than that of parabolic equations, ‘init most techniques for solving parabolic equations are extended to these hyperbolic equations, Let the hyperbolic partial differential equation given by Ou Sasi, (>0 (1.8.4) oe with boundary conditions: u(z,0) = g(x), w(2,0) = ga(z) u(Lit) = galt), ula =alt), t>0. (1.8.2) 0 A finite difference approximation to the equation at the mesh points (17, i) = (ih, 7k) on a rectangular mesh covering the solution domain is wh = 2d ft dea = 2d + ha co io mo ugh = Maly +20 — uf Puy — uf? (1.8.3) where A = £. This is an expli points along ¢ = 2k,3k,— — level are known(or computed). In order to start the computations, we need the conditions on two levels t = tj and t=). These can be obtained from the given initial conditions, Defining the boundary conditions: it scheme which gives approximate values at mesh from the mesh points along ¢ = k and its previous u(e,0) = w(ih,0) = yo = gi(ih) u(0, 1) (0, 5k) = wos = 9s(5k) u(Lt) = ulil, gk) = w(M, 5) = o4(5k), (1.84) 1 ‘and derivative boundary condition: ur(2, 0) = Mast Stason Ht = = oo(ih) Te Magar = Maga — Dhgal th) at f=0 > wy = ua — 2koalih). Example: Solve the above hyperbolic partial difference equation ae _ ou OF © Ox?29 with conditions; u=0 ot 2=0 and 1, 120 and initial conditions: w= fain, m=0 atl=0. 0< with Ar Solution: 0.25, k= At= 0.1. Obtain the solution at second time level. An explicit scheme for given wave equation is tiga = Muigrg + 211 — Puy + Puiary — May Let A= § (zo) = Mtoe u(0,t) = u(e,0) = Jsin(nih) = gain (%): For j ua = 0.16uj41,0 + 1.6840 + 0.16u:, = ta = 0.5 (0.16(uir10 + For i=1,2,3: ty = 0.5 (0.1620 + too) + 1.680) = 0.5 (0.16 x 0.125 + 1.68 x 0.7071018) = 0.0842462, un = 0.5 (0.16(ts0 + t0) + 1.68u20) 0.5 (0.16(0.088388 + 0.088388) + 1.68 x 0.125) = 0.11914, 0.5 (0.16(ugo + to) + 1.6850) 0.5(0.16 x 0.125 + 1.68 + 0.088388) = 0.0842462. ‘Therefore the solutions on first Jevel are given by uy = uy, = 0.0842462, uz = 0.11914. For j=1 tuyg = O.1Gupyay + 1.68u,2 + 0.16u5 42 — Ui, 0 = 0.1G(uisay + Mea) + L68u.1 — Us30 For # = 1,2,3, we have tha = 0.16(tay + tor) + 1.6801 — tho 0.16(0.11914) + 1.68(0.0842462) — 0.125(0.707407) = 0.072207 0.16 (tg, + uy) + 1.68u2) ~ a0 = 0.16(0.0342462 + 0.0842462) + 1.68 x 0.11914 - 0.125 = 0.1020113 tie = 0.1G(ug, + Un) 1.68 % tan — tg0 = 0.16 x 0.11914 + 1.68 x 0.0842462 — 0.125 x 0.70717 = 0.072077 The solutions on the second time level ate ta = tiyy = 0.072207. upp = 0.120113. un Example: Solve the hyperbolic partial difference equation Fu Fu Oe 9g OS 781 with conditions u(z,0) = sin(xz), u(z,0)=0,0<2<1 and u(0,t) = 0 = u(l,t), ¢>0 using an explicit scheme. Take ‘solution: Given that A= $= k Initial conditions are: Obtain solution at second time level xu=% M20) = sin(se) = typ = sin (Z) u(z,0) = 0 wa = Boundary conditions are: uO) = 0 + wy = 0, ul) =0 = uy; An explicit scheme for given partial difference equation is 0 © asst = Musany +201 =) Quay — 2a (1.8.5) For j =0, we have 1/9 7 ung (glee + wns) + Jus) ‘Therefore, for i= 1,2,3, we have 1/9 7 mm = 5 (Ro+o+3 x ox071) = 0.59061 1/9 7 um =} (Zorn +001) +2 1/9 U a (Re +agx ozo71) = 0.59061 = 0.83524‘Therefore, the first level solutions are uyy = tyy = 0.59061, way = 0.89504 Similarly, for j = 1, we have 9 7 0 (wnat oan) + fa ~ me) ‘Thereforo, for i = 1,2,3, we have 9 tna = 7G (083524 4-0) + i x 0.50061 ~ 0.7071 = 0.279501 0.39528 9 tn = (0.50001 +-0.50001) + Z »0,89524 ~ a van = Pe(O-+ 088624) + 2 x 00061 ~ 0.7071 = 0.270501 which are the second time level solutions. Example: Solve the wave equation with u(,0) = 2(1-2), OS251 (2,0) = 0, O
€4+€1 = 2M (cos ph - 1)+2=-AMsin? > +2 jh = @-(2-aNsin? Set 1=0 2(1 — 2n%sin?® &) a /4 (1 = 2x2sin? 2) — —————EESSErrrs'. z ph 2 Bl 2 sin? = 2ytsin? BH = 2x8sin? ( anrsint 5 It fr-axsnr > 1, &>1, = the scheme is unstable. i [parent 4 < 1, the roots are complex. It fp=arrsine =i ce — 2asin? BA 2rsint F co l@lsl = n1s1-arsint <1, For right inequality, 4 <0 which is not true. For left inequality —1 < 1 — 2\?sin? a ' 1s iene => 12 aint Bo int Bh cy => Psisac. ‘Thus, the explicit scheme is stable. 1.9 Elliptic partial differential equation Elliptical partial differential equations are always boundary value problems in the region R with Dirichlet, Neumann or mixed boundary conditions. In the application of finite difference schemes to elliptic partial differential equations, solution is obtained at all points or grids of the region at a stretch or at a time. Thus this leads to a very large number of unknowns i.e system of algebraic equations. Examples are O72 = 05 tse tty =0 Poisson's equation in two-dimensions : A?u= f(2,y)33 Consider the solution of elliptic partial differential equation 1 tee + ty =0 (1.9.1) Using a finite difference schemes in the rectangular region A with step lengths Az ‘and Ay in the x and y directions respectively. Lat the grid points be Im = tomy, m=0(1)M, j Ym = tone, n=0(1)N. } Define the numerical solution at the nodal point (2m, Yn) by (2m, Un) = mm = Mmttin = 2m + natin) (Unt = 2th + Urasn=1) oe eee eee ar : the Laplace equation (2.5.1) then becomes Untign + Um—iin + Amt + Urn) — (2+ 20)train (1.9.2) where A= 25. When Az = Ay, (2.5.2) becomes Um tiin + man + tmnt + mnt — Atma = 0 (1.9.3) ‘This formula is called five point formula, Example: Solve the Laplace equation Usrtty=0, 2S ay S1 subjected to the conditions (2,0) = 22, u(z,1) = 22-1, u(0,y) = u(l,y) =2—y, with Az = Ay = } using five point formula, Defining boundary conditions:4 1, the five point formula (2.5.3) for Laplace equation becomes 0 Given that Az = Ay Unattin + Unatin tmnt + tmnt = Aton : and m forn= 1,2: tg + up, + the + to ~ dy = 0 an + ta + tar + tro ~ diay = 0 un tue tts +t —4u2 = 0 use + ti2 + u23 + Ua — dun = 0. Using the above appropriate boundary conditions, the above system can be written as tytn dun = 2.3332 t+ tm dun = -2.9999 wa ttn —4uj2 = =I tha +a — du = —1.6666 ‘This forms the linear system of equations as 11 4 0] [a, 2.3332 140 a |) a, 2.9999 10 4 le |e Sin Of a lee =1.6666, Solutions are obtained using any of the linear solver, and solutions are uy = 1.0832, un = 2499, m2 = 0.7499, uaa = 0.9166. Example: Solve the Laplace equation ties + ty = 0, 0 <2, y <1 subjected to the conditions u(z,0) = 0, u(0,y) = 0, u(1,y) = 0, uy(z,1) = Gz, with the five point formula. Take Ax = Ay =}. Solution: Given that Az = Ay =} Defining boundary conditions: u(2,0) = timo, u(0,Y) = ton =0, u(1,y) mete and derivative boundary condition: mn VY) = Umntt = tmnet — ) tn " Steen = we ALY= 1, Wehave tina = tina +a5, ‘The five point formula is given by Manton Urnatin + Mma ty = Attias For n= 1; m= 1,2, we have ay + toy 42 + yo — dy = 0 AUgy + atten + tay — Atay For n 2, m = 1,2, we have Un + toa + ny + tn — due = 0 Uso + tye + zy + tay — tan = 0- For n=3, m= 1,2, we have ‘gg + toa + tng + te — As usa + tat uae + uae — Aa Using the given boundary conditions, the above system can be written in 41 1 0 0 0)]fum 0 1-40 1 0 0 |] um 0 100-41 1 0 || ue 0 o 1 1 -4 0 1 /) um 0 0 0 2 0 -4 1 || ths 1.333 oo 021 un —2.666 ‘The solutions are obtained as suyy = 0.1050, uaz = 0.3030, ty =O1I7I,, toa = 0.9696, tay = 0.7434, 2s = 1.0848 1.9.1 Poisson’s equation ‘Two-dimensional elliptic partial differential equation is tne + ty = S29) (194) in R subject to the given boundary conditions u(z,y), where R is the region inside. For Poisson's equation, when finite difference scheme are used, results always into a non-homogencous algebraic equations. In Poisson's equation f(x,y) may be constant36 or function of x or y. Example: Solve the boundary value problem tee + ty =sinnzsinzy, OS t,y'S1 subjected to the conditions w= 0 on the boundary, Take Ax = Ay Solution: Given that Ar = Ay =}. Define the boundary conditions: formula is given by 5 Umo = Yon = Uma = Ugn = 0. The five point Umtin + Um=iyn + mnt + Umn-1 —4mn = (Az)? sin(nmAz) sin(andy) sin) sin( 22) For n = 1, m=1,2, we have Wat + Wor + tha + tao — dy = 0.08333, ai + thy + tan + Ugo — dy = 0.08333 For n = 2; m= 1,2, we have aa + Wor + tha + ty ~ dure = 0.08333 Usa + tae + tas + tiny — dig = 0.08333. ‘Therefore, using the given boundary conditions in the above, the system becomes 41010 0)fun 0.08833 1-40 1 | fun} _ | 0.08333 100 -4 1 |] au] ~ | 0.08333 Oe tae ilies 0.08333 The solution is given by ui: Way = ura = use = 0.04166. Example: Solve the Poisson's equation Use + ty -1, (abla subjected to the conditions u = 0 on the square with h = 0. 1.10 Examples Solve the initial-boundary value problem using any explicit methods: My = tse, u(t,0) = sin*(r2), ru(2,0) =0, O
037 ‘Tale Ar = 0.2 , A= 0.2, obtain the solution for second time level. Solve the initinl-boundary value problems using any explicit methods: Ue = Ure, u(z,0)=d4r—2?, u,(z,0) =0, u(t) = u(4,t)=0, 0>0 ‘Take Ax = 1, \= 1, obtain the solution for second time level. Solve the boundary value problem using five-point formula Uige + Uyy = —10(z? + y? + 10), with u = 0 on the boundary and take Az = Ay = 1 1.11 References 1. M.K. Jain, 8. RK. Iyengar, R. K. Jain, Computational methods for partial differential equations, Wiley Eastern Limited, New-Delhi, 1994. .. A Gourdin, M. Boumabrat, Applied numerical methods, Prentice-Hall of India, New Delhi, 1996. 3. M.K. Jain, Numerical solution of differential equations, 2nd edition, Wile Bast- em Limited, New Delhi, 1984. 4. G. D. Smith, Numerical solution of partial differential equations, Oxford Uni- versity Press, London, 1965. 5. A.R. Mitchell, D. F. Griffiths, The finite difference method for partial differ- ential equations, John Wiley and Sons, 1980.
You might also like
Finite Difference Methods Notes
PDF
No ratings yet
Finite Difference Methods Notes
125 pages
MSC Thesis PDF
PDF
No ratings yet
MSC Thesis PDF
75 pages
A. R. Mitchell - D. F. Griffiths - The Finite Difference Method in Partial Differential Equations-John Wiley & Sons Incorporated (1980)
PDF
100% (1)
A. R. Mitchell - D. F. Griffiths - The Finite Difference Method in Partial Differential Equations-John Wiley & Sons Incorporated (1980)
296 pages
CFD Part 5 - 2 FDM Elliptic PDE
PDF
No ratings yet
CFD Part 5 - 2 FDM Elliptic PDE
49 pages
Finite Difference Method
PDF
100% (3)
Finite Difference Method
10 pages
Solution of PDE's Using Finite Difference Method
PDF
100% (1)
Solution of PDE's Using Finite Difference Method
104 pages
Partial Differential Equations and Finite Difference Methods
PDF
No ratings yet
Partial Differential Equations and Finite Difference Methods
15 pages
Chapter Two. Finite Difference Methods
PDF
100% (2)
Chapter Two. Finite Difference Methods
11 pages
Finite Different Method - Heat Transfer - Using Matlab
PDF
No ratings yet
Finite Different Method - Heat Transfer - Using Matlab
27 pages
N.solution of IVPDE
PDF
No ratings yet
N.solution of IVPDE
37 pages
Finite Difference Methods: MSC Course in Mathematics and Finance Imperial College London, 2010-11
PDF
No ratings yet
Finite Difference Methods: MSC Course in Mathematics and Finance Imperial College London, 2010-11
40 pages
Partial Differential Equations: Solution by Finite Difference Method
PDF
No ratings yet
Partial Differential Equations: Solution by Finite Difference Method
34 pages
Civil & Environmental Engineering 253
PDF
No ratings yet
Civil & Environmental Engineering 253
74 pages
Finite Element Methods For Hyperbolic Systems
PDF
No ratings yet
Finite Element Methods For Hyperbolic Systems
56 pages
Chapter 4
PDF
No ratings yet
Chapter 4
6 pages
1 9781611975314 ch2
PDF
No ratings yet
1 9781611975314 ch2
24 pages
Finite Difference Representation: X y X U X X y X U X y X U y X X U
PDF
No ratings yet
Finite Difference Representation: X y X U X X y X U X y X U y X X U
5 pages
Stability Numerical Schemes
PDF
No ratings yet
Stability Numerical Schemes
15 pages
FD Methods For Parabolic Pdes: 10:12:57, Subject To The Cambridge Core Terms of Use
PDF
No ratings yet
FD Methods For Parabolic Pdes: 10:12:57, Subject To The Cambridge Core Terms of Use
30 pages
Partial Differential Equations: Hoang Hai Ha
PDF
No ratings yet
Partial Differential Equations: Hoang Hai Ha
24 pages
Linear
PDF
No ratings yet
Linear
19 pages
Chapter 2 - Numerical Methods For Parabolic PDE
PDF
No ratings yet
Chapter 2 - Numerical Methods For Parabolic PDE
6 pages
Numerical Methods: Marisa Villano, Tom Fagan, Dave Fairburn, Chris Savino, David Goldberg, Daniel Rave
PDF
No ratings yet
Numerical Methods: Marisa Villano, Tom Fagan, Dave Fairburn, Chris Savino, David Goldberg, Daniel Rave
44 pages
Finite Differences
PDF
No ratings yet
Finite Differences
11 pages
C With Data Structures 7-14
PDF
No ratings yet
C With Data Structures 7-14
31 pages
Lecture1 PDF
PDF
No ratings yet
Lecture1 PDF
9 pages
Explicit Schemes: Section 1
PDF
No ratings yet
Explicit Schemes: Section 1
13 pages
Chapter 02 - Finite Different Method
PDF
No ratings yet
Chapter 02 - Finite Different Method
31 pages
Finite Difference and Finite Volume Methods For Transport and Conservation Laws
PDF
No ratings yet
Finite Difference and Finite Volume Methods For Transport and Conservation Laws
56 pages
Class PG OE NM Gardens Final
PDF
No ratings yet
Class PG OE NM Gardens Final
18 pages
Quening Theory
PDF
No ratings yet
Quening Theory
21 pages
The Solution of Nonlinear Hyperbolic Differential Equations Finite Differences
PDF
No ratings yet
The Solution of Nonlinear Hyperbolic Differential Equations Finite Differences
13 pages
Summary
PDF
No ratings yet
Summary
13 pages
PDE
PDF
No ratings yet
PDE
39 pages
WO820-L3b-Finite Difference Method
PDF
No ratings yet
WO820-L3b-Finite Difference Method
24 pages
Finite Diff PDF
PDF
No ratings yet
Finite Diff PDF
14 pages
Numerical Hyperbolic Systems
PDF
No ratings yet
Numerical Hyperbolic Systems
42 pages
Botany Notes
PDF
No ratings yet
Botany Notes
17 pages
Numerical Methods: Marisa Villano, Tom Fagan, Dave Fairburn, Chris Savino, David Goldberg, Daniel Rave
PDF
No ratings yet
Numerical Methods: Marisa Villano, Tom Fagan, Dave Fairburn, Chris Savino, David Goldberg, Daniel Rave
44 pages
Discretization Techniques
PDF
No ratings yet
Discretization Techniques
29 pages
Numerical Analysis: Dublin Institute of Technology, Kevin Street School of Mathematical Sciences A Course in
PDF
No ratings yet
Numerical Analysis: Dublin Institute of Technology, Kevin Street School of Mathematical Sciences A Course in
52 pages
Numerical PDE
PDF
No ratings yet
Numerical PDE
12 pages
Finite Diference Method
PDF
No ratings yet
Finite Diference Method
10 pages
Finite Difference Method
PDF
No ratings yet
Finite Difference Method
7 pages
JavaLab EditVer2
PDF
No ratings yet
JavaLab EditVer2
14 pages
MHD Unit 3
PDF
No ratings yet
MHD Unit 3
7 pages
AME 301: Differential Equations, Vibrations and Controls: Notes On Finite-Difference Methods For
PDF
No ratings yet
AME 301: Differential Equations, Vibrations and Controls: Notes On Finite-Difference Methods For
19 pages
Advection Eqn Is Unstable
PDF
No ratings yet
Advection Eqn Is Unstable
9 pages
Partial Differential Equations
PDF
No ratings yet
Partial Differential Equations
11 pages
Fluid Mechanics qp-1
PDF
No ratings yet
Fluid Mechanics qp-1
5 pages
Finite Difference Methods
PDF
No ratings yet
Finite Difference Methods
9 pages
Lecture 10
PDF
No ratings yet
Lecture 10
6 pages
Session 12 - Algebra II
PDF
No ratings yet
Session 12 - Algebra II
7 pages
Two Conservative Di Fference Schemes For Rosenau-Kawahara Equation
PDF
No ratings yet
Two Conservative Di Fference Schemes For Rosenau-Kawahara Equation
17 pages
MATH3203 Lecture 5 Accuracy of Finite Difference Schemes: Dion Weatherley
PDF
No ratings yet
MATH3203 Lecture 5 Accuracy of Finite Difference Schemes: Dion Weatherley
6 pages
Finite Difference Methods
PDF
No ratings yet
Finite Difference Methods
15 pages
Explicit Method For Solving Parabolic PDE: T L X Where X U C T U
PDF
No ratings yet
Explicit Method For Solving Parabolic PDE: T L X Where X U C T U
9 pages
Crank Nicholson Method
PDF
No ratings yet
Crank Nicholson Method
7 pages
Solving Poisson's Equation by Finite Differences
PDF
No ratings yet
Solving Poisson's Equation by Finite Differences
6 pages
QP Algebra-I 2020-21
PDF
No ratings yet
QP Algebra-I 2020-21
2 pages
Lecture 14
PDF
No ratings yet
Lecture 14
5 pages