Integrodifferential PDE with NeuralPDEs - Julia

Viewed 123

I am trying to numerically solve an integrodifferential PDE with NeuralPDE.jl. The equation has an analytical solution in the Laplace domain, and therefore I can validate the numerical solution. The equation is

enter image description here

With beta a parameter. As a first step, I followed blindly the example provided in the documentation adapting only the obvious things. This is my first attempt:

using NeuralPDE, Flux, ModelingToolkit, GalacticOptim, Optim, DiffEqFlux, DomainSets
import ModelingToolkit: Interval, infimum, supremum

@parameters t E
@variables i(..)

Dt = Differential(t)
DE = Differential(E)
IE = Integral(E in DomainSets.OpenInterval(0,Inf))

beta = 2.0;
eq = Dt(i(t, E)) + exp(-beta*E)*i(t, E) - IE(i(t,E)*exp(-beta*E))*exp(-E) ~ 0
bcs = [i(0., E) ~ exp(-E)]
domains = [t ∈ Interval(0.0,100.0), E ∈ Interval(0.0, 10.0)]

chain = Chain(Dense(1,15,Flux.σ),Dense(15,1))
initθ = Float64.(DiffEqFlux.initial_params(chain));

strategy_ = GridTraining(0.05)
discretization = PhysicsInformedNN(chain,
                                   strategy_;
                                   init_params = nothing,
                                   phi = nothing,
                                   derivative = nothing)

@named pde_system = PDESystem(eq,bcs,domains,[t, E],[i(t, E)])

prob = NeuralPDE.discretize(pde_system,discretization)

And in the last line, I get a mysterious (silly, probably) error:

KeyError: key * not found

Together with the stacktrace, that doesn't help much. Can anyone please shed some light on this?

0 Answers
Related