Progress is impossible without change; and those who cannot change their minds cannot change anything.
..."George Bernard Shaw(1865-1950, Irish dramatist, essayist and critic, Nobel Prize for Literature 1925)"

Normally you find projectile in ideal case, i.e. without any air drag. The following applet add airdrag to simulate more realistic case. Drag Force is proportional to F = -kV^{2}

Mass of the object is assumed to be 1kg. If the mass of the object is different, you should divide k by real mass k->k/m .

Normally, the drag force is very small for small projectile motion in air. So the initial velocity was set to 626 m/s (very large value) and the number display for distance was always in unit of km, so that the air drag effect can be visible more easily. The right most text field (initial value=100) is used for scaling the X-Y coordinate. For example: You want to have a smaller initial velocity v=62.6 m/s. You might want to change the sclae from 100. to 1. (The same trajectory will be displayed for v=626m/s and scale=100.) If you want to have smaller velocity, i.e. v=20 m/s , you might want to change scale to 0.1

Reply #1 on: January 30, 2004, 12:43:30 pm » posted from:,,Satellite Provider

Subject: Date: Wed, 14 Jul 1999 23:23:57 +1000 From: "Antony Tribbick" <tribbick@lavalink.com.au> To: <hwang@phy03.phy.ntnu.edu.tw> Nice java applet.. Demonstrates very nicely what I was experimenting on with golf balls

Hello! My name is Marko Podpecan from Slovenia, Europe. My diploma is Physical and computer modelling with EJS. I'm doing simulations with ideal conditions (without air).

Now i have found a simulations from you, where you include air. In which program did you do this simulations ? And which program you use to open and see *.class files.

You have very interesting and great simulations. I'm amazed.

All the program in this category are written by JDK1.0.2 between 1996-2001. Java simulations created by EJS can be found at Easy java simulation category.

It is very easy to include air drag into ejs. Just add air drag terms into evolution equations in ejs.

For this simulation : The drag force is propotional to V^{2} For projectile motion you should have the following equations in EJS evolution page:

dx/dt=vx; dy/dt=vy; dvy/dt=-g;

If you want to add drag force like this one. In this model, the drag force is proportional to F=-b*V^{2}, where b is the drag force coefficient. Fx=-b*V^{2}*(vx/|V|)=-b*vx*|V|; Fx=-b*V^{2}*(vy/|V|)=-b*vy*|V|;

You should modify the evolution equations to the following: dx/dt=vx; dy/dt=vy; dvx/dt=-b*Math.sqrt(vx*vx+vy*vy)/m*vx; dvy/dt=-b*Math.sqrt(vx*vx+vy*vy)*vy/m-g;

The following is EJS version of air drag simulation.

A question concerning your projectile simulation with air drag. I am trying to plug in parameters to simulate a car traveling through the air. Assuming that your drag force of the form F=-kv^2 is equivalent to the drag force of the form D=.5(rho)S(Cd)*v^2, I was assuming your use of SI units and calculating your k to be equal to .5*1.25*1.1m^2*1.2; therefore, coming up with a k=.825. Placing -0.825 into the k= box and making the velocity = 20 (assuming this to be 20m/s), I am getting no x,y coordinate pairs and a time value that is very long. Assuming that you are using a Runge-Kutta 4th order approximation, I am very interested in the results of this simulation. Any insight into what I am doing wrong would be much appreciated.

I just added some more description for the simulation.

Normally, the drag force is very small for small projectile motion in air. So the initial velocity was set to 626 m/s (very large value) and the number display for distance was always in unit of km, so that the air drag effect can be visible more easily. The right most text field (initial value=100) is used for scaling the X-Y coordinate. For example: You want to have a smaller initial velocity v=62.6 m/s. You might want to change the sclae from 100. to 1. (The same trajectory will be displayed for v=626m/s and scale=100.) If you want to have smaller velocity, i.e. v=20 m/s , you might want to change scale to 0.1

The k value for the simulation should always be positive. (The negative sign already entered in the code) Because you enter a negative k value, it was simulating some push force was added(instead of drag force). Please check the unit of your formula. Why the density is 1.25 ? This is not the density of air (also check the unit for the density in your formula)!

Forgive me if I am not understanding something but using D=1/2*rho*S*Cd*v^2, I would take k to be equivalent to 1/2*rho*S*Cd. Plugging in values and units I get .5*1.229 kg/m^3*2.6m^2*.45 (dimensionless drag coefficient) = .72 kg/m^3 * m^2 =.72kg/m. When multiplied with the v^2 term, I get units of kg/m * m^2/s^2 = kg * m/s^2 which is of course equal to a Newton (appropriate for a force).

I am plugging in values that I would expect for something like an automobile. I believe 1.229kg/m^3 is an appropriate value associated unit for density of the atmosphere at sea level.

Plugging in v=20m/s, k=.72 and an x,y scale factor of .01, I get an xmax=2.91e-3. I believe the value not acounting for air resistance to be just over 41m.

Reply #9 on: September 25, 2007, 10:45:10 am » posted from:Taipei,T\'ai-pei,Taiwan

The force F=-kV^{2} I need to know the acceleration for the calculation. So I assume the mass is equal to 1kg in the above calculation. For you case, you should divide k by the mass( in unit of kg for your car). I am sorry. It is something I did not write out clearly.

The air-drag is not a very strong effect for small velocity and large mass.

Reply #10 on: February 03, 2008, 11:09:08 pm » posted from:Surabaya,Jawa Timur,Indonesia

My name is falah. I had been studying in Institute of Technology Sepuluh November (ITS) Surabaya Indonesia majoring in Physics. I have an assignment related to a movement of tennis ball in the air (at parabolic motion). However, there are some questions I would like to ask, would you mind to answer? By the way, these are my questions list: 1. How is the projectile motion for the sphere thing at 3 dimension by seeing air resistance, spin, and buoyant force ?How are the equation for simulating it? 2. What forces are worked on the tennis ball moving in the air, with and without spin? 3. How is the equation for the movement of tennis ball as it spins and doesn’t spin? Thanks my email: hanunfalah@gmail.com

« Last Edit: February 19, 2008, 12:48:57 pm by falah »

Reply #11 on: April 28, 2008, 09:50:26 pm » posted from:Birkirkara,,Malta

Dear Dr. Hwang,

I am Daniel Baldacchino, a second year mechanical engineering student at the University of Malta. I have an assignment to build a simple catapult to launch a 100g water balloon, as far as possible but also to try and predict as accurately as possible the range it will achieve with kinetic equations. Since this has to be an accurate calculation, I don't think we can afford to simply neglect drag on the balloon.

I now refer to your equations posted on the "Projectile Motion with Air Drag" forum. Fx= - b* V2 * (vx/|V|) = - b * vx * |V|; Fy= - b* V2 * (vy/|V|) = - b *vy * |V|;

What exactly are the terms (vx/|V|) ? initially i thought these were a position vector , but the fact you use vx has confused me.

Also, when you plug this force into the acceleration equations ,

dvx/dt = - b * ( Math.sqrt(vx*vx+vy*vy) / m ) * vx; dvy/dt = - b * ( Math.sqrt(vx*vx+vy*vy) * vy / m-g ;

how would you integrate to solve for these values? are vx and vy intial values or would you have to integrate them from some intial value to 0 ?

I was considering, for the sake of simplifying the calculation, to eliminate effect of drag in the vertical direction, and consider only a force in the horizontal direction, say Fx = -bv ( or v^2, im not sure which to use, ive found both versions!)

therefore d(vx)/dt = bv/m

and using (ax)dx = v(dv), i would integrate x from 0 to x, and v from some initial velocity to a final value. I would obtain another equation in the y direction, assuming a constant acceleration -g and try and find a way to solve...

Any insight into what your thoughts are would be much appreciated. Thank you for your time

Because one of the model for air drag is the drag force is proportional to v^{2}. So if the velocity is v. the magnitude of the drag force is b*v^{2} (where b is a constant). Since the force F is a vector, there are two components Fx and Fy in my simulation. So I have to calculate the component of the force in the x and y direction. Fx= - b* V^{2} * (vx/|V|); // vx/|V| will give me the component of the force in the x component.

Once I have dvx/dt =Fx/m = - b/m * V^{2} * (vx/|V|); I can integrate the above equation with numerical method. The method I used is Runge-Kutta 4-th order method, which is a standard method for numerical calculation. You can find related information from any numerical calculation textbook. If you use the EJS tool (which is available on our server), it will solve the differential equation for you. You just need to provide the equations and initial values. :-)

Reply #14 on: October 24, 2008, 04:49:50 pm » posted from:Taipei,T'ai-pei,Taiwan

It was explained in the previous message. The magnitude of the drag force is F=-b*V^{2} and the direction of the force is the same as velocity. So we can calculate the force component in x direction as Fx=-b*V^{2}*Vx/|V|; (i.e. calculate inner product between F and univ vector in the direction of velocity vector.)

You can download EJS source code and load it into ejs Or Click load ejs as signed applet button to load ejs into your browser and find out how it was calculated in the program!

Progress is impossible without change; and those who cannot change their minds cannot change anything.
..."George Bernard Shaw(1865-1950, Irish dramatist, essayist and critic, Nobel Prize for Literature 1925)"