1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Second order(?) ODE + Runge-Kutta method question

  1. Jun 4, 2017 #1
    1. The problem statement, all variables and given/known data
    When a rocket launches, it burns fuel at a constant rate of (kg/s) as it accelerates, maintaining a constant thrust of T. The weight of the rocket, including fuel is 1200 kg (including 900 kg of fuel). So, the mass of the rocket changes as it accelerates:

    [tex]m(t) = 1200 - m_ft[/tex]

    We’ll assume that the rocket experiences a drag force proportional to the square of velocity. Using Newton’s Second Law of Motion, we can write down the equation of the height of the rocket y(t) as a function of time, t. Namely,


    Assume an initial height of y(0)=0 and an initial velocity of dy/dt(0)=0. g = 9.81. Return a vector of t-values and a vector of y values.

    It's a programming assignment, so the values for T, mf, and cd, along with the range of t to solve for, are meant to be inputs.

    I have never taken a differential equations class, so I'm having difficulties figuring out what I have and where to go from here to get the the point where I can use numerical methods to solve for position. I believe I have an equation for acceleration and mass, and I need to find the positions. I'm given an initial velocity of a velocity function, but I am not given a velocity function, am I to find that first?

    2. Relevant equations

    Besides what's given above, I have the Runga-Kutta equations.

    3. The attempt at a solution

    I haven't gotten far in any attempts, mostly because I'm completely stuck in the differential equation step, of which I'm not familiar with any formulas or processes. My only attempt involved setting the second equation to a function of (t,y) for (t,dy/dt) and used RK to find dy/dt, but that went to negative infinity immediately.
  2. jcsd
  3. Jun 4, 2017 #2


    User Avatar
    Homework Helper
    Gold Member

    It has been awhile since I tackled one of these, but the idea is to break the second order equation into 2 equations which are linked.
    Let velocity v = y' where the prime (' mark) indicates derivative with respect to time. Now when you see y'' (or d2y/dt2), replace that with v', since acceleration is the dv/dt.
    Then you use your Runge Kutta formula to numerically evaluate for v(t) and y(t), in steps, getting the next y and v values for each time step. Then keep going.
  4. Jun 4, 2017 #3
    That makes sense, I'll start with this. Thank you!
  5. Jun 5, 2017 #4

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Your differential equation is incorrect: you need to include a thrust term, related to the rate of backward momentum transfer of the exhaust gasses (causing a forward push on the rocket body itself, via Newton's third law). That requires a value for the velocity of the exhaust gasses relative to the rocket engine's exhaust nozzle. Nowadays, some of that data is unclassified and so is publicly available for various types of rocket engines; see, eg., http://earthweb.ess.washington.edu/space/ess472/Lecture_RocketDynamics.pdf ,
    which contains a small table of such values on page 5. I do not much like the treatment of rocket dynamics in that article, but much prefer
    https://ocw.mit.edu/courses/aeronau...fall-2009/lecture-notes/MIT16_07F09_Lec14.pdf .
    That article has on pages 8-9 an example that includes worked examples that use some data on exhaust velocities.
  6. Jun 5, 2017 #5


    User Avatar
    Homework Helper
    Gold Member

    I agree with what you're saying. It looks like the T value is intended to be thrust. From what I gathered in the problem statement, it seems that this is more of an exercise to take a formula and get it into a workable computer program, rather than actual thrust rocket values. The problem states that T will be input at the beginning of running the program, and it runs for a specific timeframe, so I guess they are just inputting values to see how the program responds.
  7. Jun 5, 2017 #6


    User Avatar
    Homework Helper
    Gold Member

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Discussions: Second order(?) ODE + Runge-Kutta method question