# Modeling of Unsteady Flow through the Canals by Semiexact Method

Authors: Farshad Ehsani; Seyed Ghorban Hosseini; Hossein Soury
Journal: Modelling and Simulation in Engineering
 (2014)

---

## Abstract

The study of free-surface and pressurized water flows in channels has many interesting application, one of the most important being the modeling of the phenomena in the area of natural water systems (rivers, estuaries) as well as in that of man-made systems (canals, pipes). For the development of major river engineering projects, such as flood prevention and flood control, there is an essential need to have an  instrument that  be able to model and predict the consequences of any possible phenomenon on the environment and in particular the new hydraulic characteristics of the system. The basic equations expressing hydraulic principles were formulated in the 19th century by Barre de Saint Venant and Valentin Joseph Boussinesq. The original hydraulic model of the Saint Venant equations is written in the form of a system of two partial differential equations and it is derived under the assumption that the flow is one-dimensional, the cross-sectional velocity is uniform, the streamline curvature is small and the pressure distribution is hydrostatic. The St. Venant equations must be solved with continuity equation at the same time. Until now no analytical solution for Saint Venant equations is presented. In this paper the Saint Venant equations and continuity equation are solved with homotopy perturbation method (HPM) and comparison by explicit forward finite difference method (FDM). For decreasing the present error between HPM and FDM, the st.venant equations and continuity equation are solved by HAM. The homotopy analysis method (HAM) contains the auxiliary parameterħ that allows us to adjust and control the convergence region of solution series. The study has highlighted the efficiency and capability of HAM in solving Saint Venant equations and modeling of unsteady flow through the rectangular canal that is the goal of this paper and other kinds of canals.


---

## Body

## 1. Introduction

Hydraulics has a long tradition of providing a scientific basis for engineering applications [1, 2]. Firstly, conceptual models were designed starting from empirical relations obtained from field observations or model scale experiments. Lately, mathematics started playing an important role not only to describe the properties of these relations but also to formulate analytical solutions of particular model situations in order to capture the essential features of those phenomena. Actually, the research and the applications in the field of computational fluid hydraulics and fluid dynamics evolved with the advent of electronic computers. The first applications in computational hydraulics concerned programming analytical formulae rather than deriving generic numerical schemes and techniques based on physical principles like conservation laws for mass and momentum. Later developments extended the research and the applications in this field towards simulating complicated flow phenomena in arbitrarily shaped geometries.The basic equations expressing hydraulic principles were formulated in the 19th century by Barre de Saint Venant and Valentin Joseph Boussinesq. The original hydraulic model of the Saint Venant equations [3] is written in the form of a system of two partial differential equations and it is derived under the assumption that the flow is one-dimensional, the cross-sectional velocity is uniform, the streamline curvature is small, and the pressure distribution is hydrostatic [4]. One-dimensional flows do not actually exist in nature, but the equations remain valid provided that the flow is approximately one-dimensional: as pointed out by Steffler and Jin [5], they are inappropriate to analyze free surface flow problems with horizontal length scales close to flow depth.The goal of paper is to present a semiexact solution of Saint Venant equations. These partial differential equations are solved simultaneously with continuity equation by homotopy perturbation method [6–17]. Then they are solved by homotopy analysis method [18–22]. In the end both of above methods are compared with the finite difference method as a numerical method that it is shown the capability and suitability of HAM in solving Saint Venant equations.


## 2. Symbols

The following symbols are used in this derivation:A = The cross-sectional area of the section
h = depth of flow at the section
z = elevation of surface above a datum at the section
v = mean velocity at the section
Q = discharge at the section
b = width of the top of the section
x = position of the section measured from the upstream end
t = time
g = acceleration due to gravity
ρ = mass density of the fluid.Other symbols are defined in the text at the point when they are introduced.


## 3. The Derivation of the Continuity Equation

Consider a short lengthΔ
x of channel and assuming that there is no lateral inflow, then
(1)
Q
2
-
Q
1
=
∂
Q
∂
x
Δ
x
.
This has the partial derivative since Q is changing with both x and time t. Now the volume of water between Sections 1 and 2 is increasing as a rate of
(2)
b
∂
h
∂
t
Δ
x
,
where b is the top width. As cross-sectional area A
=
b
h then this is equivalent to
(3)
∂
A
∂
t
Δ
x
.
The terms are equal in magnitude but of opposite sign, so
(4)
∂
Q
∂
x
Δ
x
+
b
∂
h
∂
t
Δ
x
=
0
,
As
∂
Q
∂
x
=
∂
(
A
v
)
∂
x
.
The continuity equation is(5)
v
∂
A
∂
x
+
A
∂
v
∂
x
+
b
∂
h
∂
t
=
0
.
So the Continuity equation for rectangular canals becomes
(6)
v
∂
y
∂
x
+
y
∂
v
∂
x
+
∂
y
∂
t
=
0
.


## 4. The Derivation of Dynamic or Momentum Equation

By applying Newton’s 2nd law to our elemental length of channel(7)
∂
H
∂
x
=
∂
∂
x
(
y
+
Z
+
V
2
2
g
)
.
Also
(8)
S
f
=
n
2
v
2
R
4
/
3
=
τ
0
γ
R
.
By using partial differential theory, the value of acceleration at the direction of water motion becomes
(9)
a
x
=
d
v
d
t
=
v
∂
v
∂
x
+
∂
v
∂
t
.
By applying Newton’s 2nd law to our elemental length of channel and assuming the hydrostatics pressure
(10)
-
γ
·
A
·
Δ
h
-
τ
0
·
p
·
Δ
x
=
ρ
·
A
·
Δ
x
(
v
∂
v
∂
x
+
∂
v
∂
t
)
.
The First term of left side of (10) showed the difference between the hydrostatics forces and second term of left side showed the friction due of water motion.From (10), it can be deduced that
(11)
τ
0
=
-
γ
R
[
∂
h
∂
x
+
v
g
∂
v
∂
x
+
1
g
∂
v
∂
t
]
=
-
γ
R
[
∂
H
∂
x
+
1
g
∂
v
∂
t
]
.
Substituting (8) at (11) gives
(12)
∂
H
∂
x
+
1
g
∂
v
∂
t
+
n
2
v
2
R
4
/
3
=
0
.
Equation (12) can be rearranged to the below form
(13)
S
e
+
S
a
+
S
f
=
0
.
ThatR = hydraulic radius
S
e = energy slope
S
a = acceleration slope
S
f = friction slope.By using (7)
(14)
∂
H
∂
x
=
∂
z
∂
x
+
∂
y
∂
x
+
v
g
∂
v
∂
x
=
-
S
0
+
∂
y
∂
x
+
v
g
∂
v
∂
x
.
By Adding (14) and (12)
(15)
S
f
=
S
0
-
∂
y
∂
x
-
v
g
∂
v
∂
x
-
1
g
∂
v
∂
t
=
n
2
v
2
R
4
/
3
.
This is the Saint Venant equation.Then by using the homotopy perturbation method the simultaneous partial differential equations (15) and (6) are solved and obtained the semiexact solution for deep y
(
x
,
t
) and velocity v
(
x
,
t
) of flow.


## 5. Basic Idea of Homotopy Perturbation Method

The homotopy perturbation method is combination of the classical perturbation technique and homotopy technique. We start with the following nonlinear differential equation to explain the basic idea of the HPM:(16)
A
(
u
)
-
f
(
r
)
=
0
,
r
∈
Ω
.
Subject to boundary condition
(17)
B
(
u
,
∂
u
∂
n
)
=
0
,
where A is a general differential operator, B is a boundary operator, f
(
r
) is a known analytical function, Γ is the boundary of domain Ω, and ∂
u
/
∂
n denotes differentiation along the normal drawn outwards from Ω. The operator A can, generally speaking, be divided into two parts: a linear part L and a nonlinear part N.Equation (17) therefore can be rewritten as follows:(18)
L
(
u
)
+
N
(
u
)
-
f
(
r
)
=
0
.
In case the nonlinear equation (16) has no “small parameter”, we can construct the following homotopy:
(19)
H
(
v
,
p
)
=
L
(
v
)
-
L
(
u
0
)
+
p
L
(
u
0
)
+
p
(
N
(
v
)
-
f
(
r
)
)
=
0
,
where p is the parameter of homotopy. According to the homotopy perturbation method, the approximation solution of (19) can be expressed as a series of the power of p; that is,
(20)
v
=
p
0
v
0
+
p
1
v
1
+
p
2
v
2
+
⋯
,
v
=
lim
⁡
p
→
1
v
=
v
0
+
v
1
+
v
2
+
⋯
.
For St. Venant equation (15) and continuity equation (6) we obtain
(21)
y
v
x
+
v
y
x
+
y
t
=
0
,
S
0
-
y
x
-
v
g
v
x
-
1
g
v
t
-
n
2
v
2
R
4
/
3
=
0
.
These equations are solved with each other and step by step.For the continuity equation (6)
(22)
L
(
u
)
=
y
t
,
N
(
u
)
=
y
v
x
+
v
y
x
,
f
(
r
)
=
0
.
For the momentum equation (15)
(23)
L
(
u
)
=
v
t
,
N
(
u
)
=
g
y
x
+
v
v
x
+
g
n
2
v
2
R
4
/
3
,
f
(
r
)
=
g
S
0
,
H
(
y
,
v
,
p
)
=
∂
y
∂
t
-
∂
y
0
∂
t
+
p
(
∂
y
0
∂
t
+
y
∂
v
∂
x
+
v
∂
y
∂
x
)
,
H
(
y
,
v
,
p
)
=
∂
v
∂
t
-
∂
v
0
∂
t
+
p
(
∂
v
0
∂
t
+
g
y
x
+
v
v
x
+
n
2
v
2
R
4
/
3
-
g
S
0
)
.
Changing from u
0 to u
(
r
), consider v as follows:
(24)
v
=
p
0
v
0
+
p
1
v
1
+
p
2
v
2
+
⋯
.
The best approximation for the solution is
(25)
v
=
lim
⁡
p
→
1
v
=
v
0
+
v
1
+
v
2
+
⋯
.
Comparison of the expressions with the same powers of the parameter p gives the following:
(26)
p
1
:
y
1
=
-
∫
0
t
∂
y
0
∂
t
+
y
0
×
∂
u
0
∂
x
+
u
0
×
∂
y
0
∂
x
d
t
,
p
1
:
v
1
=
-
∫
0
t
(
(
n
2
g
R
4
/
3
)
∂
u
0
∂
t
+
g
×
∂
y
0
∂
x
+
u
0
×
∂
u
0
∂
x
11111
+
(
n
2
g
R
4
/
3
)
u
0
2
-
s
0
g
)
d
t
,
p
2
:
y
2
=
-
∫
0
t
(
y
0
×
∂
v
1
∂
x
+
y
1
×
∂
u
0
∂
x
+
u
0
11111
×
∂
y
1
∂
x
+
v
1
×
∂
y
0
∂
x
)
d
t
,
p
2
:
v
2
=
-
∫
0
t
(

(
n
2
g
R
4
/
3
)
g
×
∂
y
1
∂
x
+
u
0
×
∂
v
1
∂
x
+
v
1
×
∂
u
0
∂
x
111111
+
(
n
2
g
R
4
/
3
)
(
2
×
u
0
×
u
1
)
-
s
0
g

)
d
t
,
p
3
:
y
3
=
-
∫
0
t
(
y
0
×
∂
v
2
∂
x
+
y
1
×
∂
v
1
∂
x
+
y
2
×
∂
u
0
∂
x
+
u
0
111111
×
∂
y
2
∂
x
+
v
1
×
∂
y
1
∂
x
+
v
2
×
∂
y
0
∂
x
)
d
t
,
p
3
:
v
3
=
-
∫
0
t
(
(
n
2
g
R
4
/
3
)
g
×
∂
y
2
∂
x
+
u
0
×
∂
v
2
∂
x
+
v
1
×
∂
v
1
∂
x
111111
+
v
2
×
∂
u
0
∂
x
+
(
n
2
g
R
4
/
3
)
111111
×
(
(
2
×
u
0
×
v
2
)
+
v
1
2
)
-
s
0
g
(
n
2
g
R
4
/
3
)
)
d
t
,
p
4
:
y
4
=
-
∫
0
t
(
y
0
×
∂
v
3
∂
x
+
y
1
×
∂
v
2
∂
x
+
y
2
×
∂
v
1
∂
x
+
y
3
111111
×
∂
u
0
∂
x
+
u
0
×
∂
y
3
∂
x
+
v
1
×
∂
y
2
∂
x
+
v
2
111111
×
∂
y
1
∂
x
+
v
3
×
∂
y
0
∂
x
)
d
t
,
p
4
:
v
4
=
-
∫
0
t
(

(
n
2
g
R
4
/
3
)
g
×
∂
y
3
∂
x
+
u
0
×
∂
v
3
∂
x
+
v
1
×
∂
v
2
∂
x
111111
+
v
2
×
∂
v
1
∂
x
+
v
3
×
∂
u
0
∂
x
+
(
n
2
g
R
4
/
3
)
111111
×
(
(
2
×
v
1
×
v
2
)
111111111
+
(
2
×
u
0
×
v
3
)
)
-
s
0
g
(
n
2
g
R
4
/
3
)
)
d
t
,
p
5
:
y
5
=
-
∫
0
t
(

∂
y
2
∂
x
+
v
3
×
∂
y
1
∂
x
+
v
4
×
∂
y
0
∂
x
y
0
×
∂
v
4
∂
x
+
y
1
×
∂
v
3
∂
x
+
y
2
×
∂
v
2
∂
x
+
y
3
111111
×
∂
v
1
∂
x
+
y
4
×
∂
u
0
∂
x
+
u
0
×
∂
y
4
∂
x
+
v
1
×
∂
y
3
∂
x
111111
+
v
2
×
∂
y
2
∂
x
+
v
3
×
∂
y
1
∂
x
+
v
4
×
∂
y
0
∂
x

)
d
t
,
p
5
:
v
5
=
-
∫
0
t
(

(
n
2
g
R
4
/
3
)
g
×
∂
y
4
∂
x
+
u
0
×
∂
v
4
∂
x
+
v
1
×
∂
v
3
∂
x
+
v
2
111111
×
∂
v
2
∂
x
+
v
3
×
∂
v
1
∂
x
+
v
4
×
∂
u
0
∂
x
+
(
n
2
g
R
4
/
3
)
111111
×
(
(
2
×
v
1
×
v
3
)
+
(
2
×
u
0
×
v
4
)
+
(
v
2
)
2
)
111111
-
s
0
g
(
n
2
g
R
4
/
3
)
)
d
t
,
p
6
:
y
6
=
∫
0
t
(
y
0
×
∂
v
5
∂
x
+
y
1
×
∂
v
4
∂
x
+
y
2
×
∂
v
3
∂
x
+
y
3
×
∂
v
2
∂
x
111111
+
y
4
×
∂
v
1
∂
x
+
y
5
×
∂
u
0
∂
x
+
u
0
×
∂
y
5
∂
x
+
v
1
111111
×
∂
y
4
∂
x
+
v
2
×
∂
y
3
∂
x
+
v
3
×
∂
y
2
∂
x
+
v
4
111111
×
∂
y
1
∂
x
+
v
5
×
∂
y
0
∂
x
)
d
t
,
p
6
:
v
6
=
-
∫
0
t
(

(
n
2
g
R
4
/
3
)
g
×
∂
y
5
∂
x
+
u
0
×
∂
v
5
∂
x
+
v
1
×
∂
v
4
∂
x
+
v
2
111111
×
∂
v
3
∂
x
+
v
3
×
∂
v
2
∂
x
+
v
4
×
∂
v
1
∂
x
+
v
5
×
∂
u
0
∂
x
111111
+
(
n
2
g
R
4
/
3
)
(
(
2
×
v
1
×
v
4
)
+
(
2
×
u
0
×
v
5
)
111111111111111
+
(
2
×
v
2
×
v
3
)
)
-
s
0
g
(
n
2
g
R
4
/
3
)
)
d
t
.
The above partial differential equations must be supplemented by conditions ensuring a uniqueness of the solution. For above equations we assume the following conditions in the example.Consider the following Saint Venant and continuity equations with initial value problem:(27)
v
∂
y
∂
x
+
y
∂
v
∂
x
+
∂
y
∂
t
=
0
,
∂
y
∂
x
+
v
g
∂
v
∂
x
+
1
g
∂
v
∂
t
=
S
0
-
n
2
v
2
R
4
/
3
.
For an example to show the capability of HPM and HAM the boundary and initial conditions are considered as below:(28)
v
0
(
x
,
0
)
=
u
0
=
0.09
×
x
,
v
1
(
x
,
0
)
=
0
,
⋮
v
m
(
x
,
0
)
=
0
,
m
>
0
,
m
=
n
,
y
0
(
x
,
0
)
=
5.79
,
y
1
(
x
,
0
)
=
0
,
⋮
y
m
(
x
,
0
)
=
0
,
m
>
0
,
m
=
n
,
s
0
=
0.00008
,
R
=
9.3468
,
n
=
0.013
,
g
=
9.8
,
n is the order of p in (24). By assuming the above initial conditions a solution for equations system is as follows:Important Point. We assume that n
=
8 because after 8iteration the sum of homotopy perturbation sentences converged
(29)
y
1
=
-
0.5211
×
t
,
v
1
=
-
t
×
(
-
0.00078
+
0.0081
×
x
+
6.81191
×
10
-
7
×
x
2
)
,
y
2
=
0.0468989
×
t
2
+
0.0000039
×
t
2
×
x
,
v
2
=
0.00078
×
t
-
0.00003
×
t
2
+
0.00072
×
t
2
×
x
+
1.53268
×
10
-
7
×
t
2
×
x
2
+
5.15579
×
10
-
12
×
t
2
×
x
3
,
y
3
=
-
0.00422
×
t
3
-
0.000001
×
t
3
×
x
-
2.98520
×
10
-
11
×
t
3
×
x
2
,
v
3
=
0.00078
×
t
-
0.00003
×
t
2
-
0.000009
×
t
3
-
5.93393
×
10
-
9
×
t
2
×
x
-
0.00006
×
t
3
×
x
-
2.48293
×
10
-
8
×
t
3
×
x
2
-
2.01075
×
10
-
12
×
t
3
×
x
3
-
3.90231
×
10
-
17
×
t
3
×
x
4
,
y
4
=
0
+
1.14524
×
10
-
8
t
3
+
0.00037
×
t
4
+
1.91682
×
10
-
7
×
t
4
×
x
+
1.47767
×
10
-
11
×
t
4
×
x
2
+
2.25943
×
10
-
16
×
t
4
×
x
3
,
v
4
=
0.000784
×
t
-
0.000035
×
t
2
+
0.0000031
×
t
3
+
0.0000026
×
t
4
-
5.93393
×
10
-
9
×
t
2
×
x
+
1.24612
×
10
-
9
×
t
3
×
x
+
0.000005
×
t
4
×
x
+
5.98835
×
10
-
14
×
t
3
×
x
2
+
3.4760
×
10
-
9
×
t
4
×
x
2
+
4.94182
×
10
-
13
×
t
4
×
x
3
+
2.25358
×
10
-
17
×
t
4
×
x
4
+
2.95357
×
10
-
22
×
t
4
×
x
5
,
y
5
=
1.14524
×
10
-
8
×
t
3
-
3.60753
×
10
-
9
×
t
4
-
0.00003
×
t
5
-
1.73362
×
10
-
13
×
t
4
×
x
-
2.87523
×
10
-
8
×
t
5
×
x
-
4.23152
×
10
-
1
2
×
t
5
×
x
2
-
1.69457
×
10
-
1
6
×
t
5
×
x
3
-
1.71012
×
10
-
2
1
×
t
5
×
x
4
,
v
5
=
0.000784
×
t
-
0.000035
×
t
2
-
2.85762
×
10
-
7
×
t
4
-
4.230320
×
10
-
7
×
t
5
-
5.93393
×
10
-
9
×
t
2
×
x
+
1.24612
×
10
-
9
×
t
3
×
x
-
2.00269
×
10
-
10
×
t
4
×
x
-
5.31493
×
10
-
7
×
t
5
×
x
+
5.98835
×
10
-
14
×
t
3
×
x
2
-
2.29054
×
10
-
14
×
t
4
×
x
2
-
4.46926
×
10
-
10
×
t
5
×
x
2
-
5.66557
×
10
-
19
×
t
4
×
x
3
-
9.70961
×
10
-
14
×
t
5
×
x
3
-
7.63877
×
10
-
18
×
t
5
×
x
4
-
2.31265
×
10
-
22
×
t
5
×
x
5
-
2.2355
×
10
-
27
×
t
5
×
x
6
,
y
6
=
1.1452
×
10
-
8
×
t
3
-
3.3498
×
10
-
9
×
t
4
+
6.30802
×
10
-
1
0
t
5
+
2.56420
×
1
0
-
6
×
t
6
-
1.73362
×
1
0
-
13
×
t
4
×
x
+
9.0495
×
1
0
-
14
×
t
5
×
x
+
3.45027
×
10
-
9
×
t
6
×
x
+
1.96822
×
10
-
1
8
×
t
5
×
x
2
+
8.61416
×
10
-
1
3
×
t
6
×
x
2
+
6.60885
×
10
-
1
7
t
6
×
x
3
+
1.73149
×
10
-
2
1
×
t
6
×
x
4
+
1.29435
×
10
-
2
6
×
t
6
×
x
5
,
v
6
=
0.000784
×
t
-
0.0000352
×
t
2
+
0.000003
×
t
3
-
2.85759
×
10
-
7
×
t
4
+
2.5718
×
10
-
8
×
t
5
+
5.68576
×
10
-
8
×
t
6
-
5.9339
×
10
-
9
×
t
2
×
x
+
1.24612
×
10
-
9
×
t
3
×
x
-
2.00269
×
10
-
10
×
t
4
×
x
+
2.8117
×
10
-
11
×
t
5
×
x
+
4.7846
×
10
-
8
×
t
6
×
x
+
5.98835
×
10
-
14
×
t
3
×
x
2
-
2.29054
×
10
-
14
×
t
4
×
x
2
5.63878
×
10
-
15
×
t
5
×
x
2
+
5.43022
×
10
-
11
×
t
6
×
x
2
-
5.66557
×
10
-
19
×
t
4
×
x
3
+
3.2633
×
10
-
19
×
t
5
×
x
3
+
1.66316
×
10
-
14
×
t
6
×
x
3
+
5.14579
×
10
-
24
×
t
5
×
x
4
+
1.97357
×
10
-
18
×
t
6
×
x
4
+
1.01757
×
10
-
22
×
t
6
×
x
5
+
2.24333
×
10
-
27
×
t
6
×
x
6
+
1.69200
×
10
-
32
×
t
6
×
x
7
,
y
7
=
1.14525
×
10
-
8
×
t
3
-
3.6075
×
10
-
9
×
t
4
+
6.91099
×
10
-
10
×
t
5
-
1.07561
×
10
-
10
×
t
6
-
2.70354
×
10
-
7
×
t
7
-
1.73363
×
10
-
13
×
t
4
×
x
+
9.36160
×
10
-
14
×
t
5
×
x
-
2.83422
×
10
-
14
×
t
6
×
x
-
4.779851
×
10
-
10
×
t
7
×
x
+
1.96822
×
10
-
18
×
t
5
×
x
2
-
1.56473
×
10
-
18
×
t
6
×
x
2
-
1.6892
×
10
-
13
×
t
7
×
x
2
-
1.98627
×
10
-
23
×
t
6
×
x
3
-
2.00466
×
10
-
17
×
t
7
×
x
3
-
9.35669
×
10
-
22
×
t
7
×
x
4
-
1.7124
×
10
-
26
×
t
7
×
x
5
-
9.79671
×
10
-
32
×
t
7
×
x
6
,
v
7
=
0.00078
×
t
-
0.00003528
×
t
2
+
0.000003
×
t
3
-
2.85757
×
10
-
7
×
t
4
+
2.5718
×
10
-
8
×
t
5
-
2.31487
×
10
-
9
×
t
6
-
6.32475
×
10
-
9
×
t
7
-
5.93393
×
10
-
9
×
t
2
×
x
+
1.24612
×
10
-
9
×
t
3
×
x
-
2.00269
×
10
-
10
×
t
4
×
x
+
2.81176
×
10
-
11
×
t
5
×
x
-
3
.
63367
×
10
-
12
×
t
6
×
x
-
4.30797
×
10
-
9
×
t
7
×
x
+
5.98835
×
10
-
14
×
t
3
×
x
2
-
2.29054
×
10
-
14
×
t
4
×
x
2
+
5.63877
×
10
-
15
×
t
5
×
x
2
-
1.11593
×
10
-
15
×
t
6
×
x
2
-
6.33551
×
10
-
12
×
t
7
×
x
2
-
5.66557
×
10
-
19
×
t
4
×
x
3
+
3.26337
×
10
-
19
×
t
5
×
x
3
-
1.11362
×
10
-
19
×
t
6
×
x
3
-
2.59284
×
10
-
15
×
t
7
×
x
3
+
5.14579
×
10
-
24
×
t
5
×
x
4
-
4.04588
×
10
-
24
×
t
6
×
x
4
-
4.293833
×
10
-
19
×
t
7
×
x
4
-
4.54386
×
10
-
29
×
t
6
×
x
5
-
3.30581
×
10
-
23
×
t
7
×
x
5
-
1.22879
×
10
-
27
×
t
7
×
x
6
-
2.09277
×
10
-
32
×
t
7
×
x
7
-
1.2806
×
10
-
37
×
t
7
×
x
8
,
y
8
=
1.14525
×
10
-
8
×
t
3
-
3.60753
×
10
-
9
×
t
4
+
6.95737
×
10
-
10
×
t
5
-
1.08117
×
10
-
10
×
t
6
+
1.49402
×
10
-
11
×
t
7
+
2.4334
×
10
-
8
×
t
8
-
1.73362
×
10
-
13
×
t
4
×
x
+
9.36160
×
10
-
14
×
t
5
×
x
-
2.8378
×
10
-
14
×
t
6
×
x
+
6.45478
×
10
-
15
×
t
7
×
x
+
5.74793
×
10
-
11
×
t
8
×
x
+
1.96822
×
10
-
18
×
t
5
×
x
2
-
1.56474
×
10
-
18
×
t
6
×
x
2
+
6.63364
×
10
-
19
×
t
7
×
x
2
+
2.79942
×
10
-
14
×
t
8
×
x
2
-
1.98627
×
10
-
23
×
t
6
×
x
3
+
2.13028
×
10
-
23
×
t
7
×
x
3
+
4.8047
×
10
-
18
×
t
8
×
x
3
+
1.87921
×
10
-
28
×
t
7
×
x
4
+
3.50310
×
10
-
22
×
t
8
×
x
4
+
1.146019
×
10
-
26
×
t
8
×
x
5
+
1.60029
×
10
-
31
×
t
8
×
x
6
+
7.4149
×
10
-
37
×
t
8
×
x
7
,
v
8
=
0.00078
×
t
-
0.00003
×
t
2
+
0.000003
×
t
3
-
2.85756
×
10
-
7
×
t
4
+
2.57179
×
10
-
8
×
t
5
-
2.31476
×
10
-
9
×
t
6
+
2.08377
×
10
-
10
×
t
7
+
7.74365
×
10
-
10
×
t
8
-
5.93393
×
10
-
9
×
t
2
×
x
+
1.246125
×
10
-
9
×
t
3
×
x
-
2.00269
×
10
-
10
×
t
4
×
x
+
2.63873
×
10
-
11
×
t
5
×
x
-
3.43898
×
10
-
12
×
t
6
×
x
+
4.33819
×
10
-
13
×
t
7
×
x
+
3.88011
×
10
-
10
×
t
8
×
x
+
5.98835
×
10
-
14
×
t
3
×
x
2
-
2.29055
×
10
-
14
×
t
4
×
x
2
+
4.98395
×
10
-
15
×
t
5
×
x
2
-
1.00406
×
10
-
15
×
t
6
×
x
2
+
1.85116
×
10
-
16
×
t
7
×
x
2
+
7.08736
×
10
-
13
×
t
8
×
x
2
-
5.66558
×
10
-
19
×
t
4
×
x
3
+
2
.
733075
×
10
-
19
×
t
5
×
x
3
-
9.438281
×
10
-
20
×
t
6
×
x
3
+
2.71433
×
10
-
20
×
t
7
×
x
3
+
3.69331
×
10
-
16
×
t
8
×
x
3
+
4.116633
×
10
-
24
×
t
5
×
x
4
-
3.17752
×
10
-
24
×
t
6
×
x
4
+
1.607857
×
10
-
24
×
t
7
×
x
4
+
8.00541
×
10
-
20
×
t
8
×
x
4
-
3.24562
×
10
-
29
×
t
6
×
x
5
+
3.83938
×
10
-
29
×
t
7
×
x
5
+
8.38422
×
10
-
24
×
t
8
×
x
5
+
2.94785
×
10
-
34
×
t
7
×
x
6
+
4.49991
×
10
-
28
×
t
8
×
x
6
+
1.23289
×
10
-
32
×
t
8
×
x
7
+
1.58747
×
10
-
37
×
t
8
×
x
8
+
7.26969
×
10
-
43
×
t
8
×
x
9
.


## 6. Basic Idea of Homotopy Analysis Method (HAM)

In this section we employ the homotopy analysis method to the discussed problem. To show the basic idea, let us consider the following differential equation:(30)
N
[
u
(
τ
)
]
=
0
,
where N is a nonlinear operator, τ denotes independent variable, and u
(
τ
) is an unknown function, respectively. For Simplicity, we ignore all boundary or initial conditions, which can be treated in the similar way. By means of generalizing the traditional homotopy method, Liao [18] constructs the so-called zero-order deformation equation(31)
(
1
-
p
)
L
[
ϕ
(
τ
;
p
)
-
u
0
(
τ
)
]
=
p
ħ
H
(
τ
)
N
[
ϕ
(
τ
;
p
)
]
,
where p
∈
[
0
,
1
] is the embedding parameter, ħ
≠
0 is a nonzero auxiliary parameter, H
(
τ
)
≠
0 is an auxiliary function, L is an auxiliary linear operator, u
0(τ) is an initial guess of u(τ), and ϕ
(
τ
;
p) is an unknown function, respectively; it is important that one has great freedom to choose auxiliary things in HAM. Obviously, when p
=
0 and p
=
1, it holds
(32)
ϕ
(
τ
;
0
)
=
u
0
(
τ
)
,
ϕ
(
τ
;
1
)
=
u
(
τ
)
,
respectively. Thus as ρ increases from 0 to 1, the solution ϕ
(
τ
;
p
) varies from the initial guess u
0
(
τ
) to the solution u
(
τ
). Expanding ϕ
(
τ
;
p
) in the Taylor series with respect to p, one has
(33)
ϕ
(
τ
;
p
)
=
u
0
(
τ
)
+
∑
m
=
1
+
∞
u
m
(
τ
)
p
m
,
(34)
u
m
(
τ
)
=
1
m
!
∂
m
ϕ
(
τ
;
p
)
∂
p
m
|
p
=
0
.
If the auxiliary linear operator, the initial guess, the auxiliary parameter ħ, and the auxiliary function must be chosen so properly, the series (33) converges at p
=
1, and one has
(35)
u
(
τ
)
=
u
0
(
τ
)
+
∑
m
=
1
∞
u
m
(
τ
)
,
which must be one of solutions of original nonlinear equation, as proved by Liao; as ħ
=
-
1 and H
(
τ
)
=
1, (31) becomes
(36)
(
1
-
p
)
L
[
ϕ
(
τ
;
p
)
-
u
0
(
τ
)
]
+
p
N
[
ϕ
(
τ
;
p
)
]
=
0
.
This is mostly used in HPM, whereas the solution can be obtained directly without using the Taylor series. According to (36), the governing equation can be deduced from the zero-order deformation equation (31). The vector is defined as
(37)
u
→
n
=
{
u
0
(
τ
)
,
u
1
(
τ
)
,
…
,
u
n
(
τ
)
}
.Differentiating (31) m times with respect to the embedding parameter p, and then setting p
=
0 and finally dividing them by m
! we will have the so-called mth-order deformation equation as
(38)
L
[
u
m
(
τ
)
-
x
m
u
m
-
1
(
τ
)
]
=
ħ
H
(
τ
)
R
m
(
u
m
-
1
)
,
where
(39)
R
m
(
u
m
-
1
)
=
1
(
m
-
1
)
!
∂
m
-
1
N
[
ϕ
(
τ
;
p
)
]
∂
p
m
-
1
|
p
=
0
,
x
m
=
{
0
,
m
≤
1
,
1
,
m
>
1
.
It should be emphasized that u
m
(
τ
) for m
≥
1 is governed by the linear equation (37) with the linear boundary conditions coming from the original problem, which can be easily solved using the symbolic computation software.


## 7. Application of Homotopy Analysis Method

For Saint Venant equation (15) and continuity equation (6) these obtained
(40)
y
v
x
+
v
y
x
+
y
t
=
0
,
S
0
-
y
x
-
v
g
v
x
-
1
g
v
t
-
n
2
v
2
R
4
/
3
=
0
.
These equations are solved with each other and step by step.For the continuity equation (6)
(41)
L
(
u
)
=
y
t
,
N
(
u
)
=
y
v
x
+
v
y
x
,
f
1
(
r
)
=
0
,
and for the momentum equation (15)
(42)
L
(
u
)
=
v
t
,
N
(
u
)
=
g
y
x
+
v
v
x
+
g
n
2
v
2
R
4
/
3
,
f
2
(
r
)
=
g
S
0
.
In the following, we apply HAM to solve St. Venant and continuity equations in the canals. To obey both the rule of solution expression and the rule of the coefficient periodicity, the corresponding auxiliary function H
(
τ
)
=
1 can be determined uniquely. Then
(43)
(
1
-
p
)
L
[
y
(
τ
;
p
)
-
y
0
(
τ
)
]
=
p
ħ
N
[
ϕ
1
(
τ
;
p
)
-
f
1
(
r
)
]
,
(
1
-
p
)
L
[
v
(
τ
;
p
)
-
u
0
(
τ
)
]
=
p
ħ
N
[
ϕ
2
(
τ
;
p
)
-
f
2
(
r
)
]
.


## 8. Following the Homotopy Analysis Method

Consider(44)
y
1
=
-
0.5211
h
×
t
,
v
1
=
-
t
(
h
×
x
2
-
0.00078
×
h
+
0.0081
×
h
111
×
x
+
6.81191
×
10
-
7
×
h
×
x
2
)
,
y
2
=
0.046898
×
h
2
×
t
2
+
0.000003
×
h
2
×
t
2
×
x
,
v
2
=
0.000784
×
h
×
t
-
0.00003528
×
h
2
×
t
2
+
0.00073
×
h
2
×
t
2
×
x
+
1.53268
×
1
0
-
7
×
h
2
×
t
2
×
x
2
+
5.155792
×
1
0
-
12
×
h
2
×
t
2
×
x
3
,
y
3
=
-
0.00422
×
h
3
×
t
3
-
0.000001
×
h
3
×
t
3
×
x
-
2.9852
×
1
0
-
11
×
h
3
×
t
3
×
x
2
,
v
3
=
0.000784
×
h
×
t
-
0.00003
×
h
2
×
t
2
-
0.000009
×
h
3
×
t
3
-
5.93393
×
1
0
-
9
×
h
3
×
t
2
×
x
-
0.00006
×
h
3
×
t
3
×
x
+
1.78018
×
1
0
-
10
×
h
4
×
t
3
×
x
-
2.11509
×
1
0
-
8
×
h
3
×
t
3
×
x
2
-
3.67840
×
1
0
-
9
×
h
4
×
t
3
×
x
2
-
1.23739
×
1
0
-
12
×
h
3
×
t
3
×
x
3
-
7.73369
×
1
0
-
13
×
h
4
×
t
3
×
x
3
-
1.30077
×
1
0
-
17
×
h
3
×
t
3
×
x
4
-
2.60154
×
1
0
-
17
×
h
4
×
t
3
×
x
4
,
y
4
=
1.14525
×
1
0
-
8
×
h
4
×
t
3
+
0.0003
×
h
4
×
t
4
-
2.57681
×
1
0
-
10
×
h
5
×
t
4
+
1.81034
×
1
0
-
7
×
h
4
×
t
4
×
x
+
1.06489
×
1
0
-
8
h
5
×
t
4
×
x
+
1.141840
×
1
0
-
11
×
h
4
×
t
4
×
x
2
+
3.35835
×
1
0
-
12
×
h
5
×
t
4
x
2
+
7.53146
×
1
0
-
17
×
h
4
×
t
4
×
x
3
+
1.50629
×
1
0
-
16
×
h
5
×
t
4
×
x
3
,
v
4
=
0.00078
×
h
×
t
-
0.00003
×
h
2
×
t
2
+
0.000003
×
h
3
×
t
3
+
0.000003
×
h
4
×
t
4
-
5.93393
×
1
0
-
9
×
h
3
×
t
2
×
x
+
7.12071
×
1
0
-
10
×
h
3
×
t
3
×
x
+
5.34053
×
1
0
-
10
×
h
4
×
t
3
×
x
+
0.000005
h
4
×
t
4
×
x
+
2.87314
×
1
0
-
11
×
h
5
×
t
4
×
x
+
2.99417
×
1
0
-
14
×
h
3
×
t
3
×
x
2
+
2.99417
×
1
0
-
14
×
h
5
×
t
3
×
x
2
+
2.97951
×
1
0
-
9
×
h
4
×
t
4
×
x
2
+
4.96582
×
1
0
-
10
h
5
×
t
4
×
x
2
-
6.73690
×
1
0
-
16
×
h
6
×
t
4
×
x
2
+
3.30614
×
1
0
-
13
×
h
4
×
t
4
×
x
3
+
1.49647
×
1
0
-
13
×
h
5
×
t
4
×
x
3
+
1.39205
×
1
0
-
14
×
h
6
×
t
4
×
x
3
+
1.19996
×
1
0
-
17
×
h
4
×
t
4
×
x
4
+
7.60951
×
1
0
-
18
×
h
5
×
t
4
×
x
4
+
2.92673
×
1
0
-
18
×
h
6
×
t
4
×
x
4
+
1.47678
×
1
0
-
22
×
h
4
×
t
4
×
x
5
+
4.92263
×
1
0
-
23
×
h
5
×
t
4
×
x
5
+
9.84526
×
1
0
-
23
×
h
6
×
t
4
×
x
5
,
y
5
=
1.14524
×
1
0
-
8
×
h
4
×
t
3
-
1.80376
×
1
0
-
9
×
h
4
×
t
4
-
1.80376
×
1
0
-
9
×
h
5
×
t
4
-
0.00003
×
h
5
×
t
5
-
1.00796
×
1
0
-
11
×
h
6
×
t
5
-
8.66815
×
1
0
-
14
×
h
4
×
t
4
×
x
-
8.6681
×
1
0
-
14
×
h
6
×
t
4
×
x
-
2.64522
×
1
0
-
8
×
h
5
×
t
5
×
x
-
2.30017
×
1
0
-
9
×
h
6
×
t
5
×
x
+
1.56026
×
1
0
-
15
×
h
7
×
t
5
×
x
-
3.24013
×
1
0
-
12
×
h
5
×
t
5
×
x
2
-
9.43025
×
1
0
-
13
×
h
6
×
t
5
×
x
2
-
4.83599
×
1
0
-
14
×
h
7
×
t
5
×
x
2
-
9.89634
×
1
0
-
17
×
h
5
×
t
5
×
x
3
-
5.69379
×
1
0
-
17
×
h
6
×
t
5
×
x
3
-
1.35566
×
1
0
-
17
×
h
7
×
t
5
×
x
3
-
8.55061
×
1
0
-
22
×
h
5
×
t
5
×
x
4
-
2.85020
×
1
0
-
22
×
h
6
×
t
5
×
x
4
-
5.7004
×
1
0
-
22
×
h
7
×
t
5
×
x
4
,
v
5
=
0.000784
×
h
×
t
-
0.00003
×
h
2
×
t
2
+
0.000003
×
h
3
×
t
3
-
3.44607
×
1
0
-
11
×
h
4
×
t
3
-
2.85764
×
1
0
-
7
×
h
4
×
t
4
+
2.3261
×
1
0
-
12
×
h
5
×
t
4
-
4.0216
×
1
0
-
7
×
h
5
×
t
5
-
2.08717
×
1
0
-
8
×
h
6
×
t
5
-
5.9339
×
1
0
-
9
h
3
×
t
2
×
x
+
3.56035
×
1
0
-
10
×
h
3
×
t
3
×
x
+
8.90089
×
1
0
-
10
×
h
4
×
t
3
×
x
-
1.281727
×
1
0
-
10
×
h
4
×
t
4
×
x
-
7.20971
×
1
0
-
11
×
h
5
×
t
4
×
x
+
1.95619
×
1
0
-
16
×
h
6
×
t
4
×
x
-
5.31472
×
1
0
-
7
×
h
5
×
t
5
×
x
-
2.129523
×
1
0
-
11
×
h
6
×
t
5
×
x
-
4.69487
×
1
0
-
18
×
h
7
×
t
5
×
x
+
2.9941
×
1
0
-
14
×
h
4
×
t
3
×
x
2
+
2.99418
×
1
0
-
14
×
h
5
×
t
3
×
x
2
-
1.01053
×
1
0
-
14
×
h
4
×
t
4
×
x
2
-
6.73699
×
1
0
-
15
h
5
t
4
x
2
-
6.06321
×
1
0
-
15
h
6
×
t
4
×
x
2
-
3.66479
×
1
0
-
10
h
5
×
t
5
×
x
2
-
8.04465
×
1
0
-
11
h
6
×
t
5
×
x
2
+
9.49108
×
1
0
-
17
h
7
×
t
5
×
x
2
-
1.69967
×
1
0
-
19
h
4
×
t
4
×
x
3
-
1.13311
×
1
0
-
19
×
h
5
×
t
4
×
x
3
-
1.69967
×
1
0
-
19
×
h
6
×
t
4
×
x
3
-
1.133116
×
1
0
-
19
×
h
7
×
t
4
×
x
3
-
5.95106
×
1
0
-
14
h
5
t
5
x
3
-
3.407758
×
1
0
-
14
h
6
t
5
x
3
-
3.50794
×
1
0
-
15
h
7
×
t
5
×
x
3
+
2.03960
×
1
0
-
21
×
h
8
×
t
5
×
x
3
-
3.3399
×
1
0
-
18
×
h
5
×
t
5
×
x
4
-
3.24516
×
1
0
-
18
h
6
×
t
5
×
x
4
-
1.01147
×
1
0
-
18
h
7
×
t
5
×
x
4
-
4.214463
×
1
0
-
20
h
8
×
t
5
×
x
4
-
6.91137
×
1
0
-
23
h
5
×
t
5
×
x
5
-
9.48098
×
1
0
-
23
h
6
×
t
5
×
x
5
-
5.84808
×
1
0
-
23
h
7
×
t
5
×
x
5
-
8.86073
×
1
0
-
24
h
8
×
t
5
x
5
-
4.471004
×
1
0
-
28
h
5
t
5
x
6
-
7.45167
×
1
0
-
28
h
6
t
5
x
6
-
7.451674
×
1
0
-
28
h
7
t
5
x
6
-
2.9806
×
1
0
-
28
h
8
t
5
x
6
.
By using first order explicit finite difference method (FDM), (15) and (6) are solved simultaneously and the capability of HPM and HAM is compared with FDM (finite difference method) as a numerical method for solving Saint Venant equations.


## 9. Result and Conclusion

In Figures1, 2, 3, 4, 5, and 6, two-dimensional plot for the comparison of HPM, HAM, and FDM for the solutions v(x, t) and y(x, t) for different values of x, t, and ħ
=
0.001 is shown. It could be observe a good accuracy between these methods. In the end we have shown v
(
x
,
t
)
=
v
0
+
v
1
+
v
2
+
v
3
+
v
4
+
v
5
+
v
6
+
v
7
+
v
8, y
(
x
,
t
)
=
y
0
+
y
1
+
y
2
+
y
3
+
y
4
+
y
5
+
y
6
+
y
7
+
y
8 and v
(
x
,
t
)
=
v
0
+
v
1
+
v
2
+
v
3
+
v
4
+
v
5
+
v
6
+
v
7, y
(
x
,
t
)
=
y
0
+
y
1
+
y
2
+
y
3
+
y
4
+
y
5
+
y
6
+
y
7 by three-dimensional plots in Figures 7, 8, 9, and 10 for 0
≤
t
≤
1, 0
≤
x
≤
4 and observed that the results converged after 8 sentences of HPM and there is no need to write the term v
9
,
y
9 of homotopy perturbation method. Then it’s shown that HAM is converged after just 5 sentences of y
(
x
,
t
) and v
(
x
,
t
).Figure 1
The comparison of HPM, HAM, and FDM for the solutionv
(
x
,
t
) for different values of 0
≤
x
≥
4 and 0
≤
t
≥
0.04; ħ
=
0.001.Figure 2
The comparison of HPM, HAM, and FDM for the solutiony
(
x
,
t
) for different values of 0
≤
x
≥
4 and 0
≤
t
≥
0.04; ħ
=
0.001.Figure 3
The comparison of HPM, HAM, and FDM for the solutionv
(
x
,
t
) for different values of 0
≤
x
≥
8 and 0
≤
t
≥
0.6; ħ
=
0.001.Figure 4
The comparison of HPM, HAM, and FDM for the solutiony
(
x
,
t
) for different values of 0
≤
x
≥
8 and 0
≤
t
≥
0.6; ħ
=
0.001.Figure 5
The comparison of HPM, HAM, and FDM for the solutionv
(
x
,
t
) for different values of 0
≤
x
≥
4 and 0
≤
t
≥
0.4; ħ
=
0.001.Figure 6
The comparison of HPM, HAM, and FDM for the solutiony
(
x
,
t
) for different values of 0
≤
x
≥
4 and 0
≤
t
≥
0.4; ħ
=
0.001.Three-dimensional plot for the solution of Saint Venant equations via homotopy analysis method obtained (a)v
(
x
,
t
) = v
0 + v
1 + v
2 + v
3 + v
4 (b) v
(
x
,
t
) = v
0 + v
1 + v
2 + v
3 + v
4 + v
5.
(a)
(b)Three-dimensional plot for the solution of Saint Venant equations via homotopy analysis method obtained (a)y
(
x
,
t
) = y
0 + y
1 + y
2 + y
3 + y
4 (b) y
(
x
,
t
) = y
0 + y
1 + y
2 + y
3 + y
4 + y
5.
(a)
(b)Three-dimensional plot for the solution of Saint Venant equations via homotopy perturbation method obtained (a)v
(
x
,
t
) = v
0 + v
1 + v
2 + v
3 + v
4 + v
5 + v
6 + v
7 (b) v
(
x
,
t
) = v
0 + v
1 + v
2 + v
3 + v
4 + v
5 + v
6 + v
7 + v
8.
(a)
(b)Three-dimensional plot for the solution of Saint Venant equations via homotopy analysis method obtained (a)y
(
x
,
t
) = y
0 + y
1 + y
2 + y
3 + y
4 + y
5 + y
6 + y
7 (b) y
(
x
,
t
) = y
0 + y
1 + y
2 + y
3 + y
4 + y
5 + y
6 + y
7 + y
8.
(a)
(b)In this paper, HPM has been successfully applied to finding the solutions of Saint Venant equations in rectangular canals. The obtained solution is compared with finite difference method. The homotopy perturbation method had a little difference with finite difference method, so we solve Saint Venant equations by homotopy analysis method and by changingħ, we could control error and observed that the accuracy of HAM is more than HPM for solution of Saint Venant equations. All the figures show that the results of the homotopy analysis method are in approximate agreement with FDM.



---

*Source: 495715-2014-02-20.xml*