• No results found

6.6 Level set evolution with adaptive mesh refinement: numerical examples

6.6.4 hp-convergence study: shearing circle

6.6.4.1 Initialisation

The next example is the shearing circular interface problem introduced in Section 5.4.2.3. An initial level set function which is the signed distance function to a circular interface of radius,

r = 0.5, centred at the origin, that is as described in Equation (5.25), is L2 projected onto

the domain Ω = (−1, 1)2. The initial mesh consists of square elements of size h = 0.2 and

p = 2, which after the initial projection is narrow banded and passed into the refinement

loop, to generate a mesh upon which the L2 error in the projection satisfies the tolerance,

errorTol=10−9×area.

The variation in error with mesh density associated with the initialisation of the circular interface for the shearing circle problem can be seen in Figure 6.29. Once again this is the

initialisation of a circular interface, driven by the L2 error in the solution. In this case the

analyticity estimate indicates that the solution in the elements near where the singularity falls is sufficiently smooth to be refined in p. Once the upper limit on p refinement is reached, the flags switch to h-flags should further refinement be required in the region, at which point the singularities are removed and the refinement loop can converge quickly upon a mesh which can represent the level set function with the desired level of accuracy. The stagnation in the DG

5 6 7 8

Polynomial Order

Figure 6.30: Final computed mesh configuration for the initialisation of the shearing circular interface problem on an hp-adaptively refined mesh where the colour of the element denotes the polynomial order of that element. The thick black line denotes the computed interface position. norm is a numerical artefact from the truncation error when computing the analytical gradient using a finite difference method.

Figure 6.30 shows the first mesh upon which the converged solution to the initialisation of the shearing circular interface problem satisfies a stopping criterion of the mesh refinement loop. The computed mesh is similar to all of the meshes upon which circular interfaces have been projected in the example problems on adaptive meshes thus far.

6.6.4.2 Evolution

The evolution can then proceed, driven by the advection velocity defined in Equation (5.26),

which will, in the interval te = (0, 0.5), cause the initially circular interface to shear, stretch

and rotate. The function describing the analytical solution to the shearing circle problem over time, is given in Equation (5.28). If at any point during the evolution the signed distance error

grows such that ESD >10−6×area, this will trigger the refine-reinitialisation loop (Algorithm

3), which will continue in a while loop until either the tolerance on the error is satisfied, or the mesh becomes maximally refined.

Figure 6.31 presents the variation in error over pseudotime for the shearing circle problem on an hp-adaptively refined mesh. For this problem the mesh is initialised so as to accurately represent a circular interface, which is a problem with which the proposed method has been successful throughout this chapter. As the evolution begins the circle begins to shear and become more elliptic. As seen in the reinitialisation example problems in Section 6.4, there is some relationship between the either the curvature or the orientation of the interface relative to the grid, and the ability to solve the reinitialisation in a timely fashion without using greater levels of refinement than are to be used here. This example illuminates just how slight this additional complexity needs to be before p = 8 elements and a maximum of 100 Picard iterations of the reinitialisation, are no longer sufficient to represent the level set function with the desired

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Time (s) 10-10 10-8 10-6 10-4 10-2 100 Error L2 Error DG Error Error Estimate

(a) Error against pseudotime

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Time (s) 0.97 0.98 0.99 1 1.01 1.02 1.03 A/A 0

(b) Area ratio against pseduotime

Figure 6.31: Error and area ratio over pseudotime for the shearing circular interface problem on an hp-adaptively refined mesh. The red line denotes the error tolerance defining one of the stopping criteria, as this varies with the area of narrow band.

level of accuracy. Figure 6.32 shows the interface and mesh configurations at a number of points

in the interval te= (0, 0.01) and the mesh required to satisfy the error tolerance. It can be seen

that after very few time steps, almost the entire mesh consists of p = 8 elements.

One point of note with this example, however, is that during the period te= (0, 0.025), the

shape of the interface is more complex than the initial circle but not so complex that the limits on refinement and number of Picard iterations are insufficient to satisfy the tolerance on the signed distance error. During this period the refinement strategy also has a positive effect on

the error in the L2 and DG norms. These results can be seen in Figure 6.33. This is promising

as it implies that the proposed method is capable of generating a solution with any desired level of accuracy for any problem given enough computing power.

Also shown in Figure 6.31, is that beyond te = 0.025 the error grows as the upper limits

on refinement are reached and the error reflects the best possible solution given these limits as

opposed to satisfying the tolerance on the error. In the interval te= (0.025, 0.3) the change in

the shape and the orientation of the shape manifests as an error which is in general growing but oscillates considerably, as reinitialisation continues at each step to attempt to decrease the error and the shape becomes increasingly difficult to capture on a given mesh. Beyond around

te = 0.3, the signed distance error decreases but continues to oscillate, the error in the L2 and

DG norms remains constant, which is something not seen in previous examples. The decrease in error at this stage does seem to align with an observation in Section 6.4.4, that being that certain orientations of the interface relative to the background grid are more difficult to capture than others, even if the curvature is larger.

Compared with the solution of the same problem on a fixed mesh (again see Section 5.4.2.3),

the error is reduced in both the L2 and signed distance error measures. The error seems to

have increased in the DG norm, however, again this is likely to do with truncation errors in computing the known gradient using a finite difference method, which are larger due to the much large number of interpolation points at which the error is computed. This increase in accuracy does appear to have come at cost however, as the number of degrees of freedom in the system for the fixed mesh grows from 12800-15680, as the shape grows for the fixed mesh, compared to 29431-147231 for the adaptive mesh. Also, the smaller elements and much higher polynomial orders used in the simulation on the adaptive mesh causes a significant reduction in the time step increasing the number of iterations required for the simulation from 110 for the fixed mesh, to 2806 for the adaptive mesh. Given what has been observed across the numerical examples in this chapter, increasing the limit of allowed p-refinement would likely result in a more economical use of degrees of freedom as well as reducing the required time step, and improving the accuracy, especially given that other than the singularity near to the origin this problem is smooth everywhere.

Also shown in Figure 6.31 is the area ratio over time. Area ratio denotes the relative change in the area of the shape, which given that the advection velocity is divergence free should remain constant throughout the evolution. Despite a larger variance in the area ratio over time, compared with the same problem computed on a fixed mesh (see Section 5.4.2.3), the area ratio here tends to oscillate around unity which is an improvement over the fixed mesh where the area

t=0.00 5 6 7 8 Polynomial Order

(a) Mesh and interface position at te= 0.0000.

t=0.0026 t=0.00 5 6 7 8 Polynomial Order

(b) Mesh and interface position at te= 0.0026.

(c) Mesh and interface position at te= 0.0051. (d) Mesh and interface position at te= 0.0064.

(e) Mesh and interface position at te= 0.0077. (f) Mesh and interface position at te= 0.0100.

Figure 6.32: Configuration of mesh and interface position over time for the shearing circular

interface evolution problem, on an hp-adaptively refined mesh, in the interval te = (0, 0.01). The

0 0.005 0.01 0.015 0.02 0.025 Time (s) 10-9 10-8 10-7 10-6 10-5 10-4 10-3 Error L2 Error DG Error Error Estimate

Figure 6.33: Error over time, for the shearing circular interface problem, on an hp-adaptively

refined mesh in the time period te = (0, 0.025). The red line denotes the error tolerance defining

one of the stopping criteria, which can change as the area of narrow band changes.

ratio began to grow over time with no indication that this would decrease if the simulation was to continue.

Figure 6.34 shows snapshots of the interface and the mesh over time, for the shearing circle interface problem. What can be seen is that the initial circular interface is captured well using very few, high order elements. Higher levels of refinement can be seen as the shape of the interface becomes more and more difficult to resolve well given the limits on the refinement, reflecting what was seen earlier for the elliptical interface reinitialisation problem (see Section 6.4.4).