kill(all)$
f : 4.15e6$    /*Frequency*/
u_fgpp : 20$ /*Voltage at function generator peak-peak (given voltage is over load and 50 Ohm internal resistance)*/
d_zSmaxm : 1.82676666666667E-10$ /*Normal deflection amplitude (0-peak) at u_fgpp*/
Z : 5.2067711041921-23.1185128280492*%i$  /*Impedance from network analyzer measurement*/
u_PZT0pm : 0.5*(9/10)^0.5*u_fgpp*abs(Z/(50+Z)); /*Voltage amplitude at actuator (0-peak - that's why factor 0.5; 10 percent of power are loft for measurement equipment - that's why factor (9/10)^0.5)*/
d_zSmax0pg1V : d_zSmaxm/u_PZT0pm*1; /*Normal deflection amplitude (0-peak) at u_PZT0p=1 V*/
emod : 2.1e11$ /*Young's modulus*/
pz : 0.27$ /*Poisson's ratio*/
rho : 7850$ /*Density*/
b_IDT : 26.38e-3$ /*width of IDT structure*/
omega : 2*%pi*f$    /*angular speed*/
lambda : emod*pz/(1+pz)/(1-2*pz)$ /*Lamé constants*/
my : emod/(2+2*pz)$
kl : omega*(rho/(lambda+2*my))^(1/2)$ /*wavenumbers*/
kt : omega*(rho/my)^(1/2)$
eta : (0.87+1.12*pz)/(1+pz)$
k : kt/eta$
q : (k^2-kl^2)^(1/2)$
s : (k^2-kt^2)^(1/2)$
A : d_zSmax0pg1V/(q*(1-2*k^2/(k^2+s^2)))$   /*Amplitude for Rayleigh equation, determined by deflection*/
vx : -A*k*omega*(exp(-q*z)-2*q*s/(k^2+s^2)*exp(-s*z))*cos(k*x)$ /*tangential particle velocity for time t=0*/
vz : A*q*omega*(exp(-q*z)-2*k^2/(k^2+s^2)*exp(-s*z))*sin(k*x)$ /*normal particle velocity for time t=0*/
P_AOW : float(rho*f*b_IDT*integrate(integrate(vx^2+vz^2,x,0,2*%pi/k),z,0,inf)); /*wave power determined by particle velocity*/
P_el : 0.5*realpart(1^2/2/Z); /*electrical Power, determined by electr. impedance (factor 0.5, as only one out of two Rayleigh waves is considered)*/
p : P_AOW/P_el; /*efficiency of actuator*/;