Try to move "(t*1000)" into "[]", i.e. replace your line 24 with the following:
m=mdb.models['t%2d'%(t*1000,)]
In Python the expression (t*1000) is fully equivalent to t*1000 , but you need to pass a tuple (Python tuple) to make string formatting properly. This is why I put a comma after t*1000.
As Martin suggested, you could try to get the model instance directly, e.g.
model_name = 't10'
m = mdb.models[model_name]
or
m = mdb.models['t10']
If t runs in [0.01, 0.02, ...], the piece of code 't%2d'%(t*1000,) is consequently evaluated by Python as strings 't10', 't20'... respectively.