Questions tagged [runge-kutta]

The Runge–Kutta methods are a set of numerical methods for ordinary differential equations for the approximation of their solutions.

Filter by
Sorted by
Tagged with
0
votes
2answers
37 views

Verifying convergence of a stationary solution to a PDE with the Runge-Kutta method

I am numerically solving a nonlinear wave PDE using the Runge-Kutta method, and I know the solution I am looking for is constant in time, but I do not know the solution. What is a good way of ...
1
vote
1answer
51 views

Using Kutta Merson on NLS

I'm trying to use the Kutta-Merson to get the same results as in the book Solitons, Nonlinear Evolution Equations and Inverse Scattering - M. J. Ablowitz - pg 140 The author propose using the Kutta-...
2
votes
1answer
59 views

Langevin equation in 4th order Runge-Kutta

I'm trying to figure out how to translate a piece of code from Velocity Verlet to Runge-Kutta, while treating the time step dependence of the thermal noise correctly. The Langevin equation for my ...
2
votes
0answers
48 views

Reverse automatic differentiation and integration

In Symplectic Runge-Kutta schemes for adjoint equations, automatic differentiation, optimal control and more Sanz Serna writes: It is well known that the reverse mode of differentiation implies ...
1
vote
0answers
44 views

Computing Trajectory Equations of Kerr Geodesics

I want to numerically solve the trajectory equations of a Kerr geodesic given by wikipedia in Matlab. The trajectories look like: I implemented the equations and solved it with the standard Runge-...
7
votes
1answer
112 views

Is there any explicit symplectic Runge-Kutta method?

As far as I know, all the symplectic Runge-Kutta methods are implicit which need to solve non-linear equations during the calculation. Is there any explicit method? If not, why?
2
votes
1answer
84 views

Dormand–Prince 5(4): How to update the stepsize and make accept/reject decision?

https://en.wikipedia.org/wiki/Dormand–Prince_method I want to implement the Dormand-Prince 4(5) version to solve Initial Value problems. Using regular notation I have $A$ matrix and the $c,b,\hat{b}$ ...
5
votes
1answer
335 views

Is there a database/website with Butcher tableaus?

I have started investigating in mostly Runge Kutta and Runge Kutta Nyström methods and there one of the only differences between the methods of the same type is their Butcher tableu. For the most ...
2
votes
0answers
58 views

How to implement adaptive step size Runge-Kutta Cash-Karp?

Trying to implement an adaptive step size Runge-Kutta Cash-Karp but failing with this error: ...
1
vote
1answer
39 views

How to obtain and form a 1st order differential equation for leapfrog integration from second order one in this example of coulomb drag

I am currently doing a computational physics homework which asked us to use leapfrog to give the relations between timevelocities and time-distance of these two objects. The full question is as ...
0
votes
0answers
46 views

Finding second excited state of Schrödinger equation with secant Runge Kutta method

In our assignment, we are required to find the energies of the ground state and the first two excited states of the Schrödinger equation in a harmonic potential: $$V = \frac{50 x^2}{(10^{-11})^2}\, .$...
2
votes
1answer
69 views

Step size updating scheme adaptive embedded RK methods

If I have a RK method $y$ of order $p$ and a RK method $z$ of order $p-1$ I have read I can estimate the local error as $r_{n+1} = y_{n+1} - z_{n+1}$. First of all I don't see how this estimates the ...
1
vote
2answers
66 views

TVD for temporal dicretisation

I have come across schemes where TVD (with flux limiters) is used for spatial discretisation along with Runge-kutta for Temporal discretisation. Can TVD be used for Temporal discretisation? If so ...
1
vote
1answer
47 views

Why is it assumed that $c_i = \sum_{j=1}^sa_{i,j}$ in the butcher tableau of a RK-method?

In my textbook it is stated that we make a "simplifying assumption" $$c_i = \sum_{j=1}^sa_{i,j}, $$ where $c_i, a_{i,j}$ are the constants in the butcher tableau. What's the relevancy of this ...
1
vote
2answers
42 views

Determine conditions on parameters (for consistency) on RK method $y_{n+1} = y_n + ha_1f(t_n,y_n) + ha_2f(t_n + b_1h, y_n + b_2hf(t_n,y_n))$

I'm asked to find the conditions on the coefficients $a_1,a_2,b_1,b_2$ in the RK method $$y_{n+1} = y_n + ha_1f(t_n,y_n) + ha_2f(t_n + b_1h, y_n + b_2hf(t_n,y_n))$$ such that is consistent of (a) ...
3
votes
3answers
157 views

How well do explicit Runge-Kutta “tableau” methods compare to the state of the art ODE solvers and when do they fail?

How well do explicit Runge-Kutta "tableau" methods compare to the state of the art ODE solvers and when do they fail? I've been reading Butcher's ODE book and he does a good job at introducing ...
2
votes
1answer
95 views

Euler Method Instability. Why?

I am currently enjoying writing computational codes as a hobby. Right now I've worked out an Euler method and results are pretty good with up to $x=1$. Over $x=1$, instability starts to kick in. May I ...
1
vote
1answer
128 views

Runge-Kutta when time dependence not known

As a simple exercise for a class in computational methods for physics, we've learned how to implement the RK4 (Runge-Kutta 4th-order) algorithm for a very simple exponential decay. E.g. the function y(...
4
votes
2answers
121 views

Estimating error at mid timesteps for Runge-Kutta methods

When a timestep $h$ is rejected using a Runge-Kutta pair, such as Dormand–Prince, the algorithm resumes from the same initial point $t$ with a smaller timestep. A different idea is to resume at an ...
1
vote
1answer
83 views

Stability Criteria for Numerical Solution of Windkessel Ordinary Differential Equation

I'm trying to solve this equation (Windkessel equation) numerically as: $$C \frac{d P}{d t} + \frac{P}{R} = Q(t)$$ Where $C$ is compliance, $R$ is resistance, $P$ is pressure, and $Q(t)$ is a known ...
5
votes
2answers
130 views

Methods for precise solution of an ODE whose solution terminates at a singularity

I'm working on a fun open-source project to calculate the trajectories of objects near black holes. This is obviously not the first time anyone has done this sort of thing, but I have some design ...
5
votes
1answer
143 views

How can I apply Euler's Method to predict a point in time rotating around multiple axis'

I am xposting this from my original stackoverflow question where I was presented with a coding challenge that I have been able to narrow down extensively and I think it lies with Euler's Method. Here'...
0
votes
1answer
107 views

Prescribing variables as an excitation in Runge-Kutta method

I am using Runge-Kutta to solve a $3 \times 3$ 2nd order linear ODE $$M x'' + C x' + K x = 0$$ and initial conditions are all zeros. Then I prescribe the 2nd variable to follow a given path. As for ...
0
votes
1answer
33 views

Confirmation of FSAL property for IMEX methods by Kennedy and Carpenter

This question is a continuation of Fourth order IMEX Runge-Kutta method and Implementation details for high order IMEX methods by Kennedy and Carpenter. I need confirmation that ARK3(2)4L[2]SA by ...
2
votes
1answer
106 views

Implementation details for high order IMEX methods by Kennedy and Carpenter

This question is a continuation of Fourth order IMEX Runge-Kutta method, concerning the implementation. Is seems to me that the first implicit stage value involves a direct evaluation, rather than ...
0
votes
1answer
87 views

Runge-Kutta timestep in atomic units

I'm using 4th order RK to solve the schroedinger equation in atomic units. Say I want to simulate 400fs in intervals of h=10fs, then in atomic units this is h=413a.u and 400fs=16500a.u. 4RK involves ...
5
votes
2answers
261 views

Do there exist low-storage Runge–Kutta methods with an order larger than four?

I’m trying to find a Runge–Kutta integrator that only requires the absolute minimum of storage, i.e. it fulfills one of the following three, presumably equivalent criteria: Each evaluation of the ...
3
votes
2answers
292 views

Developping PDE with Python symbolically and numericaly

I feel like publishing some previous works from my PhD thesis. I was using Mathematica to build a system of 2N partial differential equations for 2N functions by symbolic spatial Taylor expansion, ...
0
votes
1answer
688 views

4th order runge-kutta and harmonic oscillator [closed]

I am trying to solve equations of motion for an harmonic oscillator using 4th order runge kutta method, but as a result I get almost constant velocity and position; I feel that the problem is that I ...
1
vote
0answers
73 views

Successive iteration method for solving eigenvalue ploblem

I have a question concerning the branch of successive iteration methods (Newton, Runge-Kutta). I definitely know (or can read in Wikipedia) the implementation of these methods. But I was wondering ...
3
votes
2answers
239 views

Runge Kutta and Milstein – system of second-order coupled differential equations with noise

I would like to solve a system of second-order differential equations to describe the dynamics of a system of particles. Two Newton-like forces are responsible for the motion of each particle $i$: A ...
9
votes
1answer
238 views

Easily understandable argument that normal Runge–Kutta methods cannot be generalised to SDEs?

A naïve approach to solving stochastic differential equations (SDEs) would be: take a regular multi-step Runge–Kutta method, use a sufficiently fine discretisation of the underlying Wiener process, ...
6
votes
3answers
1k views

4th order Runge-Kutta for $y' = y$

My question is quite simple, but the more I look at it, the less content I am. My question is how to do a RK4 method for $y'=y$. At first I would assume the following: $$k_1=y_n$$ $$k_2=y_n+\frac{...
0
votes
1answer
120 views

ODE System doesn't work when step size (h) is bigger than 1

I am a beginner to Python. Currently I'm writing a code for developing a simple solver for non-linear ODE systems with initial value. The equations of the system are The function of myu is evaluated ...
15
votes
1answer
1k views

BDF vs implicit Runge Kutta time stepping

Are there any reasons for why one should choose high order implicit Runge Kutta (IMRK) over BDF time stepping? BDF seems much easier to me as $q$ stage IMRK needs $q$ linear solves per time step. ...
1
vote
0answers
85 views

How and when to use IMEX runge-kutta

i have come across method of IMEX Runge-Kutta written by Kennedy and Carpenter in july 2001. The method consist of two kind that is "implicit and explicit" can i use the ERK@explicit part only to ...
2
votes
0answers
811 views

Using RK2 Method to solve the simple harmonic oscillator of a horizontal mass on a spring (1D)

Being new to numerical analysis techniques, in particular RK2, I decided the best way to jump in is by using python to solve the well known mass-spring oscillator using RK2 techniques. My problem is ...
2
votes
1answer
1k views

4th order Runge-Kutta Method for Driven Damped Pendulum

Although I've been looking everywhere, I have been unable to find an answer to my question so here it is. For a driven damped pendulum the equation of motion in dimensionless units is, $$\alpha(\...
1
vote
1answer
113 views

VTK: Missing Streamlines due to error in Runge-Kutta method?

We are using Kitware VTK to visualize our models. When we display streamlines, it sometimes happens that a single streamline is left out. This can be especially seen when duplicating a model several ...
1
vote
1answer
236 views

Higher-order Verlet integration

I'm using a simple version of Verlet integration for a particle–particle interaction system with collisions. At the end of each iteration, I integrate like this: ...
2
votes
1answer
51 views

Can 3rd order TVD admit perfect shift for Upwind 1D Advection equation?

I recently coded a 1 stage and 3 stage optimal TVD-RK explicit scheme using eqn 3.3 here http://www.ams.org/journals/mcom/1998-67-221/S0025-5718-98-00913-2/ on the equation Ux+Uy=0, where x and y ...
1
vote
1answer
219 views

Numerical Free Fall Analysis with RK4

I am trying to calculate real speed and time in free fall of a body. I wrote a code in Fortran and I am trying to improve it by using RK4 method x=time y=total free fall Purple line using: ...
4
votes
2answers
467 views

Time discretization: Runge-Kutta methods vs. standard backward difference

I've recently written a code that solves the incompressible/low-Mach number formulation of the Navier-Stokes equation with high-order methods for both time and space. My advisor insisted that I use ...
1
vote
2answers
314 views

implementation of method of line and Runge-Kutta to the given equation

$$\frac{d^2 u}{dx^2} +A \frac{d^2}{dx^2}\left(\frac{du}{dt}\right)=B $$ I want to solve the equation given above. I need to first discretize it by the Method of Lines and then evolve the resulting ...
17
votes
4answers
6k views

Why are higher-order Runge–Kutta methods not used more often?

I was just curious as to why high-order (i.e. greater than 4) Runge–Kutta methods are almost never discussed/employed (at least to my knowledge). I understand it requires greater computational time ...
0
votes
1answer
237 views

Runge-Kutta Stability Regions

Based on this link, in particular Figure 1, what is the exact meaning of the plot? To my understanding, it implies that for a given differential equation: $$ \frac {dy}{dt} = \lambda y $$ that the ...
-2
votes
1answer
277 views

Comparison between CashKarp Method and Dormand Prince Method - Runge Kutta Method

Can Cash Karp Method be used for integrating a nonsmooth solution ?. Because Dormand Prince method gives an error while integrating nonsmooth solution How can nonsmooth function can be integrated? I ...
2
votes
0answers
443 views

Scaling step size in adaptive runge-kutta method

I'm developing my own generic Runge-Kutta solver, and I'm currently implementing the adaptive step-size routine. I say generic because I want to be able to test different RK implementations by only ...
3
votes
1answer
251 views

Runge Kutta solution blows up for a first order ODE with very large coefficients

I am solving a first-order ODE: $\frac{\partial \rho }{\partial t} = -a \rho^2 + b |A(t)|^2 \rho +c|A(t)|^{2m}$ This is the evolution of the plasma density in the presence of a laser pulse (complex ...
1
vote
0answers
121 views

Preventing numerical oscillations with Cash-Karp method

I am implementing an ODE solver using the Cash-Karp method on equations with the following form: $$ \frac {d E}{d z} = - \frac {1}{\mu_0c} \frac {d ^2 E}{d z^2} + \frac {i}{\mu_0c}E \tag{1} $$ And ...