Implementation of model problems covered in ch. 5 of An Introduction to Computational Fluid Dynamics: The Finite Volume Method, 2nd ed., Versteeg and Malalasekera
I wrote all programs in FORTRAN90 with plot scripts for visualizing results in Gnuplot format.
The Su vector (b in Ax = b) is not updated properly. After solving the first N-S line, Su is zero for all subsequent lines. This returns a result of zero when solving directly with the Thomas algorithm.
The code currently solves for phi for just one sweep of the grid. Now that this feature appears to work acceptably, I need to add a residual calculation and solve to a desired tolerance.
Write the value of phi along the diagonal from (0, ymax) to (xmax,0). Results along this line will clearly illustrate the deficiencies with the various schemes.
The output file (phi_oblique.dat) should be in two column format:
I thought I had to use FORTRAN90 modules. These are like classes in OOP, but they felt like global arrays the way I was using them. This caused a lot of problems.
The solution is to, in the called subroutine, explicitly declare the size of the array when you make the intent(inout) statement.
The current solution method is a direct method -- the Thomas algorithm for tri-diagonal matrices. This works by solving along N-S lines and treating W and E coefficients explicitly.
Add the option to choose iterative solvers (Jacobi, Gauss-Seidel, etc.) as an exercise.
Additionally, I can modularize all of the components of the Thomas algorithm procedure (e.g., bounds calculation, update_explicit, and thomas).