Soft Computing and Simulation
in Water Resources
HWR 702
By
Amro Elfeki, PhD.
Course Content
• Introduction to Computer Methods in Water Resources.
• Algorithms and Flow Charts.
• Computing Techniques.
• Numerical Differentiation and Integration.
• Ordinary Differential Equations.
• Solutions by Finite Difference Methods.
• Partial Differential Equations.
• Design of Digital Models.
• Visual Programming and Graphical Interface.
Chapter 1
Introduction to Computer Methods in
Water Resources
Introduction to Computer Methods in
Water Resources
• Setup a mathematical model of a water resources system.
• Solving the model equations.
• Learning different models and methods of solutions.
• Programming the numerical model.
• Running the model.
• Testing the model results.
• Designing a graphical interface.
• Designing animations.
• Performing simulations.
What do you expect to gain from the
course?
The following slides show you some of the
skills that you expect to gain from the
course.
Visual Programming
=IF($I$3=0,0,('T=0 '!$E$12/('T=0 '!$E$13*'T=0
'!$E$7))/(2*PI()*$I$10*$I$11*(1-($I$4)^2)^0.5)*EXP(-(1/(2*(1-
$I$4^2)))*(((E$19-$I$5)/$I$10)^2-2*$I$4*((E$19-
$I$5)/$I$10)*(($C21-$I$6)/$I$11)+(($C21-$I$6)/$I$11)^2)))
Graphical Interface
Simulations with Graphical and
Animation Interface (Flood wave)
Simulations with Graphical and
Animation Interface (cont.)
Simulation with on-time Graphical
Interface (Dam Break)
Simulations with Graphical Interface:
Rainfall-Runoff Modeling
Numerical Integration: Channel
Characteristics by Changes in Water Level)
Numerical Integration: Volume of Storm
Runoff
0.00
0.50
1.00
1.50
2.00
2.50
3.00
3.50
0 0.5 1 1.5 2
Time (hr)
infiltrationrate(f)&accumulation(F)
f
F
Use of Macros for Automation of
Equation Solver in Excel
Model Testing: Comparison with
Softwares and Analytical Solutions
Solving ODE for WSF
2nd Order ODE and Matrix
Operations
Elliptic PDE application: Seepage Under
Hydraulic Structures
o i i+1i-1
j+1
j
j-1
imax
jmax
x
y
2 2
2 2
0
h h
x y
 
 
 
Groundwater Flow Applications
Groundwater Flow Applications (cont.)
Groundwater Flow Applications (Cont.)
Advection Eq. with Variable Celerity: Wave
Propagation on a Beach
( ) 0
h h
c h
t x
 
 
 
Parabolic PDE: Diffusion
ADE by FD
2
2
0
h h h
c D
t x x
  
  
  
Analytical Solution of ADE
Non-linear PDE
( ) 0
( ) ,
( )
( )
am
a
a
K
x x
a
K
b
S



  
 



  
   
 
 
 
  
 
Solve Real Problems
Particle Models
Random Walk

Soft Computing and Simulation in Water Resources: Chapter 1 introduction