showconsole() clearconsole() open("armature.fem") mi_saveas("armature_tmp.fem") start_p=0 end_p=0.45 step=0.15 k=0 name="picture_" ext=".bmp" outfile = openfile("results.txt","a") for shift=start_p,end_p,step do -- rz=rz+1 k=k+1 mi_analyze() mi_loadsolution() --mo_zoom(-50,-60,50,70) mo_showdensityplot(1,0,2.1,0.001,"bmag") --mo_showdensityplot(-1) -- mo_showmesh() -- name=string.format("obrazek%d",k) mo_savebitmap(name .. k .. ext) mo_groupselectblock(1) -- fx=mo_blockintegral(18) 18 --x (or r) part of steady-state weighted stress tensor force fx=mo_blockintegral(18) c,V,Fl = mo_getcircuitproperties("circ_1") print(shift," ",fx," ",Fl," ",V) write(outfile,shift," ",fx," ",Fl," ",V,"\n") -- mo_groupselectblock(1) -- t=mo_blockintegral(22) -- print(kat,t,i) -- wynik[rz]={} -- wynik[rz][1]=kat -- wynik[rz][2]=t -- wynik[rz][3]=i mo_close() mi_seteditmode("group") mi_selectgroup(1) -- mi_moverotate(0,0,step,4) mi_movetranslate(0,step) end closefile(outfile)