Syllabus
Lectures: none (directed reading course)
Textbook: Class Notes (see references below)
References:
Online MATLAB tutorials and references:
- Tutorials offered by The Mathworks . The creators of Matlab.
- Introductory Matlab material from Indiana University
- A practical introduction to Matlab from Michigan Tec
- Links to Matlab tutorials, references, books, packages, etc. -- from the Math Department at UIC
MATLAB guides
- Getting Started with Matlab
- Using Matlab
- Using Graphs in Matlab
- Using GUIs in Matlab
Provided with the Matlab installation
For links to these documents visit Dr. Randy Jost's web page (USU ECE Department). For other links related to Matlab, visit my Matlab page .
For MATLAB operation
- Hanselman, D. and B. Littlefield, 2005, "Mastering MATLAB 7," PEARSON/Prentice Hall, Upper Saddle River, NJ
- Nuruzzaman, M., 2003, "Tutorials on Mathematics to MATLAB," 1stBooks, USA (NOTE: good collection of tutorials for a variety of mathematical applications and graphics, very little programming included. Link to the 1stBooks web site and do a search on Author : Nuruzzaman to link to the book.).
- Hahn, B.D., 1997, "Essential MATLAB® for Scientists and Engineers," Arnold, London.
- Etter, D.M. and D.C. Kuncicky, 1999, "Introduction to MATLAB®", E-Source, Prentice Hall, Upper Saddle River, New Jersey
- Palm III, W.J., "Introduction to MATLAB® for Engineers," B.E.S.T Series, McGraw-Hill, Boston.
For Mathematics and Numerical Methods with MATLAB
- Moler, C., 2004 [?], Numerical Mathematics with Matlab ,SIAM's MATLAB book (Visit this website: http://www.mathworks.com/academia/ and click on the link New Textbook by Cleve Moler under the Faculty Center heading in that page)
- Fausett, L. V., 1999, "Applied Numerical Analysis Using MATLAB," Prentice Hall, Upper Saddle River, New Jersey.
- Mathews, J.H. and K.D. Fink, "Numerical Methods Using MATLAB - Third Edition," Prentice Hall, Upper Saddle River, New Jersey
- Linfield, G. & Penny, J. 1995, Numerical methods using MATLAB, Ellis- Horwood.
- Van Loan, C.F., 2000, "Introduction to Scientific Computing - A Matrix-Vector Approach Using MATLAB," Prentice Hall, Upper Saddle River, New Jersey
- Nakamura, S., 2002, "Numerical Analysis and Graphic Visualization with MATLAB - Second Edition," Prentice Hall PTR, Upper Saddle River, New Jersey
- Middleton, G.W., ????, "Data Analysis in the Earth Sciences using MATLAB®," Prentice Hall, Upper Saddle River, New Jersey
For Elementary Numerical Methods
- Moin, P., 2001, Fundamentals of Engineering Numerical Analysis, Cambridge University Press, New York
- Hoffman, J.D., 2001, Numerical Methods for Engineers and Scientists - Second Edition, Marcel Dekker, Inc., New York
- Chapra, S. and R. Canale, 2001, Numerical Methods for Engineers: With Software and Programming Applications, McGraw-Hill, New York
For the material to be covered in this class
- Abbot, M.B. and A.W. Minns, 1994, Computational Hydraulics, Ashgate Pub. Co.
- Chapra, , 1997, Surface Water Quality Modeling, McGraw Hill
- Chaudhry, M. H. 1993. Open-Channel Flow. Prentice-Hall, Inc.
- Chaudhry, M.H., 1987, Applied Hydraulic Transients, Van Nostrand Reinhold
- Cunge, J.A., F. M. Holly, Jr., and A. Verwey, 1980, Practical Aspects of Computational River Hydraulics, Pitman Publishing Limited, London ( reasonably-priced, paperback copy available here )
- Julien, P.Y., 2002, River Mechanics, Cambridge University Press, New York
- Vreugdenhil, C.B., 1989, Computational Hydraulics - An Introduction, Springer-Verlag, Berlin
- Smith, G.D., 1985, Numerical Solution of Partial Differential Equations: Finite Difference Methods - Third Edition, Clarendon Press, Oxford
Required background
We will be using Matlab as the main programming/graphics environment, therefore, students must be familiar or learn the use of Matlab during this class. The course will focus on the solution of partial differential equations (PDEs) typical of hydraulics and transport problems in groundwater and open channel flows, however, students are required to have a background on elementary numerical methods, namely:
- Solution to equations with one variable (e.g., bisection, Newton-Raphson, secant methods).
- Solution to systems of non-linear equations on more than one variable (e.g., generalized Newton-Raphson and secant methods)
- Matrix algebra (e.g., transpose, inverse, addition, multiplication, etc.) -- You may want to download this free book on Matrix Algebra by Autar K Kaw, University of South Florida
- Linear algebra and solution of systems of linear equations (Gaussian and Gauss-Jordan elimination, pivoting, LU decomposition, quadratic forms)
- Numerical integration (trapezoidal rule, Simpson's rule, Gaussian quadrature)
- Data fitting (least-square for linear fitting, multiple-linear fitting, polynomial fitting) 7. Numerical solution to ordinary differential equations - ODEs (Euler method, Runge-Kutta methods, stiff ODEs)
Class Notes on Matlab
The following links allow you to download documents related to Matlab operation, programming, functions, etc.
Getting started with Matlab
- Introduction to Matlab with the Help menu - a brief introduction to the Matlab interface and its use, then uses Matlab Help Desk to guide you in learning Matlab (optional reading)
- Introduction to Matlab - specific exercises introducing Matlab
- Programming, I/O, Strings - logical operations, programming structures, scripts and functions, input and output, and string manipulation - basic components for developing programs in Matlab
- Elementary Matlab Graphics - two- and three-dimensional plots with Matlab:
- Matlab for SCILAB users - although originally developed to show the differences between Matlab and Scilab, it is also useful to understand many Matlab concepts.
- Elementary mathematical functions with Matlab - description and graphics of elementary mathematical functions using Matlab
- Using logical vectors in Matlab - exercises on graphics and other manipulations of logical vectors
- Moler's book Ch. 1 - Introduction to Matlab (intro.pdf) - highly mathematical introduction (optional reading)
- Symbolic functions in Matlab -- download this script and run it in Matlab to see examples of symbolic functions
Computer programming with Matlab
- Introduction to computer programming - principles of computer programming: programming structures, flow charts, pseudo-code
- Programming with Matlab - specific examples of Matlab functions including all programming structures introduced earlier.
- Notes on Functions in Matlab - discusses issues related to m-file and inline user-defined functions in Matlab.
- Passing functions as arguments in Matlab - shows examples of functions used as arguments of other functions
- Gradually Varied Flow solution through the direct step - an example of Matlab programming with functions and sub-functions
Elementary numerical methods with Matlab
NOTE: See the Using Matlab guide corresponding to these subjects. Also, see the chapters in the SIAM book referred to below. For items 1 through 3, you may want to download this free book on Matrix Algebra by Autar K Kaw, University of Florida
- Matrix operations in Matlab (transpose, addition and subtraction, multiplication, term-by-term multiplication, creating matrices, manipulating matrix elements)
- Read the chapter on Matrices and linear algebra from the Using Matlab guide
- Linear algebra operations in Matlab (solution to systems of linear equations, LU factorization, sparse matrices)
- Read Moler's book Ch. 2 - Linear Equations
- Eigenvalues in Matlab (eigenvalues, eigenvectors, and singular value decomposition)
- Read Moler's book Ch. 10 - Eigenvalues and Singular Values
- Solution to single equations and multiple non-linear equations in Matlab (single equation solution: bisection, Newton-Raphson, secant; systems of non-linear equations: Newton-Raphson, "secant" methods:
- Solution to non-linear equations - a pdf document with examples of single and multiple non-linear equations
- Read the chapter on Functions: zeros, maxima and minima, integration from the Using Matlab guide
- Read Moler's book Ch. 3 - Zeroes and Roots
- Examples from hydraulics - click here to download zip file with documentation and scripts - Examples included:
- pipe flow
- Manning's equation
- pipe-pump system
- entrance from a reservoir into a channel.
- Numerical integration in Matlab (rectangular elements, trapezoidal rule, Simpson's rule, Gaussian quadrature, multiple integrals) --
- Read the chapter on Functions: zeros, maxima and minima, integration from the Using Matlab guide
- Read Moler's book Ch. 6 - Quadrature
- Data fitting in Matlab (interpolating polynomials, cubic splines, cubic Hermite polynomials)
- Read the chapter on Polynomials and interpolation from the Using Matlab guide
- Read the chapter on Statistics, difference equations, Fourier analysis from the Using Matlab guide (read only parts related to least-square fitting)
- Read Moler's book Ch. 5 - Data Fitting (leastsquares.pdf)
- Solution to Ordinary Differential Equations in Matlab (Euler method, Runge-Kutta methods, etc)
- Numerical solution to ODEs - notes on finite differences, the Euler method, implicit methods, and systems of ODEs
- Additional examples of ODEs - Scripts (initial value problems)
- Symbolic functions in Matlab -- download this script and run it in Matlab to see examples of symbolic functions, study, in particular, function dsolve
- Read Moler's book Ch. 7 - Ordinary Differential Equations
- Water quality in a lake - Part 1 ( based on Chapter 2 in Vreugdenhil, C.B., 1989, Computational Hydraulics )
- Documentation and Scripts for Vreughdenhil's Chapter 2 (CompHydEx0) - Analytical solutions
Class Contents
- Numerical differentiation and finite differences (Approximation error, Taylor series expansion and finite differences, implicit and explicit methods for ODEs)
- Water quality in a lake - Part 2 ( based on Chapter 3 in Vreugdenhil, C.B., 1989, Computational Hydraulics )
- Documentation and Scripts and documentation for Vreughdenhil's Chapter 3 (CompHydExI) - Numerical solutions
- Introduction to Partial Differential Equations (PDEs) (Definitions, First and second-order equations, classification, Examples of analytical solutions )
- Read Part III - Partial Differential Equations, pages 501 through 526, in Hoffman, J.D., 2001, Numerical Methods for Engineers and Scientists
- Introduction to Partial Differential Equations -- pdf file with definitions and examples of analytical solutions
- Read Moler's book Ch. 11 - Partial Differential Equations (optional reading)
- First-order PDEs - Method of characteristics
- Read section III.3, pp. 504 - 511, in Hoffman, J.D., 2001, Numerical Methods for Engineers and Scientists
- Read pages 17-19, and 26-27 in Vreugdenhil, C.B., 1989, Computational Hydraulics
- Hydraulic transients - method of characteristics - pdf file
- Advection equation (Characteristics method and finite difference approximations)
- Characteristics method for pure advection - The Holly-Preissmann approach
- Online references on Holly-Preissmann and pure advection (optional reading)
- Comparative study of numerical schemes used for one-dimensional transport modelling (pdf file, Gadjos, 1998)
- Numerical Simulation of Unsteady Mobile-bed Hydrodynamics and Contaminant Transport in River Systems (web page)
- Equivalent Differential Equations in Fixed-Grid Characteristics Method (Civil Engineering Data base)
- Interactive Explicit Simulation of 1D Surges and Dam-Break Flow (abstract - International Journal of Numerical Methods in Fluids)
- Unsteady Dispersion of Non-conservative Pollutants in Natural Rivers (Yoo et al.)
- An improved second-moment method for solution of pure-advection problems (Ghods et al.)
- For finite-difference solutions: Read the following chapters in Vreugdenhil, C.B., 1989
- Ch. 4 - Transport of a Dissolved Substance (single-level methods)
- Documentation and Scripts for Vreughdenhil's Chapter 4 (CompHydExII) - Numerical solutions
- Ch. 5 - Explicit Finite-Difference Methods (Two-level methods, Leap-Frog method, CFL condition)
- Documentation and Scripts for Vreughdenhil's Chapter 5 - i (CompHydExIII) - Explicit methods
- Documentation and Scripts Vreughdenhil's Chapter 5 - ii (CompHydExIV) - Leap-frog method
- Ch. 6 - Kinematic Waves
- Documentation and Scripts for Vreughdenhil's Chapter 6 (CompHydExV) - Kinematic waves
- Stability, Consistency, and Convergence of Numerical Schemes
- PDF file
- Maple worksheet - Learn more about Maple here
- Second-order diffusion equation (Finite difference approximations) - Read the following chapters in Vreugdenhil, C.B., 1989
- Ch. 7 - Diffusion (Explicit vs. implicit methods, Thomas algorithm)
- Documentation and Scripts for Vreughdenhil's Chapter 7 (CompHydExVI) - Groundwater flow in horizontal layer
- Ch. 8 - Numerical Accuracy for Diffusion Problems (Fourier series )
- Ch. 9 - Diffusion Model for Coastline Development (optional reading)
- Ch. 10 - Consolidation of Soil (optional reading)
- Convection-diffusion (Finite difference approximations) - Read the following chapters in Vreugdenhil, C.B., 1989
- Ch. 11 - Convection - diffusion (Crank-Nicholson method)
- Documentation and Scripts for Vreughdenhil's Chapter 11 (CompHydExVII) - Convection-Diffusion
- Unsteady Poiseuille Flow - pdf file with background information
- Ch. 12 - Numerical Accuracy for Convection-Diffusion (Numerical diffusion)
- Ch. 13 - Salt Intrusion in Estuaries (optional reading)
- Ch. 14 - Boundary Layers (optional reading)
- Laplace and Poisson equations modeling
- Laplace equation - temperature distribution in solids (pdf file) - Click here to download scripts
- Potential flow problems Read the following chapters in Vreugdenhil, C.B., 1989
- Ch. 19 - Potential Flow
- Ch. 20 - Finite-Difference Method for Potential Flow
- Additional notes on Example 1 (*) - details of solution implementation - - Scripts for Example 1 (In page 146)
- Additional notes on Example 2 (*) - details of solution implementation - - Scripts for Example 2 (In pages 147-149)
- Potential Flow in Rectangular Domains - pdf file (complements Chapters 19-20 in Vreugdenhill's book)
- Groundwater flow problems
- Notes on groundwater solution (*)- Scripts for Groundwater example
- Body-fitted coordinates (optional reading: see a list of references here )
- De Saint-Venant equations for unsteady open channel flow (optional subject - depending on time availability)
- Derivation of equations
- Simple prismatic channels case
- Programming of solution
- Analysis of different cases