- #1
Kamiden
- 4
- 0
Homework Statement
- I'm trying to write a program to calculate Newtons of impact force from a fall given the weight, general size, shape, and density of an object. I want to take air resistance into account. I also want to take the density of the thing the object falls on into account. I am having trouble figuring out why a 200 lb object falling 200 ft is going ~23 m/s at the point of impact. This is the loop I am using.
- For reference:
- accel = acceleration, which is set to 9.81 m/s^2 originally.
- densitya = density of air, set to 1.2754 kg/m^3
- drag = drag coefficient, set to .6 for the shape.
- area = area of the object, set at .58 m^3
- dragf = drag force in Newtons
- weight = weight. Mass in kg * 9.81
- mass = mass in kg, 90.7185
- rheight = remaining height. This is in meters, and is set to 60.96
- while (rheight > 0)
- {
- time = time + 0.01;
- velocity = velocity + (accel*.01);
- dragf = ((densitya*drag*area)/2)*(velocity*velocity);
- accel = (weight - dragf)/mass;
- rheight = rheight - (velocity*.01);
- }
- cout << velocity << " " << time;
- Am I getting a formula wrong, is the code bugged, or is it something else?
Homework Equations
Drag Force = (p*Cd*A)/2*v^2
Velocity = d/t
Weight = m * 9.81
Acceleration = W - Df
The Attempt at a Solution
Seen above.
Last edited: