# New Pressure-Velocity Solver for *FLOW-3D*

*This article highlights the development of a new pressure-velocity solver based on the GMRES method to be included in the next release of FLOW-3D.*

Figure 1: Tank filling simulation

Figure 2: Injection of

compressible gas into a tank

Figure 1: Tank filling simulation

Figure 2: Injection of

compressible gas into a tank

For
years, * FLOW-3D*’s two options for handling pressure and velocity iterations have served users well, as a general matter. The successive over-relaxation (SOR) and alternating-direction-implicit (ADI) solvers are useful for flow problems which cover a wide range of the solutions that

*users tackle on a daily basis. Some problems, however, have been very difficult to solve with these methods. With the passage of time, newer solution algorithms have been developed.*

**FLOW-3D**A new pressure-velocity solver, GMRES, has been developed and will be included in the next release of * FLOW-3D*. GMRES stands for the general minimum residual method. It is designed to solve nonsymmetric linear systems. Because it is very robust and easy to parallelize, GMRES is being widely accepted and used in the CFD community. In addition to the GMRES solver, a new optional algorithm—the generalized conjugate gradient (GCG) algorithm—has also been implemented for solving viscous terms in the new GMRES solver (users can still select the original ADI method). Together, these developments will yield dividends for

*users in a number of problems. Some examples will illustrate the application of and benefits from these new developments.*

**FLOW-3D**Our first example (Figure 1) is a simple tank filling problem. In this simulation, free surface option ITB=1 is adopted and a specified velocity boundary is applied at the tank inlet. Figure 1 shows simulation results at two time frames, with color representing pressure. For this problem, where the finish time was set to 100 seconds, the CPU times for the SOR and GMRES solvers were 276 seconds and 48 seconds, respectively. That is, in this case, GMRES provided a speed-up of almost six times over SOR. Note, however, that GMRES will not always have such an advantage over SOR. This is because for a single iteration, the GMRES solver consumes more CPU time than the SOR solver. So if the required iterations in SOR for each time step is very small, the SOR solver would be more efficient.

A second example illustrates another benefit of the new implicit viscous solver: ability to solve a problem that was virtually impossible before. In this example, we have simulated the free fall of a highly viscous liquid block (viscosity = 1000 cgs units), from an initial velocity of zero. This is one of those problems where neither the SOR or ADI solvers is efficient. However, for GMRES, the solution is easily obtained. And the results of the numerical solution compare very well (within 0.1%) with analytical predictions.

A third example (Figure 2) problem involves a simulation where compressible gas is injected into a tank. A uniform pressure increase is expected during injection. The new GMRES solver performed as expected, as shown in Figure 2. For this problem, where the finish time was one second, the CPU times for the SOR and GMRES solvers were 1,630 seconds and 1,000 seconds, respectively, a speed-up of over 60% compared to SOR. But speedup wasn’t the only benefit. In order to use the SOR solver for this kind of problem, adjustments needed to be made to pressures and convergence criteria in order to obtain convergence. No such adjustments are needed with GMRES, eliminating some user uncertainty.