ValueError: vector::reserve for writing a xdmf file

Your code works for me if I use

t_start += float(dt)

instead of

t_start += dt

Since dt depends on f = Constant(5), it will result in a ufl type rather than a float. Converting it to float ensures that t_start remains a real number rather than a ufl expression.