FINISH
/CLEAR
/config,nproc,2

/PREP7  
!*  
MPTEMP,,,,,,,,  		!piezokeramika PCM51
MPTEMP,1,0  
MPDATA,DENS,1,,7800 

MPTEMP,,,,,,,,  
MPTEMP,1,0  
MPDATA,PERX,1,,1850 

MPTEMP,,,,,,,,  
MPTEMP,1,0  
MPDATA,LSST,1,,190E-4  
 
MPTEMP,,,,,,,,  
MPTEMP,1,0  
MPDATA,DAMP,1,,6.25E-3  

!TB,ANEL,1,1,21,1			!nelze pouzit compliance
!TBTEMP,0
!TBDATA,,13.3E-12,,,,,   
!TBDATA,,13.3E-12,,,,,16.8E-12   
!TBDATA,,,,,,,   
!TBDATA,,,,,,,   



TBDE,ANEL,1,,,  
TB,ANEL,1,1,21,0
TBTEMP,0
TBDATA,,5.33E+010,2.45E+010,1.96E+010,0,0,0 
TBDATA,,5.33E+010,1.96E+010,0,0,0,42.7E9
TBDATA,,0,0,0,5.76E+010,0,0 
TBDATA,,4.62E+010,0,4.62E+010,,, 




TB,PIEZ,1,,,0   
TBMODIF,1,1,
TBMODIF,1,2,
TBMODIF,1,3,-11.3E-3 
TBMODIF,2,1,
TBMODIF,2,2,
TBMODIF,2,3,-11.3E-3 
TBMODIF,3,1,
TBMODIF,3,2,
TBMODIF,3,3,27.2E-3  
TBMODIF,4,1,
TBMODIF,4,2,
TBMODIF,4,3,
TBMODIF,5,1,
TBMODIF,5,2,
TBMODIF,5,3,
TBMODIF,6,1,
TBMODIF,6,2,
TBMODIF,6,3,






MPTEMP,,,,,,,,  			!kov
MPTEMP,1,0  
MPDATA,EX,2,,2.1e11 
MPDATA,PRXY,2,,0.3  
MPTEMP,,,,,,,,  
MPTEMP,1,0  
MPDATA,DENS,2,,7850
MPDATA,DAMP,2,,0.1  


	
xd1=0				!x-ova souradnice kraje desky			Deska
xd2=0.065			!x-ova souradnice konce desky
zd1=0.0005			!y-ova souradnice kraje desky
zd2=-0.0005			!y-ova souradnice konce desky
yd1a=0.01			!z-ova souradnice 1. kraje desky
yd1b=-0.01			!z-ova souradnice 2. kraje desky
yd2a=0.005			!z-ova souradnice 1. konce desky
yd2b=-0.005			!z-ova souradnice 2. konce desky

xk1=xd2			        !x-ova souradnice kraje kladiva			Kladivo
xk2=xk1+0.01			!x-ova souradnice konce kladiva
zk1=0.010			!y-ova souradnice kraje kladiva
zk2=-0.010			!y-ova souradnice konce kladiva
yk1=0.010			!z-ova souradnice kraje kladiva
yk2=-0.010			!z-ova souradnice konce kladiva

xz1=-0.005			!x-ova souradnice kraje zakladny		zakladna
xz2=0				!x-ova souradnice konce zakladny
zz1=-0.0005			!y-ova souradnice kraje zakladny
zz2=0.0005			!y-ova souradnice konce zakladny
yz1=-0.01			!z-ova souradnice kraje zakladny
yz2=0.01			!z-ova souradnice konce zakladny

xpa1=xd1+0.005			!x-ova souradnice kraje pieza_a			piezo
xpa2=xpa1+0.02			!x-ova souradnice konce pieza_a
zpa1=zd1			!y-ova souradnice kraje	pieza_a
zpa2=zd1+0.00049		!y-ova souradnice konce pieza_a
ypa1=0.01			!z-ova souradnice kraje pieza_a
ypa2=-0.01			!z-ova souradnice konce pieza_a




K, ,xd1,yd1a,zd1,  		!deska
K, ,xd1,yd1a,zd2, 
K, ,xd1,yd1b,zd1,
K, ,xd1,yd1b,zd2, 
K, ,xd2,yd2a,zd1,
K, ,xd2,yd2a,zd2, 
K, ,xd2,yd2b,zd1,
K, ,xd2,yd2b,zd2,  



BLOCK,xk1,xk2,yk1,yk2,zk1,zk2,   !kladivo

BLOCK,xz1,xz2,yz1,yz2,zz1,zz2,   !zakladna  

V,       1,       2,       6,       5,       3,       4,       8,       7      !tvorba objemu kovu

BLOCK,xpa1,xpa2,ypa1,ypa2,zpa1,zpa2,      !tvorba objemu krystalu




FLST,2,2,6,ORDE,2   
FITEM,2,2   
FITEM,2,-3  
VADD,P51X   
FLST,2,2,6,ORDE,2   
FITEM,2,1   
FITEM,2,5   
VADD,P51X   
VPLOT   
FLST,2,2,6,ORDE,2   
FITEM,2,2   
FITEM,2,4   
VGLUE,P51X 




CM,_Y,VOLU  
VSEL, , , ,       1 
CM,_Y1,VOLU 
CMSEL,S,_Y  
!*  
CMSEL,S,_Y1 
VATT,       1, ,   1,       0   
CMSEL,S,_Y  
CMDELE,_Y   
CMDELE,_Y1  
!*  
CM,_Y,VOLU  
VSEL, , , ,       3 
CM,_Y1,VOLU 
CMSEL,S,_Y  
!*  
CMSEL,S,_Y1 
VATT,       2, ,   2,       0   
CMSEL,S,_Y  
CMDELE,_Y   
CMDELE,_Y1  
!*  

ESIZE,0.002,0,  
MSHAPE,1,3D 
MSHKEY,0
!*  
FLST,5,2,6,ORDE,2   
FITEM,5,1   
FITEM,5,3   
CM,_Y,VOLU  
VSEL, , , ,P51X 
CM,_Y1,VOLU 
CHKMSH,'VOLU'   
CMSEL,S,_Y  
!*  
VMESH,_Y1   
!*  
CMDELE,_Y   
CMDELE,_Y1  
CMDELE,_Y2  
!*  
/UI,MESH,OFF


NSEL,S,LOC,Z,zpa2	         !vyber nodu
NSEL,R,LOC,X,xpa1,xpa2	         !vyber nodu na horni plose
NSEL,R,LOC,Y,ypa1,ypa2	         !vyber nodu na horni plose horniho pieza
CP,1,VOLT,ALL                    !coupling voltu
*GET,HEH,NODE,,NUM,MIN           !horni elektroda
D,HEH,VOLT,1
ALLSEL,ALL



NSEL,S,LOC,Z,zpa1,	         !vyber nodu
NSEL,R,LOC,X,xpa1,xpa2    	 !vyber nodu na horni plose
NSEL,R,LOC,Y,ypa1,ypa2           !vyber nodu na dolni plose
CP,2,VOLT,ALL          		 !coupling voltu
*GET,DEH,NODE,,NUM,MIN           !dolni elektroda
D,DEH,VOLT,0
ALLSEL,ALL



FINISH  

/SOLU
EQSLV,SPARSE			 ! pouziti sparse resice   
ANTYPE,HARMIC                    ! harmonicka analyza
OUTPR,ALL,ALL,			 ! ulozeni vsech vysledku
HARFRQ,0,200,  			 ! rozsah 0 az 200 Hz
NSUBST,20  			 ! pocet substepu 20
KBC,1   			 ! Zadavani zatizeni po krocich - nutno nastavit pro spravny vypocet


SOLVE   

FINISH

/POST26

RFORCE,2,HEH,AMPS                 ! zjisteni naboje


/EOF				 ! po smazani prikazu EOF provede skript vykresleni grafu na obrazovce	


FILE,'pokus','rst','.'  	!jmeno pracovniho souboru - pokus	
/UI,COLL,1  
NUMVAR,200  
SOLU,191,NCMIT  
STORE,MERGE 
PLCPLX,0
PRCPLX,1
FILLDATA,191,,,,1,1 
REALVAR,191,191 
FILLDATA,192,,,,0,0 
FILLDATA,193,,,,1,0 
FILLDATA,194,,,,-1,0
FILLDATA,195,,,,1,1 
VARNAME,195,NSET
!   
! Name: Z   
! ID:  3
! Function: 1/(2*3.1415926*{FREQ}*{AMPS})   
FILLDATA,199,,,,3.1415926,0 
REALVAR,199,199 
FILLDATA,198,,,,2,0 
REALVAR,198,198 
PROD,200,198,199
PROD,199,200,1  
PROD,200,199,2  
FILLDATA,198,,,,1,0 
REALVAR,198,198 
QUOT,3,198,200,,Z   
!   
!STORE,MERGE 
XVAR,1  
PLVAR,3,