Questions tagged [differentialequations.jl]
103 questions
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
- 319
- 2
- 9
7
votes
1 answer
Solve the Heat Equation with non-zero Dirichlet BCs with Implicit Euler and Conjugate Gradient Linear Solvers?
Many users have asked how to solve the Heat Equation, u_t = u_xx, with non-zero Dirichlet BCs and with conjugate gradients for the internal linear solver. This is a common simplified PDE problem before moving to more difficult versions of parabolic…

Chris Rackauckas
- 18,645
- 3
- 50
- 81
7
votes
1 answer
Parabolic PDEs in julia
I am trying to solve a parabolic partial differential equation numerically using Julia, but I cannot find any accessible documentation that can help.
Here is an example: t, x are 1 dimensional real. I want to solve for u(t,x)=[u1(t,x) u2(t,x)]; u…

user306330
- 73
- 3
5
votes
1 answer
Second order differential equation in Julia
I'm new to Julia programming I managed to solve some 1st order ODE, but when I thought to move to the second order I don't know how to use the solver to implement to the required equation.
I want to solve this equation
y" + y = 0
with initial…

Saravanan T
- 73
- 4
5
votes
1 answer
Using Complex Numbers in ODE Problem returns Inexact Error
I am trying to implement to Swing equation for a n-Machine system using Julia.
When i run the following code I get this Error Message:
LoadError: InexactError: Float64(0.0 + 1.0im)
in expression starting at…
user12158459
4
votes
0 answers
Strange Memory Allocations with DifferentialEquations.jl
I'm observing very strange and large memory allocations while solving a standard ODE and evaluating it at given times. However, after the first benchmark, if (and only if!) I recompile the integrated function these allocations disappear.
using…

7vn_
- 63
- 6
4
votes
2 answers
Reducing memory allocation in DifferentialEquations.jl
I'm using DifferentialEquations.jl to solve an ODE system as shown below. The result is not really relevant since p only contains test parameters for the purpose of producing a MWE, but the key is that I am seeing a lot of memory allocation despite…

jul345
- 83
- 4
4
votes
1 answer
Arbitrary precision arithmetic in JIT compiled functions
When I use numba inside python I know that if I try to jit-compile functions which have arbitrary precision floats (mpmath) inside their loops, it will fail to compile in nopython mode and its speed will be same as plain python version. My question…

Giorgi Bakhtadze
- 249
- 1
- 6
4
votes
1 answer
Trouble with DifferentialEquations.jl
I'm quite new to Julia and I'm currently learning how to solve differential equations with it. I tried to run a simple pre-made code by Christopher Rackauckas, but I got an error. The code can be found here. I will also write it here:
using…

maikkirapo
- 155
- 9
4
votes
1 answer
Why both tableau and explicit solver in DifferentialEquations.jl?
I am looking through the DifferentialEquations.jl package. In
DiffEqDevTools/src/ode_tableaus.jl I can see the tableaux for
Midpoint and RK4.
But I can also see explicit code for these schemes…

idontgetoutmuch
- 1,621
- 11
- 17
3
votes
2 answers
Julia Differential Equations suppress warning of detected instabilities
I have a program that simulates the paths of particles using the Differential Equations package of Julia. The simulation allows for particles to hit devices - to prevent the continued simulation of such particles, I use the unstable_check of the…

MetaColon
- 2,895
- 3
- 16
- 38
3
votes
2 answers
Parallelizing code for solving simultaneous ODEs (DifferentialEquations.jl) - Julia
I have the following coupled system of ODEs (that come from discretizing an integrodifferential PDE):
The xi's are points on an x-grid that I control. I can solve this with the following simple piece of code:
using DifferentialEquations
function…

dapias
- 2,512
- 3
- 15
- 23
3
votes
1 answer
Second order ODE in Julia giving wrong results
I am trying to use the DifferentialEquations.jl provided by julia, and it's working all right until I try to use it on a second order ODE.
Consider for instance the second order ODE
x''(t) = x'(t) + 2* x(t), with initial conditions
x'(0) = 0, x(0)…

Trirac
- 31
- 2
3
votes
0 answers
Comlex Valued Parameter Estimation in Julia using DifferentialEquations
I want to estimate my complex parameters of an ODE using Optim and DifferentialEquations.
I built an example case by changing the parameters in the example from the…
user12158459
3
votes
2 answers
How can I run a simple parallel array assignment operation in Julia?
I have to solve a differential equations system many times, iterating over a parameter. For this, I run a loop over a list of the parameter, and store the solution (evaluated at an array of time values) for each parameter. So I have a 2D array in…

hg153
- 87
- 5