Just Enough Physics Chapter 1: Kinematics

Quick recap: I’m going through and redoing many of my physics videos. The idea is to put together a cohesive playlist that would work through the full physics course. I’m using the approach that skips over some of the more tedious topics—that’s why I’m using the “Just Enough Physics” title (yes, same as my ebook).

Well, I’ve got enough stuff for chapter 1. Here they are. Let me know if you think something should be added.

Introduction

Constant Velocity in 1D

Example with Constant Velocity

Introduction to Numerical Calculations for Constant Velocity

Constant Acceleration in 1D

Constant Acceleration with Numerical Calculations

Accelerating car catching a constant velocity car

Just Enough Physics Video Series

I think I need help. I’m not sure of the best way to proceed (or even to do it at all) with this new video project. Here is my idea:

  • Just Enough Physics – the video. Yes, a long time ago I put most of my physics explanations into a self-pub ebook on Amazon. I think it turned out OK. The book is in the KindleUnlimited program, so you might be able to get it for free – https://www.amazon.com/Just-Enough-Physics-Rhett-Allain-ebook/dp/B0052UKTDQ/ref=sr_1_1?keywords=just+enough+physics&qid=1578932997&sr=8-1
  • I’ve made a bunch of physics videos—but they aren’t well organized and they jump over to many different topics. I wanted to start over and make one series of videos that sort of go through the full intro (algebra-based) physics course.
  • In most of my previous physics videos, I used a white board with me in front of it. I think this works well, but I wanted to be able to make videos from home. With that, I decided to switch to a paper and pen method (with the camera just looking at the paper).
  • Also, I figured I would add a Patreon page. It would be nice to be able to work on this over the summer instead of teaching summer classes (which is always a financial gamble anyway). Oh, here is my Patreon page—https://www.patreon.com/justphysics

So, that’s the idea. Here you can check out what I have so far.

Now for the questions. Here’s where you can help.

  • Should I start a NEW YouTube channel for these videos or just include them in my current channel. I’ll be honest—I thought it would be good to start a new channel, but I need a bunch of subscribers before I can put ads on the videos. Yes, that’s silly.
  • I started off with an intro to each video and included a title animation. Forget that—too much work. I don’t think people REALLY care about that stuff.
  • What about Patreon? What kinds of things should I put there? Should I include access to a discord group?
  • Titles. How should I title each video? Chapter 1 section 1 kinematics? Constant velocity? I’m not sure. What about homework videos (example problems).
  • I’m aiming for each video to be about 10 minutes long. Is that a good time length?

Finally, here is my tentative outline for videos.

  1. Kinematics in 1 Dimension (including numerical calculations).
  2. Forces and the Momentum Principle in 1D.
  3. Vectors
  4. Calculated Forces: gravity, springs, real gravity.
  5. Falling objects air resistance.
  6. Forces of Constraint: normal force, friction, tension
  7. 2D Motion: projectile motion, circular motion.
  8. Orbits.
  9. Work-Energy Principle.

That’s just a start.

Top 10 Blog Posts from 2019

It’s always difficult to pick the BEST of stuff. This is especially true when it’s all your own stuff.

So, let’s just say these are 10 nice posts from 2019.

How Does the Mandalorian See Through Walls?

You know I love to write about stuff that gets me excited—and I’m super pumped up about The Mandalorian (just finished season 1). In one of the episodes, Mando sees through a wall with his sniper rifle. How would that work?

side by side photographs showing boy holding up sheet

No, it probably wouldn’t be with infrared.

Modeling the Water from a Spinning Sprinkler

You don’t really understand something unless you can model it. In this post, I use python to model the motion of water shooting from an inward pointing and spinning sprinkler (based on the Steve Mould and Destin video).

This gif pretty much sums it up.

Orbital Physics and the Death Star II at Endor

This is my favorite thing to do (which I also did in the Mandalorian post above)—take some scene from a movie and and then use that as an excuse to talk about physics. In this case, it’s all about geostationary orbits from Star Wars: Return of the Jedi.

Bonus: more python code in this post. Double bonus, I use data from ROTJ to estimate the length of a day on the planet moon of Endor.

All Measurements Are Really Just Distance—or Voltage

I was in lab when I realized that pretty much all of our measurements were actually measuring distance. Well, originally that was true. Now we can make measurements by measuring a voltage.

Here are some measurement devices—this wasn’t in the original post.

You Can’t Calculate the Work Done by Friction

This was a post I wrote after a discussion I had with Bruce Sherwood. He told me this story about how it’s easy to use the momentum principle with a sliding block (with friction), but you can’t use the work-energy principle.

We like to think friction is this simple thing—but it’s not. The above image is an illustration to show that the distance a friction force is applied is not the same as the distance the object moves.

Video Analysis of Captain America vs. Thanos

There is the perfect scene in Avengers: Endgame. It’s not only perfect because of what Captain America does—but it’s perfect for video analysis. So, in case you haven’t seen it, Cap takes Thor’s hammer and smacks Thanos hard.

Here is the frame corrected version after using Tracker Video Analysis.

No, momentum is not conserved. But that’s OK.

What are Maxwell’s Equations?

Yes, Maxwell’s Equations can be tough.

an equation

Here is my attempt to explain these equations in a simple way to describe the electric and magnetic fields.

Every Jedi Jump in Star Wars

OK, not every Star Wars movie. I didn’t have Episode IX to include at this time (I will have to wait for the digital version of the video). But the idea is to analyze ALL the jumps. Here they are.

There are too many jumps for me to do a complete video analysis. Instead, I just estimated the jump height and the jump time. From these two values, I can make a graph—if the vertical acceleration is constant then there should be a linear fit.

The best part is that most Jedi have a vertical acceleration LOWER than g (free fall acceleration on Earth). Yoda has a vertical acceleration HIGHER than g because he takes so many short jumps. I need to write a future post just looking at Yoda.

All the Hacks and Science from MacGyver Season 3

Maybe this is cheating since it’s really not just one post. This is a list of all my science explanations for MacGyver Season 3. Oh, just to be clear—I’m the Technical Consultant for the CBS show MacGyver (season 4 starts in February).

It’s a lot of work to help the writers come up with new science tricks for MacGyver, but it’s also super fun. I also really enjoy making these MacGyver at home videos.

I’m really looking forward to sharing more science for season 4.

Projectile Motion in Polar Coordinates

I’ve had this secondary blog for over a year now—and I really like it. It’s like the old days of blogging. I can write whatever the heck I want (example—the top five lightsaber fights in Star Wars). Also, I can go into super complicated physics stuff.

Here is an example from my upper-level classical mechanics course. Can you use polar coordinates for projectile motion? Yes you can—but it’s obviously not the best choice.

newplot (3).png

There’s python here too.

Best Graphs from 2019

It’s a tradition. At the end of the year, I like to post “top” stuff. Here are my best graphs. I’m only going to share graphs that I created with Plot.ly—although there are some other ones out there. So, maybe I should say “best plot.ly graphs of 2019”.

Oh, you haven’t used plot.y? That’s OK. Plotly, is an online graphing platform. It’s pretty nice. The thing I really like is that you can create some data in python (with Glowscript) and send it over to plotly for beautification.

One last thing. I don’t yet know how many “best” graphs I have—I haven’t looked yet. Also, these are in no particular order.

What ball is the best to catch with during free fall?

Here is the graph.

The graph is from this post—https://www.wired.com/story/the-right-ball-for-playing-catch-while-skydiving/. The idea was to consider what ball would be best to pass back and forth while skydiving.

Modeling a Moon Run

Here is the graph.

This is from my post looking at the physics of running on the moon. Actually, I really like this stuff. I built a model of a running human in which the final running speed depends on the foot contact time with the ground. I really just made the model so that I could use it for this moon running post.

Oh, bonus—here is my python code for the running model.

All the Jedi Force Jumps

Here is the graph.

If you look at all the jumps (in all the Star Wars movies) you can measure two things—jump height and jump time. Assuming there is a constant acceleration (not necessarily true) then there is a relationship between time and height.

a = \frac{2\Delta y}{(\Delta t)^2}

So, by plotting twice the height by time squared, the slope of the line would give the vertical acceleration. In the graph above, the green line is for an acceleration of 9.8 m/s^2 (the value on Earth) and the red line is the average for all the Jedi. Notice that Yoda has a greater acceleration. I think that’s cool.

Oh, bonus video. Here are all the Jedi jumps.

Course Reflections: Introductory Calc-Based Physics (PHYS 221)

The Course:

This is the calc-based physics course (the first semester). The students in the class are mostly:

  • Physics majors
  • Chemistry majors
  • Computer Science majors
  • Math majors

I don’t think there are any other students that take this. OK, I guess you could include pre-engineering—but technically they are still physics majors.

For the textbook, I use the super alpha awesome book Matter and Interactions (Wiley – Chabay and Sherwood). If you’ve read my stuff, you should know that I LOVE this book (and Bruce Sherwood and Ruth Chabay are both great people to talk to). Here is my previous review.

Just a few highlights of the curriculum.

  • Includes relativistic momentum and energy.
  • Focus on fundamental interactions and fundamental particles.
  • Ball and spring model of matter.
  • Three big principles: momentum, work-energy, angular momentum.
  • Explicit inclusion of numerical calculations.
  • I use Standards Based Grading with options for students to submit reassessment videos.
  • We often use multiple-choice questions in class with student response systems (clickers). Matter and Interactions has a nice set of questions to use.

Here is the course website.

The Good:

I always enjoy this course. The students are both diverse and great. They are at LEAST in Calc-I so that means they can probably do some algebra stuff. There are a good number of students that are in even more advanced math classes like Differential Equations and stuff. Oh, and it’s a great chance to get to know the new physics and chemistry majors.

The class isn’t too big (mine started around 30) so that it’s fairly easy to memorize names.

Maybe the best part of the class is watching student videos. OK, I really don’t like watching videos—it can get kind of boring. But I LOVE seeing students make terrible videos and then get better and start figuring things out. It’s awesome when students have never made a video and are afraid to do it, but then really get into it.

Students eventually figure out that I’m not just assessing their videos, but they are learning by making the videos.

One other thing I liked—I always like it: speed dating physics problem solving. Here is a twitter thread on speed dating (from another class).

Also, I did assign and collect homework. I didn’t really grade it (I gave them a score), but it’s like free points and maybe it helps them practice.

One last “good”. I put together this video tutorial on numerical calculations that looks at an object falling on the surface of the moon. I think it’s pretty good. Not sure how much the students used it though.

The Bad:

Yes, there was some bad stuff. Sometimes I felt like students were just sitting there. Even when I was doing interactive activities, they had this blank stare (it seemed). Maybe it was the class time (9:30 AM)—although that doesn’t seem too early. I really don’t know what the problem was. For the most part they were fine.

Another big problem—speed dating. Oh, I get it. Students don’t want to participate. They want to just sit there and take in the fire hose of learning (they think that works). But in the end, most of them seem to get some positive things out of the speed dating. But the room was not super great for this. It’s a standard lecture hall—so I didn’t really have places to put boards. I tried using very small boards, but it just wasn’t perfect.

One final problem—a good number of student just never seemed to fully grasp numerical calculations.

The Future:

Here are some ideas for the future.

  • Mounted white boards. If I have to be in that lecture hall, I want to find some ways to put boards somewhere around on the walls.
  • Plickers. I’m ditching the TurningPoint clickers. I’m tired of constant updates that bork the system. I get it—they want me to upgrade. Not upgrading again. Oh, also with Plickers it shows the student name over their head when they vote.
  • More in-class stuff. More group problem solving. More activities. More focus on numerical calculations.
  • I should show the students more of the awesome physics (like stuff from my blog). I don’t do this enough because I get so busy with getting through different topics—but I think the students really like these things. Who cares anyway, it’s the stuff that I love.

Modeling a Spinning Sprinkler

Subtitle: “You don’t really understand something until you model it”

Here is the video. It’s great. Watch it.

The basic idea is to predict the path of water that is shot from a spinning sprinkler. In the first case, the water is shot straight out of the spinning pipe. The second case is a little bit trickier with the water shot towards the center of the sprinkler. OK, it’s not actually a sprinkler.

Of course, once a drop of water leaves the sprinkler, it will only have the gravitational force acting on it. So, if you view this from the top—a drop of water should travel in a straight line with a constant velocity. But there is a problem that makes this difficult to predict. It’s that we don’t see the path of one drop of water, we see the path of a water stream.

A water stream is a collection of water drops. Even though one drop might travel in a straight line, the next drop will be “launched” at a different location with a different velocity. This makes it look weird.

OK, so let’s get to a model. I’m going to go over the steps to build this model in VPython.

Build a bar

Don’t try to do everything at once. Let’s just make a spinning bar—I’ll add water balls later. Here is what that spinning bar looks like.

And here is the code (along with a link to the code – https://trinket.io/glowscript/d6545ddfca

Let me go over some of the important parts of this code.

  • The bar is an object of type “box”—this is a prebuilt object in VPython. It has two important attributes. The position (pos) is the location of the center of the box. The size is the vector with length, width, and height.
  • I added a ball so you can see the center (it’s not needed).
  • The variable “omega” is the angular velocity of the rotation. You can change this if you like.
  • The variable “theta” is the angular position of the bar—this is used for something later.
  • In the loop, the rate(100) tells the code to not do any more than 100 loops per second. Since I have a time step of 0.01 seconds, this means 100 loop would take one second—it would run in “real time”.
  • Don’t worry about line 16 (update theta)—at least not for now.
  • Line 18 is the important part. There is a rotate function in Vpython. You need to pick the angle (in this case it’s dtheta which is the angular velocity times the time step), the axis of rotation (the z-axis) and the origin of rotation (the origin).

But it works.

Add a single water

The next step is to add a single ball of water to the end of the sprinkler bar. It’s not going to do anything except to “ride around”. Here’s what that looks like. It’s really the same thing except with that ball of water.

Here is the code—https://trinket.io/glowscript/14e1ecbb7d. Let me just point out the important parts.

If I know the angular position of the sprinkler, I can find the vector from the center of the sprinkler to the end of the sprinkler. It looks like this:

\vec{r} = \left(\frac{L}{2}\right) <\cos\theta,\sin\theta,0>

For each iteration of the loop, I can calculate theta and then use that to calculate “r”. This r is now the new vector position of the ball.

List of balls

Now for the magic. Lists are your friend. I feel like I could write a whole post on just lists—but I want to get right to the good stuff.

In short, a list is a group of things in python. Let me start with an example program.

balls=[]
x=-5
dx=1

while x<3:
  balls=balls+[x]
  x=x+dx

print("balls = ",balls)
print("balls 3 = ",balls[2])

Here are some notes on this code.

  • balls = [] makes an empty list. The name of this list is balls.
  • In the loop, I add a new x value to the list and then update x.
  • At the end, I print the list of balls and the 3rd item in the list (the first item would be balls[0]).

Here’s the output.

But wait! You don’t just have to make a list of numbers. I can make a list with objects too. Check out this version of the code.

balls=[]
x=-5
dx=1

while x<3:
  balls=balls+[sphere(pos=vector(x,0,0), radius=0.1,color=color.cyan)]
  x=x+dx


print("balls 3 position = ",balls[2].pos)

Here is the output.

Boom. Check that out. It’s 8 balls—but in just one list. You can even print out the position of one of the balls (you can’t print the whole list because a sphere() isn’t printable).

Water balls in a list

OK, I think we are ready. Oh, you might not be ready—maybe you need some more practice with lists. Just start playing around and see what happens. Anyway, here is the plan.

  • Make a list of water balls (actually two lists—one for each side).
  • Start the time (t = 0) and a time step of dt.
  • Set a ball time counter. If the time gets to some specified value, then create a ball and add it to the list (both lists).
  • When you create a water ball, set its properties: mass, size, add a trail…oh, and initial velocity. Yup. You can do that.
  • Now let stuff run. I will need to go through each ball list and update the water ball positions, but that’s not too difficult.

Let’s just get to the code. Here it is (also on trinket.io)

GlowScript 2.9 VPython

#Length of sprinkler - just leave this
L=0.1
stick=box(pos=vector(0,0,0), size=vector(L,.05*L,.05*L),color=color.yellow)
cent=sphere(pos=vector(0,0,0), radius=0.03*L, color=color.red)


#CHANGE THIS - rotation rate of sprinkler
omega=2*pi/2


theta=0

#CHANGE THIS to -1 to make balls shoot IN
a=1 

t=0
dt=0.01

#this is just a spacer to make the scene look nice
space=sphere(pos=vector(4*L,0,0),radius=0.001)


#water stuff
water=[]
water2=[]
vwater=.3
tint=0 #this is the "clock" for shooting water

#CHANGE THIS - this is the water ball production rate
f=15 #water per second rate that balls are made


while t<10:
  rate(100)
  r=(L/2)*vector(cos(theta),sin(theta),0)
  r2=-r
  

  if tint>=1/f:
    
    water=water+[sphere(pos=r,radius=0.04*L, color=color.cyan, v=(-1*cross(r,vector(0,0,omega))+a*vwater*r.hat),
    make_trail=False)]
    water2=water2 +[sphere(pos=r2,radius=0.04*L, color=color.cyan, v=(-1*cross(r2,vector(0,0,omega))+a*vwater*r2.hat),
    make_trail=False)]
    tint=0
  for ball in water:
    ball.pos=ball.pos+ball.v*dt
    if ball.pos.mag>3*L:
      ball.v=vector(0,0,0)
      ball.visible=False
      del ball
  for ball2 in water2:
    ball2.pos=ball2.pos+ball2.v*dt
    if ball2.pos.mag>3*L:
      ball2.v=vector(0,0,0)
      ball2.visible=False
      del ball2  
    
  theta=theta+omega*dt
  
  stick.rotate(angle=dt*omega,axis=vector(0,0,1), origin=vector(0,0,0))
  t=t+dt
  tint=tint+dt

This is what the output looks like. Actually, this is an animation for the case of the water shooting inward (since I already had the gif).

Now for some comments on the code.

  • When the water ball gets a certain distance away (I think I set it to 3*L), I change the water ball velocity to vector(0,0,0) and then I make it invisible. Otherwise the view would just keep expanding and it would look weird.
  • I don’t have any other important comments, but I can’t have a one bullet list.

I think that’s good enough. Hope that helps.

Finding the Electric Field from the Electric Potential (difference)

I’m way behind on this one. My plan was to write up something when this question came up in the summer section of algebra-based physics. It was a great question and deserved a full answer. Also, I wanted to make this a tutorial on trinket.io—but maybe I will do that after I write about it here.

So, here’s how it goes. We start off the semester calculating the electric field due to a point charge and then due to multiple point charges (you know—like 2). After that we get into the electric potential difference. Both the potential and the field follow the superposition principle. If you calculate the value due to two charges individually, you can add these together to get the total field or potential.

But there is a big difference. The electric potential difference is a scalar value where as the electric field is a vector. That means that when using the superposition with electric fields, you have to add vectors. Students would prefer to just add scalars—I’m mean, that seems obvious. Does that means that you could just find the electric potential difference for some set of point charges and then use that potential to find the electric field? Yup. You can. And we will.

Let me start with the definition of the electric potential difference. Since it’s really just based on the work done by a conservative force (the electric field), this looks a lot like the definition of work.

\Delta V = -\int_a^b \vec{E}\cdot d\vec{r}

Yes, that’s an integral. Yes, I know I said this was for an algebra-based course. But you can’t deny the truth. The “a” and “b” on the limits of integration are the starting and ending points—because remember, it’s really an integral. Also, the “dr” is in the direction of the path from a to b. It doesn’t technically have to be a straight line.

What about an algebra-based course? Really, there are only two options. The most common approach gives the following two equations for electric potential.

V = k\frac{q}{r}

\Delta V = -E\Delta r \cos \theta

The first expression is the electric potential of a point charge with respect to infinity (so the starting point for the integral is an infinite distance away). The second expression is the change in electric potential due to a constant electric field when there is an angle between the field and the displacement.

Oh wait! I forgot to list the value of k. This is the Coulomb constant.

k = 9\times 10^9\text{ N*m}^2\text{/C}^2

Students can understand the second expression because it’s pretty much the same as the definition of work (for a constant force). The first equation is mostly magic. The one way you can show students where it comes from is to do a numerical calculation of the electric potential difference since they can’t integrate. Did I write about that before? I feel like I did.

Ok, that’s a good start. Now for a problem.

Electric potential due to two point charges

Suppose I have two charges that are both located on the x-axis. Charge 1 is at the origin with a charge of 6 nC. Charge 2 is at x = 0.02 meters with a charge of -2 nC. Here’s a diagram—just for fun.

Let’s start off with the electric potential—as a warm up. What is the value of the electric potential (with respect to infinity) at the location of x = 0.02 meters? Using the equation above for the electric potential due to a point charge, I need to find the potential due to point 1 and then the potential due to point 2—then just add them together (superposition).

First for point 1.

r_1 = 0.02\text{ m} - 0\text{ m} = 0.02

V_1 = k\frac{q_1}{r_1}

Now for point 2.

r_2 = 0.02\text{ m} - 0.01\text{ m} = 0.01

V_2 = k\frac{q_2}{r_2}

This gives a total electric potential:

V = V_1 + V_2 = k\left(\frac{q_1}{r_1} + \frac{q_2}{r_2}\right) = 175.3\text{ Volts}

Finding the Electric Field

Now to find the electric field at that same point. I don’t know how to say this in a nice way, so I will just say it. Since the electric potential is calculated based on an integral of the electric field, the electric field would be an anti-integral. Yes, this means it’s a derivative. But wait! The electric field is a vector and the electric potential is a scalar? How do you get a vector from a scalar? Well, in short—it looks like this.

\vec{E} =-\nabla V

That upside delta symbol is the del operator. It also looks like this:

\nabla V = \frac{\partial V}{\partial x}\hat{x} + \frac{\partial V}{\partial y}\hat{y} + \frac{\partial V}{\partial z}\hat{z}

Yes, those are partial derivatives. Sorry about that. But you do get a vector in the end. But how can we do this without taking a derivative? The answer is a numerical derivative. Here’s how it works.

Suppose I find the electric potential at three points on the x-axis. The first point is where I want to calculate the electric field. I will call this x_0. The next point is going to be a little bit higher on the x-axis at a location of x_0+dx. The final point will be a little bit lower on the x-axis at x_0-dx. Maybe this diagram will help.

When I take these two end points (not the middle one), I can find the slope. That means the x-component of the electric field will be:

E_x(x_0) = -\frac{V(x_0+dx)-V(x_0-dx)}{2dx}

Let’s do this. I’m going to find the x-component of the electric field at that same location (x = 0.02 meters). I don’t want to write it out, so I’m going to do it in python. Here is the link (I wish I could just embed the trinket right into this blog post).

Umm..wow. It worked. Notice that I printed the electric field twice. The first one is from the slope and the second one is by just using the superposition for the electric field. Yes, I knew it SHOULD work—but it actually worked. I’m excited.

Also, just for fun—here is a plot of the electric potential as a function of x. The negative of this slope should give you the x-component of the electric field.

Here you can see something useful. Where on this plot is the electric field (the x-component) equal to zero? Answer: it’s where the slope of this plot is zero (yes, it’s there). Remember, just because the electric field is zero that doesn’t mean the electric potential is zero.

Homework

How about this? See if you can find the electric field due to these two charges at a location y = 0.01 and x = 0.0 meters. This is right on the y-axis, but now the electric field clearly has both an x and a y-component. That means you are going to have to do this twice.

Jump Start Guide for Computational Physics

It’s the beginning of a new school year—and I’ve got you covered. You want to do something with coding in your physics class, but you don’t know where to start? I’m going to give you a jump start.

I know you are nervous, but don’t worry. You don’t need to be a ‘l33t h4x0rz’ (that’s cool-speak for elite hacker). You just need to get started. Just remember, everyone had to start programing at some point. They all did it—so can you.

What the heck do you call it?

I like to call this stuff “numerical calculations”. I think this is the best name for it because it sort of describes what’s going on. Here’s the general idea:

  • Take a physics problem (or any problem, really).
  • Break the problem into a bunch of small and easier problems.
  • Maybe make some approximations.
  • Solve all the small problems by using numbers.

Numbers are the key. You have to use numbers in a numerical calculation. The other solution is an analytical calculation. This is the process of solving a problem in terms of known functions—like the trig functions. For an analytic solution, you don’t really have to put in the numbers until the end.

Of course, there isn’t a huge difference in these two solutions (analytical vs. numerical). A great example from Bruce Sherwood (in a discussion at the recent AAPT meeting in Utah) points out the following:

Suppose you get a solution for a mass oscillating on a spring. The analytical solution will be in terms of the cosine function. But then, how do you get values for something like cos(0.33) = ? Well, you put it in your calculator or you look it up in a table. Oh, you could find the value for cosine by summing an infinite series. But you see—we are back to a numerical calculation.

That’s not exactly what Bruce said, but that’s the basic idea.

Here are some other names for numerical calculations that you might see:

  • Computational physics
  • Coding in physics
  • I’m drawing a blank here—there must be some other words.

But I also like numerical calculations because it doesn’t explicitly say “computer” in it.

Why do numerical calculations in physics?

Solving for the motion of a mass on a spring

Let me be brief and just list some points.

  • Numerical calculations are just part of physics. There are countless physics problems that can only be solved numerically.
  • Once students get the idea of numerical calculations, they can solve more interesting problems that would otherwise be inaccessible to them.
  • What about other fields? Meteorology, digital animations, protein folding, economics…the list goes on.
  • Tools. The tools for numerical calculations are both free and easy to access. You don’t need to install anything and you could even do it on a smart phone (not recommend—but possible).
  • Finally, numerical calculations helps student understand physics. I’ve always been surprised that when working on a problem with students on a computer, they ask questions. But these questions are rarely about computer syntax. They are usually things about vectors or forces. It’s awesome.

Who is this for?

I’m going to get you started—so this tutorial is geared towards very introductory classes. I use this same stuff in a physics lab for an algebra-based physics course at that college level. I think this would be fine for high school classes also.

If you want more advanced stuff—this might also work as an introduction. For my calculus-based physics course, I start with more complicated stuff.

Also, I am careful to emphasize that students (and faculty) don’t need any prior experience with coding.

Where to start

I like to have a workshop format for my lab or class. I use a projector at the front of the room to go over some points and then stop and let the students work on code either individually or in groups (here is a version of my presentation—feel free to use it). I tell students to bring a computer or tablet if possible. Otherwise they will be in groups of 4 per computer (which is not ideal). Of course some students don’t want to get involved, so a 4 person group is what they want.

Here is the general outline of the workshop format lesson.

  • Give an overview of numerical calculations (motivation).
  • Start with an object moving at a constant velocity in one dimension. Let them solve it analytically (hopefully, this is a review).
  • Next have them take this SAME PROBLEM but solve it by breaking into 7 time steps—but still solving it on paper. NO COMPUTERS YET.
  • I actually give them a table to fill out. It has 7 rows with columns for time, time step, and position. After a short time, I stop them and go over the calculation for the first row (and maybe the second). Some students can finish this table very quickly, and others not so quick.

Next, they do this same set of calculations with some python code. I give them this program that runs as it is and I go over each line.

The two parts that might be new for students:

After going over the code, I send them to this page (https://trinket.io/rhettallain_gmail_com/courses/physics-python-for-mere-mortals#/beginning-numerical-calculations/using-small-pieces). It’s a trinket.io page with the code right in the browser. They don’t even need to log in or anything. It even has all the instructions there too so that they could do this on their own. The trinket site is the BEST. Oh, I also made this shortened-url (http://bit.ly/trinket-physics). That page includes everything. I make sure to tell them to click on the “using small pieces” tab on the left to get to the code.

So, the students run the code and then modify the code to answer some questions such as:

  • Where will the car be at a different time? Say 2.2 seconds.
  • What if you change the velocity the 0.62 m/s, where will it be after 2.2 seconds?
  • What if the car starts at -0.5 meters?

Stuff like that. Really, I just want them to be able to run the code, read the output, and change the code. It’s sort of a coding ice-breaker.

I’m not going to go over the rest of the workshop—but it’s all there (and more) on the trinket.io site along with the instructor slides. After that first small activity, the students do the following:

  • A similar problem but with a constant (non-zero) acceleration. This is great because you get a different final answer for the numerical calculation that depends on the size of the time step.
  • How to make graphs (or at least print out values) so you can get more data.
  • Solving a problem with two cars—one moving at a constant velocity and one accelerating. This is the classic “police chase” problem. I set up the program (not all the way) but I let them figure out how to change the while loop to get it to run. It’s great because students come up with their own ways of making it work. Sometimes, this is where I stop the class.
  • Projectile motion.
  • Mass oscillating on a spring.

What do you need?

If you want to do this in class, you need some computers or tablets and some time. You could probably do this in sections, just break it into 30 minute activities if you like.

Some other things to consider:

  • Make sure you work through the material first. It’s important to really know what’s going on so that you can easily help students when they get stuck.
  • If a group has a program that’s not running right, I really try to get them unstuck. If it’s a silly syntax error, I try to find that right away so they don’t get frustrated.
  • If you have any questions or need help. let me know.

Notes and Comments on AAPT Summer Meeting 2019

Here are some things I need to share regarding this meeting. Overall, it was great to see everyone. As usual, the conversations were the best. I regret that there were some people I did not get to meet or talk to—maybe next time we will meet up.

Blog vs. WIRED

One question that came up multiple times was about this blog vs. my posts at WIRED. How do I decide where a post goes? OK, here is my explanation.

In the beginning, there was a blog. A blog was super informal and free form and alive with comments. It was like the 60s and I was a hippie. A physics hippie. I don’t know if this early blogging era was like the 60’s or maybe the wild-wild west. Well, the comments eventually turned into the wild west with a shoot out at the O.K. Corral.

When I moved to WIRED, everything was the same except it was at a different site. But I’ve been there for a LONG time (9 years?) and things evolve. My posts at WIRED are more edited and geared for a specific audience. That’s not bad, it’s just different. I don’t think I can just write whatever I want like I did in the old days. No more random posts that just talk about my cat (I don’t even have a cat).

So, that’s where this blog comes in. It’s a place where I can post whatever I want and no one can stop me. These are the kinds of things you will find here.

  • Random posts (like this one) that are just an outlet for me to write stuff and tell stories.
  • Explicit educational material. If a post needs too many equations, I would rather put it here. Many WIRED readers (while very education) don’t really get into all the equations. Also, since WIRED is paywalled it makes it more difficult for educators to access the stuff (in the off chance that they might find it useful).
  • MacGyver science notes. Oh sure, I post some MacGyver stuff on WIRED—but I really don’t think they want to see 50 posts on different episodes. So, those are here.
  • I think that pretty much covers it, so I don’t even need this last point.

In the end, I apologize for the confusion with the two blogs. Oh, actually there are three. I recently wrote a post on OneZero Medium (analysis of a car crash from Stranger Things) also. Not sure how much I will write there—but it’s still me.

What’s up with all the drone videos?

Yes, I have a drone. I love my drone. I can only hope my drone loves me as much as I love it. Honestly, I am honored that you even noticed my drone videos.

Oh, wait. You haven’t seen them? I can fix that.

In case you are curious. This is a DJI Spark. Great drone.

More Comments

Here are some more short comments.

  • Meeting with Bruce Sherwood and Ruth Chabay was great. I wish I had a picture with both of them (I did get one with Bruce though).
  • Bruce made this epic comment in regards to numerical vs. analytical calculations. People claim that analytical solutions are better because you can solve a problem in terms of known functions like sine and cosine. But how do you find the value of the cosine function? YUP – numerically or in a table or in an infinite series. So, in a way all solutions are numerical. Win for numerical.
  • The other deep thought by Bruce was a discussion on his AJP on energy. Read that paper. This sums it up. You can not find the work done by friction. Friction is crazy hard. I think I might write a WIRED post on this.
  • Eric Ayars had an excellent presentation on chaotic systems. One system was a bouncing ball on a moving floor. I wonder if there is a case where the ball just stops—this could happen if the relative collision speed of the ball and floor is zero.
  • The 30 demos in 60 minutes was pretty good. I love these things. Even though I’ve seen many of these demos before, I always find something new. Here is their site http://30demosin60minutes.com/
  • I went hiking. It was super hot, but I had a great time.

Using video games to build models. AAPT AD05

Here are the resources and links for my AAPT talk at the Summer Meeting. These are probably in chronological mass (unless I change my mind at the last minute).