Common partial differential equations of computational hydraulics 39
5. Knowing that the streamline functions (s) are defined as
∂
∂
=
∂
∂
s
y
f
x
and
∂
∂
= −
∂
∂
s
x
f
y
, calculate the streamline field and plot the results.
Compare the solution data obtained by running the modifications, derive
conclusions and discuss the significance of the various variables involved to
the phenomenon under consideration.
3.3.2 Solution of a parabolic partial differential
equation (diffusion equation)
In contrast to the elliptic type PDEs that describe equilibrium conditions,
the parabolic ones are time-dependent, therefore for a one-dimensional
case the solution domain is the x-t plane. Considering a solution domain
bounded by the inequalities (0 ≤ x ≤ L; 0 ≤ t ≤ T), where L is the total
length and T the total computational time, the discretization is accomplished by using a Δx – Δt grid (Figure 3.8). Provided that the initial and
boundary conditions are given, the unknown values of the f(x,t) can be
calculated for the internal nodes of the computational grid. The values of
f(x,t) on the computational points are denoted by the two integer indices.
The lower one, i, refers to the position on the x-axis (f i = f(x i ), where x i =
(i – 1)Δx); and the upper index, n, refers to the position on the t-axis (f n =
f(t n ), where t n = (n – 1)Δt). Index i runs from 1 to N ((N – 1)Δx = L) and
index n from 1 to M ((M – 1)Δt = T).
3.3.2.1 Forward in time, central in space (FTCS)
numerical scheme
According to the aforementioned notations, the derivatives on point i,n
are approximated by finite differences (FD) using a forward FD scheme of
the first order for the time derivative
∂
∂
f
t
(Equation 3.21) and a central FD
scheme of the second order for the space derivative
∂
∂
2
2
f
x
(Equation 3.22):
∂
∂





 =
− +
+
f
t
f
f
t
Truncation error O t
i
n
i
n
i
n
1
∆
∆
( )
(3.21)
∂
∂





 =
−
+
+
+
−
2
2
1
1
2
2
f
x
f
f f
x
Truncation
i
n
i
n
i
n
i
n
( )
∆
error O x
(
)
∆
2
(3.22)
Précédent

- 52/302

Suivant