# Back of the Envelope Estimation Problem for Faraday’s Law

I told my students I would solve this problem for them. It’s a real life problem too.

Is it possible to use a Neodymium magnet and a coil of wire to get an LED to light up?

That’s the real version. But because I was afraid students would be overwhelmed, I added the following:

• The magnet has a maximum magnetic field of 0.2 Tesla.
• The LED requires 1.5 Volts and 10 mA to light.

I like this problem because I don’t know the answer. Also, the answer is useful. If you want to do a physics demo showing the voltage induced by a changing magnetic field—what better way than with a hand-held magnet and a small light?

But will it even work? Let’s get started. Here is a diagram.

By changing the magnetic flux through the coil, this will create a curly electric field and an electromotive force (a change in electric potential). The magnetic flux is defined as:

$\Phi = N|\vec{B}|A\cos\theta$

Where N is the number of turns in the loop, A is the area of the loop and $\theta$ is the angle between the magnetic field and a vector perpendicular to the area. In the diagram above, $\theta = 0$ since the magnetic field is perpendicular to the coil.

A change in flux produces a voltage according to Faraday’s Law:

$\Delta V = \frac{\Delta \Phi}{\Delta t}$

Note: yes, I’m different. I think that the number of loops (N) is part of the magnetic flux and that the minus sign in Faraday’s Law doesn’t really mean anything.

Putting the flux into Faraday’s Law, I get (assuming $\theta = 0$):

$\Delta V = \frac{NBA}{\Delta t}$

Now for some estimates. I could just estimate everything and then calculate the voltage—but instead I’m going to estimate everything except the number of turns. I can then solve for N and see if it’s reasonable.

Here’s what I have.

• B = 0.2 T
• A: radius = 0.01 m
• Time interval = 1 second
• Voltage = 1.5 V

Solving for N:

$N = \frac{\Delta V \Delta t}{BA}$

This is the perfect case to use python for your calculator. You can put your estimates as variables so that you can easily change things up. Here is my code. I get the following output.

Umm….yeah. That’s 23 thousand turns. I’m not going to do that. Even if decreased the time to 0.1 seconds, I would still need 2000 turns. Arg.

Oh, what if I just make a HUGE loop? Nope. That wouldn’t work. In my estimation for the change in flux, I assumed a constant magnetic field—this is obviously not true, but good enough for a small loop. With a big loop, you would have some of the magnetic field creating a negative flux. It would just make things worse.

What if I put the magnet on a spinning stick (run by a motor)?

# Numerical Calculation of an Electric Field of a Half-Ring

Suppose there is a charge distribution that is half a circle with uniform charge. How do you find the electric field due to this half-ring? Here is a picture.

If you wanted to find the electric field at the origin (center of the half-ring), you could do this analytically. If you want to find the electric field somewhere else, you need to do a numerical calculation.

Here is the plan for the numerical calculation.

• Break the ring into N pieces (where N can be whatever number makes you happy).
• Treat each of these N pieces as though they were point charges.
• Calculate the electric field due to each of these pieces and add them all up.
• The end.

Maybe this updated picture will be useful.

Let’s say the total charge is 5 nC and the ring radius is 0.01 meters. We can find the electric field anywhere, but how about at < 0.03 ,0.04, 0 > meters.

I’m going to break this ring into pieces and let the angle θ determine the location of the piece. That means I will need the change in angular position from one point to the next. The total circle will go from θ = π/2 to 3π/2. The change in angle will be:

$d\theta = \frac{\pi}{2N}$

I know it’s wrong, but I will just put the first piece right on the y-axis and then space out the rest. Here is what that looks like for N = 7.

Here is the code.

That works. Oh, and here is the link to the code. Go ahead and try changing some stuff. See what happens if you put N = 20.

But there is a problem. If I make these charge balls, I need to also calculate the electric field due to each ball. I was going to make a list (a python list) to put all these balls in, but I don’t think I need it.

Here is my updated code.

With the output of:

I think this is working, but let me go over some of the deets.

• Line 13: you need to know the charge of each piece—this depends on the number of pieces.
• Line 12: We need to add up the total electric field from each piece. This means that we need to start with a zero electric field.
• Line 15: I named the point charges so I can reference them. But here you can see that with this method, there is only one charge—it just moves.
• Line 16: calculate r from a piece to observation location.
• Line 17: electric field due to a point charge.

Homework

I’m stopping here. You can do the rest as homework.

• How do you know this answer is correct? Hint: put the observation location at the origin.
• How many pieces do you need to get a valid answer?
• Make a plot of E vs. distance along the x-axis. This graph should show E approaching zero magnitude as you get farther away.
• What about electric potential with respect to infinity? Oh yeah. That’s a good one.
• Display the electric field as an arrow at different locations.

# Electric Field due to a Uniformly Charged Ring

Hold on to your pants. Let’s do this.

Suppose I have an electrically charged ring. The radius of this ring is R and the total charge is Q. The axis of the ring is on the x-axis. What is the value of the electric field along this x-axis?

Analytical Calculation

You can’t directly find the electric field due to a charge distribution like this. Instead, you have to break the object into a bunch of tiny pieces and use the superposition principle. The super position principle says that the total electric field at some point is the vector sum of the electric field due to individual point charges.

Of course the electric field due to a single point change can be found as:

$\vec{E}=\frac{1}{4\pi \epsilon_0} \frac{q\hat{r}}{r^2}$

So, if I break this ring into a bunch of tiny points I can find the electric field due to each of these points and add them up. Yes, the smaller the points the better the answer. In fact, if I take the limit in which the point size goes to zero I will turn this into an integral. Calculus for the win (CFTW).

Let’s take a look at one of these pieces on the ring of charge. Here is a view of the ring from the side.

I can find the little bit of electric field from this little bit of charge at the top of the ring. This electric field would be:

$d\vec{E}=\frac{1}{4\pi\epsilon_0}\frac{dq\hat{r}}{r^2}$

Of course the direction of r and thus the electric field will change directions as you go around this ring and add up tiny electric fields. But WAIT! We can cheat. OK, it’s not cheating–it’s just being smart. What if you also consider the tiny piece of charge at the bottom of the ring? This would also make a tiny electric field at this same location. It would have the same magnitude as the electric from the top piece since it’s the same charge and distance. However, the y-components of these two electric fields would cancel and leave only an x-component of the field.

In fact, for every tiny piece on the ring there is a corresponding piece on the opposite side of the ring. The only surviving components of electric field will be in the x-direction. So that’s all we need to calculate.

Looking at the diagram above, I can find the x-component of this tiny electric field by using the angle θ (which I don’t explicitly know). However, I can still write down this new x-component of the tiny electric field.

$dE_x = \frac{1}{4 \pi \epsilon_0} \frac{dq}{r^2}\cos\theta$

Yes, this is no longer a vector. It’s the x-component of the electric field such that it’s just a scalar. But there’s still a problem. I want to add up (thus integrate) all these tiny electric fields due to the tiny charges. However, I have these two variables that I don’t like. There is θ and r. I need to replace those.

For the r, it’s clear that I can use R and x and the pythagorean triangle to get:

$r^2=R^2+x^2$

I can also replace the θ by again using the right triangle to write:

$\cos \theta = \frac{x}{\sqrt{R^2+x^2}}$

Updating the tiny x-electric field:

$dE_x = \frac{1}{4 \pi \epsilon_0}\frac{dq}{R^2+x^2}\frac{x}{\sqrt{R^2+x^2}}$

This simplifies to:

$dE_x = \frac{1}{4 \pi \epsilon_0}\frac{xdq}{(R^2+x^2)^{3/2}}$

Now we need to get a better integration variable—we can’t integrate over dq. Or can we? Yes, we can. Take a look at the equation above. As you move around the circle, which of those variables change? The answer: none of them.

As I integrate over dq, I just get the sum of the dq’s—which would be Q. Boom. That’s it. Here is my final expression for the x-component of the electric field along the x-axis of this ring.

$E_x = \frac{1}{4 \pi \epsilon_0}\frac{xQ}{(R^2+x^2)^{3/2}}$

Now for a couple of checks on this result. I will let you make sure these are ok.

• Does this expression have the correct units for electric field?
• What about the limit that x>>R? Does this expression look like the field due to a point charge?
• What is the electric field in the center of the ring?

One last thing to think about. What if you want to find the electric field at some location that is NOT on the x-axis? Then the above derivation wouldn’t work. Too bad.

Numerical Calculation

Let’s do this again. However, this time I am going to create a numerical calculation instead of an analytical calculation. What’s the difference?

• The analytical calculation takes the sum of charge pieces in the limit as the size of the pieces goes to zero.
• The numerical calculation uses numerical values for a finite number of pieces to calculate the electric field.

That’s really the only difference.

OK, let’s just get into this. I’m going to give you a link to the code and then I will go over every single important part of it. Honestly, you aren’t going to understand this code until you play with it and probably break it.

Here is the code on trinket.io. Sorry—I can’t embed the code in this wordpress blog (I wish I could).

This is where I start.

k=9e9
Q=10e-9
R=0.01


I like to start with some constants and stuff. Here I am using k for the constant. I also had to pick a value for the total charge and the radius of the ring. Remember, you can’t do a numerical calculation without numbers.

Now let’s make the ring.

Some notes.

• This isn’t really needed for the calculation—but it allows us to make a visualization of the thingy.
• “ring” is a built in object in VPython (glowscript).
• The important attributes of this object are the position (pos), the axis—which is a vector in the direction of the axis of the ring. Radius and thickness and color should make sense.

For the next part, I need to break this ring into pieces. If I use N pieces, then I can find the location of each of the tiny charges by using an angle to indicate the location. I also need to find the charge on each tiny piece. Here is the important code.

N=20
theta=0
dtheta=2*pi/N
dq=Q/N


The “dtheta” is the angular shift between one piece and the next. It’s like a clock. It’s a clock that only ticks N times and doesn’t really tell time. But each “tick” is another tiny charge. Maybe that’s a terrible analogy.

But how do we deal with all these tiny charges? What if N is equal to 50? I don’t want to make 50 variables for the 50 charges. I’m too lazy. So instead, I am going to make a list. Lists in python are super awesome.

I won’t go into all the details of lists (maybe I will make tutorial later), instead I will just show the code and explain it. Here’s where I make the tiny charge pieces.

points=[]

while theta<2*pi:
theta=theta+dtheta


Some notes.

• First, I made an empty list called “points”.
• Next I went through all the angular positions around the ring. That’s what the while loop does.
• Now I create a sphere at that angular position and add it to the points list.
• Update theta and repeat.
• In the end I have a list of points—the first one at points[0].

Next part—make the observation location. This is the spot at which I will calculate the electric field.

obs=sphere(pos=vector(.03,0.03,0), radius=R/10)
E=vector(0,0,0)


The “E” is the base electric field, it starts at the zero vector.

Now for the physics.

for p in points:
r=obs.pos-p.pos
dE=k*dq*norm(r)/mag(r)**2
E=E+dE

print("E = ",E," N/C")


Here you can see the full power of a list. Once I make the list of tiny charges, it is very simple to go through the list one tiny charge at a time—using the “for loop”.

Essentially, this loop does the following:

• Take a tiny charge piece.
• Find the vector from this piece to the observation location
• Find the tiny component of the electric field using the equation for a point charge.
• Add this tiny electric field to the total electric field and then move on to the next piece.

Boom. That’s it. Print that sucker out. Maybe you should compare this electric field to the analytical solution. Oh wait. There’s a bunch of homework questions. Actually, I was going to do some of these but this post is already longer than I anticipated.

Homework

• Pick a value of N = 10 and an observation location of x = 0.1 meters. How well does the analytical and numerical calculations agree? What if you change to N = 50? What about N = 100?
• Create a graph that shows the magnitude of the electric field as a function of x (along the ring axis). In this graph include the analytical solution and plots for N = 10, 30, 50, 100.

Actually, I wanted to make that last graph. It would be great.

Oh wait! I forgot about the most important thing. What if I want to calculate the electric field at a location that is NOT on the x-axis? Analytically, this is pretty much impossible. But it’s pretty easy with a numerical calculation. Here’s what that would look like.

Oh, if you like videos—here is the video version of this post.

# Modeling a falling slinky

I already posted some stuff about the MythBusters Jr. slinky defying gravity thing—here are those notes.

But how do you make a model of a falling slinky? Remember, you don’t fully understand something until you model it.

Also, with a model you can quickly test different situations. What happens if you put a car on one end of the slinky (or massive spring). What kind of spring constant do you need? What if the two masses are different?

All of these questions can be investigated with a model.

Let’s get to it. Of course, I am building my model with python—because I like python (and so should you). Here is my code. This is what most of it looks like (sorry, I can’t embed here).

Here is a gif of the output.

Some notes:

• The balls wait a short time before dropping—just to make it dramatic.
• I have calculated the position of the bottom mass so that it starts in equilibrium. If you don’t do that, the bottom mass will just oscillate up and down and ruin the whole thing.
• I added two objects—a stick on the side and a free falling ball. That way you can see how the spring thingy falls.
• Oh, you should absolutely try changing things up and running the model.

Here is how the model works.

• There are two masses (the ball1 and ball2)—just ignore the other objects, they don’t matter.
• Once the top mass is let go, there are two forces on the two balls. The downward gravitational force and then the spring force. Whatever the spring force on the bottom ball is, the top ball has the opposite.
• The gravitational force is easy to calculate.
• For the spring force, you need to know the natural length of the spring and the distance between the masses. The spring force depends on the difference between the distance and the natural length—then just multiply by the spring constant. Yes, I often mess up the sign on this force so that the two objects get pushed away in a weird motion.
• After that, you are pretty much done. Use this force to update the momentum and then use the momentum to update the position.

Homework.

Here are some things for you to try.

• What if the top mass is 0.1 times the bottom mass? Does this still work?
• What if the bottom mass is 0.1 times the top mass?
• See if you can calculate and plot the vertical motion of the center of mass of the two ball system.
• What if the spring also has mass? There is a way to model this, but I’m going to make you think about it first.
• Suppose I want to do this with a 2000 kg car. What spring constant would I need? What natural length of a spring should I use?

# Thanksgiving Physics

I am honestly not quite sure how many blog posts I have about Thanksgiving.  It’s probably about 1 per year for 8 years.  I’m going to guess it’s 8.  Here goes my internet search.

This is what I found.

# Intro to Chaos in Mechanics

This is really just for me so that I won’t forget.  I mean, I will forget—but then I can look back at this post and remember stuff.  Here’s to you Future Rhett.

What is a chaotic system?  Really, that’s the question—isn’t it?  There is the classic example of the double pendulumHere is some code for a double pendulum. And this is what it looks like.

But this isn’t the best system.  The problem is that there are two coordinates—the angle for the top bar and the angle for the bottom bar.  Sure, it’s cool—but what if you want to plot angle vs. time or something.  You have to plot both angles vs. time and that’s a bummer.

OK, how about a model of bounded population growth?  That’s just one dimensional, right?  Actually, it doesn’t even have to be population, it’s just an equation—something like this.

$x_{n+1} = 4rx_n(1-x_n)$

In this expression, r is some parameter—it really doesn’t matter what.  Let’s just model this expression for different values of r.  I’ll use a starting x value of 0.1 and r values of 0.7 and 0.9.   Here is the code.

Notice that when r = 0.7, the population reaches some stable value—but this is not true for r = 0.9.

Bifurcation Diagram

Now for another way to look at a chaotic systems—the bifurcation diagram.  Honestly, I didn’t really understand these things until I made one.  Here’s what we are going to do.

• Start with some initial value of x (just pick something—I’m going to use 0.5).  Pick a value for r also.  Let’s just start at 0.1.
• Run the model for 200 iterations and throw out that data.  This should allow us to look at the long term behavior for that particular value of r (throws out the transient behavior).
• Now run the model for 100 additional iterations and save these.
• Create a plot of these final x values vs. r.
• Next increase the r value a little bit (I will increase it by 0.001)
• Repeat until you get bored.

So if the model is stable after the initial stuff, then it will just keep plotting the same value of x after the first 200 iterations and you will just get a dot.  If it’s not stable after the first stuff, then you will get a bunch of dots with different x values.

OK, let’s do it.  Here is the code.  Oh, I made a function to iterate the model.  I probably should put more comments in there.

This is what it looks like.

Up to an r value of about 0.75, you only get one final x value.  After that, you get two different values . With r over 0.9, it gets crazy.

OK, that’s enough for now.  I just want to make sure future Rhett knows how to make a bifurcation diagram.

# Video Analysis of Soyuz MS-10

There should be a grave yard for blog posts that start, but never get published.  Fortunately, I have this site.  Here I can share with you my failed posts.  Get ready.

It starts with this epic video from the Soyuz MS-10 failed launch.

That’s pretty awesome.  It’s doubly awesome that the astronauts survived.

Ok, so what is the blog post?  The idea is to use video analysis to track the angular size of stuff on the ground and from that get the vertical position of the rocket as a function of time.  It’s not completely trivial, but it’s fun.  Also, it’s a big news event, so I could get a little traffic boost from that.

How do you get the position data?  Here are the steps (along with some problems).

The key idea is the relationship between angular size, actual size and distance.  If the angular size is measured in radians (as it should be), the following is true $L = r\theta$ where L is the length (actual length), theta is the angular size, and r is the distance.

Problem number 1 – find the actual distance of stuff on the ground.  This is sort of fun.  You can get snoop around with Google maps until you find stuff.  I started by googling the launch site.  The first place I found wasn’t it.  Then after some more searching, I found Gagarin’s Start.  That’s the place.  Oh, Google maps lets you measure the size of stuff.  Super useful.

Finding the angular size is a little bit more difficult.  I can use video analysis to mark the location of stuff (I use Tracker Video Analysis because it’s both free and awesome).  However, to get the angular distance between two points I need to know the angular field of view—the angular size of the whole camera view.  This usually depends on the camera, which  I don’t know.

How do you find the angular field of view for the camera?  One option is to start with a known distance and a known object. Suppose I start off with the base of the Soyuz rocket.  If I know the size of the bottom thruster and the distance to the thruster, I can calculate the correct angular size and use that value to scale the video.  But I don’t the exact location of the camera.  I could only guess.

As Yoda says, “there is another”.  OK, he was talking about another person that could become a Jedi (Leia)—but it’s the same idea here.  The other way to get position time data from some other source and then match that up to the position-time data from the angular size.  Oh, I’m in luck.  Here is another video.

This video shows the same launch from the side.  I can use normal video analysis in this case to get the position as a function of time.  I just need to scale the video in terms of size.  Assuming this site is legit, I have the dimensions of a Soyuz rocket.  Boom, that’s it (oh, I need to correct for the motion of the camera—but that’s not too difficult).  Here is the plot of vertical position as a function of time.

Yes, that does indeed look like a parabola—which indicates that it has a constant acceleration (at least for this first part of the flight).  The term in front of t2 is 1.73 m/s2 which is half of the acceleration.  This puts the launch acceleration at around 2.46 m/s2.  Oh, that’s not good.  Not nearly good enough.  I’m pretty sure a rocket has an acceleration of at least around 3 g’s—this isn’t even 1 g.  I’m not sure what went wrong.

OK, one problem won’t stop me.  Let’s just go to the other video and see what we can get.  Here is what the data looks like for a position of one object on the ground.

You might not see the problem (but it sticks out when you are doing an analysis).  Notice the position stays at the same value for multiple time steps?  This is because the video was edited and exported to some non-native frame rate.  What happens is that you get repeating frames.  You can see this if you step through the video frame by frame.

It was at this point that I said “oh, forget it”.  Maybe it would turn out ok, but it was going to be a lot of work.  Not only would I still have to figure out the angular field of view for the camera, but I need to export the data for two points on the ground to a spreadsheet so that I can find the absolute distance between them (essentially using the magnitude of the vector from point A to point B). Oh, but that’s not all.  When the rocket gets high enough, the object I was using is too small to see.  I need to switch to a larger object.

Finally, as the rocket turns to enter low Earth orbit, it no longer points straight up.  The stuff in the camera is much farther away than the altitude of the rocket.

OK, that’s no excuse.  I should have kept calm and carried on.  But I bailed.  The Soyuz booster failure was quite some time ago and this video analysis wouldn’t really add much to the story.  It’s still a cool analysis—I’ve started it here so you can finish it for homework.

Also, you can see what happens when I kill a post (honestly, this doesn’t happen very often).

Actually, there is one other reason to not continue with this analysis.  I have another blog post that I’m working that deals with angular size (ok, I haven’t started it—but I promise I will).  That post will be much better and I didn’t want two angular size posts close together.

The end.

# Thinking about labs

I need to redo all my physics labs.  They are terrible.  I want to make them even MORE about model building.

With that in mind, I saw this:

One sentence labs.  Leave the procedure up to the students.  I think I will need some type of turn in sheet for these labs though.  What about informal lab reports?

# Reflections on Student Video Assessments

After the summer session of physics (algebra-based), I have the following comments.

• It seems like every other video has a problem with vector notation.  Students often set a vector equal to a scalar.  Frustrating.
• Students seem to confuse two standards: The Momentum Principle and Collisions.  I have students submit videos for the momentum principle that are just a collision.  The key point is that the momentum principle deals with force, time and change in momentum.  I guess this is my fault. I offered suggested homework problems from a textbook and it covered momentum and collisions in the same chapter.  I guess they thought they were the same thing.
• Students are not very skilled at picking problems to solve.  They like the lowest level of something like “mass is 2 and velocity is 3, what is the momentum?”. I tried to help them, but it didn’t seem to work.  I showed a bunch of questions in class and had them “rate” them then discuss what makes a good problem. (I think I wrote about that here on my blog).
• I’m still not happy with the “student review”.  I want students to watch other student videos – but I don’t know how to implement that.
• Students like to procrastinate.  I’m getting a bunch of redos on the last day of submissions.  That sucks to grade.
• I hate vertical videos – but I hate videos that are recorded sideways even more.  I stopped accepting the sideways videos since they can fix it and send it back to me.
• I try to give meaningful feedback in my responses – but sometimes I just give a grade (score out of 5 points).
• I’m trying to give higher scores.  If they do well on the in-class assignment and submit multiple videos that aren’t wrong, I typically will at least give a 4/5.