31 views

Uploaded by ozeoze_nth

mid

mid

Attribution Non-Commercial (BY-NC)

- Limits
- Finite Difference Method
- The Finite-Difference–Time-Domain Method and its Application to Eigenvalue Problems
- MA6459 Numerical Methods
- Hph Matlab Basic2012 3
- capitulo halliday 13
- Ch2Introduction to Polynomials
- tse
- Analysis Review
- Subsets Non Associative Topological Spaces
- FDM_lecturenotes-4
- Calculus
- 14 Indicators
- Integer Programming OR
- NumericalMethods g
- ECE Jntur07
- 2 2 domain and range pdf for online
- EFFICIENT IMPLEMENTATION OF NONLINEAR COMPACT SCHEMES ON MASSIVELY PARALLEL PLATFORMS
- 5C Chapter5 Sec.5.10 Color
- Regional Mathematical Olympiad - 2017 Solutions

You are on page 1of 15

2T 1 T

(1) 0 xL t 0

x 2 t

T 0 at x0 t 0

T

k qL at xL t 0

x

T F x at 0 xL t 0

i) Explicit for the differential equation, central difference formula for the boundary

condition:

T 2T

2

t x

L

x

M

Using the second-order accurate central difference formula for the second

derivative and the first-order accurate forward differencing formula for the time

derivative to yield:

0 x

2

x 2 x

2

i ,n

T Ti n 1 Ti n

0 t

t i ,n t

Ti n 1 Ti n Ti n1 2Ti n Ti n1

0 t , x (2)

2

t x

2

t

Where: r

x

2

n 0,1, 2,...

i 1, 2,..., M 1

2

have:

T

k qL know at xL

x

discretize the boudary condition:

Ti n1 Ti n1

k q

2x

At x L and i M , we have:

TMn 1 TMn 1

k qL

2x

2xqL

TMn 1 TMn 1

k

n

Replace with TM 1 so we have:

2xqL

TMn 1 rTMn 1 1 2r TMn r TMn 1 iM

k

Rearranged:

xqL

TMn 1 2rTMn 1 1 2r TMn 2r iM

k

Final:

T 0 i0

xqL

TMn 1 2rTMn 1 1 2r TMn 2r iM

k

T F i i 1, 2,..., M

ii) Fully implicit method for difference equation, central difference formula for the

boundary condition:

Using the second-order accurate central difference formula for the second derivative

and the first-order accurate backward differencing formula for the time derivative to

yield, at n 1 time

0 x

2

x 2 x

2

i , n 1

T Ti n 1 Ti n

0 t

t i , n 1 t

0 t , x

2

i 1, 2,..., M 1 ; n 0,1, 2,...

t x

2

Ti n rTi n11 1 2r Ti n 1 rTi n11 (4)

have:

T0 0 know at x0

T

k qL know at xL

x

discretize the boudary condition, at n 1 time:

Ti n11 Ti n11

k q

2x

At x L and i M , we have:

k qL

2x

2xqL

TMn 11 TMn 11

k

n 1

Replace with TM 1 so we have:

2xqL

TMn rTMn 11 1 2r TMn 1 r TMn 11 iM

k

Rearranged:

xqL

TMn 2rTMn 11 1 2r TMn 1 2r iM

k

Final:

Ti n rTi n11 1 2r Ti n 1 rTi n11 i 1, 2,..., M 1 n 0,1, 2,...

T 0 i0

xqL

TMn 2rTMn 11 1 2r TMn 1 2r iM

k

T F i i 1, 2,..., M

iii) Crank-Nicolson method for the fidderential equation and central difference formul;a

for the boundary condition:

Retains the left-hand side of the implicit equation, and modifies the righ-hand side by

taking the arithmetic average of the right-hand sides of the explicit equation and the implicit

equation. So we have the finite-difference approximation of the diffusion equation with

Crank-Nicolson method becomes:

0 t , x

2 2

t x x

2 2

2

Rearranged:

t

Where: r

x

2

T0 0 know at x0

T

k qL know at xL

x

the boudary condition :

Ti n11 Ti n11

k q

2x

At x L and i M , we have:

TMn 1 TMn 1

k qL

2x

2xqL

TMn 1 TMn 1

k

At n 1 time:

2xqL

TMn 11 TMn 11

k

2xqL 2xqL

rTMn 11 2 2r TMn 1 r TMn 11 rTMn 1 2 2r TMn r TMn 1 i M

k k

Rearranged:

2xqL

2rTMn 11 2 2r TMn 1 2rTMn 1 2 2r TMn 4r iM

k

Final:

n 0,1, 2,...

T 0 i0

2xqL

2rTMn 11 2 2r TMn 1 2rTMn 1 2 2r TMn 4r iM

k

T F i i 1, 2,..., M

Bài 2.Consider the diffusion problem given in the dimensionless form as:

2T T

0 x 1 t 0

x 2 t

T 0 at x0 t 0

T 0 at x 1 t 0

T sin x at 0 x 1 t 0

T x, t e t sin x

2

Write the finite formulation of this problem by using the explicit method. Solve the resulting

difference equations with a step size x 0.1 and calculate the center temperature x 0.5

by taking:

1

i. r

6

ii. r 0.5

iii. r 0.6

Solution:

x 0.1

M 10

L 1

Ti n 1 rTi n1 1 2r Ti n rTi n1 i 1, 2,...,9

t

Where r

x

2

t

r x t r * x

2

x

2

1 1

r 0.1

6 600

So we have:

1 n 1 1 n 2 n 1 n

r : Ti Ti 1 Ti Ti 1

6 6 3 6

r 0.5 : Ti 0.5 Ti 1 Ti 1

n 1 n n

i

Ti 0 sin i 1, 2,...,10

10

deltax=0.1;

r=input('input value for r, r= ');

deltat=r*deltax^2

x=0;

for i=1:10

T(1,i)=sin(pi*x);

x=x+deltax;

end

t=0;

n=1;

' t T(0.5,t)'

while t<=0.1

t=t+deltat;

T(n,11)=0;

for i=2:10

T(n+1,i)=r*T(n,i-1)+(1-2*r)*T(n,i)+r*T(n,i+1);

T(n+1,1)=T(n+1,2);

end

if mod(n,2)==0

m=n;

s=t;

fprintf('%10f',s,T(m,6))

fprintf('\n')

end

n=n+1;

end

Result:

1

r :

6

0.003333 0.983686 0.023333 0.812837 0.043333 0.700885 0.063333 0.626288 0.083333 0.571539

0.006667 0.951851 0.026667 0.790394 0.046667 0.686502 0.066667 0.616082 0.086667 0.563691

0.010000 0.921046 0.030000 0.769674 0.050000 0.673012 0.070000 0.606361 0.090000 0.556132

0.013333 0.891414 0.033333 0.750517 0.053333 0.660321 0.073333 0.597082 0.093333 0.548841

0.016667 0.863351 0.036667 0.732764 0.056667 0.648349 0.076667 0.588207 0.096667 0.541800

0.020000 0.837135 0.040000 0.716265 0.060000 0.637025 0.080000 0.579703 0.100000 0.534989

r 0.5 :

0.065000 0.617753

0 0 0 6 0 7

0.01000 0.95105 0.03000 0.77809 0.05000 0.66977

0.070000 0.599357

0 7 0 3 0 8

0.085000 0.561797

0 8 0 5 0 9

0.717119 0.100000 0.526355

0 9 0 0 8

• r 0.6 :

Bài 3.

a. Using the simple implicit scheme with forward-time and central-space discretization,

develop finite-difference approximation for the following one-demensional, transient,

convection-diffusion equation:

T T 2T

u 2 (1)

t x t

We have:

T Ti n 1 Ti n

t t

t 2 x

2

T Ti n1 Ti n1

x 2x

0 t , x

2

u i 1 i 1 i 1

t 2 x x

2

Rearranged:

c n

Ti n 1 Ti n

2

Ti 1 Ti n1 r Ti n1 2Ti n Ti n1

c n

Ti n 1 Ti n

2

Ti 1 Ti n1 r Ti n1 2Ti n Ti n1 (2)

t u t

Where: r c

x

2

x

b. Using Fourier stability analysis, examine the stability criterion for the finite

difference approximation of his convection-diffusion equation:

We consider the error term i defined as:

n

in n e I mix

e

n n t

c I m x I m x nt I mix

e t

1 e nt e I mix

2

e e

e e

r e I m x 2 e I m x e nt e I mix

c I m x I m x

et 1

2

e e

r e I m x 2 e I m x

c

et 1 2 I sin m x r 2 cos m x 2

2

e 1 Ic sin m x 2r cos m x 1

t

The requirement:

1 et 1

1 2r 2r cos m x Ic sin m x 1

is a unire circle. The ellipse is tangent to the uniw circlr at the point where the circle

intersects the real positive axis.

Imaginary

R=1 ?

c

F

Real

The stability condition 1 is satisfied if the ellipse remain entirely within the unit

circle. So the requirements for the lengths of the semi-minor and semi-major axis of the

ellipse:

u t

c 1 1

x

1 t 1 (4)

r

x 2

2

2

Imaginary

R=1 ?

2r

Real

That picture show that even it is satisfied given by equation (4), the solution can still

be unstable. Using the stability limitation given by Anderson. Tannehil and Pletcher:

c 2 2r

(5)

2r 1

u t x

2

u x c

Pe Re x

x t r

c 2

r c

(6)

2c c

r

So we have:

c 2

2c

r c

(7)

2

2c Re x

c

If t is chosen too large to violate the above stability criterion for a fixed value of x

, the numerical results exhibit oscillations that grow rapidly, and after a few step, the

amplitute becomes so large that the computer may register an “overflow”. So we

combine two results in equation (6) for more requitement:

c 1

2

c 2 2r or t is the stability criterion arises from discretization of convection

u2

x

2

2

- LimitsUploaded byvipul
- Finite Difference MethodUploaded byNovieOppy November Bi
- The Finite-Difference–Time-Domain Method and its Application to Eigenvalue ProblemsUploaded bySudantha Jayalal Perera
- MA6459 Numerical MethodsUploaded bySekar Dinesh
- Hph Matlab Basic2012 3Uploaded byAxmed Shirwac
- Ch2Introduction to PolynomialsUploaded byStar Pudding
- tseUploaded bySajjad Ahmed
- FDM_lecturenotes-4Uploaded byMuralikrishnan GM
- capitulo halliday 13Uploaded byMelkzedekue Moreira
- Analysis ReviewUploaded bysoftpalsulley
- CalculusUploaded byKuria Kang'ethe
- NumericalMethods gUploaded bydwight
- Subsets Non Associative Topological SpacesUploaded byAnonymous 0U9j6BLllB
- 14 IndicatorsUploaded bygodwsky
- ECE Jntur07Uploaded byganga_ch1
- EFFICIENT IMPLEMENTATION OF NONLINEAR COMPACT SCHEMES ON MASSIVELY PARALLEL PLATFORMSUploaded byabhinitb
- Integer Programming ORUploaded byAbby Dalag
- 2 2 domain and range pdf for onlineUploaded byapi-234934912
- 5C Chapter5 Sec.5.10 ColorUploaded byDaniel Alves de Andrade
- Regional Mathematical Olympiad - 2017 SolutionsUploaded bySabat Umar
- CODINGSUploaded byBastin Rogers
- ExerciseSet6_Phys115Uploaded byivona
- aUploaded byɐnb Ɯôɥ Snld
- lec-07Uploaded byapi-247714257
- 5 - IntegraciónUploaded byHarim02
- 7.1 Define and Use Sequences Series (1)Uploaded bysoham
- 2008 june p2Uploaded byRicky Martin
- Calculus Problems (1)Uploaded bytopper
- 3.6_hwUploaded bycaleb
- Assignment2 Sept2018.docxUploaded byAhmad Safwan Hakim

- Sheet Ml Matlab IntroUploaded byuc
- (Queen's papers in pure and applied mathematics) Tor H Gulliksen - Homology of Local Rings-Queen's University (1969).pdfUploaded byPercy Bulacio
- Analysis of the Trace Determinant Plane of Systems of Linear Differential EquationsUploaded bybanaa1212
- Alberty-Matlab Implementation of Fem in ElasticityUploaded byRick Hunter
- Longitudinal Vibration BarsUploaded byGerson Cordoba Barco
- CLASS-10-MATHEMATICS-SOLUTIONS-CHAPTER-3.pdfUploaded byanu
- MATH 2930 - Worksheet 12 SolutionsUploaded byBrimwoodboy
- Advanced Calculus and Analysis - I. Craw (2002) WWUploaded byUgras SEVGEN
- tricks for speed mathUploaded bySourav Choudhary
- Space Curves matlabUploaded byk_gh22
- factoringUploaded byapi-265713032
- lesson plan - fundamental theoremUploaded byapi-296220127
- Conjugate Gradient MethodUploaded byVulpe Florian
- ZICA T3 - Business Mathematics & StatisticsUploaded byMongu Rice
- 2. Functions, Limit, And ContinuityUploaded byAndi Falih M
- MAT 25 NotesUploaded byBenson
- identitas trigonoUploaded byPutri Nilamsari
- Grade6-Integers-multiple-additions-subtractions.pdfUploaded byEduGain
- g2o kuemmerle11icraUploaded byDanilo Djordjevic
- Catalan ProblemsUploaded byDeusExMacchiato
- hw5Uploaded bysklawans1995
- Theorem of Rank MatrixUploaded byPeter Laslo
- lecture2.pdfUploaded byPravishna Prakash
- m40_s12_lecture5Uploaded byammar_harb
- UntitledUploaded byapi-150536296
- A New Wheel-rail Contact Model for RailwayUploaded bysamratdebbarman
- IMO2018SLUploaded byAndrei346
- 12_2013_lyp_mathematics_01Uploaded bySachin Yadav
- DAA2_More Practice Your SkillsUploaded byMariel Villaluna
- Scan Converting CircleUploaded byAnik