Questions tagged [differentialequations.jl]
The differentialequations.jl tag has no usage guidance.
110
questions
3
votes
1
answer
58
views
Where to find the code for ESRK1 and RSwM1 in the Julia library source code?
I'm trying to implement the SDE solver called ESRK1 and the adaptive stepsize algorithm called RSwM1 from Rackauckas & Nie (2017). I'm writing a python implementation, mainly to confirm to myself ...
0
votes
0
answers
27
views
Finite difference operators for PDE solving in Julia (DiffEqOperators alternative)
In the past I was using DiffEqOperators.jl to solve PDEs on a nonuniform grid, but now that this package has been archived I am struggling to find an alternative which provides the same functionality.
...
0
votes
1
answer
103
views
How to save ODE solution only at the last step while using Callbacks in Julia
I am solving the following ode, using Julia. The code I am using is as follows:
using DelimitedFiles
using LinearAlgebra
using Random
using Distributions
using DifferentialEquations
...
1
vote
0
answers
71
views
How to model species interactions (interaction matrix) for inverse problem modelling with SciML software
I have a probably simple question that I haven't found an answer to. I'm building ODEs for a competitive Lotka Volterra model in order to perform inverse modelling. I first built a 3 species dummy ...
0
votes
2
answers
82
views
Julia Differential Equations: Kuramoto model as DDE: Results don't converge when constant_lags are specified
Copy-pasting from the issue I opened on github (https://github.com/SciML/DifferentialEquations.jl/issues/983).
Hello,
Here is my problem: I am trying to simulate the Kuramoto model with time delays ...
0
votes
2
answers
91
views
Error when attempting to solve Ordinary Differential equation using Symplectic solver in Julia
using LinearAlgebra
using PyPlot
using Random
using DifferentialEquations
N = 100
σ, a, J, K = 10.0, 1.0, 1.0,-0.1;
ω = zeros(N);
function heaviside(x::Real)
return x >= 0.0 ? 1.0 : 0.0
...
-1
votes
1
answer
32
views
Error using Latexify.jl: type LotkaVolterra has no field funcs
I'm trying to follow along with this tutorial https://www.youtube.com/watch?v=KPEqYtEd-zY and I encounter the error "type LotkaVolterra has no field funcs" when I run the latexalign function....
0
votes
1
answer
36
views
Julia throws error when running an example from DifferentialEquations.jl
I am trying to solve stochastic delay differential equations in Julia. I was not successful in figuring out the Syntax from the manual, so I tried to run some examples. Running the example from here:
...
1
vote
1
answer
58
views
Julia Differential Equations Repositories
Is there a repository (or a web page) of all differential equations coded in DifferentialEquations.jl or at least ODE in OrdinaryDiffEq.jl?
If there are no repositories, are there other sources, ...
1
vote
1
answer
111
views
How can I implement an integration termination callback in DifferentialEquations.jl to solve an ODE?
Need help implementing a integration termination callback in DifferentialEquations.jl.
Greetings,
I have the code
function height(dh, h, p, t)
dh[1] = -1*sqrt(h[1])
end
h0 = [14]
...
0
votes
0
answers
49
views
How can I solve a non-autonomous ODE using DifferentialEquations.jl and Julia
How to solve this autonomous ODE using DifferentialEquations.jl?
I'm using Pluto notebooks for the Differential Equations class I'm teaching this semester.
I'm having problems using ...
0
votes
1
answer
60
views
Sundials for larger system of chemical plant
I am trying to solve a rather larger system of differential algebraic equations (DAEs) using Sundials. The DAEs contain both algebraic and differential variables.
To get the initial conditions for the ...
1
vote
1
answer
180
views
How to use a callback in DifferentialEquations.jl to simulate a hammer blow to a mass in a spring-mass system?
I'm teaching Differential Equations and am using Pluto notebooks with DifferentialEquations.jl to supplement the course. We are currently trying to model a spring-mass system that is subject to an ...
0
votes
1
answer
81
views
Passing Jacobian to Julia through the diffeqpy python package
I have a Python package that defines an ODE y'=f(y) corresponding to the semi-discretisation in space of a heat-like equation.
I want to test some integrators availabe in the DifferentialEquations ...
0
votes
2
answers
148
views
How to solve the error "UndefVarError: InterpolatingAdjoint not defined" using differentialequations.jl in Julia
I'm trying to solve the LotkaVolterra problem that Chris Rackauckas explained in the JuliaCon 2020 and get an error when try to calculate the loss between the prediction and the values.
I have a ...
0
votes
2
answers
191
views
Dynamic function invocation, InvalidIRError with DiffEqGPU.EnsembleGPUKernel
EDIT4: The problem seems to be much larger and I will be refraining from further investigating this type of EnsembleProblem on GPU. Below is the last working code (that has nothing to do anymore with ...
2
votes
1
answer
215
views
Julia DifferentialEquations.jl: EnsembleProblem where tspan is varied
I am currently working on some ensemble problems where I vary quite a few parameters of an ODE. The ODE in code is given by sys! below. It certainly is quite easy to vary the parameters, w, ...
1
vote
1
answer
142
views
Exclamation mark in Julia "!" after function in scripts
I am trying to save multiple solutions of my ODE in an Array. Right now this is what I got:
sols = []
for i in 1:numSim
if solver == "Rosenbrock23"
solution = solve(odeprob, ...
1
vote
1
answer
226
views
How to optimize the julia differential equation solution
I am running the following Julia code to solve a set of differential equations, but it takes too much time, and sometimes my machine gets crushed. Is there any solution to reduce the running time and ...
0
votes
1
answer
153
views
storing the solution of differential equation takes too long time
I am solving a differential equation whose solution comes up with size (2000,2000000),
i.e., size(sol)=(2000,2000000).
Now I want to store the time evolution of first 1000 variable to an array.
for ...
1
vote
1
answer
1k
views
How do I setup the timestep when using DifferentialEquations.jl in Julia for an irregular time series?
Playing with the harmonic oscillator, the differential equation is driven by a regular time series
w_i in the millisecond range.
ζ = 1/4pi # damped ratio
...
1
vote
1
answer
84
views
Method for measuring the percentual of time span in a Differential Equation solver
I use Differential Equations from julia (previously solve_ivp from scipy) and it would be very convenient for me to have a notion of the amount of time steps that have occured.
For example, if my ...
0
votes
1
answer
116
views
DynamicalODEProblem not compatible with EnsembleProblem?
I'm trying to use the EnsembleProblem feature, where in my case prob is a DynamicalODEProblem(f1, f2, v0, u0, tspan). I'd like my ensemble to span different initial conditions for the same ODE.
...
1
vote
0
answers
315
views
Using the GPU with Lux and NeuralPDE Julia
I am trying to run a model using the GPU, no problem with the CPU. I think somehow using measured boundary conditions is causing the issue but I am not sure. I am following this example: https://...
2
votes
1
answer
82
views
Decoupled ODEs in Julia
The Lorenz attractor is the archetypal example in Julia documentation for solving systems of ODEs using DifferentialEquations.jl. Suppose I would like to solve that system for one thousand different ...
1
vote
1
answer
97
views
BoundsError when providing sparsity pattern to DifferentialEquations.jl
I'm trying to solve a set of stiff ordinary differential equations using DifferentialEquations.jl. It works fine when I'm just providing the ODE functions with or without the Jacobian, however when I'...
2
votes
0
answers
128
views
Julia DifferentialEquations.jl all variable output
I have the following example:
using DifferentialEquations
function test1(du,u,p,t)
a,b,c = p
d=a^0.1*(t+1)
e=u[1]/a
f=u[2]/d
du[1] = a*u[1]
du[2] = d*u[2]
du[3] =...
4
votes
0
answers
129
views
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 ...
1
vote
1
answer
73
views
Does the command "expectation" in Distributions.jl not work recently?
I tried the following commands
using DiffEqUncertainty, Distributions
expectation(g, prob, u0_dist, p)
Of course, the second command is not correct and many arguments are still missing, but it still ...
2
votes
1
answer
115
views
TypeError in Julia/Turing when sampling for a forced differential equation
I am new to Julia and Turing and am trying to fit a forced 0-D box ODE to data, but I get type error when doing sampling.
Following this page (solve system of ODEs with read in external forcing), I ...
1
vote
1
answer
400
views
Sciml conflict using DiffEqFlux
I'm getting an error using sciml to train a DiffEqFlux tutorial. I used the same exact code with some modifications last summer with no problems but can't seem to find a solution. I am using Julia v....
1
vote
1
answer
136
views
Puzzling result from boundary condition code in Julia BVP solver
I am trying to solve a boundary value problem in Julia, following the example found here, using the BoundaryValueDiffEq package. In the boundary condition function, the example requires a for loop to ...
1
vote
1
answer
278
views
Solving IVPs with vectors in Julia DifferentialEquations
I am fairly new to Julia, so apologies in advance. I am trying to simultaneously solve two differential equations in Julia and having trouble. I have a MWE in Python, which is:
import numpy as np
from ...
0
votes
2
answers
351
views
DifferentialEquations.jl multithreading
The code below is solving an ODE with different variables, and PAs corresponding to diffrent Δs the only data I'm interested in after each loop. Since the loops are independent I assume I can ...
1
vote
0
answers
52
views
Error when using CorrelatedWienerProcess with VectorContinuousCallback
I am trying to simulate stochastic population dynamics using CorrelatedWienerProcess to add the noise. To prevent populations going negative I am using callbacks. Ideally I would like to use ...
1
vote
1
answer
298
views
How to solve a 4th order differential equation in space and time variables in Julia
I am relatively new to solving differential equations in Julia and thus cant figure out how to solve a higher order ode in 2 independent variables(space and time) and thus would request for assistance....
3
votes
2
answers
675
views
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 ...
3
votes
2
answers
439
views
Is there any faster method to solve differential equations with multidimensional array
I want a solve a complex network system involving higher-order interaction terms acting through a multidimensional array. I have written the corresponding code but it takes too much time to get my ...
2
votes
1
answer
286
views
How can I evaluate and take the derivative of a neural net in Julia
I have solved a differential equation with a neural net. I leave code below with an example. I want to be able to compute the first derivative of this neural net with respect to its input "x"...
2
votes
0
answers
228
views
ModelingToolkit: 2nd order differential equation and equivalent 1st order system give different answers
I am trying to solve a 2nd order differential equation with ModelingToolkit.jl in Julia:
using ModelingToolkit
using DifferentialEquations: solve
using Plots: plot
@variables s ρ(s) Dρ(s)
@parameters ...
1
vote
0
answers
139
views
Heston model example from DifferentialEquations.jl giving Bridging distribution error
While trying to run a code which is paraphrasing the DE tutorial on SDE's, I'm getting the following stacktrace (only the first few lines):
Bridging distribution is unknown. Cannot use adapativity
...
1
vote
0
answers
67
views
Incorporating forcing functions in the ODE model for Bayesian estimation
I am new to Turing package in Julia, and need some help!
I have been trying to estimate the parameters of a model with a discrete forcing function q(t), where the values of q(t) are discrete and are ...
3
votes
2
answers
630
views
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 ...
1
vote
1
answer
202
views
Simulating a reflecting boundary SDEProblem
I'm trying to simulate a reflecting boundary. Based on the suggestions found here: Stochastic differential equation with callback in Julia I tried
using DifferentialEquations
using Plots
using Random
...
2
votes
1
answer
453
views
How to use ModelingToolkit.jl to create variables dynamically
The main problem is that my variables would be determined only after running the codes (because the number of variables is not fixed).
In old version ModelingToolkit.jl, I used the following codes to ...
0
votes
1
answer
254
views
Ways to Improve Universal Differential Equation Training with sciml_train
About a month ago I asked a question about strategies for better convergence when training a neural differential equation. I've since gotten that example to work using the advice I was given, but when ...
0
votes
1
answer
81
views
How to guarantee convergence when training a neural differential equation?
I'm currently working through the SciML tutorials workshop exercises for the Julia language (https://tutorials.sciml.ai/html/exercises/01-workshop_exercises.html). Specifically, I'm stuck on exercise ...
2
votes
1
answer
676
views
FFTW.jl for 2D array: Diffusion only happening in 1D
From what I have read, using FFTW.jl / AbstractFFTs.jl's fft(A) when A is a 2D array should perform fft in 2D, not column-wise. Any idea why I am seeing only column-wise diffusion when (I think) I'm ...
1
vote
1
answer
240
views
Issue with solving a DDE in Julia
I am trying to use Julia’s DifferentialEquations.jl package to solve a DDE system. I was able to solve my problem for two objects using the code below
clearconsole()
@time using DifferentialEquations
...
4
votes
1
answer
328
views
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*...