Friday, March 22, 2002

Studies in Unstructured Grid Generation Using AFLR2E

Note: This is a report written for a class I had in grad school in 2002. I found it using the Wayback Machine and decided that the algorithms alone were reason enough to keep it. The original report is provided here mainly for some semblance of context.

Methods

Centroid method

Given the algorithm's simplicity, the function wasn't too difficult to produce. The results, though, were a little disturbing, given the quality of results with more complex algorithms such as AF. This degree of difference defied explanation when trying to re-evaluate my code. I eventually gave up in favor of resignation to the fact that the AFLR2E code is probably more finely tuned (i.e. better choices for cdfn, etc.).

Circle AFLR2E Class
Number of Elements 542 536
Max Angle 113.114 112.302
Min Angle 23.19 23.19
Percent above 90 degrees 2.03 2.612
Percent below 30 degrees 14.945 14.925

Atlantic AFLR2E Class
Number of Elements 31116 41396
Max Angle 148.802 116.301
Min Angle 10.54 20.37
Percent above 90 degrees 15.834 0.469
Percent below 30 degrees 5.399 0.014

Advancing front method

This algorithm was much more complex, and as such, I had many more problems. But, in the end, it all worked out. Here are some results.

AtlanticAFLR2EClass
Number of Elements4140841408
Max Angle 116.301116.301
Min Angle 20.3720.37
Percent above 90 degrees 0.4520.452
Percent below 30 degrees 0.0170.017

As you can see, the results for the two are exactly the same. So, I would assume the algorithm is a success.

Also, here is an animated gif of my advancing front algorithm at work in the Gulf of Mexico.


Secondary Functions

Area Coordinate Search

This algorithm was not as difficult as the AF or the Global Check, but it proved to be a bit of a bear in the beginning.

This experiment involves using AFLR2E's fadd and fchk functions while toggling the srch function.

Atlantic AFLR2E Class
Number of Elements41408 41408
Max Angle 116.301 116.301
Min Angle 20.37 20.37
Percent above 90 degrees 0.452 0.452
Percent below 30 degrees 0.017 0.017

Global Candidate Point Check

This algorithm was the oddest in testing. The differences seen in the AF algorithm below are unexplainable by me. I haven't the foggiest idea why the numbers are different (given how small the difference is).

This experiment involves using AFLR2E's fadd function and the class srch function (given no difference in performance) while toggling the fchk function.

Atlantic AFLR2E Class
Number of Elements 41408 41384
Max Angle 116.301 116.301
Min Angle 20.37 20.37
Percent above 90 degrees 0.452 0.462
Percent below 30 degrees 0.017 0.014

Conclusions

Regarding the centroid algorithm, I would have to assert from my findings that AFLR2E has a distinctive means of producing a centroid-type grid. From what I know about the algorithm in concept, my code should perform correctly (as it does for the most part). The differences in its results and that of AFRL2E's can only be accounted by a slight difference in approach (possibly a different node factor).

The advancing front algorithm seems to work quite well. Aside from being a (seemingly) robust tool, it also produces satisfying results. Its only down side is the computational cost. I can see that for very large fields, it might be prohibitive.

The two secondary functions were not difficult to produce, but "debugging" them got to be a bear, especially the global candidate point check. As stated above, the differences in AFLR2E's and my fchk functions are beyond my comprehension.