FINISH
/CLEAR
/config,nproc,2

/PREP7  

ET,1,SOLID98

!*  
KEYOPT,1,1,3
KEYOPT,1,3,0
KEYOPT,1,5,2

ET,2,SOLID186   		!prvek solid186
!*  
KEYOPT,2,2,0			!nastaveni solidu186
KEYOPT,2,6,0
KEYOPT,2,10,0  

/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,,5.56E-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,,,,,,,   



TB,ANEL,1,1,21,0
TBTEMP,0
TBDATA,,7.5E10,,,,, 
TBDATA,,7.5E10,,,,,5.9E10   
TBDATA,,,,,,,   
TBDATA,,,,,,,   




TBDE,PIEZ,1 
TB,PIEZ,1,,,0   
TBMODIF,1,1,0   
TBMODIF,1,2,0   
TBMODIF,1,3,
TBMODIF,2,1,0   
TBMODIF,2,2,0   
TBMODIF,2,3,
TBMODIF,3,1,-0.0113 
TBMODIF,3,2,-0.0113 
TBMODIF,3,3,0.0272  
TBMODIF,4,1,0   
TBMODIF,4,2,0   
TBMODIF,4,3,0   
TBMODIF,5,1,0   
TBMODIF,5,2,0   
TBMODIF,5,3,0   
TBMODIF,6,1,0   
TBMODIF,6,2,0   
TBMODIF,6,3,0   





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.0063			!x-ova souradnice kraje pieza_a			piezo
xpa2=xpa1+0.028			!x-ova souradnice konce pieza_a
zpa1=zd1			!y-ova souradnice kraje	pieza_a
zpa2=zd1+0.00203		!y-ova souradnice konce pieza_a
ypa1=0.005			!z-ova souradnice kraje pieza_a
ypa2=-0.005			!z-ova souradnice kraje 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, , , ,       4 
CM,_Y1,VOLU 
CMSEL,S,_Y  
!*  
CMSEL,S,_Y1 
VATT,       1, ,   1,       0   
CMSEL,S,_Y  
CMDELE,_Y   
CMDELE,_Y1  
!*  
CM,_Y,VOLU  
VSEL, , , ,       1 
CM,_Y1,VOLU 
CMSEL,S,_Y  
!*  
CMSEL,S,_Y1 
VATT,       2, ,   2,       0   
CMSEL,S,_Y  
CMDELE,_Y   
CMDELE,_Y1  
!*  
MSHAPE,1,3D 
MSHKEY,0
!*  
ESIZE,0.005,0,  
FLST,5,2,6,ORDE,2   
FITEM,5,1   
FITEM,5,4   
CM,_Y,VOLU  
VSEL, , , ,P51X 
CM,_Y1,VOLU 
CHKMSH,'VOLU'   
CMSEL,S,_Y  
!*  
VMESH,_Y1   
!*  
CMDELE,_Y   
CMDELE,_Y1  
CMDELE,_Y2  
!*  
/UI,MESH,OFF



FLST,4,77,1,ORDE,2  
FITEM,4,1417
FITEM,4,-1493   
CP,1,VOLT,P51X  
FLST,4,77,1,ORDE,4  
FITEM,4,427 
FITEM,4,-458
FITEM,4,549 
FITEM,4,-593
CP,2,VOLT,P51X  
ALLSEL,ALL 





EPLOT   
/USER,  1   
/VIEW,  1, -0.148917055912    , -0.747919988828    ,  0.646868920857
/ANG,   1,   38.5508046155  
/REPLO  





*DEL,_FNCNAME   
*DEL,_FNCMTID   
*DEL,_FNCCSYS   
*SET,_FNCNAME,'zloc'
*SET,_FNCCSYS,0 
! /INPUT,funkce_kmitani65.func,,,1  
*DIM,%_FNCNAME%,TABLE,6,10,1,,,,%_FNCCSYS%  
!   
! Begin of equation: 1.08974e-6*sin(2*3.14159*50*{TIME}) 
*SET,%_FNCNAME%(0,0,1), 0.0, -999   
*SET,%_FNCNAME%(2,0,1), 0.0 
*SET,%_FNCNAME%(3,0,1), 0.0 
*SET,%_FNCNAME%(4,0,1), 0.0 
*SET,%_FNCNAME%(5,0,1), 0.0 
*SET,%_FNCNAME%(6,0,1), 0.0 
*SET,%_FNCNAME%(0,1,1), 1.0, -1, 0, 2, 0, 0, 0  
*SET,%_FNCNAME%(0,2,1), 0.0, -2, 0, 3.14159, 0, 0, -1   
*SET,%_FNCNAME%(0,3,1),   0, -3, 0, 1, -1, 3, -2
*SET,%_FNCNAME%(0,4,1), 0.0, -1, 0, 65, 0, 0, -3
*SET,%_FNCNAME%(0,5,1), 0.0, -2, 0, 1, -3, 3, -1
*SET,%_FNCNAME%(0,6,1), 0.0, -1, 0, 1, -2, 3, 1 
*SET,%_FNCNAME%(0,7,1), 0.0, -1, 9, 1, -1, 0, 0 
*SET,%_FNCNAME%(0,8,1), 0.0, -2, 0, 0.001, 0, 0, -1 
*SET,%_FNCNAME%(0,9,1), 0.0, -3, 0, 1, -2, 3, -1
*SET,%_FNCNAME%(0,10,1), 0.0, 99, 0, 1, -3, 0, 0
! End of equation: 1.08974e-6*sin(2*3.14159*50*{TIME})   
!-->
FLST,2,3,5,ORDE,3   
FITEM,2,7   
FITEM,2,-8  
FITEM,2,11  
!*  
!*  
/GO 
DA,P51X,UZ, %ZLOC%  




FINISH  
/SOL
!*  
ANTYPE,4
!*  
TRNOPT,FULL 
LUMPM,0 
!*  
DELTIM,0.0005,0.0005,0.01  
!OUTRES,ERASE
OUTRES,ALL,ALL  
ALPHAD,0
BETAD,0  
KBC,0   
TIME,0.04 
TINTP,,0.25,0.5,0.5 


/STATUS,SOLU
/SOL
SOLVE 

