Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
2
votes
0answers
52 views

What exactly is the cause(s) of blow-up for too-large step size in a method like RK4?

I have been working on creating a few home-made numerical methods, and I am using them to visualize text-book problems from my Strogatz dynamics textbook. It feels like a good way to learn numerical ...
1
vote
1answer
69 views

Runge-Kutta fourth order method. Integrating backwards

I am using a Runge-Kutta fourth order method to solve numerically the usual equation of motion of a background scalar field in curved spacetime with a quartic potential: $\phi^{''}=-3\left(1+\frac{H^{...
1
vote
1answer
65 views

How to Break Coupled ODEs down to first order for Runge-Kutta

My question might seem a bit simple. I am trying to solve a system of ODEs using Runge-Kutta method. I am having difficulty breaking down the equations into a system of first order ones required ...
1
vote
0answers
63 views

Runge-Kutta for PID and system in separate calculations without filter

I need to calculate a closed-loop system in Python; specifically, obtain the PID response and then use the output to obtain the system response sample-by-sample with my own loop. For this, I am ...
0
votes
2answers
53 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
53 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
70 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
50 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 ...
0
votes
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
135 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
157 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
347 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
65 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
44 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
50 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
76 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
67 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
48 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
171 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
97 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
214 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
123 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
88 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
131 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
162 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
121 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
39 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
121 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
98 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
301 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
320 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
838 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
74 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
257 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
252 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
125 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 ...
16
votes
1answer
2k 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
87 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
935 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
117 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
252 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
225 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
490 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
330 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
256 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 ...