Keep up to date with the latest messages

Even though we’ve tried to keep the blog as updated as possible with the latest messages from the course pages, there have been a few that has slipped through our radar. To avoid this, we’ve added an automatically updated list to the front page of this website:

mindseye.no/fys1120

Under the heading “Latest messages” you’ll find the three latest messages that has been posted, and by clicking the link you’ll find all messages ever posted on the course pages. So keep an eye on this list in addition to the blog. Not all messages here will be posted in the blog from now on.

For instance, the following messages have not been posted here yet, and might be useful:

  • The second try for the oblig is due 21 October.
  • The obligs have not yet been corrected, but will be some time during this week.
  • About fifty percent of the responses will need to be handed in again.

Remember to sign up for the lab

You may now sign up for the lab by writing your name on the list on the door to room V225.

The lab is held during week 45, 46 and 47 at the following times:

Monday and Tuesday: 08 – 12
Wednesday, Thursday and Friday: 13 – 17

Find a time that suits you and sign up on the list. The lab will be pretty much like how it was last year, and you can find this years experiments under the title “Lab-øvelser”:

http://www.uio.no/studier/emner/matnat/fys/FYS1120/h11/

We strongly encourage you to read through the lab exercises before coming to the lab. This way you will get much more out of the exercises and will hopefully understand a lot more of what the experiments actually teach us.

Midterm exam

There came in some questions regarding the relevance of the weekly exercises considering the upcoming midterm exam. The answer is that the weekly exercises of course are relevant and therefore valuable practice. The questions for the exam might include everything that has been lectured up to and including the lecture 04.10 where the main subjects will be electrostatics, currents and magnetostatics. The lecture plan for the semester is found here:

http://www.uio.no/studier/emner/matnat/fys/FYS1120/h11/undervisningsplan.xml

Remember that you can bring an A4-paper with your own notes and allowed mathematical and physics tables (Rottman, Angell/Øgrim og Lian) as well as an approved calculator.

Update: There will be group lessons on Tuesday, 11 October, but no group lessons on Friday, 14 October.

Some missing information in the oblig

As Finn mentioned in today’s lecture, there has been some information missing from the oblig:

The side walls in the well are made of conducting material.

Some of you have already been able to deduce this from that V=0 on the side walls tells us they are in equipotential, and knowing that conductors are equipotentials, the walls are most likely conductors. However, it should have been explicitly stated that they are conducting, since this does not always have to be the case.

Good luck with the rest of the oblig, and remember to attend to the group sessions if you have any questions. If you don’t have the time to attend, you can of course contact us by e-mail or here on the web pages.

SyntaxError: Non-ASCII character

There are probably going to be a few things to watch out for in the oblig. One of these is characters not being copied correctly from the source code in the note on Jacobi’s method. A common error that Python will spew out in this case is

SyntaxError: Non-ASCII character '\xe2' in file ... on line 40, 
but no decoding declared ...

This is caused by the apostrophe ‘ being incorrectly replaced as a quotation mark ` during copying. The difference is very subtle, but for Python there is a huge difference; The apostrophe is completely legal to indicate a text string. The quotation mark is not.

The solution is to replace the offending quotation marks with apostrophes (the latter is found on the *-button on Norwegian keyboards) or to simply copy the source code manually instead.

Also, do watch out for whitespaces sneaking into your source code while copying.

Sadly, there is often many errors like these that show up when copying source code from PDF’s. Make sure you verify that the source code is the same after copying.

The oblig is here

The oblig has been posted on the course pages.

You can find it here under “Obligatoriske oppgaver”.

Please note that last weeks exercises included an oblig warm-up. This can be useful if you want to test yourself with a simpler problem before going ahead with the whole oblig.

In addition, you’ll find the note about Jacobi’s method on this page, under the link named “Numerical solutions of Laplace’s equation”.

You’ll find the due date in the oblig itself.

Good luck!

Electromagnetic java simulations

The java simulations that Andreas Görgen showed in the lectures can be found here:

The two first ones allows you to set up charge distributions and visualize fields, field lines and equipotentials. The third one comes with some preconfigured and interesting charge distributions where you can do things such as taking the flux integral of the field. As a recommendation for link 3 try out; setup: charged plate dipole, mouse: surface integral and see how you change the field by varying the the size of the plates. In one limit you get the familiar dipole field, while in the other you get the field from a parallel plate capacitor.

Using Mayavi’s contour3d function

The Mayavi library that we’re using in this years course holds a great amount of functions to plot 3D and 2D data. Among these is the contour3d function that is very useful to plot equipotential surfaces in 3D space. This could for instance be used to plot a potential. In the exercise set from week 3, you may use this to visualize the potential inside and outside a uniformly charged sphere.

The solution program for this exercise is shown below:

from numpy import *
from enthought.mayavi.mlab import *

x,y,z = mgrid[-100:101:5., -100:101:5., -100:101:5.]
R = 40
Q = 1.0

r = sqrt(x**2 + y**2 + z**2)
V = 0*x
for i in range(len(r)):
    for j in range(len(r)):
        for k in range(len(r)):
            if r[i][j][k] < R:
                V[i][j][k] = Q / (8 * pi * R) * (3 - r[i][j][k]**2/R**2)
            else:
                V[i][j][k] = Q / (4 * pi * r[i][j][k])

contour3d(x, y, z, V, contours=20, opacity=0.5)

Note that we are setting contours=20 to have 20 equipotential surfaces and opacity=0.5 to be able to see through the surfaces. Otherwise we would only be able to see the outermost surface. You can read more about these and other settings by typing “help contour3d” in IPython (after importing mayavi) or by looking at the online reference.

The result is shown in the figure below:

A close up of the potential from a uniformly charged sphere. The rings are spherical shells coloured according to the level of the potential. They are semi-transparent, so that you can see the inner shells (the orange is the innermost shell.)

Do you see how the potential rises and lowers quickly close to the edge of the sphere? The edge of the sphere is located approximately where the color goes from yellow-ish to green. What does this tell you about the field in this area?