Predicting max temperature

I have heat conduction PDE that can accurately solve for u. I want to add another output that can predict the max_u from time = 0 up to the “current” t.

I added the below but after training the result is always 0, so I assume it is not being trained. Is something like this possible.
self.equations[“max_u”] = max_u - maximum(u, t, Interval(0, t))