Questions tagged [differentialequations.jl]

103 questions
0
votes
2 answers

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 multithreading the loops so I add Threads.@threads in…
0
votes
1 answer

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 I applied what the same advice to a more…
0
votes
1 answer

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 6 part 3, which involves training a neural…
0
votes
1 answer

.= operator in Julia

In the code taken from: https://tutorials.sciml.ai/html/models/01-classical_physics.html as given below: # Simple Harmonic Oscillator Problem using OrdinaryDiffEq, Plots # Parameters ω = 1 # Initial Conditions x₀ = [0.0] dx₀ = [π/2] tspan = (0.0,…
user8210645
0
votes
1 answer

Nonhomogeneous ODE with discrete forcing function using DifferentialEquations package in Julia

In Julia, I want to use DifferentialEquations.jl package to solve \ddot{u} + f(u,\dot{u},p) = g(t) where g(t) is in given as a vector of values at equidistanced instants of time t. This situation is different from one…
0
votes
1 answer

Why does Julia (DifferentialEquations.jl) JumpProblem stop jumping at later times?

I am trying to implement a discrete stochastic simulation using tools from DifferentialEquations.jl. It works great for earlier time-points but does not do any jumps later on, inexplicably. using DifferentialEquations using Plots #initial…
0
votes
1 answer

Julia DifferentialEquations for state-to-state binary mixture kinetics

I'm quite new to Julia and I'm considering the following problem. I'd like to solve the (possible stiff) ODE system which describes the relaxation of a flow behind a shock wave according to a state-to-state approach which means that each vibrational…
lorenzowz
  • 13
  • 4
0
votes
1 answer

Stochastic differential equation sensitivity analysis with specified noise

I am trying to calculate the gradient of a functional of a stochastic differential equation (SDE) solution given a specific realization of the noise. I can successfully calculate these gradients if I leave the noise unspecified, as shown in…
0
votes
1 answer

How to fix "LoadError: DimensionMismatch ("cannot broadcast array to have fewer dimensions")"

I'd like to solve the following two coupled differential equations numerically: d/dt Phi_i = 1 - 1/N * \sum_{j=1}^N( k_{ij} sin(Phi_i - Phi_j + a) d/dt k_{ij} = - epsilon * (sin(Phi_i - Phi_j + b) + k_{ij} with defined starting conditions phi_0…
hanf_lolo
  • 13
  • 4
0
votes
2 answers

Julia DifferentialEquation package stopped working after update

I added the Vega package and tried rerunning some DiffEq code and am now getting the following [ Info: Precompiling DifferentialEquations [0c46a032-eb83-5123-abaf- 570d42b7fbaa] ERROR: LoadError: LoadError: LoadError: UndefVarError: @pack not…
Gregory
  • 341
  • 1
  • 2
  • 10
0
votes
1 answer

How do I write a piecewise Differential Equation in Julia?

I am new to Julia, I would like to solve this system: where k1 and k2 are constant parameters. However, I=0 when y,0 or Ky otherwise, where k is a constant value. I followed the tutorial about ODE. The question is, how to solve this piecewise…
-1
votes
1 answer

parabolic_squaremesh not defined in DifferentialEquations

I'm trying to reproduce an example from a tutorial and I get stuck with meshes not being defined: using DiffEqBase using DiffEqPDEBase f(t,x,u) = ones(size(x,1)) - .5u u0_func(x) = zeros(size(x,1)) tspan = (0.0,1.0) dx = 1//2^(3) dt = 1//2^(7) #…
Frank
  • 26
  • 2
1 2 3 4 5 6
7