Questions tagged [ode]

An ODE (ordinary differential equation, in contrast to partial differential equation) is a differential equation containing a function or functions of exactly one independent variable.

An ODE (ordinary differential equation, in contrast to partial differential equation) is a differential equation containing a function or functions of exactly one independent variable. Equations of this type can be solved numerically or analytically.

1524 questions
33
votes
1 answer

What is "Signal 15 received"

What might cause a C, MPI program using a library called SUNDIALS/CVODE (a numerical ODE solver) running on a Gentoo Linux cluster to give me repeated Signal 15 received.? Is that code being issued by MPI, Sundials, Linux, C or who? Note that I am…
Jeff
  • 667
  • 2
  • 7
  • 17
25
votes
5 answers

Using adaptive step sizes with scipy.integrate.ode

The (brief) documentation for scipy.integrate.ode says that two methods (dopri5 and dop853) have stepsize control and dense output. Looking at the examples and the code itself, I can only see a very simple way to get output from an integrator. …
Mike
  • 15,696
  • 10
  • 49
  • 75
20
votes
6 answers

Pass args for solve_ivp (new SciPy ODE API)

For solving simple ODEs using SciPy, I used to use the odeint function, with form: scipy.integrate.odeint(func, y0, t, args=(), Dfun=None, col_deriv=0, full_output=0, ml=None, mu=None, rtol=None, atol=None, tcrit=None, h0=0.0, hmax=0.0, hmin=0.0,…
sharkmas
  • 255
  • 2
  • 8
17
votes
2 answers

What is the difference between scipy.integrate.odeint and scipy.integrate.ode?

I have read the docs for these here, but it just states that odeint is "an integrator with a simpler interface based on lsoda from ODEPACK" What is the actual difference? Under what circumstances is using one more appropriate than the other?
Dipole
  • 1,528
  • 2
  • 19
  • 31
14
votes
2 answers

is there a c++ library for ordinary differential equation (ODE) solvers?

More specifically, i'm interested in 8th order Dormand-Prince embedded method, it's based on Runge-Kutta, and stiff equations. I use Numerical Recipes 3 but i often have trouble compiling their libraries. I'd like to know of alternatives.
kirill_igum
  • 3,703
  • 5
  • 37
  • 68
12
votes
2 answers

Multiple scipy.integrate.ode instances

I would like to use scipy.integrate.ode (or scipy.integrate.odeint) instances in multiple threads (one for each CPU core) in order to solve multiple IVPs at a time. However the documentation says: "This integrator is not re-entrant. You cannot have…
Matthias
  • 223
  • 3
  • 11
11
votes
1 answer

Differential Equations in Java

I am trying to create a simple simulation program of SIR-epidemics model in java. Basically, SIR is defined by a system of three differential equations: S'(t) = - l(t) * S(t) I'(t) = l(t) * S(t) - g(t) * I(t) R'(t) = g(t) * I(t) S - susceptible…
Sergei G
  • 1,339
  • 3
  • 21
  • 40
10
votes
2 answers

Odd SciPy ODE Integration error

I'm implementing a very simple Susceptible-Infected-Recovered model with a steady population for an idle side project - normally a pretty trivial task. But I'm running into solver errors using either PysCeS or SciPy, both of which use lsoda as their…
Fomite
  • 1,983
  • 5
  • 28
  • 45
9
votes
2 answers

Absolute error of ODE45 and Runge-Kutta methods compared with analytical solution

I would appreciate if someone can help with the following issue. I have the following ODE: dr/dt = 4*exp(0.8*t) - 0.5*r ,r(0)=2, t[0,1] (1) I have solved (1) in two different ways. By means of the Runge-Kutta method (4th order) and by means…
8
votes
2 answers

non linear regression with random effect and lsoda

I am facing a problem I do not manage to solve. I would like to use nlme or nlmODE to perform a non linear regression with random effect using as a model the solution of a second order differential equation with fixed coefficients (a damped…
denis
  • 4,710
  • 1
  • 8
  • 33
8
votes
1 answer

Julia DifferentialEquations.jl speed

I am trying to test the speed of Julia ODE solvers. I used the Lorenz equation in the tutorial: using DifferentialEquations using Plots function lorenz(t,u,du) du[1] = 10.0*(u[2]-u[1]) du[2] = u[1]*(28.0-u[3]) - u[2] du[3] = u[1]*u[2] -…
JianghuiDu
  • 189
  • 7
8
votes
2 answers

Replacing negative values in a model (system of ODEs) with zero

I'm currently working on solving a system of ordinary differential equations using deSolve, and was wondering if there's any way of preventing differential variable values from going below zero. I've seen a few other posts about setting negative…
Dorian
  • 83
  • 5
8
votes
0 answers

How to use stans integrate_ode x inputs?

Recently stan has added the integrate_ode method. Unfortunately the only documentation I can find is the stan reference manual (p.191ff). I have a model that would require some driving signal. As I understand the parameter x_r and x_i are supposed…
bdecaf
  • 4,469
  • 20
  • 40
8
votes
1 answer

Does scipy.integrate.ode.set_solout work?

The scipy.integrate.ode interface to integration routines provides a method for stopping the integration if a constraint is violated at any step, set_solout. However, I cannot get this method to work, even in the simplest examples. Here's one…
Ted Pudlik
  • 632
  • 7
  • 25
7
votes
1 answer

Solve ODE in Python with a time-delay

Can anybody give me some advice how to solve an ODE in Python that has a time-delay implemented in it? I can't seem to figure out how to do it using scipy.integrate.odeint. What I am looking for should look like: # the constants in the equation b =…
ThePiIsALie
  • 71
  • 1
  • 4
1
2 3
99 100