Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added acoustics/Problem description.pdf
Binary file not shown.
597 changes: 597 additions & 0 deletions acoustics/Problem description.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added acoustics/Problem_description.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions acoustics/acousticsOfMirrors.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
function acousticsOfMirrors
% Speed of longitudinal wave propagation in the considered media.
% we take the mean value of all source we found
vlWater = mean([1480,1483,1484,1493,1496]);
vlCopper = mean([4660,4760,4760,4660,3560]);
vlPCB = mean([4726,3070,2100,2460]);

% Speed of shear wave propagation in the considered media.
% we take the mean value of all source we found
vsWater = vlWater;
vsCopper = mean([2330,2325,2325]);
vsPCB = vlPCB / 2; % hypothese

% critical angles:
disp (strcat("critical angle of longitudinal transmission Water->Copper : ", num2str(rad2deg(criticalAngleOfTransmission(vlWater, vlCopper)))));
disp (strcat("critical angle of shear transmission Water->Copper : ", num2str(rad2deg(criticalAngleOfTransmission(vlWater, vsCopper)))));

% hereafter are computed the angles between the propagation direction and
% the normal vector of the planar boundary between media
% naming convention: ("P"|"S") "_" ("R"|"T") "_" <X> <N> is the angle between the normal vector
% of the boundary X and the propagation vector
% of the pressure (P) or shear (S) wave reflected (R) or transmitted (T) by the boundary X for the Nth time
% example: P_R_A_2 is the pressure wave reflected by the boundary A for the second time

incident = deg2rad(45);

% Pressure waves
P_T_A_1 = transmittedAngle(vlWater, vlCopper, incident);
P_T_A_2 = transmittedAngle(vlCopper, vlWater, P_T_A_1);
P_T_B_1 = transmittedAngle(vlCopper, vlPCB, P_T_A_1);

% Shear waves
S_R_A_1 = transmittedAngle(vlWater, vsWater, incident);
S_T_A_1 = transmittedAngle(vsWater, vsCopper, incident);
S_T_A_2 = transmittedAngle(vsCopper, vsWater, S_T_A_1);
S_T_B_1 = transmittedAngle(vsCopper, vsPCB, S_T_A_1);

% display in octave console
disp(strcat("incident : ",num2str(rad2deg(incident))));
disp(strcat("P_T_A_1 : ",num2str(rad2deg(P_T_A_1))));
disp(strcat("P_T_A_2 : ",num2str(rad2deg(P_T_A_2))));
disp(strcat("P_T_B_1 : ",num2str(rad2deg(P_T_B_1))));
disp(strcat("S_R_A_1 : ",num2str(rad2deg(S_R_A_1))));
disp(strcat("S_T_A_1 : ",num2str(rad2deg(S_T_A_1))));
disp(strcat("S_T_A_2 : ",num2str(rad2deg(S_T_A_2))));
disp(strcat("S_T_B_1 : ",num2str(rad2deg(S_T_B_1))));

return;
endfunction

% Share of the energy which is reflected at the boundary between two
% media of acoustic impedences "z1" and "z2"
function x = reflectionCoeff (z1, z2)
x = ((z2-z1)/(z2+z1))^2;
return;
endfunction

% Angle of the transmitted wave meeting the boundary between two
% media of longitudinal wave velocities "v1" and "v2" at an incendent
% angle "incident_angle"
function x = transmittedAngle (v1, v2, incident_angle)
x = asin (sin(incident_angle)*v2/v1);
return;
endfunction

% returns the critical angle for longitudinal wave transmission. Any
% wave meeting the boundary with a greater angle than those returned
% will be totally reflected
function x = criticalAngleOfTransmission(v1, v2)
x = asin (v1/v2);
return;
endfunction
36 changes: 36 additions & 0 deletions acoustics/envelope_detection.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
function [envelope] = envelope_detection (signal, fech, fmin, fmax,option)

%function to determine the envelope of a the data vector named signal
%fech is the sampling frequency of the data vector in MHz
%we add a filtering of the signal between fmin and fmax in MHz
%option refer to the option of the zero padding process:
%sigzp is filled with 0 from N to Nzeropad if option = 0
%sigzp is filled with the mean of sig from N to Nzeropad if option != 0
%%%%
%if signal have an offset, the output envelope won't have, but still need to put
%option != 0 if signal have an offset and want a clean envelope

if fmin<0
fmin=0;
endif
if fmax>fech/2
fmax=fech/2;
endif
if fmax<fmin
fmax=fmin;
endif

N=length(signal);
[Nzeropad, sigzp] = zero_padding (signal, option);
Sig=fft(sigzp);
deltaf=fech/Nzeropad;

nmin=floor(fmin/deltaf)+1;
nmax=floor(fmax/deltaf)+1;

Sig(1:nmin)=0;
Sig(nmax:Nzeropad)=0;
tmpenv=abs(ifft(Sig))*2;
envelope=tmpenv(1:N);

endfunction
106 changes: 106 additions & 0 deletions acoustics/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Acoustic implications of using a mirror
[TOC]

## Problem description

* Problem 1 (solved): define the angles of all reflected and transmitted longitudinal (black vectors) and shear (red vectors) waves.
* Problem 2 (solved): situate the echos, that is, the distance between the useful reflected wave and the echos
* Problem 3 (in progress): determine the magnitude of all vectors

![./Problem_description.png](./Problem_description.png)

## Results

* Critical angle of longitudinal transmission from water to copper : 19.4°.
* Critical angle of shear transmission from water to copper : 39.7°
* The incident angle (45°) is greater than the critical angles of longitudinal and shear transmission, therefore, there is no transmission of the incident wave into the copper layer, therefore neither longitudinal nor shear echo ([total internal reflection](https://en.wikipedia.org/wiki/Total_internal_reflection)).

*(To reproduce the results, execute in Octave the script “acousticsOfMirrors.m”)*

## Method

* The angles of the longitudinal and shear waves transmitted and reflected in the case of a longitudinal wave hitting a boundary between two media A and B are given by [Snell's law](https://de.wikipedia.org/wiki/Snelliussches_Brechungsgesetz#Akustik):
```
sin(a)/vLA = sin(aRS)/vSA = sin(aRL)/vLA = sin(aTS)/vSB = sin(aTL)/vLB
Where
* a is the incident angle
* vLA is the velocity of longidudinal waves in the medium A
* aRS is the angle of the reflected shear wave in medium A
* vSA is velocity of shear waves in the medium A
* aRL is the angle og the reflected longitudinal wave in medium A
* vLA is the velocity of longitudinal waves in the medium A
* aTS is the angle of the transmitted shear wave in medium B
* vSB is the velocity of shear waves in the mediom B
* aTL is the transmitted longitudinal wave in medium B
* vLB is the velocity of longitudinal waves in the B
```

* The critical angle of wave transmission is the angle above which an incindent wave is totally reflected. It is [derived from Snell's law](https://en.wikipedia.org/wiki/Snell%27s_law#Total_internal_reflection_and_critical_angle):
```
alpha = asin (vA/vB)
Where
* alpha is the critical angle
* vA is the velocity of longitudinal waves in medium A
* vB is the velocity of longitudinal waves in medium B
```

## Variables

Compressional velocity (speed of longitudinal wave propagation, in m/s):
- In copper :
- 4660 [2]
- 4760 (annealed) [6]
- 4760 (annealed) [7]
- 4660 [10]
- 3560 [13]
- In air:
- 331.45 (dry) [6]
- 331.2 (dry at 0°C) [8]
- 331 [13]
- In composite:
- 4726 (Glass fiber-reinforced polyester composite) [9]
- 3070 (graphite/epoxy) [10]
- 2100 (L385:340 epoxy at 20°C) [11]
- 2460 to 3170 (depending on thickness and material ratio) [14]
- In water:
- 1480 (at 20°C) [10]
- 1483 (at 20°C) [12]
- 1484 [8]
- 1493 [13]
- 1496 (distilled) [6]
Shear velocity (speed of shear wave propagation, in m/s):
- In copper:
- 2330 [2]
- 2325 [6]
- 2325 [7]
- In composite:
- No data found. As default value we take compression velocity / sqrt(2)
- In water and air: no shear wave propagation
Acoustic impedence (in Ns/m³):
- Copper:
- 41.6e6 [3]
- Air
- 413 (at 20°C) [3]
- Water
- 1.48e6 [3]

## References

[1] https://www.slideshare.net/RakeshSingh125/minor-project-report-28478524, p 9-12
[2] https://www.slideshare.net/RakeshSingh125/minor-project-report-28478524, p 15
[3] https://www.slideshare.net/RakeshSingh125/minor-project-report-28478524, p 16
[4] https://www.slideshare.net/RakeshSingh125/minor-project-report-28478524, p 17
[5] https://www.slideshare.net/RakeshSingh125/minor-project-report-28478524, p 18
[6] http://www.rfcafe.com/references/general/velocity-sound-media.htm
[7] https://en.wikipedia.org/wiki/Speeds_of_sound_of_the_elements_(data_page)
[8] https://en.wikipedia.org/wiki/Speed_of_sound
[9] https://arxiv.org/ftp/arxiv/papers/1511/1511.04543.pdf
[10] https://www.olympus-ims.com/de/ndt-tutorials/thickness-gage/appendices-velocities/
[11] http://www.ndt.net/article/wcndt2004/pdf/materials_characterization/616_mchugh.pdf
[12] http://www.ondacorp.com/images/Liquids.pdf
[13] http://hyperphysics.phy-astr.gsu.edu/hbase/Tables/Soundv.html
[14] http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.457.3039&rep=rep1&type=pdf

## Furher messy notes
https://www.nde-ed.org/EducationResources/CommunityCollege/Ultrasonics/Physics/modeconversion.htm
https://acoustics.byu.edu/content/mode-conversion
28 changes: 28 additions & 0 deletions acoustics/test_code.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
clear all;
close all;

tlim=2.3;
Npoint=1025;
offset=0.5;

t=linspace(-tlim,tlim,Npoint)*10^(-6);
fech=1/(t(2)-t(1))/10^6;
f=3.5*10^6;
om=2*pi*f;
sig=sin(om*t);
tau=1/f*1;
sig=sig.*exp(-(t/tau).^2);
sig=sig+offset;

[Nzeropad, sigzp] = zero_padding (sig, 0);

figure(1)
plot(t,sig);
figure(2)
plot(sigzp);

[env1] = envelope_detection (sig, fech, 0.5, 8,0);
[env2] = envelope_detection (sig, fech, 0.5, 8,1);

figure(3)
plot(t,(sig-offset),t,env1,t,env2);
28 changes: 28 additions & 0 deletions acoustics/zero_padding.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
function [Nzeropad, sigzp] = zero_padding (sig, option)

%this function is made for making a zero padding to a data vector sig
%zero_padding consiste in changing the number of elements of the the initial vector of size N
%to a number Nzeropad wich is a power of 2 to enjoy the speed of fft algorithm
%sigzp is filled with 0 from N to Nzeropad if option = 0
%sigzp is filled with the mean of sig from N to Nzeropad if option != 0

N=length(sig);

pow=0;

while (2^pow<N)
if (2^pow != N)
pow++;
endif
endwhile

Nzeropad=2^pow;
sigzp=zeros(Nzeropad, 1);
sigzp(1:N)=sig;

if option!=0
mean = sum(sig)/N;
sigzp(N+1:Nzeropad)=mean;
endif

endfunction