soli =NDSolve[{pde, ic, bcs, WhenEvent[{p1[z, t] == 2520}, {Print[z]}]} /.
params, {p1[z, t], p2[z, t]}, {z, 0, 515}, {t, 0, 100}, Method -> {"MethodOfLines", "SpatialDiscretization" -> {"TensorProductGrid", "MinPoints" -> 750}}];
That gave me all sorts of errors. Not to mention it would just print "z". So myMy question is how do I get it to print out the distance along z that it take for p1[z,t]
to decay to 20?
ss = Table[Plot[p1[z, t] /. soli, {z, 0, 515}, PlotRange -> All], {t, 0, 10, .25}];