-
Notifications
You must be signed in to change notification settings - Fork 0
/
Boric_Acid_Pure_Water_Sea_water
75 lines (52 loc) · 2.22 KB
/
Boric_Acid_Pure_Water_Sea_water
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
%************* Junaid Qadir *************%
%************* MPhil Electronics *************%
%************* Department of Electronics *************%
%************* Quaid-i-Azam University Islamabad,45320, Pakistan *************%
%************* Email: [email protected] , Instagram: @junaid_qadar, Facebook: https://web.facebook.com/junaid.qadar*************%
%%%%%%%%%%%%% BORIC ACID + Magnesium sulphate+ Pure water
clear all
close all
clc
f= 1e-2:10^3; % Frequency in kHz
S= 35; % salinity
T=10; % temmperature in degree centi grad
pH= 7.8; %% Water pH level
theta= 273+T; %%% Angle
D= 500; % Depth in meter
c= 1412+3.21*T+1.19*S+0.0167*D; %%% Sound speed in Water 1500 m/s
%%%% Boric Acid Contribution
A1= 8.86/c*10^(0.78*pH-5); % Absorption in Boric acid
p1= 1; % pressur in Boric acid
f1= 0.78* sqrt(S/35)*10^(T/26); % frequency in Boric acid
%%%% MgSO_4 Contribution
A2= 21.44* S/c*(1+0.025*T); % Absorption in MgSO4
p2= 1-1.37* 10^(-4) *D +6.2*10^(-9)* D^2; % pressure in MgSO4
f2= (8.17*10^(8-1990/theta)) ./ (1+0.0018*(S-35)); %frequency in MgSO4
%%% Pure Water Contribution
A3= 3.964*10^(-4)- 1.146* 10^(-5)*T +1.45*10^(-7)*T^2-6.5*10^(-10)*T^3; % Absorption in pure water
p3= 1-3.83*10^(-5) * D+4.9*10^(-10) *D^2; % Pressure in Pure water
Boric_acid= (A1*p1*f1*f.^2)./( f1^2+f.^2); % Formula for Boric acid %%% Absorption of Boric acid
Magnesium_sulphate= A2*p2*f2*(f.^2)./ ((f2^2)+f.^2); % Formula for Magnesium sulphate %%%% Absorption of Megnesium sulphates
Pure_water= A3*p3*f.^2; % Formula for pure water %% Absorption of Water
Total_absorption= Boric_acid+ Magnesium_sulphate + Pure_water; % Total Absorption
% Plot to double log-scale
loglog(f,Boric_acid,':.r','LineWidth',4)
hold on
loglog(f,Magnesium_sulphate,'-g','LineWidth',2)
hold on
loglog(f,Pure_water,'--b','LineWidth',2)
hold on
loglog( f,Total_absorption,'-.k','LineWidth',2)
hold off
% Change look
% a = gca;
grid on
xlabel('Frquency - kHz')
ylabel('Attenuation - dB/km')
legend({'Boric acid', 'MgSO_{4}', 'Pure water ', 'Total absorption'}, 'Interpreter', 'tex', 'Location', 'southeast')
a.GridLineStyle = '--';
a.MinorGridLineStyle = '--';
a.GridColor = 'k';
a.MinorGridColor = 'k';
a.GridAlpha = 1;
a.MinorGridAlpha = 1;