How can I be sure of my numerical result?

Click For Summary
SUMMARY

This discussion focuses on numerical calculations for a skydiver of mass 75.0 kg falling from an altitude of 30.0 km, specifically addressing the impact of air resistance on fall time. The initial calculation without air resistance yielded a time of 78.2 seconds, while including a drag force of F(v) = 0.5*v² resulted in a time of approximately 784.78 seconds. Participants emphasized the importance of comparing numerical results with analytical solutions to ensure accuracy, suggesting that refining the time step (dt) can enhance precision to within 0.1%. The discussion concluded that consistent results across varying time steps bolster confidence in the numerical model used.

PREREQUISITES
  • Understanding of basic physics principles, including gravitational force and drag.
  • Familiarity with numerical methods for solving differential equations.
  • Proficiency in Python programming, particularly with NumPy for numerical calculations.
  • Knowledge of terminal velocity concepts and their application in physics.
NEXT STEPS
  • Refine numerical methods by learning about adaptive time-stepping techniques.
  • Explore the concept of terminal velocity and its calculation in varying conditions.
  • Investigate the effects of varying atmospheric density on drag force calculations.
  • Study the use of Python libraries such as SciPy for advanced numerical analysis.
USEFUL FOR

Physics students, computational scientists, and anyone involved in numerical modeling of physical systems, particularly those interested in dynamics and fluid mechanics.

Elvis 123456789
Messages
158
Reaction score
6

Homework Statement


In this problem you will do numerical computer calculations. A skydiver of mass 75.0 kg jumps out of a plane at an altitude of 30.0 km above the surface of the Earth. His parachute fails to open. Assume there is no horizontal motion and the initial velocity is zero. We ultimately will want to do a calculation that includes variation in the drag force due to variation in atmospheric density as well as the variation of the gravitational force with altitude. But we will start simple

a) Calculate the time to fall to the ground with no air resistance and no variation in g. Compare your result to the analytical result and refine the computer code to achieve no worse than 0.1% accuracy by adjusting the time step.

b) Now include a retarding force of F(v) = c*v2, where c=0.500 kg/m and is constant. You should be able to compare your result to an analytic result from problem 3.

Homework Equations

The Attempt at a Solution

[/B]
this is my program

import numpy as np

# numerical calculation for falling body with constant

#gravitational force only

#

# gravitational acceleration in m/s^2

g = 9.81

# mass in kg

m = 75.

#drag coeffcient in kg/m

c = 0.5

# initial position (measuring down to be positive) in m

y = 0.

# initial velocity in m/s

y1 = 0.

# time interval in seconds

dt = 0.01

a = [] # acceleration array

v = [] # velocity array

p = [] # position array

i = 0

while y<30000.:

i = i + 1

y2 = g - (c*y1**2.)/m # this the differential equation that describes the motion (y2 = a )

y = y + y1 * dt

y1 = y1 + y2 * dt

p.append(y)

v.append(y1)

a.append(y2)

print(i*dt)

in the end i get t = 784.78 s for the total time but how can i be sure about this number?
 
Physics news on Phys.org
What do you mean by "sure"?

You can, for example, do an experiment to verify the model you used to arrive at that number.
You can check to see if the result is consistent with what you know of the rest of physics.
ie. for (a) the problem tells you to compare your result, in the case of zero air resistance, to the analytic result. Did you do this?
When you do the problem including air resistance, do you expect the result to be bigger or smaller than without air resistance? What did you get?
 
Simon Bridge said:
What do you mean by "sure"?

You can, for example, do an experiment to verify the model you used to arrive at that number.
You can check to see if the result is consistent with what you know of the rest of physics.
ie. for (a) the problem tells you to compare your result, in the case of zero air resistance, to the analytic result. Did you do this?
When you do the problem including air resistance, do you expect the result to be bigger or smaller than without air resistance? What did you get?
Yes I did part a and got the answer to be within about 1 part in 10000 compared with the analytic result. When air resistance is included i expect the amount of time to be significantly larger because the acceleration is not just "g" anymore, its g minus a constant times the square of the velocity, so the acceleration is decreasing at all times until the drag force cancels the gravitational force ( if its in the air that long). So the time I got for part a was like 78.2 seconds which is much smaller than the result in part b (785 s). So at least I know that it has a chance of being right, but I can technically say that about the range 78.2 s < t < infinity, obviously this is an exaggeration but still.
 
I can technically say that about the range 78.2 s < t < infinity,
... you can do better than that, you can work out the analytical terminal velocity and figure the time to fall the whole distance at that constant speed. Since some of the time is spent falling faster than that, this will be an upper limit.

What this does is show that the computer calculation is consistent with the physical model you are using. ie. helps you be confident that what the computer is calculating from the physical model (the math equation) that you want to compare with reality.
 
Simon Bridge said:
... you can do better than that, you can work out the analytical terminal velocity and figure the time to fall the whole distance at that constant speed. Since some of the time is spent falling faster than that, this will be an upper limit.

What this does is show that the computer calculation is consistent with the physical model you are using. ie. helps you be confident that what the computer is calculating from the physical model (the math equation) that you want to compare with reality.
ah i didn't think of that. my result does indeed lie below that upper limit but barely. I'm assuming this is because the drag force very quickly balances out the gravitational force due to the v^2 term
 
Simon Bridge said:
Since some of the time is spent falling faster than that,
Did you mean more slowly?
 
Hmmm... with greater acceleration grrr. So the expect correct time to fall close to or bigger than that.
 
One way to check the consistency of your numerical calculation is to decrease the time step dt. If your numerical calculation is accurate, it should be independent of dt. So you could start with a large time step, like 0.1, and then decrease dt to 0.01, 0.001, 0.0001, etc. Once dt is small enough, the result should converge to a limit that is independent of dt.
 
  • Like
Likes   Reactions: Simon Bridge

Similar threads

  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 14 ·
Replies
14
Views
2K
Replies
2
Views
3K
Replies
41
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K