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!

Python, RungeKutta and first-order differential equation system.

  1. Dec 13, 2008 #1


    2. Relevant equations

    The equation is, given to me by lurflurf,:
    mv' + f(v ) + s(u) = F(t), t > 0, u(0) = U0, v (0) = V0
    where v=u'
    For the record the equation was:
    mu'' + f(u' ) + s(u) = F(t), t > 0, u(0) = U0, u' (0) = V0 .


    3. The attempt at a solution

    Code (Text):
     def rhs(u, t):
        return [u[1],
                (1./m)*(external(t) - friction(u[1]) - spring(u[0]))]
    This is the solution, but I don't get how yuu go from the equation to rhs.
    Can someone help me?
     
  2. jcsd
  3. Dec 13, 2008 #2
    Re: Python, RukgeKutta and first-order differential equation system.

    Here is the page with the exercises: http://www.ifi.uio.no/~inf1100/ODE_project.pdf" [Broken]

    The equation is given in 11.36 and it is 11.37 I need help with.
    The solution is http://www.ifi.uio.no/~inf1100/live-programming/oscillator_v1.py" [Broken]

    ODESolver http://www.ifi.uio.no/~inf1100/src/oo/ODESolver.py" [Broken]

    Scitools contains array, plot etc
     
    Last edited by a moderator: May 3, 2017
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Python, RungeKutta and first-order differential equation system.
Loading...