A note about numerical calculations

[In a previous post, I talked about numerical calculations](http://blog.dotphys.net/2008/10/basics-numerical-calculations/). The basic idea is to use the momentum principle and the following “recipe”:

  • Update the position of the particle
  • Update the momentum of the particle
  • Update the force on the particle

Looks great, right? Well, it mostly is great. I want to give a couple of pointers about the last step, update the force on the particle. How and when can you do this? Really, in numerical calculations, you will see two types of forces:

  • Forces that you can calculate: That looks strange, but it’s true. Maybe you are thinking, can’t you calculate all the forces? – the answer is no. Yes, you can calculate the gravitational force and the electromagnetic force. Also, really all forces you are likely to see are one of those two. You can also calculate the force due to a spring(depends on position), the air resistance force (depends on velocity). These types of forces work well in the above numerical recipe.
  • Forces that you CAN NOT calculate: These are all the other forces. Typically, these are forces of constraint. Suppose a block slides down a plane. Yes, you can calculate the force the plane exerts on the block, but it depends on things other than just the position of the block. The force the plane exerts on the block is such as to keep the block on the plane. You can not calculate this in the same way as the previous category of forces. Yes, technically the force the plane exerts on the block IS the electromagnetic force. If you want to calculate this force between all the atoms in the two objects, I encourage that.

So what does this all mean? This means that you can not use the above “recipe” for whatever you want. Sorry.

(I have a trick I will show you later)

Basics: Numerical Calculations

**Pre Reqs:** [Kinematics](http://blog.dotphys.net/2008/09/basics-kinematics/), [Momentum Principle](http://blog.dotphys.net/2008/10/basics-forces-and-the-momentum-principle/)

What are “numerical calculations”? Why are they in the “basics”? I will give you really brief answer and then a more detailed answer. Numerical calculations (also called many other things – like computational physics) takes a problem and breaks into a WHOLE bunch of smaller easier problems. This is great for computers ([or a whole bunch of 8th graders](http://blog.dotphys.net/2008/09/computational-physics-and-a-group-of-1000-8th-graders/)) because computers don’t mind doing lots of little problems. Why are they “basic”? Well, most text would say they are not basic. I disagree. I think this is a legitimate method for solving problems. In particular, this is a great way of solving problems that can not be solved analytically (meaning solving one hard problem).

**Numerical Calculations are Theoretical Calculations**

Let me just get this out of the way. Numerical calculations and analytical calculations are really in the same “class”. Often people will lump numerical in with “computational experiment” but that is a really bad thing to do. Some others will claim that there are three different “paths” to discover stuff in science: theory, experiment, and simulations. Simulations are the same thing as numerical calculations which are the same as theory. ([I wrote a letter about this in the American Journal of Physics](http://scitation.aip.org/getabs/servlet/GetabsServlet?prog=normal&id=AJPIAS000076000009000797000001&idtype=cvips&gifs=yes))

**Example Problem**

Let me start with a problem that can be solved analytically. Suppose I have a ball of mass 0.5 kg and I throw this straight up with a speed of 10 m/s. How high will it go?

Continue reading “Basics: Numerical Calculations”

A physics-based Scratch game

I already said I like [scratch from MIT](http://scratch.mit.edu). After building a simple rocket model, the kids said it should be a game. I caved. Here it is:

Learn more about this project

To play, press the space bar. The arrow keys are rocket thrusts. The goal is to get to the red circle in as little time. If you hit the wall or the sides, you start back at the green circle. Please forgive me masters of scratch (I know who you are – you find something to complain about in my program).