Help with solving 2nd order PDE

I bypassed the problem by using a piecewise function instead of the callbacks.
Here’s the new piece of code:

P = t-> t<1.0e-7 ? 1.0e16*t : 1.0e9   #external wave profile Pa*s⁻¹*s

and the callback functions were removed.