05.10.2013 Views

Polymers in Confined Geometry.pdf

Polymers in Confined Geometry.pdf

Polymers in Confined Geometry.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

46 CHAPTER 4. SIMULATION METHODS<br />

Block<strong>in</strong>g method There are situations, when a set of samples has been obta<strong>in</strong>ed,<br />

but it has not been taken care of measur<strong>in</strong>g the correlation time. When<br />

the whole set of sampl<strong>in</strong>g po<strong>in</strong>ts is available a different approach can be made to<br />

extract an useful error estimate. It is a block<strong>in</strong>g method and therefore related to<br />

real space renormalization (cf. [13, 35] and the orig<strong>in</strong>al paper [12]).<br />

The idea is to calculate the error over a successively smaller set of sample<br />

po<strong>in</strong>ts and observe how this error behaves. The first step is to calculate the error<br />

over the whole set of po<strong>in</strong>ts. Then the set is reduced to half its size by tak<strong>in</strong>g<br />

the mean of two successive po<strong>in</strong>t as new po<strong>in</strong>ts for the smaller sequence. Aga<strong>in</strong><br />

the error is calculated over this new set.<br />

By repeat<strong>in</strong>g this until the set is too small, a sequence of errors is obta<strong>in</strong>ed,<br />

which is first <strong>in</strong>creas<strong>in</strong>g and then should show a plateau (at the end fluctuations<br />

become very large, so that the last po<strong>in</strong>ts are unreliable). It can be shown (see<br />

[12], also for further details and plots) that the real uncorrelated error corresponds<br />

to the value of the plateau. If there is no plateau visible, than too few sample<br />

po<strong>in</strong>ts are available to uncorrelate the error by this method and one can just<br />

get a lower border for the error, which is given by the largest error value <strong>in</strong> the<br />

sequence.<br />

4.3.4 Recursive averag<strong>in</strong>g and error calculation<br />

In the simulations a lot of averages and errors thereof have to be calculated. If<br />

this is done at the end of the program run all the sample data has to be stored.<br />

This can result <strong>in</strong> a large memory usage. The smart way is to calculate the<br />

averages and errors recursively from the last value and the just sampled one.<br />

The mean <strong>in</strong> the Nth step is denoted by (where xi is the sample taken <strong>in</strong><br />

MC-step i)<br />

〈x〉 N = 1<br />

N<br />

N<br />

xi. (4.21)<br />

Insert<strong>in</strong>g this <strong>in</strong> the same formula written down for N +1, results <strong>in</strong> the recursive<br />

equation for the average<br />

i=1<br />

〈x〉 N+1 = N<br />

N + 1 〈x〉 1<br />

N +<br />

N + 1 xN+1. (4.22)<br />

To equate the relation for the mean-square deviation 〈∆x 2 〉 N = 〈x 2 〉 N − 〈x〉 2<br />

N<br />

the result eq. (4.22) has to be used besides the same for mean-square average<br />

x 2 <br />

N+1<br />

N 2<br />

= x<br />

N + 1<br />

1<br />

+ N N + 1 x2N+1. (4.23)<br />

Insert<strong>in</strong>g and after some rearrang<strong>in</strong>g of terms the results is<br />

(N + 1) ∆x 2<br />

N+1 = N ∆x 2 N 2. + 〈x〉N − xN+1 (4.24)<br />

N N + 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!