Main Program - SS 1-D Advective Diffusion
Finite-Volume Formulator
Matrix Solver
A.m
F_upwind.m
SS advection-diffusion Power-Law scheme

The main program sets up geometry of solution domain for 1-D advective diffusion with uniform density rho and conductivity Gamma. Patankar's power-law scheme is used for advection. For illustrative purposes only, you can change the parameter "upwind" to zero, in order to use the centered-difference scheme for comparison.

  • The solution domain is set to be 1-D for this example, but the code should work for 2-D by setting nx>1.
  • 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.