Main Program - SS 1-D Advective Diffusion
Finite-Volume Formulator
Matrix Solver
SS advection-diffusion centered differences

The main program sets up geometry of solution domain for 1-D advective diffusion with uniform velocity, density and conductivity. Centered-difference scheme is used for advection. This is not a good choice! Use this code for illustrative purposes only.

  • The solution domain is set to be 1-D.
  • Fixed-temperature Boundary conditions at Up and Down (z) are applied on half-volumes, such that nodes are on boundaries, as described in Patankar.
  • Zero fluxes on East and West boundaries are applied on faces of a single stack of Finite Volumes.

solve.m solves the resulting system of linear equations.