A Model of Water Pollution Using Finite Element Method
Speaker: Nopparat Pochai Supervisor: Assoc. Prof. Dr. Suwon Tangmanee
Seminar on Ph.D. programs with semester 2/2004.
Introduction
S. Tangmanee gave a model for water pollution of nearly closed water area. The principal constraints are to attain the Chemical Oxygen Demand (COD) standards. The FEM is used for the derivation of linear constrained of the constrained optimization problem. The objective function is the total value of removal COD concentration discharging into the water. In this study, one has considered COD concentration discharging into water which assumed as one and two-dimensional domain by using FEM.
What is COD & BOD ?
• COD-Chemical oxygen demand(mg/l): a quantitative measure of the amount of oxygen required for the chemical oxidation of carbonaceous (organic) material in wastewater using inorganic dichromate or permanganate salts as oxidants in a two-hour test.
• BOD-Biochemical oxygen demand (mg/l): abbreviation for biochemical oxygen demand. The quantity of oxygen used in the biochemical oxidation of organic matter in a specified time, at a specified temperature, and under specified conditions. Furthermore, it is a standard test used in assessing wastewater strength.
Model Formulation
The dispersion of the COD is described by the diffusion-convection equation on COD in an arbitrary domain .
C C C C u v Dx 2 D y 2 RC Q 0 x y x y
2 2
where C=C(x,y) is a concentration of COD at the point (x,y) in (mg/l), u and v are flow velocity in X and Y direction respectively (m/sec). Dx and Dy are diffusion coefficients in X and Y directions (m2/sec). R is the substance decaying rate (day-1), and Q is the increasing rate of substance concentration due to a source (mg/lday).
S2 S1
S2
S1
S1
S2
S2
Figure shows a typical domain , with the boundary can be classified onto 2 types.
S2
S1
They are S1 with specified COD concentration and S2 with specified flux of concentration.
The boundary conditions on S1 and S2 are:
C C0
C C C cos(x, n) cos( y, n) T0 n x y
where C0 and T0 are the given values, derivative on the boundary S2.
on S1 on S2
C n is
the normal
FEM for solving the problem
We considered the problem in 2 cases:
1. One-dimensional problems: The domain is divided into linear elements. The Galerkin method is then used for the formulation of the finite element, using three-node linear elements. 2. Two-dimensional problems: The domain is divided into triangular elements. The Galerkin method is then used for the formulation of the finite element, using three-node triangular elements. This method reduced the problem into a linear system of equations with the unknowns vector C and the corresponding matrices.
1.One-dimensional problem
Model formulation. The dispersion of the COD is described by the diffusionconvection equation on COD in the domain [a,b], let x [a, b]
dC d C u Dx 2 RC Q 0 dx dx
where the boundary condition are:
2
C = C0
at x=a
dC T0 dx
at x=b
That is, the boundary condition in general form are
dC 0C ( a ) 1 (a) 1 dx dC 0C (b) 1 (b) 2 dx
Galerkin approximation procedure: Approximate trial solution are used which are of the form
n ~ C ( x) 0 ( x) ai i ( x) i 1
where
(a) The function 0 ( x ) is chosen to satisfy the given boundary conditions of the problem. (b) The functions 1 ( x), 2 ( x),..., n ( x) must each satisfy the corresponding homogeneous form of the boundary conditions.
Then Galerkin equation are:
Dx D Dx dx ~ b dx x dx u dC d i R u ~ Q u e C e i dx e dx dx u u a
Dx dx e u (b) i x b
1
2 0
(1)
Example in the case of one-dimensional.
Pollutant
Observation point flow River
20 m
u: flow velocity = 1 m/sec Dx: diffusion coefficient = -1 m2/sec R: substant decaying rate = 2 day-1 Q: increasing rate of substance concentration = 2 mg/lday where COD concentration at each points are given by C = 9.0 at x=0 m
dC 5 106 dx
at x=20 m
dispersion of COD is described by
dC d 2C (1) (1) 2 (2)C 2 0 dx dx
by using linear element x=0
[1]
x=10
[2]
x=20
1
by using Eqs(1), we obtain
2
3
~ C( 2 ) 7.898626 ~ C( 3) 7.898576
mg/l mg/l
2. Two-dimensional problem
The dispersion of the COD is described by the diffusion-convection equation on COD in arbitrary domain .
C C 2C 2C u v Dx 2 D y 2 RC Q 0 x y x y
where C=C(x,y) = concentration of COD at u,v = flow velocity in X and Y directions DX,DY = diffusion coefficients in X,Y directions R = decaying rate ( x, y) Q = increasing rate of substance concentration due to a source The boundary condition on S1, S2 are
C C0 C T0 n
on S1
on S2
Galerkin formulation procedure:
~ C ( x, y ) denote an approximation to exact solution,
n ~ C ( x, y ) 0 ( x, y ) ai i ( x, y ) i 1
where
0 ( x, y ) is satisfy all boundary condition
i ( x, y ); i 1,2,3,..., n
That is,
are satisfy corresponding homogeneous form of boundary condition.
0 ( x, y ) C0 0
n T0
on S1 on S2
and
i ( x, y ) 0 i
n 0
on S1 on S2
The domain is divided into triangular elements. The Galerkin method is then used for the formulation of the finite element, using piecewise linear interpolation base in three-node triangular elements. The concentration of each point is the value of C at the angular point of the triangles.
This method reduced our problem into a linear system of equations with the unknown vector C and the corresponding matrices,
~ K S H C F B
In which square matrices of order number of all node x number of all node are:
Ri R j Ri R j K ij Dx Dy dxdy x x y y [e] R j R j Sij u v Ri dxdy x y [e] H ij R( Ri R j )dxdy
[e]
Fi QRi dxdy
[e]
~ ~ C C Bi Dy dx Dx dy Ri y x
Matrix formulation :
The nodes coordinates: (x1,y1), (x2,y2), (x3,y3) , and let
b1 y2 y3 b3 y1 y2
c1 x3 x2
b2 y3 y1
c2 x1 x3 c3 x2 x1
D b2c3 b3c2
Therefore, our matrix forms are
[ K ije ]
Dx b12 D y c12 1 Dx b1b2 D y c1c2 2D Dx b1b3 D y c1c3
Dx b1b2 D y c1c2 2 2 Dx b2 D y c2 Dx b2b3 D y c2 c3
Dx b1b3 D y c1c3 Dx b2b3 D y c2 c3 2 Dx b32 D y c3
S
[e] ij
ub1 vc1 ub2 vc2 1 ub1 vc1 ub2 vc2 6 ub1 vc1 ub2 vc2
1 6 RD 0 1 24 0 1 8 1 24 1 24 1 24 1 8
ub3 vc3 ub3 vc3 ub3 vc3
H
[e] ij
F
[e]
1 QD 1 6 1
B
[b ]
DxT0 2
[b ]
1 1
Example comparing the results with the analytical solution.
4
6 5
D1
1
4
D2
1
3
D
2
2
u=0 v=0 DX = 1 DY = 1 R=0 Q=2
3
D2
The boundary value problem :
2C 2C 2 20 2 x y
C=0
C 0 n
on the boundary D1
on the boundary D2
Calculate this problem using COD2DIM1
4.5000
NODE
FEM solution
4.1178 2.0147 0.0000 0.8189 0.0000 0.0000
Exact solution
3.6000 2.7000 0.0000 0.9000 0.0000 0.0000
COD concentration
4.0000 3.5000 3.0000 2.5000 2.0000 1.5000 1.0000 0.5000 0.0000 1 2 3 4 5 6 Nodes FE M solution E xact solution
1 2 3 4 5 6
Example in the case of two-dimensional.
COD=0.0 COD=3.0 COD=7.0 COD=9.0 COD=8.0
coastal
COD=6.0
2.0 km
COD=5.0
bay
COD=9.0
5.0 km u = 0.25 m/sec v = 0.25 m/sec DX = 2.5 m2/sec DY = 2.5 m2/sec R = 1.0 day-1 Q = 0 mg/lday
Inflow points
Observation points
C 0 on S1 C 0 on S2 n
11
12
13
14
15
13
14 10
7 8
15 11
9
16 12
1 0
9
6
5 1
6 2
7 3
8 4
1
2
3
4
5
Inflow nodes Observation nodes
Calculate this problem using COD2DIM1
NODE
COD at inflow point COD at observation point COD at inflow point COD at observation point COD at Inflow point COD at observation point
u=0.25, v=0.25 1 2 3 4 5 6 7 9.0000 6.0000 1.9584 2.2920 3.5087 5.6672 9.0000 6.0000 2.6914 9.0000 10.0000 2.8703 3.1730 3.8468 5.6751 9.0000 10.0000 3.9268
u=1.25, v=1.25 1.2700 1.5260 2.5164 5.0522 9.0000 6.0000 9.0000 6.0000 2.0601
8
9 10 5.0000
4.2743
6.6412 5.0000 7.5000
4.5990
6.7041 7.5000 5.0000
3.3874
5.9992 5.0000
11
12 13 14 15
0.0000
3.0000 7.0000 9.0000 8.0000
0.0000
3.0000 7.0000 9.0000 8.0000
0.0000
5.0000 7.0000 9.0000 8.0000
0.0000
5.0000 7.0000 9.0000 8.0000
0.0000
3.0000 7.0000 9.0000 8.0000
0.0000
3.0000 7.0000 9.0000 8.0000