You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the "Adding parameters" example script of the docs on Julia v1.10.4, with current versions of ModelingToolkit v9.42.0 and MethodOfLines v0.11.5 gives an error on the discretization step.
Minimal Reproducible Example 👇
using ModelingToolkit, MethodOfLines, OrdinaryDiffEq, DomainSets
@parameters t x
@parameters Dn, Dp
@variablesu(..) v(..)
Dt =Differential(t)
Dx =Differential(x)
Dxx =Differential(x)^2
eqs = [Dt(u(t,x)) ~ Dn *Dxx(u(t,x)) +u(t,x)*v(t,x),
Dt(v(t,x)) ~ Dp *Dxx(v(t,x)) -u(t,x)*v(t,x)]
bcs = [u(0,x) ~sin(pi*x/2),
v(0,x) ~sin(pi*x/2),
u(t,0) ~0.0, Dx(u(t,1)) ~0.0,
v(t,0) ~0.0, Dx(v(t,1)) ~0.0]
domains = [t ∈Interval(0.0,1.0),
x ∈Interval(0.0,1.0)]
@named pdesys =PDESystem(eqs,bcs,domains,[t,x],[u(t,x),v(t,x)],[Dn=>0.5, Dp=>2])
discretization =MOLFiniteDifference([x=>0.1],t)
prob =discretize(pdesys,discretization) # This gives an ODEProblem since it's time-dependent# the error occurs on the above line
sol =solve(prob,Tsit5())
discrete_x = sol[x]
discrete_t = sol[t]
solu = sol[u(t, x)]
solv = sol[v(t, x)]
Describe the bug 🐞
Running the "Adding parameters" example script of the docs on Julia v1.10.4, with current versions of ModelingToolkit v9.42.0 and MethodOfLines v0.11.5 gives an error on the discretization step.
Minimal Reproducible Example 👇
Error & Stacktrace⚠️
Environment:
using Pkg; Pkg.status()
versioninfo()
The text was updated successfully, but these errors were encountered: