ME 448/548: Toy Codes

ME 448/548 Home   Lecture Notes   Toy Codes   Star-CD Goodies   Homework   Exams


This page contains links to MATLAB codes used to demonstrate the finite difference and finite volume methods. These are simple codes applied to simple problems, hence the adjective "Toy". The toy finite volume codes can handle non-uniform meshes and non-uniform material properties. Not all sample problems exercise these features.

Feel free to use the codes in your class or for self-study. I put them here to augment my course in applied CFD.

Beware! These codes surely contain bugs. I have tried to code them carefully and I have tested them for the demonstration problems I use in my class. The codes might also be applied to other problems, say different boundary conditions, often with simple changes the codes or data structures. Although the codes are designed to be flexible, they have not undergone extensive stress testing. Please let me know if you find any bugs.


The codes are contained in Zip archives. The documentation is in PDF.

 
Finite difference solutions to the one-dimensional heat equation
  Code archive -- 2008 version14 Jan 08
  Code archive16 Jan 04
  Documentation16 Jan 04
 
One-dimensional, fully-developed flow in a round pipe
  Code archive22 Jan 02
  Documentation22 Jan 02
 
One-dimensional upwind and central difference models of convection
  Code archive29 Jan 06
  Code archive of tridiagonal solvers29 Jan 06
  Documentation29 Jan 06
 
Two-dimensional finite-volume code with several test problems
  Code archive16 Feb 04 (minor updates in Feb 2004)
  Documentation24 Sept 03


GWR Classes ME 448 Home GWR Home