! ******************************************
! *** initial start-up commands ***
!*******************************************
FINISH
/CLEAR
/OUTPUT,TERM
coef = 0.10
tp_coef = coef*100
/FILENAME,MA_V%tp_coef%xyz_6
/OUTPUT,TERM
/PREP7
! ******************************************
! *** PARAMETERS ***
!*******************************************
*ASK,adh,Creat_Adhesive_Layer_?(1=Yes,0=No),1 ! To active the adhesive layer loop
*ASK,stand,Creat_stand_?(1=Yes,0=No),1 ! Add the extra piece of glue
! *** solution parameters ***
voltage = 0 ! Voltage asigned to electrode for modal analysis
f_min = 45E+03 ! lower frequency of interest
f_max = 90E+03 ! upper frequency of interest
deltaf = 10 E+03 ! frequency step size in Hz
Z_s = 50 ! enter the source impedance here (Ohm)
xmesh = 4 !
ymesh = 4 !
zmesh = 1 ! number of thickness mesh divisions
*ASK,tp_b_force,Mechanical_Load_on_cymbal_?(grames),300
b_force = -tp_b_force/1000! Frictional force in Z-direction
!b_force = -0.1 ! Frictional force in Z-direction
! *ASK,n_legs,number_of_legs_?,3 ! Ask for the number of legs (default value: 3)
n_legs = 3 ! Number of legs in rotor
SECT = 10 ! Sector size (degree)
! *** geometry parameters ***
! Geometry parameters for adhesive layer
*IF,adh,EQ,1,then
*ASK,thick_al,Adhesive_layer_thickness(m),100E-6
! thick_al = 100 E-6
*ELSEIF,adh,EQ,0
thick_al = 0
*ENDIF
! Geometry parameters for PZT disc
thick_b = 1 E-3 !
radius_b = 12.5 E-3 !
! geometry parameters for cymbal
thick_c = 0.45 E-3 ! Copper sheet thickness
radius_c = 12.5 E-3 ! Outer radius of cymbal's bonding surafce
radius_d = 10 E-3 ! Inner radius of cymbal's bonding surface
radius_e = 7.05 E-3 ! Radius of cymbal's upper surface
radius_f = 2.25 E-3 ! Radius of cymbal's hole
height = 2.3 E-3 ! Height of the cymbal
radius_l = 2 E-3 ! Radius of the applied structural constraints (loads)
radius_ef = 5 E-3 ! Radius for external loads on cymbal's top surface
tol = 1 E-9 ! Tolerance for key point search
! Geometry parameters for polymer stand
th_stand = 2 E-3 !
rd_stand = coef*radius_C !
! *** program parameters ***
ceramic = 1 ! Name for material 1
Bcopper = 2 ! Name for material 2
BCB = 3 ! Name for material 3
logconst = 20 !
eps_0 = 1 !8.854E-12 !!!
*AFUN,RAD !
pi = ACOS(-1) ! Define pi value
*AFUN,DEG !
xi = 0.001 !
ExclMark = '!!!' !
!*******************************************************************
! *** MATERIAL PROPERTIES DECLARATION FOR CYMBAL AND CERAMIC ***
!*******************************************************************
! PZ???
dens_c = 7650 ! density in kg/m^3
eps11_c = 830*eps_0 ! epsilon_11 in F/m^2
eps33_c = 629*eps_0 ! epsilon_33 in F/m^2
e31_c = -5.04 ! e_31 in As/m^2
e33_c = 11.61 ! e_33 in As/m^2
e15_c = 9.36 ! e_24 in As/m^2
c11_c = 143 E+09 ! c_11 in N/m^2
c12_c = 72.2 E+09 ! c_12 in N/m^2
c13_c = 65.9 E+09 ! c_13 in N/m^2
c33_c = 104 E+09 ! c_33 in N/m^2
c44_c = 31.8 E+09 ! c_44 in N/m^2
! *** material declaration FOR PZT (SI units) ***
! ceramic material (disc)
MP,DENS,ceramic,dens_c ! Density
MP,PERX, ceramic,eps11_c ! eps11
MP,PERY, ceramic,eps11_c ! eps33
MP,PERZ, ceramic,eps33_c ! eps22=eps11
!Z-POLED
TB,PIEZ,ceramic
TBDATA,3,e31_c ! e31
TBDATA,9,e33_c ! e32=e31
TBDATA,6,e31_c ! e33
TBDATA,14,e15_c ! e24
TBDATA,16,e15_c ! e24=e15
TB,ANEL,ceramic
TBDATA,1,c11_c ! c11
TBDATA,2,c12_c ! c12
TBDATA,3,c13_c ! c13
TBDATA,7,c11_c ! c22=c11
TBDATA,8,c13_c ! c23=c13
TBDATA,12,c33_c ! c33
TBDATA,16,(c11_c-c12_c)/2 ! c66=(c11-c12)/2
TBDATA,19,c44_c ! c44
TBDATA,21,c44_c ! c55=c44
MP,ALPX, ceramic,3 E-6 ! CTE along X
MP,ALPY, ceramic,3 E-6 ! CTE along Y
MP,ALPZ, ceramic,3 E-6 ! CTE along Z
! *** MATERIAL DECLARATION FOR CYMBAL (SI units) ***
! BeCu (cymbal)
dens_b = 8260 ! density in kg/m^3
young_b = 115 E+09 ! N/m**2
poiss_b = 0.3 ! No unit
MP,DENS, Bcopper,dens_b ! density
MP,EX, Bcopper,young_b ! Young's modulus N/m**2
MP,EY, Bcopper,young_b ! Young's modulus N/m**2
MP,EZ, Bcopper,young_b ! Young's modulus N/m**2
MP,NUXY, Bcopper,poiss_b ! Poisson ratio
MP,NUYZ, Bcopper,poiss_b ! Poisson ratio
MP,NUXZ, Bcopper,poiss_b ! Poisson ratio
MP,ALPX, Bcopper,15 E-6 ! CTE along X
MP,ALPY, Bcopper,15 E-6 ! CTE along Y
MP,ALPZ, Bcopper,15 E-6 ! CTE along Z
MP,MURX,1,0 ! Bogey material properties to suppress error messages
MP,KXX,1,0 ! Bogey material properties to suppress error messages
! *** MATERIAL DECLARATION FOR ADHESIVE LAYER (SI units) ***
! BCB bonding
MP,DENS, BCB,930 ! Density Kg/m**3
MP,EX, BCB,2.9 E+06 ! Young's modulus N/m**2
MP,EY, BCB,2.9 E+06 ! Young's modulus N/m**2
MP,EZ, BCB,2.9 E+06 ! Young's modulus N/m**2
MP,NUXY, BCB,0.34 ! No unit
MP,NUYZ, BCB,0.34 ! No unit
MP,NUXZ, BCB,0.34 ! No unit
MP,ALPX, BCB,52 E-6 ! CTE along X
MP,ALPY, BCB,52 E-6 ! CTE along Y
MP,ALPZ, BCB,52 E-6 ! CTE along Z
!*******************************************************
! *** ELEMENT DECLARATION FOR CYMBAL AND CERAMIC ***
!*******************************************************
ET,ceramic,SOLID5,3 ! 3-D coupled field solid
! UX, UY, UZ, VOLT, D.o.F.
ET,Bcopper,SOLID5,2 ! 3-D Structural solid
! UX, UY, UZ, D.o.F.
*IF,adh,EQ,1,then
ET,BCB,SOLID5,2 ! 3-D Structural solid
*ENDIF ! UX, UY, UZ, D.o.F.
!********************************************
! *** geometry and grouping ***
!********************************************
! step 1: create areas in 2D
! ceramic PZT
K,1 ,0 ,0 ,0
K,2 ,0 ,coef*radius_C ,0
K,3 ,0 ,radius_d ,0
K,4 ,0 ,radius_c ,0
K,5 ,0 ,radius_c ,thick_b
K,6 ,0 ,radius_d ,thick_b
K,7 ,0 ,coef*radius_C ,thick_b
K,8 ,0 ,0 ,thick_b
A,1,2,7,8
A,7,2,3,6
A,6,3,4,5
! cymbal
K,9 ,0 ,radius_e ,thick_b+height +thick_al
K,10 ,0 ,radius_f ,thick_b+height +thick_al
K,11 ,0 ,radius_f ,thick_b+height +thick_c+thick_al
K,12 ,0 ,radius_e ,thick_b+height +thick_c+thick_al
K,13 ,0 ,radius_d ,thick_b +thick_c+thick_al
K,14 ,0 ,radius_c ,thick_b +thick_c+thick_al
K,15 ,0 ,radius_ef ,thick_b+height +thick_al
K,16 ,0 ,radius_ef ,thick_b+height +thick_c+thick_al
K,17 ,0 ,radius_c ,thick_b +thick_al
K,18 ,0 ,radius_d ,thick_b +thick_al
A,18,17,14,13
A,9,18,13,12
A,10,9,12,11
! Adhesive layer
*IF,adh,EQ,1,then
K,21 ,0 ,0 ,thick_b
K,22 ,0 ,rd_stand ,thick_b
K,23 ,0 ,radius_d ,thick_b
K,24 ,0 ,radius_c ,thick_b
K,25 ,0 ,radius_c ,thick_b +thick_al
K,26 ,0 ,radius_d ,thick_b +thick_al
K,27 ,0 ,rd_stand ,thick_b +thick_al
K,28 ,0 ,0 ,thick_b +thick_al
A,21,22,27,28
A,27,22,23,26
A,26,23,24,25
*ENDIF
! Extra stand
*IF,stand,EQ,1,then
K,31,0 ,0 ,0
K,34,0 ,0 ,-th_stand
K,35,0 ,rd_stand ,-th_stand
K,38,0 ,rd_stand ,0
A,31,34,35,38
*ENDIF
! Step 2: creat volumes and form components
nummrg,kp!!! merge keypoints and lines, works just like aglue but much faster
ALLS
VROTAT,ALL,,,,,,kp(0,0,0),kp(0,0, th_stand),90,2 !!! now it works for all numbering
! Step 3: Give a name for each component
VSEL,S,LOC,Z,thick_b+thick_al,thick_b+height+thick_c+thick_al
CM,cymbal,VOLU
*IF,adh,EQ,1,then
VSEL,S,LOC,Z,thick_b,thick_b+thick_al
CM,adhesive,VOLU
*ENDIF
*IF,stand,EQ,1,then
VSEL,S,LOC,Z,-th_stand,0
CM,STAND,VOLU
*ENDIF
VSEL,S,LOC,Z,0,thick_b
CM,piezo,VOLU
! Step 4: coloring different volumes (parts) of the device
ALLS
/COLOR, CM, RED,piezo
/COLOR, CM, BLUE,cymbal
*IF,adh,EQ,1,then
/COLOR, CM, LGRA,adhesive
*ENDIF
*IF,stand,EQ,1,then
/COLOR, CM, YELL,stand
*ENDIF
!********************************************
! *** MESHING SELECTED VOLUMES ***
!********************************************
! MESHING SELECTED VOLUMES
CMSEL,S,piezo
VATT,ceramic,,ceramic
CMSEL,S,cymbal
VATT,Bcopper,,Bcopper !Associates element attributes with the selected, unmeshed volumes
*IF,adh,EQ,1,then
CMSEL,S,ADHESIVE
VATT,BCB,,BCB, !Associates element attributes with the selected, unmeshed volumes
*ENDIF
*IF,stand,EQ,1,then
CMSEL,S,STAND
VATT,BCB,,BCB !!! It was BCB_st instead of PCB
*ENDIF
*IF,adh,EQ,1,then
ESIZE,1*thick_c
*ELSEIF,adh,EQ,0
ESIZE,1*thick_c
*ENDIF
CSYS,1
LSEL,S,LOC,X,0,(999/1000)*rd_stand
LSEL,R,LOC,Z,-th_stand,thick_b
LESIZE,ALL,,,10
CSYS,0
ALLS
MSHKEY,1
MSHAPE,0
VMESH,ALL
! NUMMRG,NODE,10*tol
! NUMMRG,ELEM,10*tol !!! not necesary enymore
FINI
!************************************************
!*** BOUNDARY CONDITIONS ***
!************************************************
/PREP7
!*** Symmetry 1/4 structure ***
NSEL,S,LOC,X,0 ! select all nodes for X = 0
D,ALL,UX,,,,, ! symetry / face
NSEL,S,LOC,Y,0 ! select all nodes for Y = 0
D,ALL,UY,,,,, ! symetry / face
!*** CLAMPING LOAD ***
*IF,stand,EQ,1,then ! Clamping if the stand exist
NSEL,S,LOC,Z,-th_stand ! select all nodes for Z = stand height
D,ALL,UX,,,,,UZ,UY ! stop nodes motion (3 directions)
*ELSEIF,stand,EQ,0,then ! Clamping if the stand does not exist
CSYS,1 ! Chose the cylindrical repere
NSEL,S,LOC,Z,0 ! select all nodes for Z = 0
NSEL,R,LOC,X,0,coef*radius_C ! select all nodes within a circle of radius r=....
D,ALL,UX,,,,,UZ,UY ! stop nodes motion (3 directions)
*ENDIF
!*** VOLTAGE LOAD ***
ASEL,S,LOC,Z,-1/1000,1/1000 ! Select the bottom electrod.
NSLA,S,1 ! Selects those nodes associated with the selected areas.
CM,mass,NODE ! Creat comp called MASS.
ASEL,S,LOC,Z,(999/1000)*thick_b,(1001/1000)*thick_b ! Select the bottom electrod.
NSLA,S,1 ! Selects those nodes associated with the selected areas.
CM,signal,NODE ! Creat comp called SIGNAL
ALLS
D,mass,VOLT,0 !
D,signal,VOLT,1 !
!*** Thermal LOAD ***
Temp_TR = 140 ! Bonding temperature parameter
Temp_TU = 20 ! Use temperature parameter
NSEL,ALL ! Select all the nodes
TREF,Temp_TR ! Set the bonding temperature
TUNIF,Temp_TU ! Set the system used temperature
FINI
!**********************************************************************
! *** MODAL ANALYSIS ***
!**********************************************************************
/SOLU ! Enter solution processor
ANTYPE,STATIC ! Static analysis
PSTRES,ON ! Flag to calculate the prestress matrix
ALLS ! Select everythings
SOLVE !!! Here you get a warning: the material property perx for material 3 is undefined
FINISH
/eof
/SOLU ! Enter solution processor
ANTYPE,MODAL ! Modal analysis type
MODOPT,LANB,6 ! Calculate 6 modes using Block Lanczos
MXPAND,6 ! Expand all 6 modes
TOTAL,10,1 ! Requests automatic generation of (structural) DOF
ALLS ! Select all nodes
! PSTRES,ON !!! I corrected this command, it was pstress instead of pstres. but that was not the problem.
SOLVE ! Solve current load step
FINISH ! Exit active processor
/eof
/POST1 ! Enter general post-processor
SET,LIST ! List solution frequencies
*DO,i,1,6 ! Do loop from 1 to 4 with i as counter
SET,1,i ! Read solution set i (mode)
*IF,adh,EQ,1,then
Temp_DT = temp_TR-temp_TU
temp_02 = thick_al*10E+6
/TITLE,%temp_02%um adhesive layer thickness & Delta Temperature:%Temp_DT% & Mode shape %i%
*ELSEIF,adh,EQ,0
Temp_DT = temp_TR-temp_TU
/TITLE,No adhesive layer thickness & Delta Temperature:%Temp_DT% & Mode shape %i%
*ENDIF
PLDISP,1,2 ! Plot deformed shape
/VIEW,1,1,1,1
!*
PLNSOL,U,SUM,0,1
/SHOW,JPEG, ! Save the picture and results
JPEG,QUAL,100,
JPEG,ORIENT,HORIZ
JPEG,COLOR,2
JPEG,TMOD,1
/GFILE,800,
!*
/REPLOT
/SHOW,CLOSE
/WAIT,2
*ENDDO
FINISH
/eof