/out,s_ind,out
_mg1=1
fini
/prep7
alls
bfedel,all,all,all
fini
/solu
_mg1=1
ld_coil,arg1,arg2
/out,s_ind,out,,append
*if,_err,ne,0,then
/nerr
/out
*msg,info
The data for the winding is missing-regenerate the winding.
/out,s_ind,out,,append
/nerr,0,1e4
*endif
*if,_err,ne,0,:end
/out,s_ind,out,,append
_nomsg=1
ll_matrix=1
mvpsol
ll_matrix=
_nomsg=
/out,s_ind,out,,append
*set,ccurr
*dim,ccurr,,_mx_ph
*set,induc
*dim,induc,,_mx_ph,_mx_ph
*set,ph_
*dim,ph_a,char,7
ph_a(1)='ph_1','ph_2','ph_3','ph_4','ph_5','ph_6','ph_7'
*do,_i1,1,_mx_ph
_tname=_ph_n(_i1)
cmsel,,%_tname%
cm,%ph_a(_i1)%,elem
ccurr(_i1)=_cphc(_i1)*arg2
*enddo
*stat,ccurr
esel,all
esel,u,ename,,36
nsle
csys,1
*get,thmin,node,,mnloc,y
*get,thmax,node,,mxloc,y
_delth=abs(thmax-thmin)
facsym=nint(360/_delth)
csys
fini
/solu
esel,all
nsle
_mg1=1
l_matrix,facsym,'ph_','ccurr','induc'
/out,s_ind,out,,append
:end
_mg1=0
/out