Sei sulla pagina 1di 20

THIRD INTERNATIONAL COURSE

NUMERICAL HEAT TRANSFER


1 6 OCTOBER 2011, KOPAONIK, SERBIA

Monte Carlo Random Walk Method for Solving


Laplace Equation
Mladen Tomi
tomicmladen@yahoo.com

University of Ni
Faculty of Mechanical Engineering

Numerical Heat Transfer


October, 2011
Kopaonik, Serbia
Outline
INTRODUCTION AND BACKGROUND
SIMULATION APPROACH
CASE STUDY
RANDOM WALK ALGHORITAM
NUMERICAL RESULTS
ERROR AND CONVERGENCE

Numerical Heat Transfer October, 2011 Kopaonik, Serbia


INTRODUCTION AND BACKGROUND

Monte Carlo methods represent group of stohastic


techniques, which use random sampling to compute
their results.
MCM are especially useful for simulating systems
with many coupled degrees of freedom, such as
fluids, disordered materials, strongly coupled solids,
and cellular structures.
They are used to model phenomena with significant
uncertainty in inputs, such as the calculation of risk
in business.
Numerical Heat Transfer October, 2011 Kopaonik, Serbia
Another advantage of the Monte Carlo
method is possible to find a local solution to
the desired point, regardless of the resolution
values in the other counts.
This can be very convenient for solving inverse
problems of heat conduction.

Numerical Heat Transfer October, 2011 Kopaonik, Serbia


Early beginnings

Figure 1. Determination of number

Numerical Heat Transfer October, 2011 Kopaonik, Serbia


Manhattan Project

In 1946, physicists at Los Alamos Scientific


Laboratory Monte-Carlo method was applied
during Manhattan project.
Mathematicians Stanislav Ulinski and Von
Neuman have developed a method for solving
the Boltzman equation governing the neutron
distribution by using random and pseudo
random numbers, and giving the method a
code name Monte Carlo.
Numerical Heat Transfer October, 2011 Kopaonik, Serbia
SIMULATION APPROACH
The governing equation for 2D heat
conduction is given by:
T T T
( ) ( ) qV C
x x y y t
For steady state of 2D heat conduction, in
absence of interlnal heat sources, and for
constant diffusion coefficients, the governing
equation is given by:
2T 2T
( )0
x 2
y 2

Numerical Heat Transfer October, 2011 Kopaonik, Serbia


For implementing random walk method the
domain will be divided by using a grid system,
and transform the partial differential equation
into a set finite difference equations, which
can be solve algebraically.
If the finite difference method was
implemented, the we obtain:
Ti 1, j 2Ti , j Ti 1, j Ti , j 1 2Ti , j Ti , j 1
0.
x 2
y 2

Numerical Heat Transfer October, 2011 Kopaonik, Serbia


After rearranging, the FDE could be written as:
Ti, j PW Ti 1, j PETi 1, j PN Ti, j 1 PS Ti, j 1 ,

Where:
1
PW PE
x 2

1
PN PS
y 2
2 2
.
x 2
y 2

1 Pn
n
Numerical Heat Transfer October, 2011 Kopaonik, Serbia
CASE STUDY
TA=0
TB=0
TC=100
TD=0

Exact solution: Figure 2. Case study Squer plate with


constant temperature edge
1 (1) n
T TC 2 n n
sin( nx)(exp(ny ) exp(ny )).
n 1 n (e e )
Numerical Heat Transfer October, 2011 Kopaonik, Serbia
1
Ti, j (Ti 1, j Ti 1, j Ti, j 1 Ti, j 1 )
4

Numerical Heat Transfer October, 2011 Kopaonik, Serbia


RANDOM WALK ALGORITHM
1. Start
2. Input boundary temperatures.
3. Input number of random walks
4. Obtain random number for ith time.
1) If random number is less than 0.25 move up,
2) If random number is between 0.25 and 0.5
move right,
3) If random number between 0.5 and 0.75 move
down,
4) If random number is between 0.75 and 1.00 left.
Numerical Heat Transfer October, 2011 Kopaonik, Serbia
5. Is the random walker on the boundary?
1) If yes move back into domain, and calculate
the temperature as an average of surrounding
temperatures,
2) If no calculate the temperature in the point as
an average of surrounding temperatures,
6. Is the number of obtaining random numbers i
less then inputted value of random walks?
1) If yes, end the calculation.
2) If no, go back to 2nd point.
7. End.
Numerical Heat Transfer October, 2011 Kopaonik, Serbia
NUMERICAL RESULTS

Boundary values input


Number of random walks

Results

Numerical Heat Transfer October, 2011 Kopaonik, Serbia


Figure 4. Random walk results

Numerical Heat Transfer October, 2011 Kopaonik, Serbia


ERROR ANALYSIS
Error can be estimated by randomly selecting
points in space, and taking average of the
function values at these points.
By the law of large numbers, this method will
1
display convergence N .

Quadrupling the number of sampled points


will halve the error, regardless of the number
of dimensions.

Numerical Heat Transfer October, 2011 Kopaonik, Serbia


Convergence of the method
30

25

20
Aver. Temperature [OC]

1st experiment
15
2nd experiment
3rd experiment
10 average

0
0 2500 5000 7500 10000
Number of random walks

Figure 4. Convergence in function of random walks number


Numerical Heat Transfer October, 2011 Kopaonik, Serbia
Error estimation
30

25

20
Error [%]

1st experiment
15
2nd experiment
3rd experiment
10 average

0
0 2500 5000 7500 10000
Number of Random Walks

Figure 5. Error in function of random walks number


Numerical Heat Transfer October, 2011 Kopaonik, Serbia
REFERENCE
D. P. landau, F. wang, A new Approach to Monte Carlo Simulation in Statistical Physics, Brazilian Journal of Physics, 32 (2004),
2, pp. 354-362
Mandar K. Chati, Mircea D. Grigoriu, Salil S. Kulkarn, Subrata Mukherjee, Random walk method for the two- and three-
dimensional Laplace, Poisson and Helmholtz's equations, International Journal for Numerical Methods in Engineering, 51
(2001), 10, pp. 1133-1156
S. De, S Teitel, Y. Shapir, E. H. Chimowitz, Monte Carlo simulation of Fickian diffusion in the critical region, Journal of chemical
physiscs, 116 (2002), 7, pp. 3012-3017
,potraiti za porozne structure

Jelena Stankovi, Rizina vrednost (VaR) i trini rizik, portfolio akcija preduzea kotiranih na Beogradskoj berzi, M.Sc. thesis,
Univerzitet u Niu Ekonomski Fakultet, Ni, Serbia, 2010.
Sethu Hareesh Kolluru, Preliminary investigations of a stochastic method to solve electrostatic and electrodynamic problem,
M. Sc. thesis, University of Massachusetts, Amherst, USA, 2008.
Johan Carlsson, A backward Monte-Carlo method for solving parabolic partial differential equations, http://www.arxiv.org,
2000.
F. Kowsary, M, Arabi, Monte Carlo solution of anisotropic heat conduction, International Communications in Heat and Mass
Transfer, 26 (1999) 8, pp. 1163-1173
***, http://mathworld.wolfram.com/BuffonsNeedleProblem.html
***, http://en.wikipedia.org/wiki/Buffon%27s_needle
***, http://mathworld.wolfram.com/MonteCarloMethod.html,
N. Metropolis, The Beginning of Monte Carlo Method, Los Alamos Science, 10 (1987) 15, pp. 125-130
Isaac Elishakoff, Monte Carlo method, in: Probabilistic theory of structures, Dover Publications Inc., New York, 1999, pp. 433-
469
Duan Milovanevi, Parcijalne diferencijalne jednaine, Mainski fakultet Ni, Ni, 1995.
***, http://en.wikipedia.org/wiki/Monte_Carlo_method
THANK YOU FOR YOUR
ATTENTION!!!

Numerical Heat Transfer October, 2011 Kopaonik, Serbia

Potrebbero piacerti anche