Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE USE PYTHON Write a computer program that performs the procedure described in Example 4.2 in the textbook. Use the results of running your program

PLEASE USE PYTHON

image text in transcribed

image text in transcribed

image text in transcribed

Write a computer program that performs the procedure described in Example 4.2 in the textbook. Use the results of running your program to make figures that are equivalent to Fig 4.8(c) and (d) in the textbook. Make sure to show both the matrices and related histograms that show the number of sites that have Q quanta. Explain how you could use the histograms to work out the temperature of the systems. You can use any computer language you like, although I recommend that you try using python in the Jupyter notebook environment. Be sure to submit a printout of your program as part of your assignment. Example 4.2 To illustrate the statistical nature of the Boltzmann distribution, let us play a game in which quanta of energy are distributed in a lattice. We choose a lattice of 400 sites, arranged for convenience on a 20x20 grid. Each site initially contains a single energy quantum, as shown in Fig. 4.8(a). The adjacent histogram shows that there are 400 sites with one quantum on each. We now choose a site at random and re- move the quantum from that site and place it on a second, randomly chosen site. The resulting distribution is shown in Fig. 4.8(b), and the histogram shows that we now have 398 sites each with 1 quantum, 1 site with no quanta and 1 site with two quanta. This redistribution pro- cess is repeated many times and the resulting distribution is as shown in Fig. 4.8(c). The histogram describing this looks very much like a Boltzmann exponential distribution. The initial distribution shown in Fig. 4.8(a) is very equitable and gives a distribution of energy quanta between sites of which Karl Marx would have been proud. It is however very statistically unlikely because it is associated with only a single microstate, i.e., 12 = 1. There are many more microstates associated with other macrostates, as we shall now show. For example, the state obtained after a single iteration, such as the one shown in Fig. 4.8(b), is much more likely, since there are 400 ways to choose the site from which a quantum has been removed, and then 399 ways to choose the site to which a quantum is added; hence 1 = 400 x 399 = 19600 for this histogram (which contains 398 singly occupied sites, one site with zero quanta and one site with two quanta). The state obtained after many iterations in Fig. 4.8(c) is much, much more likely to occur if quanta are allowed to rearrange randomly as the number of microstates associated with the Boltzmann distribution is absolutely enormous. The Boltzmann distribution is simply a matter of probability In the model considered in this example, the role of temperature is played by the total number of energy quanta in play. So, for example, if instead the initial arrangement had been two quanta per site rather than one quantum per site, then after many iterations one would obtain the arrangement shown in Fig. 4.8(d). Since the initial arrangement has more energy, the final state is a Boltzmann distribution with a higher temperature (leading to more sites with more energy quanta). (c ) c) (d) 00101 OOOO 312000 100 01051 011 2 0 1000131 03011010123001 2410 3 21243 0011040 211 1 200 10104 0 0 0 0 0 1200 0111040 10 2 2 13100300 1 0 0 0 0 2 0 0 2 0 603130 2 2 4 1 2 0 0 0 0 1 3 0 2 0 0 30 021120000000100 13110000301010 0 0 0 2 210101204101021111 1 0 0 0 0 0 1 4 2 2 2 0 100 2001 03011 0 0 0 1 0 0 3 2 0 0 2 2 2 0 3 5 2 0 0 1 0 0 2 1 0 0 0 1 0 0 1 0 3 0 3 1103001410200301013 011020 0 4 1 3 2 0 0 0 0 2 10 20 14103021 130 5031722001 0 000 0 0 5 0 0 10 10 22 10 3001 000001010000104101 2 0 04102 211 1 203194 15 1J0213 28203000513 2 0 0 2 0 0 5 4 2 3 2 301001 402 21 23 0 2 0 1 10 2 50100102 21611110020 3211100 0 0 0 10 1 0 5 2 0 24OOJO 0 1 4 2 2 0 0 451100031 313031071 4 320 60 0070 2 2 0 0 9 0 270110 01 151151049111051 3 2 2 1 1 11 4 2 070102270520 6 0 3 5053000101LB00J91730 4 0 2 0 0 2 2 0 2 3 210 13 0 0 0 0 0 021251 2310 720 0 0 0 2 1 4 0 11 3 2 4 0 2 0 2 12 1 2 0 0 0 0 5 5 0 2 JDO 21 4 20 621037613 10 12 900151 22133110 61304 3 2 0 12 6 2 0 2 2 0 14 2 2 0 0 1 220 30 60 10 0013001013 1 2 2 4 2 10 01234567 0123456 7 8 9 10 11 12 13 14 15

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

Do you agree with the logic to outsource lower-level positions?

Answered: 1 week ago

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago