Numerical Calculation Collection

The following are some of my best posts about numerical calculations.

Working notes for my bouncing ball running model

I’ll be honest.  I had some problems getting my bouncing ball running model working.  Oh, here is the model.

https://www.wired.com/story/how-is-a-runner-like-a-bouncing-ball/

Basically, this models the speed of a running human by assuming they are bouncing ball.  When the human impacts the ground, there is some maximum impact force and an impact time.  The impact time decreases with horizontal velocity such that eventually, all the force is used in the vertical direction to keep the human off the ground long enough to switch feet in the air.  The end.

As I was making this model, I took some notes because I couldn’t get it to work.  Here are my notes.  Hopefully you can use this to see how to troubleshoot a program.

Running model notes

I think I mostly have it working:

http://www.glowscript.org/#/user/rhettallain/folder/blog_posts/program/runningbouncemodel/edit

Here is basically how it works.  Two big ideas:

  • Humans can push off the ground with some maximum force.  This force does two things – gets them off the ground and in the air so legs can move and pushes them forward
  • The contact time with the ground is small and gets smaller as horizontal speed increases
  • This means as the human speeds up, the ground force eventually gets to where it can only push up and not forward

Here is what it looks like so far

Here is a graph of speed vs. time

  • This model reaches a max speed of about 3.5 m/s in just a couple of strides – that doesn’t seem right
  • I think my Fv calc is wrong – it gives back the same speed not the needed vertical speed to get the stride time
  • Need to recalcualte Fv based on pfinal
  • If you want to be in the air for ts seconds, then your initial vertical velocity must be -g=dv/dt.  dv=g*dt dv = 2vstart. start=(½)gdt
  • Now to calculate the force. I know tc (contact time) so F = dp/dt = m*(vy2-vy1)/tc – this is the total force = Fv-mg so Fv = that stuff +mg

Something isn’t right.  Here is a plot of position vs. time

It’s getting higher and higher (and going lower – weird)

  • I’m getting stride (in air) times of 0.09 to 0.13 – that’s wrong

 

Ok – I think I know the problem.  I need to set the force push time loop and forget about while human.pos.y<R – I think that’s my problem

 

How about this

  1. Once human hits the ground – calculate Fv, Fx, and tc set tcount = 0
  2. While tcount < tc – set human.pos.y = ground. And set the forces
  3. When tcount = tc, turn off the forces and stop holding the person

 

It appears there is something wrong with my Fx.

  • Fx is some value for the first push – but after that it goes to zero and the Fv is maxed out.
  • Werid
  • There is a problem with both Fv and Fx

 

The problem is the time of impact – it gets too small such that the required force is HUGE

  • How about a min time – and it can’t go lower?

 

Fmax = m*2v/t

t=m*2*v/Fmax

 

I think the problem is that during the contact time, the horizontal force is too much so that the human ends up going faster than the theoretical speed.

 

I can use the time and force and velocity to estimate the average velocity and then recalculate the time

This is the paper

https://www.physiology.org/doi/pdf/10.1152/japplphysiol.00947.2009

It has this plot.

This shows a decrease in contact time with speed

Here is what I get for a fit

This gives a contact time function of

Although this “blows up” at v= 0.  Maybe I should say tc = 0.3612 for v < 2 and this expression for v>=2

End of notes – it finally worked.

Peltier Cooler

I have this small wine-refrigerator that is both old and not working.  I don’t really need it, but it’s nice to keep extra beers and wine in there.

My idea is to get a peltier cooler and convert this from a compressor cooler to a solid state cooler.  Of course it won’t be as efficient or cold – but as long as it gets just a little bit cooler I will be happy.

I ordered some coolers online (they weren’t super expensive) and they seem to work. It requires 12 volts and up to 5 or 6 amps – so the power supply might be an issue (it seems many people use a computer ATX power supply).  Actually, you can just connect it to a D-cell battery and put your fingers on each side of the cooler and easily feel a temperature difference (great for demos).

With a temporary power supply, I put the cold side of the peltier on a big aluminum block and then I put a cpu heat sink on the hot side.  This didn’t work – but here is a picture.

IMG_4732.jpg

It turns out that the peltier cooler gets hot – but it keeps a temperature difference between the two sides.  So the key is to keep the hot side as cool as possible.  With this in mind, I switched it so that the hot side was on the block and there was nothing on the cool side.  I still didn’t work very well until I put some thermal paste between the peltier and the aluminum block for good thermal contact.

Here is what I get.

Pretty cool, right?

I will keep you updated.

Trinket Physics Update

Ok, it’s the summer.  Yay (not yay).  I’m currently teaching a summer section of algebra-based physics and it’s pretty tough since they meet for 1 hour + 15 minutes 4 days a week.

Anyway, my goal was to finally finish my trinket physics book and use that for class.  I’m not going to finish it by the end of the semester, but I have learned some things.

  • Stick to your narrative.  I started off with my own idea but then it sort of merged into something that would match up more with traditional textbooks.  DON’T DO THIS!  I need to stick to the original plan (which I will lay out below).
  • More calculations with python.  There are some parts that don’t have much python.  MORE COWBELL.
  • My original plan was to use the momentum principle.  However – there is a problem.  I start off with kinematics (and acceleration) and you need acceleration for circular motion.  My new idea is to introduce the momentum principle as \vec{F}_\text{net}=\frac{\Delta \vec{p}}{\Delta t} = m\vec{a}.
  • Case studies are great.  I like to take something like orbital motion and just explore a bunch of stuff.
  • Students want more homework.

Ok, here is my new plan.  Break the curriculum into 4 parts.

  • Kinematics (position, velocity, acceleration).
  • Momentum Principle
  • Work-Energy
  • Angular Momentum Principle

That means some stuff gets skipped.  I don’t need to focus on statics so much – or special forces.  Focus on the big things – planet motions are great.

More to come.

Summer and Hot Stuff

Here are some posts about summer and hot weather and other related stuff

Video Game Physics

Below is a list of blog posts about video games and physics.

Angry Birds Stuff

Other Video Games

What is a good problem?

Part of the reassessment process has students pick problems to solve that they think are good demonstrations of their understanding of the material (or the standard).

For me (as the evaluator), I can learn quite a bit about what a student thinks just based on the problem they pick to solve.  However, it seems that students really don’t want to pick problems.  They would prefer to have me just tell them what problems to solve.

OK, let’s do this.  Let’s look at some problems and see which ones are good and which ones are not so good.  In this case, it will be for the Position-Velocity-Acceleration standard.  For this standard, students should show that they understand and can use the definitions of position, velocity, and acceleration in 1 dimension.  So here are some questions.  You get to pick which one is the best.  Actually, why don’t you score them from 0-10 (11 being the best).

Problem A.

A plane has a mass of 1120 kg and is landing on a runway.  The landing speed of the plane is 50 m/s and the runway is 2140 meters long.  What is the acceleration of the plane?

Problem B.

Your car is the fastest all around.  No one can beat you.  It has an acceleration of 8.2 m/s2.  Suppose you start from a rest (because, don’t all drag racers do this).  How long would it take your awesome car to get to a speed of 55 m/s?  What is this speed in mph?  What is the average speed during this time?  How far did you go?

Problem C.

A police car starts from rest and can accelerate at 5.5 m/s2.  The police car starts accelerating as soon as a speeding car passes by with a speed of 25 m/s.  Assuming the police car has a constant acceleration and the other car has a constant speed, where does the police car catch up to the other car?

Problem D.

Can you have a hang time of over 2 seconds when jumping?

Problem E.

A rocket is in space traveling with a speed of 328 m/s.  It fires its rockets to create an acceleration of -10.7 m/s2 (slowing down).  What is the speed after 5.8 seconds?

Problem F.

no words

 

Common problems on lab reports

After reading over the lab reports, there were several common problems.  Here is an overview.

  • Hypothesis. What exactly is a hypothesis?  There is an actual thing called a hypothesis and there is hypothesis testing.  However, just about every student that used this word used it incorrectly.  My suggestion is to just not use this word.  Instead, focus on model building.
  • “I learned a lot”. Remember, the report is about building a model. Hopefully you learned something, but it’s not really relevant in the report. I am only commenting on this because it was a very common statement in the reports.  Not sure why so many people stated this.
  • Human error. Please don’t use this term or any term similar to it. If there was a problem that human caused – just explain that problem. If it was a calculation error – how do you know it was a calculation error?  If the measurements were poor – just describe in what way the measurements were inaccurate.  Saying human error just glosses over the problem.  Repeat – never use this in your lab report.
  • “I proved that …”  Science doesn’t prove anything to be true.  If you drop a ball 1000 times and it falls, do you prove that balls fall?  No, because what if you drop it the 1001th time and it doesn’t fall.  You have shown that it is very likely to fall (or you have built a falling ball model) – but you didn’t prove anything.  On the other hand, you can prove things to be false.  If I say the acceleration is constant and just find one case where the acceleration changes, it’s ok to say you proved constant acceleration is incorrect.

Bonus video

  • Gather materials. I understand why this is in the lab report – but if you want to leave it out, that would be fine with me.  In general, I encourage students to write a lab report so that other students in the same lab could reproduce your results.  You can make assumptions that they have access to the same stuff you have access to.
  • Scatter plot instead of bar graph or line graph. There is rarely a reason to include a bar graph or a line graph.  You probably want a scatter plot.  If you don’t know the difference between these graph types – just make a graph on graph paper.
  • Graphs with linear fits and slope. Just about every time you make a graph, it should be to show a functional relationship between two things.  If this is a linear relationship, you can fit a linear function to the data (a best fit line).  Why include a best fit line if you don’t also include the slope of that line.  Might as well also put this slope on the actual graph.  In your analysis be sure to explain what that slope means (and the units for the slope).
  • Paraphrasing other students or other materials.  I made this clear in class, but if you are just paraphrasing something – that is copying.  Don’t copy.  Write your own words.
  • Misspelled words. Why?  Why are there spelling errors in your lab report?  I assume you are using some type of word processor.  Don’t these programs tell you when something is spelled incorrectly?
  • Self Edit. Don’t write something and then just move on.  This lab report is going to be turned in for an actual grade in a real class.  Take the time to go back over what you wrote – or have a peer or tutor also look over your lab.  It might help to write something and then take another look at it the next day.  Looking at student reports, it’s very clear that some of you just wrote stuff without reading it.
  • “Overall, this was a fun lab”.  I’m glad you had fun – but what about your physics model?  Again, just focus on the model.  Now – this doesn’t mean that you have to be all stuffy and formal.  Feel free to write in any style that you like – but in the end it’s your model and the analysis of your model that really matters.

Pi Day Posts

Below are all of my previous Pi Day posts (at least the ones I can find)