!------------------------------------------------------------------------------- !------------------------------------------------------------------------------- !--------------------------- PCB Eddy Current Sensor !--------------------------- Robert Franz !--------------------------- v.3.2 06.01.2010 !------------------------------------------------------------------------------- !------------------------------------------------------------------------------- finish /clear /units,si /prep7 csys,0 !------------------------------------------------------------------------------- !-------------------------------------------------------------- types, materials !------------------------------------------------------------------------------- et,1,plane53 , , ,1 ! air, target et,2,plane53 ,2, ,1 ! coil et,3,infin110, ,1,1 ! far field mp,rsvx,1,1/5.8e7 !copper mp,murx,1,0.999 mp,rsvx,3,1/5e7 !stainless steel mp,murx,3,100 mp,rsvx,4,0 !air mp,murx,4,1 !------------------------------------------------------------------------------- !---------------------------------------------------------------- parameter !------------------------------------------------------------------------------- coil_rad=10e-3 !coil outer radius in m con_hei=50e-6 !coil height in m con_dis=140e-6 !distance of coil_wire alpha=0.125 !ratio between inner and outer radius beta=3.2 !ratio between conductor width an height tar_abs=1e-3 net=2 !mesh factor pi=4*atan(1) !Pi coil_area=(1-alpha)*coil_rad*con_hei !coil_area con_n_0=(alpha*coil_rad+beta*con_hei)/(beta*con_hei+con_dis) !first point of archimedean spiral con_n_1=(coil_rad)/(beta*con_hei+con_dis) !last point of archimedean spiral con_turn=con_n_1-con_n_0 !coil turns con_area=con_hei*beta*con_hei !conductor area coil_fill=(con_turn*con_area)/coil_area !coil fill factor !------------------------------------------------------------------------------- !---------------------------------------------------------------- geometrie !------------------------------------------------------------------------------- !keypoints coil k,01,alpha*coil_rad ,tar_abs k,02,coil_rad ,tar_abs k,03,alpha*coil_rad ,con_hei+tar_abs k,04,coil_rad ,con_hei+tar_abs !keypoints target k,41,0 ,0 k,42,3*coil_rad ,0 k,43,0 ,-15e-3 k,44,3*coil_rad ,-15e-3 !keypoints near field k,51,0 ,4*coil_rad k,52,0 ,-4*coil_rad !keypoints far field k,61,0 ,4.5*coil_rad k,62,0 ,-4.5*coil_rad !create areas csys,2 l,51,52 l,61,62 csys,0 l,51,52 l,61,62 al,1,3 !near field area al,2,4 !far field a,01,02,04,03 !coil area a,41,42,44,43 !target area aovlap,all !------------------------------------------------------------------------------- !----------------------------------------------------------------- meshing !------------------------------------------------------------------------------- !coil ksel,,,,01,04 lslk,s,1 asll,s,1 esize,con_hei/net type,2 mat,1 r,1,coil_area,con_turn,,1,coil_fill mshkey,1 mshape,0,2d amesh,all !target ksel,,,,41,44 lslk,s,1 asll,s,1 esize,10*con_hei/net type,1 mat,3 mshkey,0 mshape,1,2d amesh,all !near field ksel,,,,51,52 lslk,s,1 asll,s,0 ksel,,,,61,62 lslk,s,1 asll,u,0 esize,50*con_hei/net type,1 mat,4 mshkey,0 mshape,1,2d amesh,all !far field csys,0 lsel,s,loc,y,4*coil_rad,4.5*coil_rad lsel,a,loc,y,-4*coil_rad,-4.5*coil_rad lesize,all,,,1 asll,s,0 type,3 mshkey,1 mshape,0,2d amesh,all !------------------------------------------------------------------------------- !----------------------------------------------------------------- boundaries !------------------------------------------------------------------------------- csys,1 nsel,s,loc,x,4.5*coil_rad sf,all,inf !coil esel,s,mat,,1 nsle,s cp,1,curr,all !cpl curr DoF (restriction plane53) cp,2,emf,all !cpl emf DoF (restriction plane53) *get,node_coil,node,,num,min !target esel,s,mat,,3 nsle,s,1 cp,3,volt,all !"Study of Electromagnetic Properties of Eddy Current Sensor" csys,0 lsel,s,loc,x nsll,s,1 d,all,az,0 !"Study of Electromagnetic Properties of Eddy Current Sensor" !------------------------------------------------------------------------------- !----------------------------------------------------------------- solution !------------------------------------------------------------------------------- /solu esel,s,mat,,1 bfe,all,vltg,,1 antype,harm harfrq,1e3 allsel solve !------------------------------------------------------------------------------- !-------------------------------------------------------------- post processing !------------------------------------------------------------------------------- /post1 !coil esel,s,mat,,1 etable,cur_sou,smisc,4 !element-result of source current in A etable,res_elem,nmisc,8 !element-result of resistivity in Ohm etable,ind_elem,nmisc,9 !element-result of inductivity in H etable,cur_tot,nmisc,15 !element-result of total current in A ssum *get,ind_sum_elem,ssum,,item,ind_elem *get,res_sum_elem,ssum,,item,res_elem set,1,1,,0 *get,cur_real,node,node_coil,curr !real part of coil current in A SET,1,1,,1 *get,cur_imaq,node,node_coil,curr !imaqinary part of coil current in A sadd,cur_edd,cur_tot,cur_sou,1,-1, , !eddy current = total current - source current in A phi=atan(cur_imaq/cur_real)*180/pi !phase in degree res_ana=1/(cur_real*cos(phi*pi/180)) !resistivity in Ohm (analytical) cur_sum=sqrt(cur_real*cur_real+cur_imaq*cur_imaq) !sum of coil current in A *dim,results,array,1,8 results(1,1)=tar_abs results(1,2)=ind_sum_elem results(1,3)=res_sum_elem results(1,4)=res_ana results(1,5)=cur_real results(1,6)=cur_imaq results(1,7)=phi results(1,8)=cur_sum allsel PLF2D,27,0,10,1 !save,H:\PCB-Spule\PCB_Spule,db,,all !------------------------------------------------------------------------------- !-------------------------------------------------------------- print out !------------------------------------------------------------------------------- *cfopen,results,txt *vwrite,results(1,1),results(1,2),results(1,3),results(1,4),results(1,5),results(1,6),results(1,7),results(1,8) (F12.6,' ',e12.6,' ',e12.6,' ',e12.6,' ',e12.6,' ',e12.6,' ',e12.6,' ',e12.6) finish /eof