• Nenhum resultado encontrado

Monte Carlo method for solving a parabolic problem

N/A
N/A
Protected

Academic year: 2017

Share "Monte Carlo method for solving a parabolic problem"

Copied!
5
0
0

Texto

(1)

MONTE CARLO METHOD FOR SOLVING A PARABOLIC PROBLEM

by

Yi TIAN and Zai-Zai YAN *

Col lege of Sci ences, In ner Mon go lia Uni ver sity of Tech nol ogy, Hohhot, China

Orig i nal sci en tific pa per DOI: 10.2298/TSCI1603933T

In this pa per, we pres ent a nu mer i cal method based on ran dom sam pling for a par -a bolic prob lem. This method com bines use of the Cr-ank-Nicolson method -and Monte Carlo method. In the nu mer i cal al go rithm, we first discretize gov ern ing equa tions by CrankNicolson method, and ob tain a large sparse sys tem of lin ear al ge braic equa tions, then use Monte Carlo method to solve the lin ear al ge braic equa tions. To il lus trate the use ful ness of this tech nique, we ap ply it to some test prob -lems.

Key words: Monte Carlo method, Crank-Nicolson method, system of linear algebraic equations

In tro duc tion

Re cently there are many meth ods to solve heat con duc tion equa tions that are used for char ac ter iza tion ther mal prob lems, Tian et al. [1] com bined the Crank-Nicolson and Monte Carlo meth ods to solve a class of heat con duc tion equa tions. Jia et al. [2] used the semi-in verse method to es tab lish a variational prin ci ple for an un steady heat con duc tion equa tion. Liu et al. [3] adopted He's frac tional de riv a tive to study the heat con duc tion in fractal me dium.

In this pa per, we will con sider a prob lem of de ter min ing an un known func tion in the heat con duc tion equa tion:

ut -a t u( ) xx =f x t( , ), 0< <x 1, t>0 (1)

with ini tial con di tion u(x, 0) = j(x), 0 < x < 1, and bound ary con di tions u(0, t) = a(t), u(1, t) = =ib(t), t > 0, where a(t) > 0 is a known func tion and j(x), a(t), b(t), and f(x, t) are known con tin u -ous func tions.

The Crank-Nicolson method is em ployed to discretize the prob lem do main. Ow ing to the ap pli ca tion of the CrankNicolson method, a large sparse sys tem of lin ear al ge braic equa -tions is ob tained, then we use Monte Carlo method to solve large sys tems of lin ear al ge braic equa tions AX = b, where A Î Rn´n, and X, b Î Rn [4]. Monte Carlo al go rithms have many ad van -tages. For one thing, these al go rithms are par al lel al go rithms, they have high par al lel ef fi ciency [5], for an other thing, Monte Carlo meth ods are pref er a ble for solv ing large sparse sys tems of lin ear al ge braic equa tions, such as those aris ing from ap prox i ma tions of par tial dif fer en tial equation [6-9].

(2)

Crank-Nicolson method for discretization

The do main [0, 1] ´ [0, T] is di vided into an n ´ N mesh with the spa tial-step size h = =i1/n in the x di rec tion and the time-step size t = T/N, re spec tively. Grid points (xi, tk) are de -fined by xi = ih, tk = kt, (0 £ i £ n, 0 £ k £ N). The no ta tion uikis used for the fi nite dif fer ence ap -prox i ma tion of u(ih, kt).We de fine the op er a tors:

u u u u u u u

i k i k i k t i k i k i k x +1 2 =1 + +1 +1 2 = +1 - 2

2

1

/ ( ),d / ( ),

t d i

k

ik ik ik x ik ik ik

h u u u u h u u

=

= 1 - -2 + + =1 + -

-2 ( 1 1),d ( 1 2/ 1 2/ ) Let's con sider eq. (1) at point (xi, tk+1/2):

u

t x t a t

u

x x t f x t

i k k i k i k

( , +1 2/ )- ( +1 2/ ) ( , +/ )= ( , 2

2 1 2 +1 2/ ) (2)

by Tay lor's for mula:

¶ ¶ ¶ ¶ ¶ ¶ ¶ 2 2 1 2

2 1 2

3

2 1

u

x x t

u

x x t

u

x t x t

i k i k i k

( , + )= ( , + / )+ ( , +/ /

/

)( )

! ( , )(

2 1 1 2

4

2 2 1 1 2

1 2

t t

u

x t x t t

k k

i ik k k

+ +

+ +

- +

+ ¶

-¶ ¶ x ) , /

2

1 2 1

tk+ <xik<tk+ (3) and ¶ ¶ ¶ ¶ ¶ ¶ ¶ 2 2 2

2 1 2

3

2 1 2

u

x x t

u

x x t

u

x t x t

i k i k i k

( , )= ( , + / )+ ( , +/ )( ) ! ( , )( ) , / / t t u

x t x t t t

k k

i ik k k k

- + + ¢ -+ + 1 2 4

2 2 1 2

2 1

2

¶ ¶ x

< ¢ <xik tk+1 2/ (4)

hence ¶ ¶ ¶ ¶ ¶ ¶ 2

2 1 2

2 2 2 2 1 1 2 u

x x t

u

x x t

u

x x t

i k i k i k

( , +/ )= ( , )+ ( , + )

é ë

ê ù

û

ú -t z

2 4 2 2 8 ¶ ¶ ¶ u

x t ( ,xi ik) (5)

where 1 £ i £ n – 1, k ³ 0, and tk < zik < tk+1. Sim i larly, we have:

¶ ¶ ¶ ¶ 3 u

x x t u

u

t x t

i k t ik i ik k

2 1 2

1 2 2 3 24

( , / ) / ( , ),

+ =d + - <

t

h hik<tk+1 (6)

and ¶ ¶ ¶ ¶ 2 2

2 2 4

4 12 u

x x t u

h u

x t t t

i k x ik ik k k ik k

( , )=d - (x , ), <x < +1 (7)

Take eqs. (5)-(7) into (2), we ob tain:

di ik d

k x ik i k ik

u +1 2/ -a t( +1 2/ ) 2u +1 2/ = f x t( , +1 2/ )+R (8) where

R u

t x

a t u

x t x

ik = i ik - k i ik

é1 +

24 8

3 3

1 2 4 2 2 ¶

¶ ¶

( ,h ) ( / ) ( ,z )

ë ê ù û ú -- + + + t x x 2

1 2 4 4

4

4 1

24

a t u

x t

u

x t

k

ik k i k

( ) ( , ) ( , / , ¶ ¶ ¶

k+ h

é ë

ê 1)ùûú 2

(3)

di ok d

k x ik i k

u +1 2/ -a t( +1 2/ ) 2u +1 2/ = f x t( , +1 2/ ), 1£ £i n-1, k³0 (9) with ui0 = j(x

i), 0 £ i £ n, and u0k = a(tk), unk = b(tk), k ³ 0. Ac cord ing to eq. (9), we have:

- + + +

--+ + + +

a t r

u a t r u a t r

k i k k i k k ( ) [ ( ) ] ( ) / / / 1 2 1 1

1 2 1 1 2

2 1 2

2 1

1 1

1 2

1 1 2

u

a t r

u a t r u a t

i k

k

ik k ik

k ++ + - + + = = ( / ) +[ - ( ) ] + (

/ 1 2 1 1 2

2 / / ) ( , ) r

uik f x t i k

+ +t + (10)

where r = t/h2, 1 £ i £ n – 1, k ³ 0.

Equa tion (10) can be writ ten as the fol low ing Ma trix form:

AU = b (11)

where

A=a tk r

-- -- -æ è ç ç ç ç ç ç ç ç ç ö ø +

( 1 2/ )

1 1 2 1 2 1 1 2 1 2 1 1 2 1 2 1

O O O ÷ ÷ ÷ ÷ ÷ ÷ ÷ ÷ ÷ + æ è ç ç ç ç ç ç ö ø ÷ ÷ ÷ ÷ ÷ ÷ 1 1 1 1 O

Ut uk uk u u

nk nk

= + +

-+ -+

( 1 1 )

2 1L 21 11

b =a tk r -æ è ç ç ç ç ç ç ç ç ç ö ø ÷ ÷ + ( 1 2/ )

1 1 2 1 2 1 1 2 1 2 1 1 2 1 2 1

O O O ÷ ÷ ÷ ÷ ÷ ÷ ÷ + æ è ç ç ç ç ç ç ö ø ÷ ÷ ÷ ÷ ÷ ÷ 1 1 1 1 O b b u u u u a t k k nk nk k = æ è ç ç ç ç ç ç ö ø ÷ ÷ ÷ ÷ ÷ ÷ + -+ 1 2 2 1 1 2 2 M ( ) [ (

/ a k k f x t

f x t

f x t

k k n k ) ( )] ( , ) ( , ) ( , / / + + + + + - + a t t t

1 1 1 2

2 1 2

2 1 M / / / ) ( ) [ ( ) ( )] ( , ) 2 1 2

1 1 2

2 1

a t r

k k f x t

k n k + - + + + + æ è ç ç ç ç ç

b b t

ç ç ç ö ø ÷ ÷ ÷ ÷ ÷ ÷ ÷ ÷

Dis cus sion of the nu mer i cal re sult

(4)

Ex am ple 1. Con sider the prob lem ut – a(t)uxx = f(x, t), 0 < x < 1, t > 0 with u(x, 0) = = (e–x + ex)e – ex, 0 < x < 1; u(0, t) = 2eet

-1 and u(-1, t) = (e–1 + e)eet-e,

t > 0, where a(t) = et and f(x, t) = e(x+t). The ex act so lu tion is u(x, t) = (e–x + ex)eet

– ex. The re sults ob tained for u(x, t) are pre sented in tab. 1.

Ta ble 1. Re sult for u with g = 0.98, h = 0.1, t = 0.005, k = 11, and N = 5000

i u1,k u5,k u9,k

Nu mer i cal Ex act Nu mer i cal Ex act Nu mer i cal Ex act

7 4.556774 4.556724 4.704200 4.703988 5.614308 5.613979

20 4.964895 4.964533 5.161609 5.161554 6.195289 6.195495

50 6.153402 6.153264 6.497873 6.495325 7.891494 7.890568

60 6.647447 6.647192 7.052375 7.049517 8.595858 8.594884

80 7.830298 7.829717 8.376961 8.376323 10.282640 10.281106

100 9.348352 9.347527 10.084721 10.079323 12.444029 12.445429

Ex am ple 2. Con sider the prob lem ut – a(t)uxx = f(x, t), 0 < x < 1, t > 0 with u(x, 0) = ex ,

0 < x < 1; u(0, t) = 2eet -1 and u(1, t) = et t+ 3/3

, t > 0, where a(t) = t2 + 1 and f(x, t) = xt2 – x. The ex act so lu tion is u x t( , )=ex t t+ +3/3 +xt3/ -xt.

3

The re sults ob tained for u(x, t) are pre sented in tab. 2.

Ta ble 2. Re sult for u with g = 0.98, h = 0.1, t = 0.01, k = 15, and N = 2000

i u1,k u5,k u9,k

Nu mer i cal Ex act Nu mer i cal Ex act Nu mer i cal Ex act

10 1.212557 1.211843 1.772773 1.772893 2.628217 2.629488

20 1.333497 1.333730 1.921650 1.920463 2.832696 2.834588

40 1.646830 1.646405 2.329271 2.323305 3.409811 3.407616

60 2.111359 2.111290 2.964007 2.964443 4.342121 4.341071

80 2.853976 2.854390 4.045561 4.037469 5.927285 5.926223

100 4.127121 4.125985 5.936542 5.921368 8.728614 8.730917

Con clu sion

In this pa per, an al ter na tive method is pro posed to solve a par a bolic prob lem. We first discretize gov ern ing equa tions by Crank-Nicolson method, and ob tain a large sparse sys tem of lin ear al ge braic equa tions Ax = b, then use Jacobi over-re lax ation it er a tive method and Monte Carlo method to solve the al ge braic equa tions. The nu mer i cal re sults show that the pro posed nu -mer i cal method is ac cu rate to es ti mate the ex act so lu tions of eq. (1).

Ac knowl edg ment

(5)

Ref er ences

[1] Tian, Y., et al., A New Method for Solv ing a Class of Heat Con duc tion Equa tion, Ther mal Sci ence, 19

(2015), 4, pp. 1205-1210

[2] Jia, Z. J., et al., Variational Prin ci ple for Un steady Heat Con duc tion Equa tion, Ther mal Sci ence, 18

(2014), 3, pp. 1045-1047

[3] Liu, F. J., et al., He's Frac tional De riv a tive for Heat Con duc tion in a Fractal Me dium Aris ing in Silk worm Co coon Hi er ar chy, Ther mal Sci ence, 19 (2015), 4, pp. 1155-1159

[4] Dimov, I. T., et al., A New It er a tive Monte Carlo Ap proach for In verse Ma trix Prob lem, Jour nal of Com -pu ta tional and Ap plied Math e mat ics, 92 (1998), 1, pp. 15-35

[5] Dimov, I. T., et al., Monte Carlo Al go rithms: Per for mance Anal y sis for some Com puter Ar chi tec tures,

Jour nal of Com pu ta tional and Ap plied Math e mat ics, 48 (1993), 3, pp. 253-277

[6] Farnoosh, R., et al., Monte Carlo Sim u la tion Via a Nu mer i cal Al go rithm for Solv ing a Non lin ear In verse Prob lem, Commun Non lin ear Sci Numer Simulat, 15 (2010), 9, pp. 2436-2444

[7] Shidfar, A., et al., A Nu mer i cal Method for Solv ing of a Non lin ear In verse Dif fu sion Prob lem, Com put ers and Math e mat ics with Ap pli ca tions, 52 (2006), 6-7, pp. 1021-1030

[8] Shidfar, A., et al., A Nu mer i cal So lu tion Tech nique for a One-Di men sional In verse Non lin ear Par a bolic Prob lem, Ap plied Mathematica and Com pu ta tion, 184 (2007), 2, pp. 308-315

[9] Hu, B., et al., Crank-Nicolson Fi nite Dif fer ence Scheme for the Rosenau-Bur gers Equa tion, Ap plied Mathematica and Com pu ta tion, 204 (2008), 1, pp. 311-316

Referências

Documentos relacionados

Para o cancro colo-retal os resultados são pouco concordantes na literatura, pois alguns estudos apontam como fator de risco para esta patologia uma alimentação

Partindo para uma análise do ponto de equilíbrio considerando o custo de oportunidade e o custo de capital, teremos a seguinte modificação de valores e análise: custos fixos somados

Resultados: São discutidos os diversos aspectos conceituais relacionados à resistência ao tratamento, os possíveis preditores de resistência e, finalmente, algumas estratégias a

No Ambulatório de Intercorrências Oncológicas – AIO, o processo de acolhimento com classificação de risco inicia quando o enfermeiro recebe o paciente após ter

Com base nessas duas realizações, caracteriza-se nesta nota o quadro natural do Atlântico Norte e da Europa Ocidental durante o Máximo Arrefeci- mento da Última Glaciação,

ROTEIRO PARA ENTREVISTA COM OS EX-MORADORES: ROSEMERI DALL AGNOL; DIORACI ANTUNES; JOVILDE MARIA LASTA; MARIA CRISTINA MARCON; IVO BARRICHELO PROJETO DE PESQUISA: REFORMA AGRÁRIA E

Experimental cooling curves considering different positions along the length of the (a) Al-11wt %Si-3.0wt %Cu and (b) Al-11wt %Si-4.5wt %Cu alloy castings.. Each mentioned

Figura 33 – Caso clínico 5 (intervenção cirúrgica no freio lingual para possibilitar o assentamento de uma placa lingual de uma prótese parcial removível): a) Fibras