• Nie Znaleziono Wyników

Modeling, simulation, Monte Carlo methods

N/A
N/A
Protected

Academic year: 2021

Share "Modeling, simulation, Monte Carlo methods"

Copied!
127
0
0

Pełen tekst

(1)

Modeling, simulation, Monte Carlo methods

Prof. dr hab. Elżbieta Richter-Wąs

Follow the course/slides from

B. Chopard et al., coursera lectures, University of Geneva

S. Paltani, Statistical Course for Astrophysicits, University of Geneva

• Modeling and simulation of natural processes

 introduction and general concepts

• Monte Carlo methods

(2)

Examples of natural processes

2

(3)

What is a model?

3

(4)

What is a model?

4

(5)

Computational Science

5

(6)

Computational Science

6

(7)

Why a model? What is a good model?

7

(8)

Level of reality

8

(9)

Several models/ different language of description

9

(10)

…to a virtual model of reality

10

(11)

Example of modeling method

11

(12)

From a model to a simulation

12

(13)

From a model to a simulation

13

(14)

From a model to a simulation: illustration

14

(15)

Space and time

15

(16)

Time evolution

16

(17)

Time evolution

17

(18)

Time evolution

18

(19)

Modeling space: Eurelian approach

19

(20)

Modeling space: Lagrangian approach

20

(21)

Modeling space

21

(22)

Beyond the physical space: complex networks

22

(23)

Example

23

(24)

Complex networks

24

(25)

Monte Carlo methods

25

(26)

A Monte Carlo computer simulation

26

(27)

A more difficult problem

27

(28)

Historical note

28

(29)

Markov-chain Monte Carlo (MCMC)

29

(30)

Sampling the diffusion equation in 1D

30

(31)

Diffusion equation in 1D

31

(32)

More general case: Master equation

32

(33)

Detailed balance

33

(34)

Metropolis Rule

34

(35)

Metropolis Rule in practice

35

(36)

Metropolis Rule in practice

36

(37)

Glauber Rule

37

(38)

Kinetic/Dynamic Mote Carlo

38

(39)

Monte Carlo simulation

39

(40)

Monte Carlo simulation

40

(41)

Gillespie’s algorithm

41

(42)

More on Monte Carlo methods

42

(43)

Monte Carlo methods

43

(44)

Numerical integration

44

(45)

Error estimation

45

(46)

Optimisation problems

46

(47)

Numerical simulations

47

(48)

Numerical simulations

48

(49)

Example: probability estimation

49

(50)

Example: error estimation

50

(51)

Example: numerical integration

51

(52)

Random numer generators

52

(53)

Random numer generators

53

(54)

Random numer generators

54

(55)

Random numer generators

55

(56)

Transformation method

56

(57)

Transformation method

57

(58)

Transformation method

58

(59)

Rejection method

59

(60)

Rejection method

60

(61)

Rejection method

61

(62)

Distributions

62

(63)

Quasi-random numbers

63

(64)

Quasi-random numbers

64

(65)

Quasi-random numbers

65

(66)

Quasi-random numbers

66

(67)

Quasi-random numbers

67

(68)

BONUS slides: For more

mathematically oriented students

68 Follow the course/slides from

M. Chrzaszcz , Lectures on Monte Carlo methods, ETH Zurich

(69)

Monte Carlo methods: more maths

69

(70)

Applications of MC methods

70

(71)

Euler number determination

71

(72)

Let’s test the √N

72

(73)

Let’s test the √N

73

(74)

Let’s test the √N

74

(75)

Mathematical foundations of MC methods

75

(76)

Mathematical foundations of MC methods

76

(77)

Mathematical foundations of MC methods

77

(78)

Mathematical foundations of MC methods

78

(79)

Mathematical foundations of MC methods

79

(80)

Law of large numbers

80

(81)

Wrap up

81

(82)

Monte Carlo and integration

82

(83)

Uncertainty from MC methods

83

(84)

Buffon needle – p number calculus

84

(85)

Buffon needle – simples Carlo method

85

(86)

Head and tails Monte Carlo

86

(87)

Buffon needle

87

(88)

Crude Monte Carlo method of integration

88

(89)

Crude vs „hits or miss”

89

(90)

Generalization to multi-dimension case. Crude method

90

(91)

Generalization to multi-dimension case. „Hits or miss”

91

(92)

Crude MC vs „Hits or miss”

92

(93)

Crude MC vs „Hits or miss”

93

(94)

Crude MC vs „Hits or miss”

94

(95)

Classical methods of variance reduction

95

(96)

Stratified sampling

96

(97)

Stratified sampling – mathematical details

97

(98)

Stratified sampling in practice

98

(99)

Stratified sampling for the Buffon needle

99

(100)

Importance sampling

100

(101)

Importance sampling - Example

101

(102)

Control variates

102

(103)

Antithetic variates

103

(104)

Wrap up

104

(105)

Classical methods of variance reduction

105

(106)

Disadvantages of classical variance reduction methods

106

(107)

Schematic of running this kind of methods

107

(108)

VEGAS algorithm

108

(109)

VEGAS algorithm

109

(110)

VEGAS algorithm – futher improvements

110

(111)

VEGAS algorithm – 2D case

111

(112)

VEGAS algorithm – an example

112

(113)

FOAM algorithm

113

(114)

FOAM algorithm

114

(115)

FOAM algorithm

115

(116)

Monte Carlo vs numerical methods

116

(117)

Wrap up

117

(118)

Random and pseudorandom numbers

118

(119)

Random numbers = history remark

119

(120)

Pseudorandom numbers

120

(121)

General schematic

121

(122)

Linear generators

122

(123)

Linear generators

123

(124)

Linear generators

124

(125)

RANLUX generator

125

(126)

Wrap up

126

(127)

Literature

127

Cytaty

Powiązane dokumenty

Simulation of growth processes A challenge to perform such growth simulations is the large range of relevant length and time scales. The features interesting for device

Growth of rough surfaces – Stochastic differential equations The simplest time-dependent description of a stochastic surface is afforded by the Edwards–Wilkinson (EW) equation

Oszacować metodą MC moment bezwładności kuli względem osi przechodzącej przez jej śro- dek oraz błąd tego oszacowania2. Sporządzić wykresy

Jeżeli G(x) jest funkcją nieujemną, wówczas minimalna wariancja estymatora ważonego jest równa 0 - należałoby jednak w takim przypadku znać wartość całki w

Możliwość umieszczenia radionuklidów w narządach lub obszarach ciała (BOMAB) ZAPEWNIENIE JAKOŚCI

KEYWORDS: Phase Shifting Transformer, Monte Carlo Simulation, Power Flow Control, Transit Flow, Total Transfer Capacity..

This thesis describes the solution of the space, energy and direction dependent adjoint neutron transport equation by the Monte Carlo method, which enables the calculation

Rozwiązania nadal poszukujemy generując łańcuch (ciąg) sfer z jednoczesnym szacowaniem wartości potencjału w środku każdej sfery, czyli:. Zauważmy, że potencjał w środku