The Laser Analytics Group

Numerical Methods (M. Phil. ACEP)

From LAGWiki

Jump to: navigation, search

Contents

[edit] Lecturer

Dr Johan Hult

EMail: jfh36@cam.ac.uk

office location: G3B

Example classes: Dr Bart Hallmark and Dr. Sinéad Matthews

EMail: bh206@cam.ac.uk and smm58@cam.ac.uk

[edit] Lectures

During MT 2008

[edit] Course Overview

In this course, we aim to examine the sorts of problems you might encounter in chemical engineering. Very often, these problems will prove too complex to solve by hand, so we will need to resort to using a computer. From the outset we will be thinking about how to write computer programs to solve them. Some (or even most) of the mathematics you may have seen before in an undergraduate course. However, you will probably not have had the chance to program the solutions yourselves. Running in parallel with the course is a series of exercise classes, in which students are required to solve relatively complex problems.

The course will use the Matlab programming language.

The layout of the course described in the table below:

Topics

Theme

Lectures(Approx.)

Exercises

Linear Equations and Matrices

Elimination methods for solving linear equations

Large, sparse linear equations

Iterative methods for solving linear equations

Linear Equations 4

1. Programming in Matlab

2. Modelling a distillation column

Solving non-linear equations Non-linear equations 3 3. More advanced modelling of a distillation column

4. Velocity profiles of non-Newtonian fluids.

Initial values problems Ordinary differential equations 3 5. Modelling a reactor
Numerical solution to partial differential equations

The transport partial differential equation

An example on solving the transport PDE

Partial differential equations

3 6. Heat conduction and reaction in a sphere

7. The heating up of a fluid in a heat exchanger tube.

Fitting models to measurements

Analysis of variance

Data analysis 1 .

Examples of Chemical Engineering Applications CFD & Electrochemistry 2 .

[edit] Useful links

The Mathworks website contains numerous help files for using Matlab. You may find Getting started in Matlab useful. This is also available in the help file when you run Matlab on the departmental computers.

[edit] Useful Books

Numerical Recipes contains information all aspects of numerical methods (But, be warned that all code is in C++ or Fortran). It is available online at http://www.nr.com/

"Numerical Methods for Chemical Engineers with Matlab Applications" by Constantinides and Mostoufi


[edit] Lecture Material

[edit] Linear Equations

[edit] Handout 1

Lecture Handout - Useful linear algebra and linear equations, PDFicon.png Handout 1 Info_circle.png

[edit] Handout 2

Lecture Handout - Elimination methods for solving linear equations, PDFicon.png Handout 2 Info_circle.png

  • Example on Gaussian elimination used in lectures
  • Gaussian Elimination routine, Micon.png GaussianEliminate.m Info_circle.png
  • A routine which will perform LU decomposition of a square Matrix, Micon.png LUdecomposition.m Info_circle.png

[edit] Handout 3

Lecture Handout - Sparse systems of linear equations, PDFicon.png Handout_3 Info_circle.png

  • Code to find the velocity profile for a Newtonian fluid in a pipe,Micon.png ViscousFlow.m Info_circle.png
  • Same code, but now employing sparse matrices,Micon.png ViscousFlow_Sparse.m Info_circle.png
  • Routine which uses the TDMA (Tri-diagonal matrix) method to solve a Ax = b, Micon.png TDMA.m Info_circle.png

[edit] Handout 4

Lecture Handout - Iterative methods for solving linear equations, PDFicon.png Handout_4.pdf Info_circle.png

  • The solution to the steady heat conduction problem in a slab,Micon.png Laplace.m Info_circle.png
  • Solution to the same problem, this time using Jacobi iteration,Micon.png Laplace_Jacobi.m Info_circle.png

[edit] Non-linear Equations

[edit] Handout 5

Lecture Handout - Non-Linear Equations, PDFicon.png Handout_5.pdf Info_circle.png

[edit] Ordinary Differential Equations

[edit] Handout 6

Lecture Handout - Initial value problems, PDFicon.png Handout_6 Info_circle.png

  • A routine which uses the Explicit Euler method to solve a single ODE,Micon.png Euler.m Info_circle.png
  • A routine which uses the Implicit Euler method to solve a single ODE,Micon.png EulerImplicit.m Info_circle.png
  • A routine which uses the Explicit Euler method to solve a system of coupled ODEs,Micon.png EulerCoupled.m Info_circle.png
  • A routine which uses the Implicit Euler method to solve a system of coupled ODEs,Micon.png EulerCoupledImplicit.m Info_circle.png
  • A routine which uses a 4th order Runge-Kutta method to solve a system of coupled ODEs,Micon.png RungeKutta_Order4_Coupled.m Info_circle.png


[edit] Handout 7

Lecture Handout - Using the Matlab ODE solvers, PDFicon.png Handout_7 Info_circle.png

[edit] Partial Differential Equations

[edit] Handout 8

Lecture Handout - Partial differential equations, PDFicon.png Handout_8 Info_circle.png

[edit] Handout 9

Lecture Handout - The generalised transport PDE, PDFicon.png Handout_9.pdf Info_circle.png

[edit] Handout 10

Lecture Handout - Solving a transport PDE, PDFicon.png Handout_10.pdf Info_circle.png

  • Code to solve the transfer of heat to flowing fluid, full PDE version,Micon.png Tube_PDE.m Info_circle.png
  • Code to solve the transfer of heat to flowing fluid, steady state,Micon.png Tube_SteadyState.m Info_circle.png
  • Code to solve the transfer of heat to flowing fluid, steady state, 4 segments,Micon.png Tube_SteadyState_4segments.m Info_circle.png
  • Code to solve the transfer of heat to flowing fluid, steady state upwind scheme,Micon.png Tube_upwind.m Info_circle.png

[edit] Analysing Data

[edit] Handout 11

Lecture Handout - Data Fitting and Regression, PDFicon.png Handout_11.pdf Info_circle.png

  • Function performing a least square fit and calculating confidence intervals,Micon.png fitcubic.m Info_circle.png
  • Main program, calling the routine above,Micon.png script.m Info_circle.png
  • Subroutine to generate noisy data set,Micon.png testdata.m Info_circle.png
Personal tools
Laser Analytics Group