ABSTRACT

The second-order upwind approximation of the convection equation is given by Eq. (11.55):

A FORTRAN subroutine, subroutine up, for implementing Eqs. (11.128) and (11.129) is presented in Program 11.4. When iu = 1, the first-order upwind method is implemented. When iu = 2, the second-order upwind method is implemented. Only the statements which are different from the statements in program main and program lax in Section 11.10.1 are presented. Program main defines the data set and prints it, calls subroutine up to implement the solution, and prints the solution.