Presentation is loading. Please wait.

Presentation is loading. Please wait.

PDEs & Parabolic problems Jacob Y. Kazakia © 20031 Partial Differential Equations Linear in two variables: Usual classification at a given point (x,y):

Similar presentations


Presentation on theme: "PDEs & Parabolic problems Jacob Y. Kazakia © 20031 Partial Differential Equations Linear in two variables: Usual classification at a given point (x,y):"— Presentation transcript:

1 PDEs & Parabolic problems Jacob Y. Kazakia © 20031 Partial Differential Equations Linear in two variables: Usual classification at a given point (x,y): From the numerical point of view Initial Value Problem ( time evolution) Hyperbolic or Parabolic Boundary Value Problem ( static solution) Elliptic Computational Concern: Initial Value Problem : Stability Boundary Value Problem: Efficiency

2 PDEs & Parabolic problems Jacob Y. Kazakia © 20032 Parabolic PDEs insulated rod time line x = 0 x = L x axis T = 0 o at all times T = 0 o at all times T = T 0 f ( x ) at time = 0 What is the temperature later ? T(x,t) T(x+  x,t)  x area A heat flux in heat flux out heat flux in = heat flux out = Balance equation:

3 PDEs & Parabolic problems Jacob Y. Kazakia © 20033 nondimensionalization

4 PDEs & Parabolic problems Jacob Y. Kazakia © 20034 Numerical Solution x = 0 u = f(x) x = L u = g 1 (t)u = g 2 (t) u t = u xx consider a grid: this results in an explicit method: where

5 PDEs & Parabolic problems Jacob Y. Kazakia © 20035 Stencil for explicit solution 2 013 h h k

6 PDEs & Parabolic problems Jacob Y. Kazakia © 20036 Example - Instability then using we obtain the following results rational arithmetic rounded to one decimal u 1 =3*0 - 5(1/3) + 3*(2/3) = 1/3 u 2 =3*(1/3) - 5(2/3) + 3*1 = 2/3 u 3 =3*0 - 5(1/3) + 3*(2/3) = 1/3 u 4 =2/3.. Solution : u = x ( satisfies all conditions) u 1 =3*0 - 5(.3) + 3*(.7) =.6 u 2 =3*(.3) - 5(.7) + 3*1 =.4 u 3 =3*0 - 5(.6) + 3*(.4) = -1.8 u 4 =+2.8 u 5 = 17.4 u 6 = -16.4 u 7 = -136.2 u 8 = +137.2 Unstable results u = 0 u = 1/3 u = 2/3 u = 1 x = 1 u=0u=1 t x 12 34 56 78

7 PDEs & Parabolic problems Jacob Y. Kazakia © 20037 Instability - reasons/conditions x = a u =  u=0 t 1 2 3 4 x u 1 = (1 - 2 )  u 2 = (1 - 2 ) 2  u 3 = (1 - 2 ) 3 .. u n = (1 - 2 ) n  for physically sensible results we must have (1 - 2 ) positive and less than one

8 PDEs & Parabolic problems Jacob Y. Kazakia © 20038 Stable solution- the Implicit method (x, t) 4 0 13 hh k (x+h, t)(x-h, t) (x, t - k)

9 PDEs & Parabolic problems Jacob Y. Kazakia © 20039 Example on Implicit method u =.3u =.7 u=0u=1 t x 12 34 56 78 k = h = 1 / 3,  = 3, 1 + 2 = 7 for the points 1 and 2 at the first level up we obtain 3 * 0 - 7 u 1 + 3 u 2 = - 0.3 3 u 1 - 7 u 2 + 3 * 1 = - 0.7 using one decimal digit arithmetic the solution of this system is: u 2 =.7 and u 1 =.3 Stable and consistent method.

10 PDEs & Parabolic problems Jacob Y. Kazakia © 200310 Crank - Nicholson Method A 013 748 h k This is more accurate without increasing the work considerably. Same form LHS of the equation

11 PDEs & Parabolic problems Jacob Y. Kazakia © 200311 A Boundary Value Technique 1 here U(x) is the solution of the problem for t  large summarized on the right solve the problem and get U(x)

12 PDEs & Parabolic problems Jacob Y. Kazakia © 200312 A Boundary Value Technique 2 we can then write the finite difference analog of the equation using the stencil 0 u(x,t)1 u(x+h,t) u(x-h,t) 3 2 u(x,t+k) 4 u(x,t-k) see example next slide

13 PDEs & Parabolic problems Jacob Y. Kazakia © 200313 B V T Example 1 the exact solution of this problem is: ( differentiate and substitute to prove that this is indeed the case) As time tends to large values the problem simplifies to: U xx = x U x with U(0) = 0 and U(1) = 0 which has the trivial solution U = 0 everywhere We choose T = 2 ( this is our approximation to large time) and we use k = h = 1/3

14 PDEs & Parabolic problems Jacob Y. Kazakia © 200314 B V T Example 2 (0,2) (0,5/3) (0,4/3) (0,1) (0,2/3) (0,1/3) (0,0) (1/3,0)(2/3,0)(1,0) (1,1/3) (1,2/3) (1,1) (1,4/3) (1,5/3) (1,2) (1/3,2)(2/3,2) u=0 t x u=1/3u=2/3 u=1 u=e -1/3 u=e -2/3 u=e -1 u=e -4/3 u=e -5/3 u=e -2 =0.14 12 34 56 78 9 10 we now write the finite difference equations for each of the 10 points and we obtain 10 equations to be solved simultaneously. This produces a solution which agrees with the exact one in two decimal places The first two equations ( points 1 and 2 ) are: verify this

15 PDEs & Parabolic problems Jacob Y. Kazakia © 200315 Two Dimensional Diffusion Equation 1 n+1 2 n+1 5 n+1 0 n+1 6 n+1 3 n+1 7 n+1 4 n+1 8 n+1 A 1n1n 2n2n 5n5n 0n0n 6n6n 3n3n 7n7n 4n4n 8n8n Try to implement Crank- Nicholson Scheme on this problem We must write one such equation per each interior point and then solve the system at each time step.

16 PDEs & Parabolic problems Jacob Y. Kazakia © 200316 Two Dimensional Diff. Eqn Cont. We must write one such equation per each interior point and then solve the system at each time step. finite difference equivalent Difficulty: Large system of equations which is sparse but not tridiagonal or even banded Remedy: ADI method ( Alternating Direction Implicit solution) a) write the above equation in the form: b) divide each time step into two steps of size  t/2. In each sub step, treat a different dimension implicitly i.e. Advantage: at each sub step only a tridiagonal system is solved


Download ppt "PDEs & Parabolic problems Jacob Y. Kazakia © 20031 Partial Differential Equations Linear in two variables: Usual classification at a given point (x,y):"

Similar presentations


Ads by Google