0
$\begingroup$

If anyone can help with how to begin in this case, it would be a great help.

Imagine if we have a 1D hyperbolic system of equations like

$\frac{\partial U}{\partial t}=-i\omega\zeta$ and $\frac{\partial \zeta}{\partial t}=-i\omega U$.

Now, if we want to apply a runge kutta method, say second order (RK2), then I know RK2 becomes,

$k_1=hf(t_n,y_n)$
$k_2=hf(t_n+h,y_n+k_1)$
$y_{n+1}=y_n +(k_1+k_2)/2$

Can someone please help me with how do we implement the RK2 or RK3 in this case such that the expression for $U_{n+1}$ also contains $\zeta$ terms? All of Runge kutta methods are mostly explained in books like $\frac{dU}{dt}=f(t,u)$ but here it's rather $\frac{\partial U}{\partial t}=f(t,\zeta)$ and I don't know how to proceed with this case.

Any help would be incredibly appreciated.

$\endgroup$

1 Answer 1

0
$\begingroup$

You are solving a system. Let $W = (U,\xi)^T$ and $f(t,W)=(-i\omega\xi, -i\omega U)^T$ and apply your method of choice (RK2, RK3...) to $\frac{dW}{dt} = f(t,W)$.

$\endgroup$
2
  • $\begingroup$ Thank you so much. I was stuck at it for so long. Your suggestion leads to the answer perfectly. Really thank you. That was a big help. Thank you! $\endgroup$ Apr 15, 2021 at 16:25
  • $\begingroup$ You are welcome. $\endgroup$
    – Rem
    Apr 15, 2021 at 19:02

You must log in to answer this question.