8 views

Uploaded by Sunil Nair

Describes a method to discretize the heat equation by using the Crank nicolson Scheme.

- ch 11-4
- IGNOU Material Price
- Algorithmic Thinking and Matlab in Computational Materials Science
- MC0079 Fall Drive Assignment 2012
- Structural Reliability
- Class Notes Functions and Linear Equations Final
- Introduction to Numerical Analysis
- Stiffness matrix based form-finding method of tensegrity structures-Zhang & Liyuan 2014
- AMathsPrelim1Paper1
- day 2 multi-step equations c
- Historical Comments on Finite Elements Oden
- IAS-Mains Mathematics Syllabus
- Guide on How to Write a Scientific Article
- Midterm Solution I (1)
- Accuracy of Determining Stress Intensity Factors in Some Numerical Problems.pdf
- Algorithm for Raman Backward Pumping
- IAS Mains Mathematics Syllabus
- WS9 Solving Simple Algebraic Equations I
- Matlab Eigenvalues
- Homework

You are on page 1of 9

The goal of this section is to derive a 2-level scheme for the heat equation which has no stability requirement and is second order

in both space and time. From our previous work we expect the scheme to be implicit. This scheme is called the Crank-Nicolson

method and is one of the most popular methods in practice.

CN Scheme

1

u(xi , tn+1 ) u(xi , tn )

t

n+ 12

is a centered difference approximation for ut at (xi , t

) and therefore should be O(t2 ).

1

ut (xi , tn+ 2 )

To approximate the term uxx (xi , tn+ 2 ) we use the average of the second centered differences for uxx (xi , tn+1 ) and uxx (xi , tn ); i.e.,

1 h u(xi+1 , tn+1 ) 2u(xi , tn+1 ) + u(xi1 , tn+1 ) u(xi+1 , tn ) 2u(xi , tn ) + u(xi1 , tn ) i

1

+

uxx (xi , tn+ 2 )

2

(x)2

(x)2

We now define the CN scheme for the IBVP

ut = uxx (x, t) (0, 1) (0, T ]

u(x, 0) = u0

u(0, t) = u(1, t) = 0

as

Set

Ui0 = u0 (xi ) i = 0, 1, . . . , M

For n = 0, 1, . . . ,

n+1

n+1

n

n i

2Uin+1 + Ui1

Ui+1

2Uin + Ui1

Uin+1 Uin

h Ui+1

=

for i = 1, . . . , M 1

+

t

2

(x)2

(x)2

n+1

=0

U0n+1 = UM

Remark:

If the original PDE has a source term f (x, t) then we usually handle this by using

1

(f (xi , tn ) + f (xi , tn+1 ))

2

Set

Ui0 = u0 (xi ) i = 0, 1, . . . , M

2

For n = 0, 1, . . . ,

n+1

n+1

n

n

+ (2 + 2)Uin+1 Ui1

= Ui+1

+ (2 2)Uin + Ui1

Ui+1

U0n+1

n+1

UM

=0

for i = 1, . . . , M 1

(1)

(2)

Lh Uin+1 = Rh Uin

where

n+1

n+1

+ (2 + 2)Uin+1 Ui1

Lh Uin+1 = Ui+1

and

n

n

+ (2 2)Uin + Ui1

Rh Uin = Ui+1

Remark:

Note that we can no longer solve for U1n+1 , then U2n+1 even if we know the solution at the previous time step.

Instead, we must solve for all values at a specific timestep at once, i.e., we must solve a system of linear equations. Such a

scheme is called an implicit scheme.

From (1)(2) we set Ui0 = u0 (xi ) for i = 0, 1, . . . , M and for each value of n = 0, 1, . . . solve the system

n+1

U1

U0n + (2 2)U1n + U2n + U0n+1

2 + 2

0

n+1

2 + 2

0

0

U2.

.

.

.

.

.

..

..

..

..

0

. =

.

.

.

..

..

0

2 + 2

..

n+1

n+1

n

n

n

0

2 + 2

UM 2 + (2 2)UM 1 + UM + UM

UM 1

(3)

Of course, on the right hand side of the first and last equations, the terms involving

U0n ,

U0n+1 ,

n

UM

,

n+1

UM

are zero due to the homogeneous boundary conditions for our IBVP.

The system (3) can be written symbolically as

3

~ n+1 = ~bn

AU

Remark:

The matrix A is tridiagonal, and symmetric positive definite and thus can be solve by the same method as the

standard implicit scheme which we discussed in the previous section.

Remark:

The matrix A does not change at each timestep (as long as the timestep remains constant).

Exercise

Exercise

We now want to investigate the stability, consistency (and thus accuracy), and convergence of the CN scheme. Recall that we

wanted a scheme which was second order accurate in space and time and which was unconditionally stable.

kxk2,x =

1

X

M

x2i x

i=1

1/2

Note here that the sum begins at i = 1 and ends at i = M 1 because we are imposing homogeneous Dirichlet boundary data.

Lemma.

Let U

u0 (x1 )

u0 (x2 )

u~0 =

..

u0 (xM 1 )

Then

kU

(4)

Remark:

This results says that the CN scheme is unconditionally stable i.e., there is no condition on required for stability.

proof

From the scheme we have

n+1

n+1

n

n

+ (2 + 2)Uin+1 Ui1

= Ui+1

+ (2 2)Uin + Ui1

Ui+1

so that

Uin+1 Uin =

for 1 i M 1 and

for i = 1, . . . , M 1

2 n+1

i

h n+1

n

n+1

n

Ui + Uin

+ Ui1

Ui+1 + Ui+1

+ Ui1

2

2

U0n+1 = U0n = 0

n+1

n

UM

= UM

=0

h

i h

2 n+1

i

n+1

n

n+1

n

x (Uin+1 )2 Uin )2 =

+ Ui+1

+ Ui1

+ Ui1

Ui+1

2

2

Now sum over i = 1, . . . , M 1

M

1

X

i=1

(Uin+1 )2 x

M

1

X

i=1

(Uin )2 x =

M 1

2 n+1

i

x X h n+1

n

n+1

n

Ui + Uin (Uin+1 + Uin )

+ Ui1

+ Ui1

Ui+1 + Ui+1

2 i=1

2

Our goal here is to show that the rhs of this expression is 0. If we do this, then

M

1

X

i=1

and thus

(Uin+1 )2 x

M

1

X

(Uin )2 x

i=1

~n 2

~ n+1 k2,x kU

~ n k2,x

~ n+1 k2

kU

2,x kU k2,x = kU

If we show this then we can apply it repeatedly to get the desired result.

To show this we simplify our equation by writing

Bi = Uin+1 + Uin

where we know B0 = BM = 0 from the homogenous boundary data.

We have

M 1

~ n+1 k2 kU

~ n k2

kU

x

=

[Bi+1 + Bi1 2Bi ] Bi

2,x

2,x

2

i=1

M 1

X

x

=

Bi+1 Bi + Bi1 Bi 2Bi2

2

i=1

h

x (B1 B2 + B2 B3 + + BM 1 BM )

=

2

+(B0 B1 + B1 B2 + + BM 2 BM 1 ) 2

M

1

X

i=1

=

=

=

M 2

M

1

i

X

h X

x 2

Bi Bi+1 2

Bi2

2

i=1

i=1

" M 1

#

M

1

M

1

X

X

X

2

2

2

x 2

Bi Bi+1

Bi

Bi+1 B1

2

i=1

i=1

i=1

" M 1

#

X

x

(Bi Bi+1 )2 B12

2

i=1

"M 1

#

X

x

2

i=1

Bi2

In this section we show that the CN scheme is consistent and its order of accuracy is (2, 2).

and let U n be

Let u satisfy the homogeneous Dirichlet IBVP for the 1-D heat equation in Q = (0, 1) (0, T ] where u C 6,3 (Q)

i

the solution to the CN equation Lh Uin+1 = Rh Uin . Then there exists constants, independent of h, k, u such that

4

i

h

u 6u

n+1

h

n

2

2

max L u(xi , t ) R u(xi , t ) Ct (x) + (t) max

+

1iM 1

x4 x6

(x,t)Q

0nN 1

(5)

Proof

As before we plug the exact solution into the difference equation and expand using Taylor series about the point (x i , tn ). We

have

Lh u(xi , tn+1 ) Rh u(xi , tn ) = u(xi+1 , tn+1 ) + (2 + 2)u(xi , tn+1 ) u(xi1 , tn+1 )

u(xi , tn ) + (2 2)u(xi , tn ) + u(xi1 , tn )

h

i

(x)2

(x)3

(x)4

h

n+1

n+1

n+1

n+1

n+1

n+1

uxxx (xi , t ) +

uxxx (xi , t ) +

uxxxx(1 , t )

L u(xi , t ) = u(xi , t ) + xux (xi , t ) +

2!

3!

4!

+2u(xi , tn+1 ) + 2u(xi , tn+1 )

i

h

(x)2

(x)3

(x)4

uxxx (xi , tn+1 )

uxxx (xi , tn+1 ) +

uxxxx(2 tn+1 )

u(xi , tn+1 ) xux (xi , tn+1 ) +

2!

3!

4!

4

(x)

uxxxx(1 , tn+1 ) + uxxxx (2 , tn+1 )

= 2u(xi , tn+1 ) (x)2 uxx (xi , tn+1 )

4!

and similarly

(x)4

(uxxxx (3 , tn ) + uxxxx(4 , tn ))

= 2u(xi , tn ) + (x)2 uxx (xi , tn ) +

4!

(x)4

uxxxx (1 , tn+1 ) + uxxxx (2 , tn+1 )

Lh u(xi , tn+1 ) = 2u(xi , tn+1 ) (x)2 ut (xi , tn+1 )

4!

i

h

2

(t)

(t)3

utt (xi , tn ) +

uttt (xi , 1 )

= 2 u(xi , tn ) + tut (xi , tn ) +

2!

3!

i

h

2

(t)

2

n

n

uttt (xi , 2 )

(x) ut (xi , t ) + tutt (xi , t ) +

2!

(x)4

(uxxxx (1 , 3 ) + uxxxx(2 , 4 ))

4!

(t)2

(t)3

utt + 2

uttt (xi , 1 )

= 2u(xi , tn ) + 2tut + 2

2!

3!

(t)3

uttt (xi , 2 )

tut (t)2 utt

2

(x)4

(uxxxx (1 , tn ) + uxxxx (2 , tn ))

4!

(t)3

(t)3

uttt (xi , 1 )

uttt (xi , 2 )

= 2u(xi , tn ) + tut + 2

3!

2

(x)4

(uxxxx (1 , 3 ) + uxxxx(2 , 4 ))

4!

where we have used the fact that ut = uxx and = t/(x)2

Combining we arrive at

Lh u(xi , tn+1 ) Rh u(xi , tn ) = 2u(xi , tn ) + tut + 2

(t)3

(t)3

uttt (xi , 1 )

uttt (xi , 2 )

3!

2

(x)4

(uxxxx (1 , 3 ) + uxxxx (2 , 4 ))

4!

(x)4

n

2

(uxxxx (3 , tn ) + uxxxx (4 , tn ))

2u(xi , t ) (x) uxx

4!

i

3h 6

(t)2 2

(t)

6u

u

uxxxx(xi , tn ) + 2

(x

,

)

+

(x

,

)

= tut

i

1

i

2

2!

3! x6

x6

4

(x)

(uxxxx (1 , tn ) + uxxxx(2 , tn ))

4!

(x)4

t

21

u

(uxxxx (3 , tn ) + uxxxx (4 , tn ))

(x)

t

(x)2

4!

where again we have used the equations ut = uxx , utt = uxxt = (ut )xx = 2 uxxxx and uttt = 2 6 u/x6 . Thus we have that

4 6

u u

h

n+1

h

n

2

2

L u(xi , t ) R u(xi , t ) t (t) (x) C max 4 , 6

x

x

Remark:

We have illustrated that the CN scheme is a 2 time level scheme which is accurate of order (2, 2) so we say it is

second order in space and time.

Convergence of CN

- ch 11-4Uploaded byapi-297924767
- IGNOU Material PriceUploaded byKamala Kanta Dash
- Algorithmic Thinking and Matlab in Computational Materials ScienceUploaded byTygerYashanshu
- MC0079 Fall Drive Assignment 2012Uploaded bySneha Latha
- Structural ReliabilityUploaded byHarikrishnan P
- Class Notes Functions and Linear Equations FinalUploaded bymswalsh
- Introduction to Numerical AnalysisUploaded bySathish Kumar
- Stiffness matrix based form-finding method of tensegrity structures-Zhang & Liyuan 2014Uploaded byAngel Sullyvan
- AMathsPrelim1Paper1Uploaded bylow_jackson
- day 2 multi-step equations cUploaded byapi-316619857
- Historical Comments on Finite Elements OdenUploaded bylalbagh
- IAS-Mains Mathematics SyllabusUploaded bysushant47
- Guide on How to Write a Scientific ArticleUploaded byMarco Andres Violet
- Midterm Solution I (1)Uploaded bySheenly Joy Abalajen
- Accuracy of Determining Stress Intensity Factors in Some Numerical Problems.pdfUploaded byPradeep Kundu
- Algorithm for Raman Backward PumpingUploaded byBharath Lagishetty
- IAS Mains Mathematics SyllabusUploaded bypankaj
- WS9 Solving Simple Algebraic Equations IUploaded bydogsdontdomath
- Matlab EigenvaluesUploaded byumunera2997
- HomeworkUploaded byIka Wahyu Utami
- Systems Solve 4Uploaded byVioleta Vázquez
- Differential Calculus SolUploaded byHrithik Goyal
- Diff.egy.Zh1.15.April.15.English.single.AUploaded bySebastian Ordoñez
- SIMULATION-LaminarPipeFlow-NumericalSolution-210616-0119-15518.pdfUploaded byasheruddin
- syllabus-M368K-S2018Uploaded byAnirudh Nair
- SyllabiUploaded bysameer_oma
- Two Layers Soil Stratification Using NumericalUploaded byRaul Marihuan González
- Math 02Uploaded byAndrew Philbert Kelley
- Assignment 3 (1)Uploaded byAnonymous cuT1z6EXp1
- DIFFERENTIAL CALCULUS SOL.pdfUploaded byXYZ

- tesla bladeless turbineUploaded byZainuddin
- Mixed FLow TurbineUploaded byFattah Ahmad
- Ant Rags Info EnUploaded bymoresushant849643
- Cs CEFR chartUploaded byzecbeli
- Application Form Bc Ielts Scholarship 2014Uploaded bySunil Nair
- ansys tutorialUploaded byHari Prakash
- Blade.element.theoryUploaded byLuz Ángela Rincón Gallego
- blade gen Report.rtfUploaded bySunil Nair
- 162Uploaded bypavanrane
- CombustionUploaded bygkarthikeyan
- 2.672 ManualUploaded bySunil Nair

- Linear Algebr1Uploaded byShiva Prakash
- Lecture 6-Measure of Central Tendency-exampleUploaded byamirhazieq
- Factores que afectan el Split Set.pdfUploaded byJuan David Rondinel Buleje
- uv vis spectrophotometerUploaded byFath Bond
- ch5-6Uploaded byggghghk
- Differentials Textbook (Diffy Q's)Uploaded byJames Dean
- Vahl Davis BenchmarkUploaded byAjith Kumar Arumugham
- WB-Mech_120_Ch07_Buckling.pptUploaded byflorinelvv
- tut02sol.pdfUploaded byfuninternet
- P-Values Are Just the Tip of the IcebergUploaded byThyago
- Notes2 LieUploaded byXavier Kattukulam
- Statistical Techniques in Business and Economics 12e Chapter 03Uploaded byAbdullah Hasib
- Numerical Methods - PART 2 (Chapter 7)Uploaded byYui Reiko
- Discourse AnalysisUploaded byRia Novela
- Econometrics-I-1Uploaded byChitrakalpa Sen
- 080331-rutgers-rutcorUploaded byymiyazak
- FINS4479.Assignment.1Uploaded byJoshua Bay
- Analysis of Precision and RecallUploaded byVinutha Raghavendra
- Advanced Mathematics Group 2 SyllabusUploaded bygeneral674
- Extension-Of-Lagrange-Interpolation.pdfUploaded byIJSTR Research Publication
- Numerical Analysis - Roalnd PulchUploaded byvarathapandian
- Midterm SolutionUploaded byZak Bron
- A Multi-criteria Intuitionistic Fuzzy Group Decision Making for Supplier Selection With TOPSIS MethodUploaded bySara Nunes
- 6 Numerical Methods 2 False Position and SecantUploaded byCarl P
- ISO17025 to Do List - 1Uploaded byPK Jha
- Gafti AP Apeo SopUploaded byManoj Chaudhari
- Taylor SeriesUploaded bydjalilkadi
- Site Analysis; Changing ParadigmsUploaded byRaymond Thomas Cheenath
- Power Series Methods of Solving Ordinary Differential EquationsUploaded byAlbert Wandui
- Correlation, Regression Analysis in Civil EngineeringUploaded byPIUS