Hi everyone !
I am searching for some way to solve the following non linear P(I)DE, known as the neural field equation:
for some scalar \alpha and functions w,f. The parameters I used in the script below are \alpha=1, f(u) = \min(u,1) and w(y,x) = \exp(-|y-x|).
I tried MethodOfLines.jl
and in particular this doc, but did not succeed. Here is the script I tried inspired from the doc.
using MethodOfLines, ModelingToolkit, DomainSets, OrdinaryDiffEq, Plots
# Parameters of the PDE and initial condition
tmin = 0.0
tmax = 200.0
α = 1.0
f(u) = (u < 1.0) * u + (u >= 1.0) * 1.0
w(y,x) = exp(-abs(y-x))
xmin = -10.0
xmax = 10.0
u_in(x) = 1.0 * (-1.0 < x) * (x < 1.0)
# Parameters, variables, derivatives and integral
@parameters t x y
@variables u(..) integrand(..)
Dt = Differential(t)
Iy = Integral(y in DomainSets.ClosedInterval(xmin, xmax))
eqs = [
Dt(u(t, x)) + α * u(t, x) ~ Iy(integrand(t, x, y))
integrand(t, x, y) ~ w(y, x) * f(u(t, y))
]
bcs = [
u(0, x) ~ u_in(x),
integrand(0, x, y) ~ w(y, x) * f(u_in(y))
]
domains = [
t ∈ Interval(tmin, tmax),
x ∈ Interval(xmin, xmax),
y ∈ Interval(xmin, xmax)
]
@named pde_system = PDESystem(eqs, bcs, domains, [t, x, y], [u(t, x), integrand(t, x, y)])
# Method of lines discretization
discretization = MOLFiniteDifference([x => 100, y => 100], t)
prob = discretize(pde_system, discretization)
At this point, the following error is raised:
ERROR: AssertionError: There must be the same number of equations and unknowns, got 2 equations and 3 unknowns
I don’t understand what “unknowns” means here. I thought it was the number of objects created by @variables
…
I recently posted this related topic.