The error comes from attempting to import the Radau method from scipy.integrate (needed because the Oregonator model is a stiff system).
I am attempting to numerically integrate the Oregonator model to show that there must be some transition point between the 0 and 3 for the parameter f such that in a particular subset of this interval, oscillations occur.
Forgive my inexperience, I'm new to Python.
Error: ImportError: cannot import name 'radau' from 'scipy.integrate'
In my ignorance, I constructed a 4th Order Runge-Kutta method from scratch. Having found stock prices instead of chemical oscillations, I transitioned to using odeint. This still failed. It was only after this that I discovered the idea of a stiff system, so I have been working on the Radau method.
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate. import radau
# Dimensionless parameters
e = 0.04
q = 0.0008
f = 1.0
# Oregonator model
def Oregonator(Y, t):
return [((Y[0] * (1 - Y[0]) - ((Y[0] - q) * f * Y[1]) // (q + Y[0])))
// e, Y[0] - Y[1]]
# Time span and inital conditions
ts = np.linspace(0, 10, 100)
Y0 = [1, 3]
# Numerical algorithm/method
NumSol = radau(Oregonator, 0, Y0, t_bound=30)
x = NumSol[:,0]
z = NumSol[:,1]
Expected results should be oscillations like those found in (page 12): https://pdfs.semanticscholar.org/0959/9106a563e9d88ce6442e3bb5b242d5ccbdad.pdf for x and z only. The absence of y is due to a steady-state approximation I have used.