Solve DiffEq for Runge-Kutta 4th Order Input

  • Thread starter Thread starter andyfive
  • Start date Start date
  • Tags Tags
    Input Runge kutta
andyfive
Messages
13
Reaction score
0
Hi,

Hi. I am trying to enter some differential equations into a Runge-Kutta 4th order spreadsheet which requires input in the form y' = ...? My differential equations are in the form :
dvx/dt = -FDvx/mv (i.e relate velocity derivative with respect to time to acceleration).
Can anyone please help or point me in the right direction as to how to convert this to to y' = ...? format?

Many Thanks
 
Physics news on Phys.org
Hi andyfive, welcome to PF! :smile:

Perhaps if you define y = vx you have the required form?

Or possibly y = (vx, vy)?
 
Many Thanks for your reply I like Serena. If I understand correctly, by defining y = ax I get :

dy/dt = -FDy/mv

If y' is equal to dy/dt then it is as simple as saying y' = -FDy/mv. Is this correct?

Thanks
 
andyfive said:
Many Thanks for your reply I like Serena. If I understand correctly, by defining y = ax I get :

dy/dt = -FDy/mv

If y' is equal to dy/dt then it is as simple as saying y' = -FDy/mv. Is this correct?

Thanks

Basically, yes!

However, you also have a "v" in your expression.
I suspect this should actually be sqrt(vx2+vy2), but I'm guessing here, since I think you did not list all your variables and equations.
If it is, "y" would come back into the expression for "v".
 
I like Serena said:
Basically, yes!

However, you also have a "v" in your expression.
I suspect this should actually be sqrt(vx2+vy2), but I'm guessing here, since I think you did not list all your variables and equations.
If it is, "y" would come back into the expression for "v".

Thanks again I like Serena. Yes, you are absolutely correct, the v will need to be defined actually as sqrt(vx2+vy2+vz2) - this is a model for a 3 dimensional ball flight. The initial velocity(v) at time(t) = 0 is known and hence the three initial velocity vectors are known. Not sure what happens though when other derivatives are part of the expression (ie vy & vz)?

Regards
 
andyfive said:
Thanks again I like Serena. Yes, you are absolutely correct, the v will need to be defined actually as sqrt(vx2+vy2+vz2) - this is a model for a 3 dimensional ball flight. The initial velocity(v) at time(t) = 0 is known and hence the three initial velocity vectors are known. Not sure what happens though when other derivatives are part of the expression (ie vy & vz)?

Regards

In this case you would have y = (y1, y2, y3) as a vector.

And you would effectively have 3 equations, the first being:

\frac {dy_1} {dt} = \frac {-F_D y_1} {m \sqrt{y_1^2+y_2^2+y_3^2}}
 
I like Serena said:
In this case you would have y = (y1, y2, y3) as a vector.

And you would effectively have 3 equations, the first being:

\frac {dy_1} {dt} = \frac {-F_D y_1} {m \sqrt{y_1^2+y_2^2+y_3^2}}

Brilliant. Many Thanks I like Serena. You really have helped clarify things for me. I'll get back to the spreadsheet and see what results I now obtain.
 
andyfive said:
Brilliant. Many Thanks I like Serena. You really have helped clarify things for me. I'll get back to the spreadsheet and see what results I now obtain.

Cheers! :smile:
 
Back
Top