156 Computational Modelling in Hydraulic and Coastal Engineering
% T = Wave period [T];
% theta = Incident wave angle [degrees];
% rf = Reflection coefficient (rf = 1 for full reflection);
% ec = Parameter for the eddy viscosity;
% Dd = Spatial step in both x and y directions [m];
% ho = Water depth at the open sea boundary;
% 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 computational time steps;
clc; clear all, close all;
% input data;
g=9.81;
a=0.5;
T=12;
theta=1;
rf=0.5;
ec=0.8;
ho=8.5;
Dd=3;
Dt=0.1;
nx=60;
ny=80;
nt=2400;
80
70
60
50
40
30
20
5
10
15
20
25
30
35
40
45
50
55
60
10
Figure 6.9 Wave-generated current pattern at time t = 2400 Δt.
% T = Wave period [T];
% theta = Incident wave angle [degrees];
% rf = Reflection coefficient (rf = 1 for full reflection);
% ec = Parameter for the eddy viscosity;
% Dd = Spatial step in both x and y directions [m];
% ho = Water depth at the open sea boundary;
% 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 computational time steps;
clc; clear all, close all;
% input data;
g=9.81;
a=0.5;
T=12;
theta=1;
rf=0.5;
ec=0.8;
ho=8.5;
Dd=3;
Dt=0.1;
nx=60;
ny=80;
nt=2400;
80
70
60
50
40
30
20
5
10
15
20
25
30
35
40
45
50
55
60
10
Figure 6.9 Wave-generated current pattern at time t = 2400 Δt.
