#importing modules
import math
#Variable declaration
t=0.15*10**-2; #thickness of the quartz crystal in m
Y=7.9*10**10; #young's modulus of quartz in N/m^2
rho=2650; #density of quartz in kg/m^3
#Calculation
x=math.sqrt(Y/rho);
f=x/(2*t);
f=f*10**-6; #converting f from Hz to MHz
f=math.ceil(f*10**6)/10**6; #rounding off to 6 decimals
#Result
print("fundamental frequency of vibration in MHz is",f);
#importing modules
import math
#Variable declaration
t=1e-03; #thickness of the quartz crystal in m
Y=7.9*10**10; #young's modulus of quartz in N/m^2
rho=2650; #density of quartz in kg/m^3
#Calculation
x=math.sqrt(Y/rho);
p1=1; #for fundamental frequency p=1
f1=(p1*x)/(2*t);
F1=f1/10**6;
F1=math.ceil(F1*10**5)/10**5; #rounding off to 5 decimals
f_1=f1*10**-6; #converting f1 from Hz to MHz
f_1=math.ceil(f_1*10**5)/10**5; #rounding off to 5 decimals
p2=2; #for first overtone p=2
f2=(p2*x)/(2*t);
F2=f2/10**6;
F2=math.ceil(F2*10**5)/10**5; #rounding off to 5 decimals
f_2=f2*10**-6; #converting f2 from Hz to MHz
f_2=math.ceil(f_2*10**5)/10**5; #rounding off to 5 decimals
#Result
print("fundamental frequency in Hz is",F1,"*10**6");
print("fundamental frequency in MHz is",f_1);
print("frequency of the first overtone in Hz is",F2,"*10**6");
print("frequency of the first overtone in MHz is",f_2);
#importing modules
import math
#Variable declaration
lamda=589.3*10**-9; #wavelength of light in m
f=100*10**6; #frequency of ultrasonic transducer in Hz
n=1; #order of diffraction
theta=2.25; #angle of diffraction in degrees
theta=theta*0.0174532925; #converting degrees to radians
#Calculation
d=(n*lamda)/(2*math.sin(theta));
d1=d*10**6; #converting d from m to micro m
lamda1=2*d;
v=f*lamda1;
v=math.ceil(v*100)/100; #rounding off to 2 decimals
#Result
print("wavelength of ultrasonic wave in m is",lamda1);
print("velocity of ultrasonic wave in m/sec",int(v));
#importing modules
import math
#Variable declaration
f=2*10**6; #frequency of transducer in MHz
v=3; #speed of blood in m/s
c=800; #velocity of ultrasonic wave in m/s
theta=30; #angle of inclination in degrees
theta=theta*0.0174532925; #converting degrees to radians
#Calculation
deltaf=(2*f*v*math.cos(theta))/c;
deltaf=deltaf*10**-6; #converting deltaf from Hz to MHz
deltaf=math.ceil(deltaf*10**6)/10**6; #rounding off to 6 decimals
#Result
print("doppler shifted frequency in MHz is",deltaf);
#importing modules
import math
#Variable declaration
Y=7.9*10**10; #young's modulus of quartz in N/m^2
rho=2650; #density of quartz in kg/m^3
#Calculation
v=math.sqrt(Y/rho);
v=math.ceil(v*10**3)/10**3; #rounding off to 3 decimals
#Result
print("velocity of ultrasonic waves in m/s is",v);