Algorithm for acceleration of projectile undergoing squared velocity drag?

  • Thread starter Levis2
  • Start date
  • #1
43
0
I am trying to write a java program to simulate the motion of a projectile undergoing a drag proportional to the velocity squared, but i am having some issues writing the acceleration part. This is my attempt, not sure if its right though;

a=g-kv^2
da/dt=-k dv^2/dt
since dv^2/dt=2vdv/dt;
da/dt=-2vkdv/dt
da=-2vkdv
and
a=dv/dt
dv=adt inserting;
da=-2vkadt
trying to incorporate some indexes; (bear with me, first prog. algorithm :)
a_(n+1)-a_n=-2vka_n Δt
a_(n+1)=a_n-2vka_n Δt

Is this all wrong ?
 

Answers and Replies

  • #2
rcgldr
Homework Helper
8,775
572
wiki already worked out a direct solution for free fall with air resistance (for constant air density which matches your original equation):

wiki_falling_with_air_resistance.htm

Wiki doesn't show the math. To get there, you start with

a = dv/dt = g - k v2

dv / (g - k v2) = dt
 

Related Threads on Algorithm for acceleration of projectile undergoing squared velocity drag?

Replies
0
Views
5K
Replies
3
Views
15K
Replies
2
Views
1K
  • Last Post
Replies
3
Views
3K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
3
Views
2K
Replies
3
Views
1K
  • Last Post
Replies
2
Views
603
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
1
Views
814
Top