-
July 8th, 2011, 08:30 PM
#1
Junior Member
Solving the Kinematic Equations using Runge-Kutta
I am attempting to write a physics simulation program using the kinematic equations and using Runge-Kutta to solve them to determine how an object will move through space subject to certain gravitational forces etc.
I have x=vt+(at^2)/2 as the equation i need to solve using Runge-Kutta.
I've attempted to find code online to help, but what i've found has been mostly the spring equations, nothing dealing with pure kinematics.
If someone knows of a place i could get code for this, in any programming language it would be much appreciated!
thanks in advance
Last edited by livenail; July 8th, 2011 at 09:57 PM.
-
July 10th, 2011, 06:19 AM
#2
How much mathematics and physics experience do you have? This is an algebra based equation, and therefore does not need any approximation. The substituted values will solve for a solution and that is the solution. No approximation necessary. RK4 approximation is used for systems of ordinary differential equations. Mainly nonlinear ones. This is because nonlinear differential equations cannot actually be solved. So approximating is the only thing you can possibly do.
-
July 11th, 2011, 06:45 PM
#3
if you're dealing with actual equations...you need only write the code to calculate it? Meta took it a bit, too far. Your project is still a determination of "x", though. Depending on the variable missing, that is what becomes 'x'. Meta was jumping ahead to what happens when x becomes a non definable, or non static relativistic variable, imo.
Every now and then, one of you won't annoy me.
-
July 11th, 2011, 08:33 PM
#4
My explanation was an attempt to show why the Runge-Kutta method was unnecessary. So I agree with you, whether or not my last post seems like it. Maybe a little too much math ranting?
-
July 12th, 2011, 03:11 AM
#5
Originally Posted by metguru
This is an algebra based equation, and therefore does not need any approximation.
You were entirely right.
Every now and then, one of you won't annoy me.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|