Jacobian selection for the flux limiter: experiments

air–water flow does not give rise to convergence pro- blems, since the number of Newton iterations is virtually the same for both LIQUID_STATE switching and no LIQUID_STATE switching runs, before the NAPL is injected. Convergence difficulties arise only when the NAPL is injected. Although the cure for convergence problems is similar to that used in 26 , the cause of these problems appears to be different. In the following examples, we will always use LIQUID_STATE variable substitution.

9.2 Jacobian selection for the flux limiter: experiments

In this Section, we will carry out some tests to determine the effect of using various approximations to the Jacobian when using a flux limited discretization eqns 22–26. Tables 12–14 compare the performance of pure upstream weighting and flux limiters based on van Leer and MUSCL approaches. For the flux limiters, the nonlinear iteration is carried out using the full Jacobian, an approximate Jacobian derivatives respect to i 2up in eqns 22–26 is ignored, and a first-order Jacobian Jacobian constructed using first- order upstream weighting. These methods are described in more detail in Section 5.1. All the results in Tables 12–14 were obtained using the maximum potential method see Fig. 1 for location of the second upstream point. Examination of these tables reveals that, at least for this interphase mass transfer data, which is similar to that in 13 , the nonequilibrium models are easier numerical problems than the equilibrium models, for the same scenario. This will be discussed more detail in Section 9.3. Another interesting result form Tables 12–14, is that there is very little difference between using the full Jaco- bian, the approximate Jacobian, and the first-order Jacobian, in terms of total Newton iterations. This holds for MUSCL and van Leer weighting, equilibrium and nonequilibrium models, and all three scenarios. For any given weighting method, model formation, and scenario, the number of Newton iterations varied by at most . 15. Of course, the CPU times for the full Jacobian methods were about double the CPU cost compared to the approximate and first-order Jacobians, due to the increased size of the Jacobian. Consequently, on the basis of these results, either the first- order or approximate Jacobian method would appear to be a good choice for solution of the nonlinear equations. There does not seem to be any advantage to using the full Jacobian. Table 12. Comparison of full and approximate Jacobian, stra- tegies, heterogeneous DNAPL examples, 100 days: CPU times are for a SUN Sparc-10 Method Total nonlinear iterations Total linear iterations CPU time s Equilibrium model Upstream weighting Full Jacobian 250 1540 241 MUSCL weighting Approximate Jacobian 443 2413 431 First-order Jacobian 430 2271 413 Full Jacobian 435 2261 831 Van Leer weighting Approximate Jacobian 440 2248 400 First-order Jacobian 450 2392 424 Full Jacobian 427 21398 784 Nonequilibrium model Upstream weighting Full Jacobian 288 1806 390 MUSCL weighting Approximate Jacobian 280 1782 406 First-order Jacobian 272 1772 393 Full Jacobian 265 1603 727 Van Leer weighting Approximate Jacobian 289 1835 403 First-order Jacobian 275 1798 397 Full Jacobian 271 1686 765 Table 13. Comparison of full and approximate Jacobian, stra- tegies, heterogeneous DNAPL examples, 100 days: CPU times are for a SUN Sparc-10 Method Total nonlinear iterations Total linear iterations CPU time s Equilibrium model Upstream weighting Full Jacobian 309 1647 282 MUSCL weighting Approximate Jacobian 512 2094 460 First-order Jacobian 517 2094 460 Full Jacobian 509 2195 941 Van Leer weighting Approximate Jacobian 622 2377 547 First-order Jacobian 713 2540 615 Full Jacobian 729 2519 1319 Nonequilibrium model Upstream weighting Full Jacobian 249 1383 324 MUSCL weighting Approximate Jacobian 256 1390 356 First-order Jacobian 257 1391 351 Full Jacobian 252 1379 692 Van Leer weighting Approximate Jacobian 252 1394 355 First-order Jacobian 255 1401 348 Full Jacobian 250 1386 699 Nonlinear multiphase flow 445 Recall from Figs 7 and 8 that MUSCL and van Leer weighting give very similar computed solutions. Tables 12–14 also indicate that, in terms of numerical perfor- mance, there is little difference between MUSCL and van Leer methods. This is somewhat surprising, since the MUSCL method in eqn 26 was specifically designed to use a smooth limiter function. The van Leer limiter function eqn 25 has a discontinuity in slope at r ¼ 0. In order to verify that the above trends are also observed in convection-dominated problems, the homogeneous DNAPL nonequilibrium problem was run again, this time with all dispersion parameters in Table 3 reduced by a factor of 10. This resulted in a grid Peclet number of . 20. Table 15 shows that even for this problem, there does not seem to be any advantage of using the full Jacobian, compared to either the first-order Jacobian or the approximate Jacobian. Note that, as shown in Fig. 15, there is very little differ- ence in the computed solution for the Heterogeneous DNAPL problem, using either the maximum potential or geometric method for determining the second upstream point see Fig. 11 for use in the flux limiter expressions. Again, this is somewhat surprising, since the maximum potential method would appear to be more physically reasonable for heterogeneous problems. This was also reported in 20 . In order to determine if there was a difference in comput- ing cost when using maximum potential or geometric methods for determining the second upstream point, the heterogeneous DNAPL scenario was run again, using the geometric method. The run statistics for the computations Table 14. Comparison of full and approximate Jacobian, stra- tegies, heterogeneous LNAPL examples, 100 days: CPU times are for a SUN Sparc-10 Method Total nonlinear iterations Total linear iterations CPU time s Equilibrium model Upstream weighting Full Jacobian 1023 4788 880 MUSCL weighting Approximate Jacobian 1345 6606 1225 First-order Jacobian 1334 6410 1217 Full Jacobian 1319 6365 2246 Van Leer weighting Approximate Jacobian 1283 6333 1149 First-order Jacobian 1436 7135 1325 Full Jacobian 1235 5877 2067 Nonequilibrium model Upstream weighting Full Jacobian 624 2567 736 MUSCL weighting Approximate Jacobian 612 2481 761 First-order Jacobian 706 3046 886 Full Jacobian 648 2569 1544 Van Leer weighting Approximate Jacobian 672 2907 817 First-order Jacobian 714 3078 904 Full Jacobian 599 2427 1439 Table 15. Comparison of full and approximate Jacobian, stra- tegies, homogeneous DNAPL examples, 100 days Method Total nonlinear iterations Total linear iterations CPU time s Nonequilibrium model Upstream weighting Full Jacobian 268 1829 376 MUSCL weighting Approximate Jacobian 290 2061 443 First-order Jacobian 286 1956 424 Full Jacobian 295 2056 857 Van Leer weighting Approximate Jacobian 310 2265 460 First-order Jacobian 289 1939 420 Full Jacobian 277 1877 778 This example used dispersion parameters 10 times smaller com- pared to the base case in Table 3, resulting in a grid Peclet number of . 20. CPU times are for a Sun Sparc-10. Table 16. Comparison of full and approximate Jacobian, stra- tegies, homogeneous DNAPL examples, 100 days Method Total nonlinear iterations Total linear iterations CPU time s Equilibrium model MUSCL weighting Approximate Jacobian 932 3213 812 First-order Jacobian 368 2036 365 Full Jacobian 935 2861 2461 Van Leer weighting Approximate Jacobian 1107 3681 890 First-order Jacobian 1359 4272 1110 Full Jacobian 1020 2954 2676 Nonequilibrium model MUSCL weighting Approximate Jacobian 315 2337 498 First-order Jacobian 314 2278 477 Full Jacobian 307 1673 1287 Van Leer weighting Approximate Jacobian 316 2372 499 First-order Jacobian 320 2342 490 Full Jacobian 345 179 1446 This example used the geometric method for determining the second upstream point. Compare with Table 12. CPU times are for a SUN Sparc-10. 446 P. A. Forsyth et al. using the geometric method are given in Table 16 and should be compared with Table 12. Note that for the equili- brium models, there is a large increase in the number of Newton iterations required when using the geometric method compared to the maximum potential method, with one exception. The one anomaly occurs when using MUSCL weighting, with the first-order Jacobian equili- brium model. In this case, the geometric method run has slightly fewer total Newton iterations than the maximum potential computation. However, for the rest of the equili- brium simulations, the number of Newton iterations for the geometric method is about double that of the maximum potential methods. For the nonequilibrium assumptions, the geometric-based runs have slightly more Newton itera- tions compared with the maximum potential runs. Note that the CPU time requirements for the geometric- based methods, when using the full Jacobian Newton itera- tion, are much greater than the corresponding runs using the maximum potential method. This is because the number of nonlinear iterations has increased for the geometric methods and, as well, the geometric Jacobians have more non-zeros than the maximum potential Jacobians. This results in greater costs for construction and solution of the Jacobian for the geometric Jacobians. The maximum potential Jacobian has fewer non-zeros than the geometric Jacobian since the maximum potential method recognizes that many possible non-zeros in the geometric Jacobian are identically zero in the maximum potential Jacobian. An example of this would be if fluid flows from node j to node i, then i2upi,j does not exist see eqn 24. Consequently, even though the solutions for both maxi- mum potential and geometric methods are very similar, the geometric method is generally slower than the maximum potential method.

9.3 Effect of varying mass transfer parameters