You do not need to recreate the variational form, provided you used a Function or Expression
to define your "velocity" and "dt".
In the advection-diffusion example, "velocity" is already a Function, so if you change it,
you can solve for a different velocity field, without recompiling the form.
To change dt, you could do something like:
dt = Expression("dtvalue", dtvalue=0.1)
instead of
dt = 0.1
Later on, when you want to change it, just do:
dt.dtvalue = 0.2
and it will be updated in the form.
You will need to put the assembly of A inside your loop, too.