convert pseudo to python code

for(#iterations)
solve non linear solution
get new flux klinkages
solve LD and Lq
solve new Id and Iq
if (abs(Id_new - Id_old) < 0.01)
break
else
put in the new Id_new and Iq_new