Contaminant and sediment transport by advection and diffusion 203
The time step was Δt = 5 s, and the simulation was conducted for a
period of 720 time steps (3600 s). The simulation results are illustrated
in Figure 8.2, where the effects of both advection and diffusion are
clearly shown. The concentrations depicted in Figure 8.2 refer to the
maximum concentration values estimated for each location over the
entire simulation period.
Computer code 8.1
% Example 8.1 Contaminant Advective Diffusion Near Marina
Breakwater
% csource = Pollution concentration at the source [kg/m^3];
% dc = Decay coefficient [s^-1];
% imm = x-axis coordinate of the pollution source [number of
steps];
% jmm = y-axis coordinate of the pollution source [number of
steps];
% Dd = Spatial step (same in both directions) [m];
% Dt = Time step [s];
% nx = Number of computational steps in the x-direction;
% ny = Number of computational steps in the y-direction;
% nt = Number of time steps;
clc; clear all; close all;
% Input data;
csource=1;
dc=0.0;
imm=18;
40
35
30
25
20
15
10
5
10
20
30
40
50
60
70
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Figure 8.2 Advection and diffusion of a substance near a breakwater structure.
The time step was Δt = 5 s, and the simulation was conducted for a
period of 720 time steps (3600 s). The simulation results are illustrated
in Figure 8.2, where the effects of both advection and diffusion are
clearly shown. The concentrations depicted in Figure 8.2 refer to the
maximum concentration values estimated for each location over the
entire simulation period.
Computer code 8.1
% Example 8.1 Contaminant Advective Diffusion Near Marina
Breakwater
% csource = Pollution concentration at the source [kg/m^3];
% dc = Decay coefficient [s^-1];
% imm = x-axis coordinate of the pollution source [number of
steps];
% jmm = y-axis coordinate of the pollution source [number of
steps];
% Dd = Spatial step (same in both directions) [m];
% Dt = Time step [s];
% nx = Number of computational steps in the x-direction;
% ny = Number of computational steps in the y-direction;
% nt = Number of time steps;
clc; clear all; close all;
% Input data;
csource=1;
dc=0.0;
imm=18;
40
35
30
25
20
15
10
5
10
20
30
40
50
60
70
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Figure 8.2 Advection and diffusion of a substance near a breakwater structure.
