联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Python编程Python编程

日期:2019-02-10 11:10

PHAS0020 Final Assignment 2019

Dr. Christian G¨utschow?

(c.gutschow@ucl.ac.uk)

February 2019

Contents

1 Introduction 1

2 Boundary value problems: eigenvalue solutions 2

3 Infinite square well 2

4 Finding the ground-state energy 3

5 Finding the ground-state wavefunction 3

6 Finding the higher energy states 4

7 Beyond the infinite square well 4

7.1 Harmonic potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

7.2 Finite square well . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

7.3 Coulomb potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

7.3.1 Quantum tunnelling . . . . . . . . . . . . . . . . . . . . . . . . 5

8 General assignment advice 6

9 Assessment 6

10 Submission 6

11 Page limit 7

1 Introduction

In the course so far we have used a wide variety of techniques to give you a flavour

of the sort of problems that can be tackled using computational approaches. In

session 10, we are going to look at one more new aspect of this, including boundary

values in the solving of differential equations. You will then apply this to the problem

for the PHAS0020 final assignment: solving the quantum-mechanical problem of a

particle in a potential well. You will fist solve for an infinite square potential well, and

use the known solutions for this system to check that your results are correct. You will

then be able to extend this to calculate for systems where there is no simple analytical

solution. Before commencing any of the tasks below, make sure you have gone through

and understood the contents of the Jupyter Notebook script for session 10, which will

guide you through the process of finding roots of a function using the secant method,

and hence solving differential equations with boundary value conditions, both of which

you will need to solve this problem.

With thanks to Dr. Louise Dash (louise.dash@ucl.ac.uk) who provided most of the material for

this course.

1

2 Boundary value problems: eigenvalue solutions

In this task we are going to be applying our new knowledge of boundary value problems

to the one-dimensional time-independent Schr¨odinger equation,(1)

Initially, we are going to consider one of the most well-known solutions of this—for

a particle in a square potential well of width 2a with infinitely high walls. This is

Figure 1: The infinite square

well potential. Within the well,

the potential is zero, everywhere

else the potential is in-

finite.

shown in Figure 1, and the potential V (x) takes the form

V (x) = (0 if  a ≤ x ≤ +a,∞ if |x| > a.

(2)

You will all have studied this in PHAS0022 (or an equivalent course) and should be

familiar with the solutions. These solutions show that the probability of finding the

particle in the region where V (x) = ∞ is zero, and thus the wavefunction must be

subject to the boundary conditions of ψ = 0 at x = a and x = +a. Therefore, this

would seem to be an ideal system to solve using the same approach as we used to

calculate the trajectory of a thrown ball in the Jupyter Notebook for Session 10—we

could transform Equation 1 into two first-order equations, guess some initial values,

and iterate until we find a solution that fulfills the boundary condition at x = +a.

Separating out the Schr¨odinger equation into two first-order equations yields(4)

We know one initial boundary condition, that ψ = 0 at x = a. We would therefore

need to guess an initial condition for φ and then vary this with the secant method (or

another root-finding method) until we find a solution where ψ(x = +a) = 0.

Unfortunately, this approach will not work. The Schr¨odinger equation is a linear

equation, so if we have a solution ψ, any multiple of ψ will also be a solution. Conversely,

a multiple of any candidate wavefunction ψ that does not fulfill the boundary

condition of ψ(x = +a) = 0 will also not fulfill the condition.

This is because the Schr¨odinger equation is an eigenvalue equation—it only has

solutions at particular values of the energy E. For other values, there are no solutions

that fulfill the boundary conditions.

The approach we will adopt, therefore, is not to search for an initial condition on

φ that will give us the required solution, but instead to search on values of E. As the

only effect of φ’s initial condition is to multiply the wavefunction by a constant, we

can choose any starting value. We can then normalize the wavefunction once we have

found a solution if needed.

3 Infinite square well

You now have all the information you need to start on the task. The first part of the

task is to calculate the energy of the ground state. You should be able to do this by

the end of Session 10, and you can get help from the demonstrators for this part of

the task during the session. Start by creating a new notebook from scratch. You will

need to define the following physical constants:

reduced Planck constant ~ = h/2π = 1.0545718 × 10?34 Js

electron charge e = 1.60217662 × 1019 C

electron mass m = 9.10938356 × 1031 kg

proton mass mp = 1.6726219 × 1027 kg

2

You can include more digits of precision than this if you wish, but please work in SI

units. When quoting energies however, you will find it more convenient to convert to

electronvolts ( eV) by dividing the value in Joules (J) by e.

Set the half-width of the potential well a, to be 5 × 1011 m, so that the well will

be 2a = 10?10 m wide. Use N = 1000 for the number of Runge–Kutta calculation

points.

For an infinite square well, we know that the particle will never be outside the

well, where V (x) = ∞, and as V (x) = 0 inside the well, we could just ignore this

in the calculations. However, later in the task you will calculate for other forms of

V (x), so write a suitably-named and documented function that will, for the moment,

return a value of V (x) = 0 for all values of x, the function input1

.

1Hint: you just need one line in the

function at the moment: return 0.0.

Make sure you remember the docstring

as well though.

We have already split the Schr¨odinger equation into two first-order equations,

Equations 3 and 4. You will need to write another function, just like the ones you

used in Sessions 7 and 8, to calculate the right-hand side of these equations2

. Now 2Hint: Unlike the previous functions,

this one will need three arguments as

inputs: a vector r of ψ and φ, a value

of x, and a value for the energy E,

which appears in the RHS of Equation

4.

you need a Runge–Kutta function. Use the fourth-order function you already have,

but you will probably want to make some changes. In particular, you can put the

initial conditions within the function. You can use any initial condition you choose

for φ, but phi = 1.0 is probably a good choice. Instead of running over an array of

time points, the loop will now run over an array of N x-points starting at x = a

and finishing at x = +a, with step size h = 2a/N.

3 The Runge–Kutta function will 3Hint: As you will be asked to change

the array range later on in the exercise,

it might be worth passing the

array as an argument to the Runge–

Kutta function.

need to return an array of the wavefunction values representing ψ(x), although note

that we do not actually need to return an array to represent φ(x) = dψ/dx.

4 Finding the ground-state energy

As in the script for Session 10, you will need to set up a code cell to iterate using

the secant method until you find a value of E that gives the required ψ(x) = 0

at x = a. To do this, you will need two initial guesses for the energy (e.g. using

variable names E1 and E2)

4

, then calculate corresponding wavefunction arrays using 4Hint: choose initial guesses that

are close to the initial ground-state

energy, otherwise you may find the

eigenvalue of one of the excited states

instead!

the Runge–Kutta function. Check the final element of these wavefunction arrays–are

they equal to zero? If not, update the guesses E1 and E2 using the secant method

until you find an energy that does fulfill the boundary conditions5

.

5Hint: You will need to set an appropriate

value for the tolerance, e/1000 is If all has gone well, your code will converge on the ground state reasonably quickly. probably a good choice

To check your result, compare it with the known ground-state energy, by recalling

that the eigenvalues of this system are given by:

This is the point that we anticipate most of you will be able to reach by the end of

Session 10. From this point onwards, you have to complete the task entirely on your

own, with no help from demonstrators or from your peers.

5 Finding the ground-state wavefunction

Now calculate and plot, on an appropriately labelled plot, the ground-state wavefunction.

You may wish to represent the walls of the infinite square well potential on the

plot as well6

.

6Hint:

plt.axvline(x=-a,c=’k’,ls=’-’,lw=2)

will plot a thick black vertical line at

x = a. Adapt this as required.

As we noted earlier when discussing the arbitrary choice of initial condition for

φ, our wavefunction as calculated is not normalised. It would be useful to write a

function that will normalize the wavefunction, so that

Z|ψ(x)|2dx = 1. (6)

You can achieve this by calculating the value of the integral on the left-hand side of

Equation 6, and then dividing the wavefunction through by the square root of this

value. The easiest way of calculating the integral is to use the trapezoidal rule7

, where 7Note that our wavefunction is already

in a convenient form to do this,

as it is a numpy array.

3

an integral with limits a and b can be evaluated as(7)

Having done this, compare your calculated wavefunction with the known ground-state

wavefunction, remembering that the normalized wavefunctions of the system are given

(8)

If all has gone well, you should find a perfect match between your numerical results

and the analytical solutions we already knew.

6 Finding the higher energy states

Once you are satisfied that your ground-state solutions are correct, try finding the

first few excited states (n = 2, 3, 4, as a minimum), and verify that these are also

correct. Comment on how you chose the initial guesses for the energies for these

states.8 Once more, plot these solutions and compare with the known solutions. 8Hint: As analytical solutions for the

energies are not always known, you

will want to find a general approach

to guessing the energies that does not

rely on prior knowledge of the textbook

results.

Does your method also work to find eigenstates for large n (for example, n ~ 20)?

Show this explicitly.

7 Beyond the infinite square well

Hopefully now you have code that works well to solve for the eigenstates of the infinite

square well. However, you probably found it a fair amount of work to calculate

answers that we already knew from a relatively simple analytical solution. In fact,

the main point of doing this was to confirm that your numerical version does indeed

work as expected, before going on to calculate for systems that are not easily solvable

analytically. This is what you will do now, and then compare your results to the

systems you have already met.

We are going to keep the infinite square walls of the potential well, which guarantee

that the particle cannot be found in the V (x) = ∞ region. This means we can keep

the boundary conditions of the original problem.

However, we are going to change the base of the potential well so that it is no

longer square—in effect we are going to embed another potential within the square

well. An example of this is shown in Figure 2.

Figure 2: Potentials can be

embedded within our infinite

square well, as shown by the

blue line. We can calculate for

any arbitrary potential defined

within the surrounding infinite

square well.

This opens up the possibility of solving for a wide range of systems for which there

is no simple analytical solution. By starting with embedded potentials with familiar

forms, you will be able to explore the similarities and differences from the analytical

solutions and get a feel for the physics of the new, embedded system. You will then

be able to extend this to any (arbitrary) embedded potential. You can implement this

simply by changing the form of the potential defined in the Python function earlier.

In each case, calculate at least the lowest four eigenstates (include some of the

higher eigenstates if you wish), and plot the wavefunctions. Also plot the potential

itself, with the energy eigenvalues as horizontal lines.

Compare these results qualitatively to the form of the wavefunctions you would

expect for the standard form of these potentials—explain the similarities and differences

in your text cell commentary. You may also want to attempt a quantitative

comparison using the known eigenvalues and wavefunctions if possible.

4

7.1 Harmonic potential

Set the potential to have the form

This will give you a harmonic potential embedded within the infinite square well, as

shown in Figure 3. You will need to pick an appropriate value for V0. 800e is a good

Figure 3: A harmonic potential

embedded in the infinite

well. Note that the particle

is still constrained within the

infinite walls indicated by the

black lines.

starting point, as it gives a fairly deep harmonic potential, but experiment to find a

value you think is most suitable. In what way do your results differ from the known

results for a simple harmonic oscillator potential? Why?

7.2 Finite square well

Set the potential to have the form

V (x) = (0 if a/2 ≤ x ≤ +a/2,V0 if |x| > a/2.

(10)

Again, you will need to adjust V0, and you may also want to experiment with the

width of the finite square well. How do your results differ from the known results for

a normal finite square well, and why?

7.3 Coulomb potential

Finally, we will consider the Coulomb potential that we have already met in Session 5.

In this scenario, an electron experiences a repulsion due to a potential that falls off

as ~ 1/r, except for very small ranges below a = 1 × 10?11 m where the potential is

zero. In this case, one of the infinite potential walls is placed at r = 0 and the other

one at r = 3a, resulting in

V (r) =0 if 0 < r < a,

V0/r if a ≤ r ≤ 3a,

∞ otherwise.

(11)

This will give you the Coulomb potential embedded within the infinite square well,

as shown in Figure 4. You may want to experiment again with the value for V0, but

Figure 4: A Coulomb potential

embedded in the infinite

well. Note that the particle

is still constrained within the

infinite walls indicated by the

black lines.

adjusting it such that Vmax is about 10 keV is probably a good starting point. It

might be worth converting all energies to keV for this part of the exercise. Make sure

you include a full interpretation of the physics of your results in your notebook.

7.3.1 Quantum tunnelling

In classical physics, the radius of closest approach rc for a particle of energy E is

where V (r = rc) = E, as indicated in Figure 4. In quantum physics, however, the

particle is allowed to tunnel through the potential barrier where V (r) > E, with some

transmission probability T, which is approximately given by(12)

assuming the exponential is the dominant term of the full expression. Write a function

that solves the integral in the exponent of Equation 12, e.g. using the trapezoidal rule

from Equation 7, and use it to estimate the transmission probability for the lowest

eigenstate energy for which E > V (r) near the infinite potential walls.

The shape of the Coulomb potential can also be used to model other phenomena,

such as radioactive decay or stellar nucleosynthesis. For instance, in order for

two hydrogen nuclei to form a heavier nucleus by fusion, one proton would have to

5

tunnel through the repulsive Coulomb potential of another proton. The range of the

attractive strong force is only around a ≈ 1 fm and so

Vmax =Z1Z2e24π0a≈ 1.4 MeV (13)

where Z1 = Z2 = 1 for the two protons. For a diproton system with reduced mass

mr = m1m2/(m1+m2), use your function to give a rough estimate of the transmission

probability assuming that the average thermal proton energy is roughly kBT ≈ 1 keV

at the Sun’s core where the temperature is around 15 million degrees Celsius.9 9You can ignore the infinite potential

walls for this back-on-the-envelope

calculation.

8 General assignment advice

Submit your work as a fully self-contained Jupyter Notebook. Your notebook should

have a similar writing style to a formal report, i.e. use complete and grammatically

correct sentences, avoid bullet lists, and use formal scientific language.

Pay particular attention to your text cell commentary. Because this task is fairly

open-ended, we will only be able to tell what you have done, and why you have chosen

to do it in that way, if you use the text cells to tell us. Likewise, make sure your code

is fully commented, as you may not get full credit if we cannot figure out what it

does.

Your notebook should not include any interactive code requiring user input.

9 Assessment

In this assignment, most of the available marks (65 %) are for successfully calculating

the eigenvalues and eigenfunctions, and analysing and discussing these results in the

text commentary.

The remaining marks will be allocated for the overall quality of your plots (10 %),

the overall quality of your coding style and code comments (10 %), and the overall

quality of your discussion in the text cells (including grammar and spelling, 15 %).

As a guide: if you have successfully completed only the first part of the task (i.e.

calculation of the ground-state energy), including a reasonable text cell commentary

etc., you would receive a maximum grade of around 40 %. A complete, fully correct

solution of the low-lying eigenstates of the infinite square well would expect to receive

a grade of no more than 55 %. Higher grades than this will only be achieved if you

have extended your code for other potentials, and given a sensible analysis of your

results.

10 Submission

This is an individual assignment. You must work on this on your own, with

no help or input from staff or other students. Everything in your submission must

be either completely your own work, or have the source explicitly acknowledged and

suitably referenced. We will be using several methods to check for plagiarism, copying,

and collusion. This assignment will be graded anonymously. Please make sure that:

your name does not appear anywhere in your submission;

your submission title starts with your student number; and

you include your student number at the start of your submitted Jupyter Notebook.

If you have an e-sticker from Student Disability Services please copy

and paste the wording (but not your name!) into a clearly labelled text

cell at the top of your Jupyter Notebook.

6

You can only submit one file on Moodle, so it will not be possible to upload

additional figure files. You may include images as linked URLs (as, for example,

in the script for session 10), and make sure that the original source of the image is

made clear. If you want to include figures you have created yourself, you will need

to upload these to an external hosting service (e.g. Imgur, Flickr, etc.) and ensure

that the images are public. In this case please make it clear in the accompanying

text that you have created this image yourself. You are advised to include a suitably

formatted bibliography or reference section if you refer to any textbooks, lecture notes

(e.g. PHAS0022) or other sources of information.

11 Page limit

This year we have introduced a page limit of the equivalent of 60 sides of A4 paper

for the final assignment.

You can find out how to determine the page count for your completed notebook

by following the procedure laid out at the bottom of the Moodle page for Session 10.


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp