216 Computational Modelling in Hydraulic and Coastal Engineering
for j=1:ny
c(i,j)=0;
end
end
for i=1:ipp
X=fix(x(i)/Dd)+1;
Y=fix(y(i)/Dd)+1;
c(X,Y)=c(X,Y)+1;
end
for j=1:ny
for i=1:nx
if c(i,j)>cmax(i,j)
cmax(i,j)=c(i,j);
end
end
end
index=k
end
[i,j]=meshgrid(1:1:nx,1:1:ny);
df1=fDep(:,3);
df2=reshape(df1,70,40);
df2=df2';
An=ones(size(df2));
idx=find(df2== 0);
An(idx)=0;
figure;
pcolor(An);
colormap(jet);
shading flat;
hold on;
i=1:nx;
j=1:ny;
Cplot=cmax(i,j)/ipp;
contour(i,j,Cplot')
% colorbar('vert')
PROBLEM 8.3
Solve the same problem by making the suggested modifications while keeping the rest of the data constant:
1. Place the contaminant point source at location x = 225 m, y = 190 m.
2. Remove the horizontal arm of the breakwater.
3. Remove the left vertical section of the breakwater.
4. Change the decay coefficient from 0.00001 s –1 to (a) 0.01 s –1 (decay)
and (b) –0.01 s –1 (growth).
5. Change the number of simulated particles from 5000 to (a) 500 and
(b) 50,000.
for j=1:ny
c(i,j)=0;
end
end
for i=1:ipp
X=fix(x(i)/Dd)+1;
Y=fix(y(i)/Dd)+1;
c(X,Y)=c(X,Y)+1;
end
for j=1:ny
for i=1:nx
if c(i,j)>cmax(i,j)
cmax(i,j)=c(i,j);
end
end
end
index=k
end
[i,j]=meshgrid(1:1:nx,1:1:ny);
df1=fDep(:,3);
df2=reshape(df1,70,40);
df2=df2';
An=ones(size(df2));
idx=find(df2== 0);
An(idx)=0;
figure;
pcolor(An);
colormap(jet);
shading flat;
hold on;
i=1:nx;
j=1:ny;
Cplot=cmax(i,j)/ipp;
contour(i,j,Cplot')
% colorbar('vert')
PROBLEM 8.3
Solve the same problem by making the suggested modifications while keeping the rest of the data constant:
1. Place the contaminant point source at location x = 225 m, y = 190 m.
2. Remove the horizontal arm of the breakwater.
3. Remove the left vertical section of the breakwater.
4. Change the decay coefficient from 0.00001 s –1 to (a) 0.01 s –1 (decay)
and (b) –0.01 s –1 (growth).
5. Change the number of simulated particles from 5000 to (a) 500 and
(b) 50,000.
