Open dasergatskov opened 1 year ago
For the m=1 (cylindrical) and m=2 (spherical) geometries, pdepe sets the left-end boundary condition to a zero-Neumann condition regardless of what the user has specified.
It is unclear to me that this is the best thing to do so have not done the same in pde1dm.
The referenced pdepe example actually sets the left-end BC to a nonsensical value knowing that it is irrelevant. In my opinion this is a big mistake in a tutorial like this one as it may mislead users in how to prescribe boundary conditions in general.
In the example, if you set ql = 1 instead of ql = 0, pde1dm will produce the correct result.
Trying heat equation example from https://www.mathworks.com/help/matlab/ref/pdepe.html
It fails with:
Quite possible that the issue is with ode15i. According to the same web page (See "Algorithm" section):