/out,coillink,out
*if,hfreq,le,0,then
hfreq=60
*endif
*set,link1
*dim,link1,,_n_slot
*set,link_str
*dim,link_str,,_mx_ph
cmsel,,stator
csys,1
*get,_thmn,node,,mnloc,y
*get,_thmx,node,,mxloc,y
_delaa=_thmx-_thmn
perfac=nint(360/_delaa)
esel,,mat,,3,6,3
etab,,a,z
etab,,volu
smult,azvolu,az,volu
*do,_il1,1,_n_slot
/gopr
*msg,info,_il1
line number in winding file: %i
_g_slot=cwnd_(_il1,1)
cmsel,,%_g_slot%
ssum
*get,azt,ssum,,item,azvolu
*get,tvolu,ssum,,item,volu
azavout=azt/tvolu
_g_slot=cwnd_(_il1,2)
cmsel,,%_g_slot%
ssum
*get,azt,ssum,,item,azvolu
*get,tvolu,ssum,,item,volu
azavin=azt/tvolu
link1(_il1)=wnd_(_il1,3)*(azavout-azavin)*stkthk*ggeom
link_str(wnd_(_il1,4))= link_str(wnd_(_il1,4))+link1(_il1)
*enddo
*if,arg1,gt,0,then
coil_lnk(arg1,0)=_angrot
*do,_il1,1,_mx_ph
coil_lnk(arg1,_il1)=link_str(_il1)
*enddo
*else
/nopr
/out,coillink,sum
*msg,info
_______SUMMARY OF FLUX LINKAGE FOR THE COILS____________
*msg,info
*msg,info,w_file
Winding file:__________________ %c
*msg,info,stkthk
Stack length:__________________ %g
*msg,info,perfac
Periodic factor:_______________ %i
*msg,info
*msg,info
___COIL___Turns_____Flux linkage_______Phase____
*msg,info
______________________Weber-t___________________
*msg,info
*vwrit,sequ,wnd_(1,3),link1(1),wnd_(1,4)
(f8.0,f8.0,f15.6,f13.0)
*msg,info
*msg,info
*msg,info
____Phase_______Total Flux Linkage_______
*msg,info
*vwrite,sequ,link_str(1)
(f10.0,f20.5)
*if,perfac,gt,1,then
*msg,info
*msg,info
The flux linkages reported are for the periodic section modeled.&
The total flux linkages for each phase would be factored by the periodic factor
*endif
/out
/gopr
*uili,coillink,sum
*endif
*if,arg1,gt,0,then
*if,arg1,eq,1,then
/out,coillink,dat
*else
/out,coillink,dat,,append
*endif
*list,coillink,sum
*endif
/out