The main program sets up geometry of solution domains for a series of 2-D advective diffusion models with uniform density rho and conductivity Gamma. A zone of high phi (bc_phi_1) enters over one portion of the boundary, while low phi (bc_phi_0) enters on the remaining adjacent part of the boundary on the inflow side of the domain.
- Models 1 and 2 have moderate true diffusion, and demonstrate the same behavior when flow and BC are rotated to another boundary. In both cases, flow is parallel to one or other coordinate direction. In #1, flow enters through Up boundary. In #2, flow enters West boundary.
- Runs 3 and 4 repeat run #2 for decreasing Gamma, until (true) diffusion is no longer evident.
- Runs 5,6,7 use the final small Gamma, but flow is now aligned at 45 degrees to the coordinate directions,entering the domain with equal velocities through the Up and West sides. Low phi (bc_phi_0) enters on Up boundary, and high phi (bc_phi_1) on West boundary. Strong "false diffusion" is visible, as the finite-volume scheme "leaks" phi into adjacent volumes across boundaries aligned at 45 degrees to flow. As volume dimensions dx, dz are decreased, the false diffusion is diminished.
- Patankar's power-law scheme is used for advection.
- The boundaries of this solution domain are on finite-volume faces, but additional nodes are added on the boundaries (Patankar's Practice B, p.69).
- Boundary conditions can be either fixed phi or fixed phi gradient at each face on the boundary. For example, in bc_e, first column is numerical value of BC, second column specifies BC type - 1 for value, 2 for gradient.
- u.m and w.m find velocities on appropriate volume boundaries
- A.m and F_upwind.m implement power-law advection scheme
solve.m solves the resulting system of linear equations.