Errors in the schedule

There are some serious errors with the FYS1120 schedule on the course pages.

The following groups have been added as a mistake and will be removed:

We’re sorry about the inconvenience.

This means that the following groups are the only ones that will be held:

In addition, we note that there is only one oblig in this course. The exact deadline for this oblig will be announced.

Information about the labs

Latest update: October 31, 2012.

The labs are soon around the corner. Hopefully you are not too exhausted from working on the oblig and thankfully we have tried to make the labs a lot more fun this year. We hope that you’ll enjoy learning about these concepts of electromagnetism.

Time and place

The deadline to register for the lab was last friday. If you have not registered, please contact us as soon as possible!

The labs are held from week 45 to week 47 (room FV225). Each week you will attend one lab which lasts four hours. The labs are held multiple times, each week and they are as follows:

  • Mondays 08-12
  • Tuesdays 13-17
  • Wednesdays 08-12
  • Thursdays 13-17
  • Fridays 13-17

Again, we repeat that you are only attending one of these times each week. In other words, there are a total of 12 hours of lab during the whole semester.

Prelab and exercises

Each lab has a prelab and exercises. You have to do the prelab questions before showing up at the lab. These are multiple choice and should be fairly quickly done.

In the end of each lab there is a set of exercises that are supposed to be done at the lab. Some might however be done at home before the lab, which is perfectly fine if you feel like doing so to save time.

Topics

The topics of the labs are

You may download the lab texts now and have a look through them. They are mostly complete, but some changes may occur – also to the questions. We will update this post whenever we change the labs, so make sure to check back here and see if there are any updates the day before you have your lab.

Good luck!

Do not blindly trust the solutions!

The solutions are meant as a guide on one way to think when solving different problems in electromagnetism, and they are not guaranteed to be clean of errors. When you stumble across an answer or a piece of logic you do not agree with it is most likely you who are correct.

You can help us in identifying errors in the solutions by posting on the weekly post.  This might even trigger a discussion which everyone will learn from and appreciate!

.

Basic kinematics

Kinematics is all about motion. And since we are now moving away from pure electrostatics, it is about time to introduce some motion of particles.

In exercise set 6 we ask you to simulate the motion of a particle in an electric field using numeric methods. This is likely something you have seen before, so we’ll just briefly restate the most important concepts here.

Numerical integration

To determine the motion of any particle, we need to find the position as a function of time. This is usually done by observing that the double derivative of the position, namely the acceleration, can be integrated over time to give back the position. However, evaluating the integral

$$\mathbf r(t) = \int \int \mathbf a(t, \mathbf v(t), \mathbf r(t)) ~dt~dt$$

is no trivial task, except for the cases where $\mathbf a$ is constant. That’s why numerical integration is so useful when working with more complicated problems, especially when $\mathbf a$ is a function of $\mathbf r$ and $\mathbf v$.

In numerical integration, we divide the time into discrete steps, where we at each step recalculate the acceleration, velocity and position. One of the simplest of these schemes is the Euler-Cromer scheme.

In the Euler-Cromer scheme, we increase the current velocity by adding the acceleration at each time step. The acceleration is then a function of the current time, and the position and velocity at the previous time step.

$$\mathbf v(t_{i+1}) = \mathbf v(t_i) + \mathbf a(t_{i}, \mathbf r(t_i), \mathbf v(t_i)) \cdot \Delta t$$

Similarily, we find the position using the velocity we just calculated for the current time step:

$$\mathbf r(t_{i+1}) = \mathbf r(t_i) + \mathbf v(t_{i+1}) \cdot \Delta t$$

We have to do this from the first step in time till the last, and in terms of code this is translated into a for-loop. In Python we may express this as a small script:

from pylab import *

dt = 1e-3
t0 = 0
t1 = 10
t = linspace(t0, t1, (t1 - t0)/dt)

r1 = zeros((len(t),3))
v1 = zeros((len(t),3))

r1[0] = [0.0, 0.0, 0.0]
v1[0] = [0.0, 0.0, 0.0]

for i in range(len(t)-1): 
    a1 = array([5.0, 0.0, 0.0])
    v1[i+1] = v1[i] + a1*dt
    r1[i+1] = r1[i] + v1[i+1]*dt

figure()
plot(t, r1[:,0], label="Motion in x direction")
xlabel("$t$",fontsize=16)
ylabel("$x$",fontsize=16)
legend()
show()

To run this in an IPython terminal, just save it to file a file named “kinematics.py” and launch it by running the following commands in the folder where you saved the file:

ipython --pylab
run kinematics.py

Here we are using vectors, generated by linspace. The linspace function does in this case generate an array of 3-dimensional vectors, where the first argument, len(t), tells linspace that we want as many such vectors as there are time steps. The second argument, 3, tells linspace that each vector is three-dimensional.

The reason for using vectors (instead of 3 arrays of length len(t)) is that it makes it simple to write the following two statements in a way that is easy to read and remember:

r1[0] = [0.0, 0.0, 0.0]
v1[0] = [0.0, 0.0, 0.0]

This sets the first vectors of our position and velocity, also known as the initial conditions. In this case we have chosen the components of both to be $x = 0$, $y = 0$ and $z = 0$.

The for-loop is basically what we defined as the Euler-Cromer scheme above, with a constant acceleration vector in the $x$-direction:

for i in range(len(t)-1): 
    a1 = array([5.0, 0.0, 0.0])
    v1[i+1] = v1[i] + a1*1e-4
    r1[i+1] = r1[i] + v1[i+1]*dt

At each time step the position and velocity is not only calculated, but stored to an array that makes it readily available for plotting. The plotting is done for the first component of all $\mathbf r$-vectors as a function of t:

plot(t, r1[:,0], label="Motion in x direction")

A plot showing the $x$-component of the particle’s position as function of time $t$.

This results in a plot looking something like this:

For the case where we are working with a more physical problem, we would have to calculate the force $\mathbf F$ at each time step and find the acceleration from Newton’s second law, $\mathbf a = \frac{F}{m}$.

 

You should now be ready to play around with your own kinematic problems.

Good news for Matlab fans!

We have decided that the oblig can be done in any programming language you like, including Python and Matlab. This means that there will be no need for functions specific to Python or Mayavi to get the oblig approved, and that we will help you with both Matlab and Python during the group sessions.

Just note that if you choose any other language than Python or Matlab, you are a bit on your own when it comes to support. You will also have to make sure that your language of choice generates good-looking plots that meets all requirements such as legend, named axes, etc.

Note also that there is a numeric exercise in set number 6 that might be useful to have done before the oblig is published.

The oblig will be published shortly after the mid-term exam.

 

Equation sheet

We have put together an equation sheet that you will be handed on the mid-term and final exam. The sheet is not complete, so please be aware of errors and missing equations, and check in here frequently to download the latest version.

If you miss something that you would like to have included in the equation sheet, don’t hesitate to ask us to include it. (We can’t guarantee that we’ll accept any proposal, though.)

 

Maxwell’s equations

Last weekend Fysisk fagutvalg arranged the annual cabin trip, and in that regard Jørgen Midtbø held a lecture on Maxwell’s equations. Those of you who were there are already familiar with the content, but for the rest of you we post the note from this lecture that may be useful to read through. You can find the note here

Enjoy!