Introduction to Modeling

in Python for scientists and engineers.
Introduction to Modeling

You may have heard the belief that if a penny were to be dropped off of the Empire State Building that it would accumulate so much velocity that it would become embedded in the concrete below or that it might even kill a person if it were to strike them. We can test this hypothesis by making and analyzing two models. For the first model, to keep the math simple, we will assume that the penny is falling in a vacuum and is not being adversely affected by external forces (which we of course know that it is in reality). If the initial velocity (v) is equal to zero (f(0)) and the acceleration (a) is constant (9.81 m/s^2) the velocity after a period of time in seconds (t) is:

v = at

, and the distance the penny has dropped is:

x = a(t^2)/2

, and to fine the time until the penny reaches the sidewalk, we can solve for t:

t = $\sqrt{2x/a}$

Maintaining our constant (a) and the recorded height(x) of the Empire State Building is equal to 381m (meters), we get t = 8.8s (seconds). If we compute that for velocity (v), the speed of the impact would be 86m/s (meters per second) or about 190mph (miles per hour). Since a penny is about 2.5 grams, we could assume since the average bullet is weighed in grains where there are about 15 grains per gram where the standard .22 caliber bullet weights about 40 grains and travels at about 700-900 mph, that being hit with a penny falling off of the Empire State Building would be less impactful than being struck with a standard .22 caliber bullet but may be fatal depending on placement of the strike and other factors. Either way, it isn’t something I personally aspire to experience for wish upon any other person. I’m not saying it wouldn’t be fatal or wouldn’t lodge itself into concrete as there are many other factors at play in the real world but I do personally believe that it would be at least unlikely to happen much less the probability of it happening at the exact moment that I am in the direction of the path of travel. Regardless, this is a very basic introduction to modeling and simulating a causal effect in reality.

Here is a sample of how to conduct these calculations using Python:


from pint import UnitRegistry

units = UnitRegistry()
meter = units.meter
second = units.second

a = 9.8 * meter / second**2

##############################
#
# Acceleration (a) has two parts; magnitude (a.magnitude(9.8)), and units (meter/second**2).
#
##############################

t = 3.4 * second


v = a * t
print(v)
# 33.32

x = a * t**2 / 2
print(x)
# 56.655 meter per second squared

h = 381 * meter

from numpy import sqrt

t = sqrt(2 * h / a)
print(t)
# 8.817885349726142 second

v = a * t
print(v)
# 86.41527642726142 

If you’d like to sponsor my work and help me compete against other top computer science students developing Machine Learning algorithms, please do so on GitHub Sponsors. Your sponsorship helps me continue my education, maintain my equipment, and focus on developing tools that are learning from the world around us to find solutions to some of the problems that are affecting society today or that may affect us in the future. I sincerely appreciate all of your love and support as I travel through this journey, so please let me know if you’d like me to post any specific content or if you would like to be featured in any of my work. Thank you so much!