Md_Salem
Subscriber

 

 

Hi Bill,

I tried to built up this model with workbench , and for more simpicilty I assumed only the Piezo sensor attached to the surface of cantilever plate 1 cm from the root

I added next APDL macro to the coupled field block :

nsle
nsel,r,loc,z,0.0018 
nsel,r,loc,x,0.01,0.095     !dimensions and location of piezo sensor surface
cm,v1_n,node
*get,nnds,node,,count
nd=0
*do,i,1,nnds
 cmse,s,v1_n
 nd=ndnext(nd)
 nsel,a,node,,1
 ce,next,0,nd,volt,1,1,uz,-1
*enddo
fini

 


then I added next APDL macro to the solution block (modal analysis) :

/POST1
*DIM,INPUTTAB,,1,2
INPUTTAB(1,1) = 246 !node number at the tip of the cantilever
INPUTTAB(1,2) = 3
*DIM,INPUTLAB,CHAR,1
INPUTLAB(1) = ‘246_Uz’ !displacement of node 246 in the Z direction

*dim,outputTab,,1,2 
*dim,outputLab,CHAR,1
outputTab(1,1) = 1 
outputTab(1,2) = 3 
outputLab(1) = ‘n1_volt'

spmwrite,modal,4,inputTab,inputLab,outputTab,outputLab,1 

 

unfortunately , I recieved the next error : 

” The results file (file0.rst) is not available for the NSET option on  *GET command.  The requested *GET data cannot be retrieved.”

Could you please help me please with that error ?

Regards