Time-Dependent Finite-Difference Method
Return to the picture of Couette flow in Figure 16.2. Imagine, for a moment, that the space between the upper and lower plates is filled with a flow field which is not a Couette flow; for example, imagine some arbitrary flow field with gradients in both the x and у directions, including gradients in pressure. We can imagine such a flow existing at some instant during the start-up process just after the upper plate is set into motion. This would be a transient flow field, where и, T, p, etc., would be functions of time t as well as of r and y. Finally, after enough time elapses, the flow will approach a steady state, and this steady state will be the Couette flow solution discussed above. Let us track this picture numerically. That is, starting from an assumed initial flow field at time t = 0, let us solve the unsteady Navier-Stokes equations in steps of
time until a steady flow is obtained at large times. As discussed in Section 13.5, the time-asymptotic steady flow is the desired result; the time-dependent approach is just a means to that end. At this stage in our discussion, it would be well for you to review the philosophy (not the details) presented in Section 13.5 before progressing further.
The Navier-Stokes equations are given by Equations (15.18a to c) and (15.26). For an unsteady, two-dimensional flow, they are Continuity:
dp d(pu) d(pv)
dt dx dy
x momentum:
du
~dt
у momentum:
dv
~dt
d{uTxx) d(uryx) d(vrxy) d(vzyy) |
dx dy dx dy J
Note that Equations (16.66) to (16.69) are written with the time derivatives on the left-hand side and spatial derivatives on the right-hand side. These are analogous to the form of the Euler equations given by Equations (13.59) to (13.62). In Equations (16.67) to (16.69), rxy, rxx, and xyy are given by Equations (15.5), (15.8), and (15.9), respectively.
The above equations can be solved by means of MacCormack’s method as described in Chapter 13. This is a predictor-corrector approach, and its arrangement for the time-dependent method is described in Section 13.5. The application to compressible Couette flow is outlined as follows:
1. Divide the space between the two plates into a finite-difference grid, as sketched in Figure 16.8a. The length L of the grid is somewhat arbitrary, but it must be longer than a certain minimum, to be described shortly.
2. At x — 0 (the inflow boundary), specify some inflow conditions for u, v, p, and T (hence, e, since e = cvT). The incompressible solution for Couette flow makes reasonable inflow boundary conditions.
3. At all the remaining grid points, arbitrarily assign values for all the flow-field variables, u, v, p, and T. This arbitrary flow field, which constitutes the initial conditions at t = 0, can have finite values of v, and can include pressure gradients.
4. Starting with the initial flow field established in step 3, solve Equations (16.66) to
(16.69) in steps of time. For example, consider the x-momentum equation in the form of Equation (16.67). MacCormack’s predictor-corrector method, applied to this equation, is as follows.
Predictor: Assume that we know the complete flow field at time t, and we wish to advance the flow-field variables to time / + Д/. Replace the spatial derivatives with forward differences:
(Ljx)/,_/+1 (j-yx)i. j
Ду
All the quantities on the right-hand side are known at time t; we want to advance the flow-field values to the next time, t + At. That is, the right-hand side of Equation (16.70) is a known number at time t. Form the predicted value of u, j at time t + At, denoted by m; j from the first two terms of a Taylor’s series as
Calculate predicted values for p, v, and e, namely, /),. /, v,,;, and e, ,, by the same approach applied to Equations (16.66), (16.68), and (16.69), respectively. Do this for all the grid points in Figure 16.8a.
Corrector: Return to Equation (16.67), and replace the spatial derivatives with rearward differences using the predicted (barred) quantities obtained from the predictor step:
(tyx)i, j (tyx)i. j— 1
~Ay
Finally, calculate the corrected value of m,,/ at time t + At, denoted by from the first two terms of a Taylor’s series using an average time derivative
obtained from Equations (16.70) and (16.72). That is,
[16.73]
Carry out the same process using Equations (16.66), (16.68), and (16.69) to obtain p^At, и’+л’, and е’+л’. The complete flow field at time t + At is now obtained.
5. Repeat step 4, except starting with the newly calculated flow-field variables at the previous time. The flow-field variables will change from one time step to the next. This transient flow field will not even have parallel streamlines; i. e., there will be finite values of v throughout the flow. This is sketched in Figure 16.86. Make the calculations for a large number of time steps; as we go out to large times, the changes in the flow-field variables from one time step to another will become smaller. Finally, if we go out to a large enough time (hundreds, sometimes even thousands, of time steps in some problems), the flow-field variables will not change anymore—a steady flow will be achieved, as sketched in Figure 16.8c. Moving from left to right in Figure 16.8c, we see a developing flow near the entrance, influenced by the assumed inflow profile. However, at the right of Figure 16.8c, the history of the inflow has died out, and the flow-field profiles become independent of distance. Indeed, we have chosen L to be a sufficient length for this to occur. The flow field near the exit is the desired solution to the compressible Couette flow problem.
The value of At in Equations (16.71) and (16.73) is not arbitrary. The steps outlined above constitute an explicit finite-difference method, and hence there is a stability bound on At. The value of At must be less than some prescribed maximum, or else the numerical solution will become unstable and “blow up” on the computer. A useful expression for At is the Courant-Friedrichs-Lewy (CFL) criterion, which states that At should be the minimum of Atx and Aty, where
In Equation (16.74), a is the local speed of sound. Equation (16.74) is evaluated at every grid point, and the minimum value is used to advance the whole flow field.
The time-dependent technique described above is a common approach to the solution of the compressible Navier-Stokes equations, and for that reason, it has been outlined here. Our purpose has been not so much to outline the solution of Couette flow by means of this technique, but rather to present the technique as a precursor to our later discussions on Navier-Stokes solutions.
(b) Transient flow
Illustration of the finite-difference grid, and characteristics of the flow during its transient approach to the steady state.