52 Computational Modelling in Hydraulic and Coastal Engineering
3.3.3.5 Total variation diminishing (TVD) scheme
In addition to the aforementioned numerical schemes, there is a variety
of other higher-order schemes. One such scheme, which is applied to the
numerical solution of the first-order hyperbolic equation, is the TVD
scheme. The TVD scheme reads
f
f c
t
x
f f
K
K
i
n
i
n
o
i
n
i
n
i
i
+
−
+
−
= −
−
(
)−
−
(
)
1
1
1
2
1
2
∆
∆
(3.47)
where the parameters involved are defined as
K
c
t
x
c
t
x
f
f
R
i
o
o
i
n
i
n
i
+
+
=
−

 

 
−
(
)
1
2
1
2
1
∆
∆
∆
∆
ϕ( )
(3.48)
K
c
t
x
c
t
x
f f
R
i
o
o
i
n
i
n
i
−
−
=
−

 

 
−
(
)
1
2
1
2
1
∆
∆
∆
∆
ϕ( )
(3.49)
R
f
f
f
f
i
i
n
i
n
i
n
i
n
=
−
−
−
+
1
1
(3.50)
while φ(R i ) = min(2R i ,2) for R i > 0 and φ(R i ) = 0 for R i < 0. It should be
noted that if the parameters K are set equal to zero, then the TVD scheme
coincides with the Godunov scheme.
Example 3.3
This exercise examines the performance of three different finite difference methods applied for solving the wave equation (Equation
3.30). The schemes applied are the Godunov scheme (Equation 3.36),
the Fromm scheme (Equations 3.45 and 3.46) and the TVD scheme
(Equation 3.47). The data used are as follows:
Celerity = 1 m/s
Time step = 0.5 s
Spatial step = 1 m
The upstream boundary condition for the function was set f = 1.
The initial conditions were f = 0 for the Godunov and Fromm schemes
and f = 0.0001 for the TVD scheme. The simulation was run for 300
spatial steps and 200 time steps.
From the numerical simulation results (Figure 3.14), the diffusiveness of the Godunov scheme, the trailing oscillations of the Fromm
scheme and the robustness of the TVD scheme can all be clearly seen. In
Précédent

- 65/302

Suivant