• Nem Talált Eredményt

Circulation in the presence of a nearshore trench

Figure 53. Planar rotation in parabolic basin. Global error of elevation vs the cell count (left) and the CPU time (right).

5.5 Circulation in the presence of a nearshore

5.5. CIRCULATION IN THE PRESENCE OF A NEARSHORE TRENCH 101

Figure 54. Steady-state circulation with nearshore trench. Bathymetry.

= 0:025 s m 1=3 was prescribed. Di¤usion and the e¤ects of the Earth’s rotation were not considered either.

In the absence of an analytic solution to this problem, the reference solution was taken as the numerical result on a …ne uniform grid with 6.25 m cell size (Figure 55). It is seen from the velocity vector …eld that the trench e¤ectively carries all

‡ow in the upwind direction, and in doing so, it facilitates the development of a large, asymmetric topographic gyre. The varied bathymetry also gives rise to intense velocity shear and vorticity along the steep bed slopes of the trench. This benchmark problem contains the topographic ‡ow features relevant to shallow lakes and is therefore su¢ ciently complex for evaluating the behaviour of the various re…nement procedures.

Simulations are run for a sequence of uniform mesh resolution decreasing by a factor of 1/2, that is, with 12.5, 25 and 50 m cell size. In addition to these, solution-adapted simulations are also performed. Starting with a uniform mesh of 50 m resolution, the mesh is adapted using four di¤erent schemes, as summarized in the following table:

Name sdiv srot svrec

ad, div 0.2 0 0

ad, rot 0 0.2 0

ad, v-rec 0 0 0.2 ad, all 0.2 0.2 0.2

Coarsening is initiated according to acoa = 0:15. Re…nement is limited to 12.5 m cell size and the total cell count is not allowed to increase beyond 3 times the

Figure 55. Steady-state circulation with nearshore trench. Reference results on the

…nest mesh, with uniform 6.25 m cell size. Left panel: velocity magnitude with 0.02 m/s contour interval. Middle panel: evenly resampled vector …eld. Right panel: Surface elevation with 0.005 m contour interval.

initial cell count, which is achieved by settingnmax = 1800. As to the scheduling of the adaptation, I let the model approach convergence on the initial 50 m mesh, then the mesh is adapted in three successive steps at t = 10,000, 14,000 and 18,000 s. The left panel in Figure 56 shows the evolution of the solution due to mesh re…nement for a typical simulation on an adaptive mesh.

The global error is computed by (149) with the di¤erence that ^ denotes the converged reference solution instead of the analytical solution. The error is integ-rated numerically, based on and ^ …rst resampled with linear interpolation to a uniform, 6.25 m grid. It can be seen from Figure 56 that the …rst adaptation step att = 10;000 s greatly reduces the global error on the coarse initial grid, whereas later re…nements are less e¤ective.

The right panel in Figure 56 shows the relative residual ofuversus the number of iterations and the variation of cell count with each adaptation. The relative residual of the ‡ow state vector, 2u, is computed using the L2-norm of the the relative change inubetween subsequent time stepstnandtn+1. Exceptionally, the simulation for the right panel is continued to25;000 s in order to con…rm that the adaptive scheme does converge at 20,000 s. Each adaptation step induces a sudden jump in the residual which proves that the piecewise linear interpolation of the coarse solution does not satisfy the governing equations. The convergence stalls after20;000 swhen the residual reaches a magnitude of10 5 whereas the reference solution on the …nest uniform grid stalls with a residual of magnitude 10 7 (not plotted here). Introducing further adaptation steps is not justi…ed for this steady-state simulation because the overhead would add to the computation time without

5.5. CIRCULATION IN THE PRESENCE OF A NEARSHORE TRENCH 103

Figure 56. Steady-state circulation with nearshore trench. Convergence history of the

“ad, all” scheme. Left panel: History of the global error in water elevation and velocity vs model time. Right panel: cell count and relative residual vs iterations. The vertical dashed lines indicate when the mesh was adapted.

notably improving the accuracy. Also, a premature adaptation would increase the cell count too early, slowing down the simulation unnecessarily. The deviation from the exact solution is generally not available to control the scheduling of the adaptation, however it would be promising to extend the adaptation algorithm so that adaptation is automatically triggered based on the residuals. The adaptation strategy outlined here in fact realises one prolongation step of a full multigrid scheme (Mavriplis, 1995), whereby the transfer of the coarse solution towards the

…ner meshes is achieved in an adaptive way, re…ning only where the expected accuracy improvement justi…es it. A full adoption of the multigrid framework on quadtree meshes is shown by Józsa and Gáspár (1992) and Gáspár et al. (1995) in their …nite di¤erence solver of the shallow water equations, applied to natural lake geometries.

The …nal meshes are presented in Figure 57. There is a clear relationship between the adapted mesh density and the velocity …eld, as expected. Visibly, local re…nement is concentrated to the trench and to the closed boundary with all adaptation schemes. The error estimator based on the divergence (“ad, div”) emphasises the allocation of new cells along the interface between the two basins, where strong ‡ows meet high depth gradients and therefore yield signi…cant diver-gence. Circulation-based adaptation (“ad, rot”) targets re…nement to the western boundary, where the velocity shear is highest and a …ner resolution is expected to represent vorticity more accurately. Adaptation based on velocity reconstruction (“ad, v-rec”) re…nes the whole trench and some of the southern eddy by one level

Figure 57. Steady-state circulation with nearshore trench. Converged meshes at t= 20;000 sobtained using the four adaptive schemes.

(to 25 m), while it re…nes fewer cells to the …nest level (12.5 m) than the two previous error estimators. In combination (“ad, all”), the three error estimat-ors act with a mixture of their individual e¤ect. Because re…nement indicatestimat-ors are normalised, in general it is the relative combined importance which counts, and the total cell count does not always increase when the estimators with equal sensitivity are combined.

The global, normalised error of the computed water elevation and velocity magnitude versus the …nal cell count and the CPU time is presented in Figure 58 and 59. The dashed lines connect the results obtained with successively re…ned uniform grids. The formal second-order accuracy is con…rmed by EA( ). On the other hand, the order of convergence (de…ned with the unsteady benchmark problem) turns out to be only 1.47 when judged by the global error in the velocity, EA(v), and the value of the error itself is one magnitude higher than for EA( ).

One reason for the slower convergence of the velocity is that the velocity …eld is directly in‡uenced by the discontinuous variation of the bathymetry. Furthermore, the numerical balancing of the bed slope and the linear interpolation of the coarse solution may also reduce the order of convergence.

The desirable attributes of a numerical model, that is, low error paired with few cells and short simulation time, are in the lower left corner. It is apparent from the …gures that the performance of adaptive schemes is better than that of uniform grids. The cell counts are close to each other for the four adaptation schemes, that is why the simulation times barely di¤er. The least accurate water surface was obtained by the “ad, rot” scheme, whereas the three other schemes gave a comparable error EA( ). The di¤erence between the adaptation schemes is greater according to EA(v). It is not surprising that the “ad, v-rec” scheme is the most accurate error estimator in this case: it is directly measuring the error

5.5. CIRCULATION IN THE PRESENCE OF A NEARSHORE TRENCH 105

Figure 58. Steady-state circulation with nearshore trench. Global error in water elevation (EA( ), left panel) and velocity (EA(v), right panel) plotted against the …nal cell count.

Figure 59. Steady-state circulation with nearshore trench. Global error in water elevation (EA( ), left panel) and velocity (EA(v), right panel) plotted against the …nal CPU time.

Figure 60. De…nition of the wind surge problem in a rectangular lake with submerged peninsula.

in the discretisation of velocity. Overall, the “ad, v-rec”and the “ad, all”schemes perform better than the two other.

CPU time bears at least as much importance for the modeller as cell count, because it also re‡ects the increased cost of time integration in the re…ned cells.

In fact, after a local re…nement, the time step is approximately reduced to half in the four new child cells, which means that the computational work increases to about eightfold (actually somewhat less, thanks to the adaptive time stepping).

It follows that time integration is slower on an adaptive mesh than on a uniform grid with exactly the same cell count. Encouragingly, a comparison of Figure 58 and 59 shows that adaptive time stepping along with multigrid-type prolongation also retains the advantage of adaptive meshes when measured in terms of CPU time. The instantaneous simulation speed (i.e., advance in model time per spent CPU time) is governed approximately by the 1.5th power of the number of cells.