/nopr
cmsel,s,kstator
allsel,below,area
NUMMRG,NODE,1e-6 , , ,LOW 
NUMCMP,NODE 
nummrg,kp

cmsel,s,krotor
allsel,below,area
NUMMRG,NODE,1e-6 , , ,LOW 
NUMCMP,NODE 
nummrg,kp
/gopr

allsel

csys,1
nsel,s,loc,x,raussen
d,all,az,0
nsel,s,loc,x,rinnen
cp,2,az,all

!!
!!Stator
!!
csys,1

*Do,ileit,1,z1
asel,s,mat,,3
allsel,below,area
ASEL,r,LOC,Y,-360/(2*z1)+(ileit-1)*360/z1,360/(2*z1)+(ileit-1)*360/z1 
allsel,below,area

*If,Zweischicht,eq,1,then
cp,ileit*4+1,curr,all
cp,ileit*4+2,emf,all
*Else
cp,ileit*2+1,curr,all
cp,ileit*2+2,emf,all
*EndIf
*GET,wicknodeo%ileit%, NODE, 0,num,min

*EndDo

*If,Zweischicht,eq,1,then
*Do,ileit,1,z1
asel,s,mat,,4
allsel,below,area
ASEL,r,LOC,Y,-360/(2*z1)+(ileit-1)*360/z1,360/(2*z1)+(ileit-1)*360/z1 
allsel,below,area

cp,ileit*4+3,curr,all
cp,ileit*4+4,emf,all
*GET,wicknodeu%ileit%, NODE, 0,num,min

*EndDo
*EndIf
