Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

4:th order Runge-Kutta for system of PDE's

  1. Nov 24, 2008 #1
    Hi everyone.

    I have the following system of PDE's:

    ut = vx
    vt = (-3)*ux + 4*vx,

    with initial conditions u(x,0) = sin (x), v(x,0) = 0. I am only considering the region 0<x<2*pi and 0<t<4*pi. The solution is assumed to be periodic in space.

    Using MATLAB, I want to discretize in space using a central difference quotient, and then apply the 4:th order Runge-Kutta method in time.

    Being new to both numerical methods as well as MATLAB I have been unable to manage this task. I found this m-file for system of ODE's:

    http://matlabdb.mathematik.uni-stuttgart.de/runge_kutta4.m?MP_ID=405" [Broken]

    I tried modifying it to suit my purpose but it wouldn't work. Is there an easy way to modify it when I include the space discretization? Or does anyone have a better idea?

    Thanks for taking a look.
    Last edited by a moderator: May 3, 2017
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted