Free surface flows 131
% hbo = Initial lower fluid layer depth [m];
% Dx = Spatial step [m];
% Dt = Time step [s];
% nx = Number of spatial computational steps;
% nt = Number of time computational steps;
clc; clear all; close all;
% Input data;
g=9.81;
w=10;
fs=0.000003;
fi=0.001;
fb=0.05;
rdd=0.005;
ev=20;
huo=10;
hbo=10;
Dx=200;
Dt=10;
nx=50;
nt=103680;
% Initial conditions;
for k=1:nx-1
hu(k)=huo;
13
12
11
10
9
8
7
0
1
2
3
4
5
6
7
8
9
10
Time × 10 (s)
× 10 4
Lower layer
Upper layer
Surface oscillation at right boundary (m)
Figure 5.21 Oscillations of the free surface and interface at the end boundary.
% hbo = Initial lower fluid layer depth [m];
% Dx = Spatial step [m];
% Dt = Time step [s];
% nx = Number of spatial computational steps;
% nt = Number of time computational steps;
clc; clear all; close all;
% Input data;
g=9.81;
w=10;
fs=0.000003;
fi=0.001;
fb=0.05;
rdd=0.005;
ev=20;
huo=10;
hbo=10;
Dx=200;
Dt=10;
nx=50;
nt=103680;
% Initial conditions;
for k=1:nx-1
hu(k)=huo;
13
12
11
10
9
8
7
0
1
2
3
4
5
6
7
8
9
10
Time × 10 (s)
× 10 4
Lower layer
Upper layer
Surface oscillation at right boundary (m)
Figure 5.21 Oscillations of the free surface and interface at the end boundary.
