Issue solving 2D wave equation with ModelingToolkit.jl

It looks like it’s the right solution to 2 digits. Plot the slides as an animation if you’re not sure.

The documentation on this says it’s not complete.

Note: This uses a currently unreleased interface that is still a work in progress. Use at your own risk!

Specifically, upwinding has not merged yet:

So yes, it’s as incorrect as the documentation page says it will be right now. We will remove that note when it’s released, but for right now, I mean, the docs said it’s not fully working yet :sweat_smile:.

(Specifically, as of today, arbitrary even derivatives work fine, it’s the odd ones that need that to merge)

But anyways, @luraess mentioned, if you have a linear PDE like this then the most efficient thing to do would be to semi-discretize it with ParallelStencil.jl and then solve the ODEs using whichever method (likely one of the SSP integrators like https://diffeq.sciml.ai/stable/solvers/ode_solve/#Explicit-Strong-Stability-Preserving-Runge-Kutta-Methods-for-Hyperbolic-PDEs-(Conservation-Laws)). The coming DiffEqOperators interface is mostly focused on nonlinear and it’s not complete right now.

3 Likes