## 5 Examples
### Allen-Cahn Equation
(**b**) Phase field distribution within the quarter domain after 100 s. The nucleus has shrunk to a smaller radius whilst retaining the interface profile. Of course, this scenario has been discussed already in many different works. Quite often, it is used to highlight accuracy gains or performance improvements of advanced numerical techniques, that are particularly suggested to solve the Allen-Cahn problem. For instance, [PERSON] et al. discussed the scenario in the context of solving the anisotropic Allen-Cahn equation using fully implicit or a linearized time discretization and semi-implicit time discretizations and globally convergent truncated nonsmooth Newton methods. They provide information on resulting differences in the achieved accuracies and concerning the complexity of the schemes [83]. Another example is the nonlinear preconditioning for diffuse interface models based on the Allen-Cahn equation, as first suggested by [PERSON] [84]. Interestingly, this preconditioning technique seems to be related to the abovementioned sharp phase field method suggested by [PERSON] et al. [77]. Both methods provide a tremendous improvement potential, as demonstrated by a comparative study using this scenario. ### Two-Phase Advection

As a second model problem, we will investigate the advection equation in two dimensions. This problem is well studied in the literature and is known as challenging to solve accurately. Due to the absence of dissipative terms, numerical algorithms oftentimes struggle to converge towards the entropy solution and either produce spurious oscillations, rendering the solution unstable, or yield overly diffusive approximations, where conservation laws are violated [85]. We choose this problem in particular due to being simple yet challenging enough to study. In addition, the advection equation frequently arises in modeling multiple phases in an Eulerian framework and the motion of immersed immiscible fluids in general. It is, thus, of high relevance in a multitude of multiphysics problems. In particular, we investigate a pure advection problem involving two phases. We choose to describe the motion of two fluids and track the volume fractions \(\alpha_{i}\), as is common for the volume-of-fluid (VoF) formulation [86]:

\[\partial_{t}\alpha+\underline{u}\cdot\
abla\alpha=0, \tag{26}\] \[\alpha_{1}+\alpha_{2}=1,\] (27) \[\Omega\in[0;5]\times[0;5],\] (28) \[t\in[0;5]. \tag{29}\]

The initial condition to this problem is given as a rectangle function that is one in the interval \(x\in[2;3]\times[2;3]\) and zero everywhere else. One may alternatively track only the motion of the interface using a coloring function \(\phi\). This is common for the level set method; the governing equation, however, is the same as Equation (26). We would like to solve this problem on three different architectures to showcase the effect of parallelism on the efficiency of numerical schemes. The choices of hardware along with important quantities are given in Table 4. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **FDM** & **FEM** & **Relative** \\ \hline Median run time & 4.743 ms & 192.837 ms & 40.7\(\times\) \\ Mean run time \(\pm 1\sigma\) & 4.731 ms \(\pm\) 0.059 ms & 192.787 ms \(\pm\) 0.219 ms & 40.7\(\times\) \\ Allocated memory & 21.490 kB & 494.730 kB & 23.0\(\times\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Run times of the finite element and finite difference model of the 2D Allen-Cahn equation. Both models were run on identical hardware and Julia 1.8.5 with LLVM 13.0.1 [72]. Time stepping was performed using the DifferentialEquations.jl library [73]. Linear algebra operations were performed using OpenBLAS [80,81] on a single-threaded Apple M1 Pro ARM processor. Fast evaluation of fused array expressions was provided by the Tullio.jl library [82]. Allocated memory refers to the physical size of the problem-specific data structures given in Listing 1. The sample size for each scheme is \(n=100\).