!This script was created by Laura Del Tin, Februar 2006. !It performs in Ansys the harmonic pre-stress simulation of !the electromechanical microresonator described in: !K.Wang,A-C.Wong,C.T-C.Nguyen,"VHF Free-free beam high-Q micromechanical !resonators",IEEE J.of Microelectromechanical system,vol.9,n.3,September 2000 !Free download at: !http://www.eecs.umich.edu/~ctnguyen/publications.ctnguyen.htm !Ansys model of the device is generated running the file model.ans, and then !here resumed (geo.db) !Mechanical and electrical results are written in the file result.txt resume,geo,db !*************** parameters for harmonic and static simulation *********** !************************************************************************* vltg=86 vamp=1 nstep=100 nvar=3 n=nstep-1 freqmin=1e7 freqmax=1e8 Q=8743 !*************** applying loads for static analysis /prep7 cmsel,s,trans d,all,volt,vltg allsel cmsel,s,dimples d,all,uy,-(gap-d) allsel fini !********************** static analysis ********************** !************************************************************* /solu allsel antype,static nlgeom,off pstres,on solcontrol,on eqslv,sparse outres,all,all solve finish !*************** prestressed harmonic analysis ****************** !**************************************************************** !***** preparing output file in MTX format /post26 *cfopen,results.txt,names *vwrite,'Frequency' %C *vwrite,'centerUY' %C *vwrite,'current' %C *cfclos *CFOPEN, results,txt *vwrite,'%%Matrix','Market m','atrix ar','ray real',' general' (5A8) *VWRITE,nvar,n %I %I fini !**************** applying harmonic load /prep7 cmsel,s,trans ddele,all,volt d,all,volt,vamp allsel cmsel,s,dimples ddele,all,uy allsel fini !**************** looping on different fre *DO,i,1,nstep /solu antype,harmic eqslv,sparse outres,all,all pstres,on hropt,full hrout,off KBC,1 TSRES,ERASE ALLSEL !dmprat,1/(2*Q) dmprat,0 autots,off ALPHAD,alpha BETAD,beta nsubst,1 expf=(i-1)/(nstep-1)*(log10(freqmax)-log10(freqmin))+log10(freqmin) f=10**expf harfrq,f solve fini !********** writing results /post26 esel,s,ename,,126 *get,num,elem,0,count,,,, *get,transele,elem,0,num,min,,, allsel curtot=0 j=0 *do,j,1,num *get,curr,elem,transele,nmisc,25 curtot=curtot+curr transele=transele+1 *enddo *dim,y,array,1 NSOL,2,tip,U,Y abs,3,2 vget,y(1),3 *VWRITE,f,y(1),curtot (E15.10,' ',E15.7,' ',E15.7) fini *ENDDO *CFCLOS fini