MATLAB Script (BT model)
%% This code solves the Bergh-Tijdeman model
% Author: Arif Hossain_04-10-2016
clc; clear all ; close all
D = 0.00127; % Tube diameter (m)
L = 0.2413; % Tube length (m)
Vt = 1.324e-8; % Transducer volume (m3)
T0=298; % temperature of the Air [K]
P0=101325; % pressure[Pa]
R = 285;
rhos=P0/(R*T0); % density of air at T0 and P0 [kg/m^3]
Cp=1007; % specific heat of air at T0 and P0 [J/(kg K)]
lambda=0.0261; % heat conductivity coefficient of air at T0 and P0 [W/(m K)]
mu=1.85e-5; % dynamic viscosity of air at T0 and P0 [Pa s]
gama=1.402; % specific heat ratio of air at T0 and P0
c=sqrt(gama*P0/rhos); % velocity of sound at T0 and P0 [m/s]
Vp=pi/4*D^2*L; % volume of the probe [m^3]
k=1.402; % polytropic factor for air in the transducer volume
sigma=0; % dimensionless increse in transducer volume
f=10:10:1000; % frequency vector [Hz]
omega=f*2*pi; % radian frequency [rad/s]
alpha=1i*sqrt(1i)*D/2*sqrt(rhos*omega/mu); % shear wave number [-]
Pr=mu*Cp/lambda; % Prandtl number [-]
J0a=besselj(0,alpha);
J2a=besselj(2,alpha);
J0p=besselj(0,alpha*sqrt(Pr));
J2p=besselj(2,alpha*sqrt(Pr));
n=(1+(gama-1)/gama*(J2p./J0p)).^(-1);
phi=(omega/c).*sqrt(J0a./J2a).*sqrt(gama./n); % frequency response function;
PR=(cosh(phi.*L)+(Vt/Vp)*(sigma+1/k)*n.*phi*L.*sinh(phi*L)).^(-1); % amplitude ratio;
AR=20*log10(abs(PR)); % phase shift [rad];
theta=unwrap(angle(PR))*(180/pi); % degree
%% Exp Data plot
load ('Exp_data.mat')
subplot(2,1,1) % Amplitude
semilogx(f,AR,'b','linewidth',2);
hold on
semilogx(amp(:,1),amp(:,2), 'sr')
set(gca,'fontsize',12)
xlabel('f [Hz]');ylabel('Amplitude [dB]');
legend('B.T Model','Experiment','location','northwest')
ylim([-5 15]);
grid on
subplot(2,1,2) % Phase lag
semilogx(f,theta,'b','linewidth',2);
hold on
semilogx(phase(:,1),phase(:,2), 'sr')
set(gca,'fontsize',12)
xlabel('f [Hz]');ylabel('Phase [^0]');
legend('B.T Model','Experiment','location','southwest')
ylim([-200 50])
grid on
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%