METHODS
Description of the proposed protocol
Our proposed protocol utilizes the AM algorithm[2] included in SimVascular[3], an open source software package. The output of this protocol is several adapted meshes and the corresponding FE simulation solutions. Since the overall goal of FE simulations is to achieve sufficient resolution for the parameters of interest (PoI), which are quantities derived from the simulated flow physics important to the research question at hand, the user selects the adapted mesh which adequately resolves the PoI with a minimum number of elements. The protocol consists of an iterative procedure with several operational recommendations. The iterative procedure performs serial adaptations of an initial input mesh by invoking SimVascular’s AM algorithm in each iteration. The adapted mesh produced in each iteration is supplied to the subsequent iteration as the input mesh. In each iteration, the input parameters to the AM algorithm are gradually refined to ensure progressive improvements in the mesh. The operational recommendations are a set of suggestions regarding the initial mesh and the settings prescribed to the iterative procedure that can help prevent the occurrence of the aforementioned undesirable outcomes.
The iterative procedure
The iterative procedure (Figure 1) is governed by parameters prescribed to it, which may be broadly divided into two categories:
- Iteration parameters: Number of iterations (n), Error threshold (Emin), Initial mesh edge size (H0), Refinement Factors (F1 and F2), Preliminary maximum edge size (Hpmax), Preliminary minimum edge size (Hpmin).
- AM algorithm parameters:
- Mesh adaptation strategy: Isotropic versus anisotropic. Our protocol exclusively uses the anisotropic setting as recommended by the authors of the AM algorithm[2].
- MIE reduction factor (R): The AM algorithm attempts to reduce the MIE through each iteration by this factor. It should always be less than 1.
- Maximum edge size (Hmax) and Minimum edge size (Hmin): The maximum and minimum edge size parameters constrain the size of the elements produced in the adapted mesh.
The iterative procedure begins with a uniform mesh where the global edge size for the bulk volume of the geometry is set to H0. In order to refine the mesh progressively, the protocol reduces Hmin and Hmax by refinement factors F1 and F2, respectively, in each iteration. For the first iteration, Hmax and Hmin are set equal to Hpmax and Hpmin, respectively. The error threshold, Emin, is the user-defined value of MIE at which the protocol will stop operation irrespective of the number of completed iterations. Since the MIE of the initial mesh may be unknown when the protocol is initiated, the initial value of Emin should be set to an arbitrarily large value. Once the MIE of the initial mesh is determined after the post-processing step of the first iteration, Emin is updated to the desired value, i.e., a certain proportion (less than 1) of the MIE of the initial mesh.
Operational Recommendations
In addition to the iterative procedure described above, the following operational recommendations are critical for the proper working of the protocol:
- The value of Hmax prescribed to the AM algorithm should always be lesser than H0, to prevent mesh coarsening.
- We have observed that the AM algorithm does not affect faces to which a boundary layer mesh is prescribed. It is our suggestion that this behavior is utilized to preserve the geometric fidelity of “wall” faces and other complex faces by prescribing a fine face mesh and a boundary layer mesh. The fine face mesh and boundary layer mesh prevent changes to those faces, thereby preserving geometric fidelity without significantly increasing the total mesh size.
- In the initial mesh, the mesh for the gross volume can be quite coarse. The value of H0 can be one order of magnitude larger than the edge size prescribed to the wall face.
An example application of the protocol
To demonstrate the working of the protocol, we consider a scenario modelling a Fontan surgical junction with physiologic flow and a patient-specific geometry derived from the MRI scan of a patient with a 19mm-diameter extracardiac conduit (Figure 2A). The initial mesh is identical in all three trials and was generated using MeshSim (Simmetrix Inc., NY). In the subsequent section, we present three trial runs of the protocol designated Trials 1, 2 and 3, which represent conservative, aggressive and moderate approaches to MIE reduction, respectively. In all trials Emin was set to the value of 30. For this example, we consider the PoI to be the pressure developed at the IVC and SVC faces. A detailed description of the initial mesh, simulation and protocol settings are provided in Additional File 1.
RESULTS
The net reduction in the MIE after six iterations of each trial is 86% for Trials 2 and 3 and 47% for Trial 1. Trials 2 and 3 representing the aggressive and moderate settings exhibit monotonous downward trends (Figure 3A). Conversely, for Trial 1 an initial uptick is followed by a steady decreasing trend. Trials 2 and 3 are characterized by steady increases in the number of elements while in Trial 1, an initial drop in the mesh size is observed, after which a modest increasing trend is established (Figure 3B). In all trials, after the first iteration the increase in the number of elements is predictable and never exceeds the mesh size of the pre-adaptation mesh by more than an order of magnitude. In Trials 2 and 3, the number of elements escalates by one order of magnitude over six iterations, where a milder increase occurs over the entirety of Trial 1. When the progression of the MIE is examined vis-à-vis the number of elements in the adapted mesh, all three trials exhibit a decreasing trend for the MIE in a similar fashion (Figure 3C).
The evolution of the adapted mesh at the region where the IVC and SVC flows collide is shown in Figure 2D. Starting from the same initial mesh (Figure 2C), all three trials exhibit the formation of a vortex in approximately the same region by the sixth iteration. In all three trials it can be observed that the mesh density increases in and around the regions where the velocity gradient is large (i.e. in and around the vortex).
DISCUSSION
The overall objective of our proposed protocol is to produce consistent decreases in the MIE, facilitate predictable increases in the number of elements and prevent losses in geometric fidelity. With the exception of the first iteration of Trial 1, all iterations of all trials exhibit steady reductions in the MIE. These observations are an indication that even with conservative inputs prescribed to the protocol, an overall improvement in the mesh error metrics can be achieved.
All three trials exhibit predictable increases in mesh size through subsequent adaptations, with the exception of the first iteration of Trial 1. A rectification (described in Additional File 1) made to Trial 3 prevented a decrease in the number of elements. It is evident that the user can exercise control over the number of elements in the adapted meshes by modifying the parameters prescribed to the protocol, specifically, Hpmax, Hpmin, and the factors F1 and F2, to obtain predictable increases in the number of elements.
All three trials exhibit declining MIE at different rates, and hence with a sufficient number of iterations, the conservative settings can achieve the same reduction in MIE as the aggressive settings. From Figure 2D it is evident that starting from the same mesh, the location and magnitude of the vortex at the sixth iteration is approximately the same for all three settings we investigated. With these observations in mind, we recommend initiating the protocol with conservative settings. Compared to the aggressive or moderate settings, since the conservative setting reduces Hmax and Hmin in smaller steps, the increase in the number of elements (and therefore the computational cost) from one iteration to the next is smaller. This means that the results of the early iterations with conservative settings can be obtained significantly faster than with aggressive settings. The user can monitor the change in the MIE and PoI, and adjust the protocol parameters if necessary, without a substantial time investment. The final choice of the adapted mesh is governed by the resolution of the PoI. The threshold below which the differences in the solution can be considered negligible should be determined by the user based on the context of the problem in question.
While the proposed protocol was designed to work with the AM algorithm available in SimVascular, the first component of the protocol, i.e., the iterative procedure, could form the basis for iterative procedures valid for other AM algorithms. Iterative procedures are prime candidates for automation and use on supercomputing clusters, potentially reducing the number of man-hours necessary to obtained converged meshes for multiple geometries. With significant advances being made in the field of AM, we hope that our proposed protocol will encourage the publication of similar “lessons learnt” documents for existing and novel AM algorithms, allowing the utilization of their capabilities to the fullest.