Contaminant and sediment transport by advection and diffusion 243
uo(i)=pi*amm/T/(exp(arg)-exp(-arg))*2;
else
arg=2*pi*hmm/lmm;
cc=lmm/T;
uc(i)=(pi*amm/T/(exp(arg)-exp(-arg))*2)^2/2/cc;
uo(i)=pi*amm/T/(exp(arg)-exp(-arg))*2;
end
ch=18*log(12*hmm/ks);
twc=g*uc(i)^2/ch^2+0.25*0.05*uo(i)^2;
qs(i)=0.05*uc(i)*ch*twc^2/sed;
end
% Continuity equation for estimation of new depths;
for i=2:nx
hhb(i)=(qs(i)-qs(i-1))/Dx*Dt;
end
% Filtering the water depths by moving averages;
for i=1:nx
h(i)=h(i)+hhb(i);
end
for i=2:nx-1
hm(i)=0.8*h(i)+0.1*(h(i-1)+h(i+1));
end
for i=2:nx-1
h(i)=hm(i);
end
h(nx+1)=2*h(nx)-h(nx-1);
%
index=k
hbb(k)=h(nb);
index=k
end
% Original beach profile;
x=0;
for k=1:83
x=x+k;
yplot(k)=-H+0.06*k;
end
ii=1:k;
i=1:nx;
hplot=-h(i);
plot(1:nx,hplot,'Linewidth',1.5)
xlabel('Longitudinal distance x 3 [m]')
ylabel('Beach profile [m]')
hold on;
plot(ii,yplot,'m','Linewidth',1.5)
text(30,-0.7,'Evolved beach profile')
text(50,-2.3,'Original beach profile')
figure
k=1:nt;
hbplot=hbb(k);
plot(1:nt,hbplot,'Linewidth',1.5)
uo(i)=pi*amm/T/(exp(arg)-exp(-arg))*2;
else
arg=2*pi*hmm/lmm;
cc=lmm/T;
uc(i)=(pi*amm/T/(exp(arg)-exp(-arg))*2)^2/2/cc;
uo(i)=pi*amm/T/(exp(arg)-exp(-arg))*2;
end
ch=18*log(12*hmm/ks);
twc=g*uc(i)^2/ch^2+0.25*0.05*uo(i)^2;
qs(i)=0.05*uc(i)*ch*twc^2/sed;
end
% Continuity equation for estimation of new depths;
for i=2:nx
hhb(i)=(qs(i)-qs(i-1))/Dx*Dt;
end
% Filtering the water depths by moving averages;
for i=1:nx
h(i)=h(i)+hhb(i);
end
for i=2:nx-1
hm(i)=0.8*h(i)+0.1*(h(i-1)+h(i+1));
end
for i=2:nx-1
h(i)=hm(i);
end
h(nx+1)=2*h(nx)-h(nx-1);
%
index=k
hbb(k)=h(nb);
index=k
end
% Original beach profile;
x=0;
for k=1:83
x=x+k;
yplot(k)=-H+0.06*k;
end
ii=1:k;
i=1:nx;
hplot=-h(i);
plot(1:nx,hplot,'Linewidth',1.5)
xlabel('Longitudinal distance x 3 [m]')
ylabel('Beach profile [m]')
hold on;
plot(ii,yplot,'m','Linewidth',1.5)
text(30,-0.7,'Evolved beach profile')
text(50,-2.3,'Original beach profile')
figure
k=1:nt;
hbplot=hbb(k);
plot(1:nt,hbplot,'Linewidth',1.5)
