**Mesh Generation and Adaptivity Tools from the**

**Terascale Simulation Tools and Technology (TSTT) Center**

PIs: J. Glimm^1,2^, D. Brown^3^, L. Freitag^3^, Co-PIs: E. D'Azevedo^5^,
P. Fischer^6^, P. Knupp^4^, X.L. Li^2^, M. Shephard^7^, H. Trease^8^,
Affiliated Researchers: J. Drake^5^ (Climate), K. Ko^9^ (Accelerators),
S. Jardin^10^ (CEMM), C. Tzanos^6^ (Combustion)

**^1^Brookhaven National Laboratory, ^2^State University of New York at
Stony Brook, ^3^Lawrence Livermore National Laboratory, ^4^Sandia
National Laboratories, ^5^Oak Ridge National Laboratory, ^6^Argonne
National Laboratory, ^7^Rensselaer Polytechnic Institute, ^8^Pacific
Northwest National Laboratory, ^9^Stanford Linear Accelerator**
**Center, ^10^Princeton Plasma Physics Laboratory**

***Our goal is to improve the accuracy and fidelity of PDE-based
simulations by bringing modern mesh generation and adaptive mesh tools
to the application scientist.*** ***Often, however,*** ***these
sophisticated tools*** ***have a level of software implementation
difficulty that*** ***limits their usage. To address this, we are
working closely*** ***with SciDAC application teams to enhance mesh
generation techniques, improve mesh quality analysis and control, and
insert sophisticated adaptive technologies directly into their
simulations.***

**Vision.** Many science simulation problems, including those in the
SciDAC program, call for sophisticated mesh generation and adaptive mesh
refinement technologies. Complex geometrical domains, the need for
enhanced resolution in regions where the solution is rapidly changing,
or requirements on the quality of the underlying mesh all complicate the
numerical simulation of applications based on the solution of partial
differential equations. The TSTT Center is working closely with several
SciDAC projects and with related application areas and groups to ensure
that existing mesh technologies are utilized to their fullest extent. .

**Adaptive Mesh Technologies.** Many simu-lation problems contain
subregions of particular complexity, difficulty, and importance that
require enhanced resolution. Adaptive mesh refinement (AMR) tools allow
the focusing of simulation effort where it is most needed, and we are
applying such tools to accelerator design, climate, and combustion
applications.

*Accelerator Design:* The design process for the next generation of
linear accelerators requires accurate prediction of several field
quantities that influence wall losses in complex three-dimensional
configurations. To obtain the necessary accuracy, TSTT researchers have
teamed with scientists at the Stanford Linear Accelerator Center (SLAC)
to develop an adaptive mesh control loop based on error indication
procedures. TSTT error indicators, field function libraries, and
adaptive refinement procedures are used to provide increasingly refined
meshes to the SLAC analysis code until a satisfactory result is
obtained. The adaptive procedure has been applied to the Trispal cavity
for which both experimental measurements and numerical results from
standard codes are publicly available. Using only one-third the number
of degrees of freedom, the new adaptive procedure reliably provides more
accurate predictions than results using uniform refinement. Moreover, in
a recent study of four different codes, the TSTT adaptive analysis
procedure gave the best agreement to experimental measurements.

*Climate.* Atmospheric flows over mountain ranges respond dynamically to
the variations in height these ranges present. The flow dynamics are
thus inherently more complex near such regions, and as a result, the
flow simulation is correspondingly more difficult. We are working with
climate scientists to develop enhanced mesh generation capabilities for
anisotropic planar and geodesic surface meshes. The initial mesh is
adapted and optimized to capture land surface orographic or topographic
height fields. As the analysis proceeds, solution based adaptation is
used to redistribute the mesh nodes in order to minimize solution error.
We have successfully demonstrated this technology in prototype
simulations and are now working with climate scientists to directly
interface the mesh generation and adaptation tools directly with climate
codes.

*Combustion.* This effort has emphasized the break up of a diesel jet
into spray. The instability and breakup of a diesel jet is initiated by
vortical motion near the jet surface and the injection nozzle walls.
These features are about 1/500 of the computational domain size so that
AMR is critical to the success of this simulation. We are developing a
combined front tracking/AMR scheme and anticipate obtaining a validated,
predictive model for the formation of spray, thereby creating a new
capability for diesel engine design.

**Enhanced Mesh Generation Capabilities.** In many applications, the
geometric complexity of the computational domain leads to difficulties
in the mesh generation process that the TSTT Center is working to
address. Of particular note are our efforts in the accelerator design
and biology applications.

![](media/image1.png){width="1.9381889763779527in"
height="1.4956692913385827in"}![](media/image2.png){width="1.4846456692913386in"
height="1.4846456692913386in"}![](media/image3.png){width="1.9271653543307086in"
height="1.49251968503937in"} Accelerating cavities and beamline
components have complex boundaries which complicate the process of
generating high-quality, computational meshes. We have been working
closely with accelerator scientists to help decrease the time needed to
generate an initial mesh for these geometries using TSTT mesh generation
tools. The generation of an all-hexahedral mesh representing the
geometry of the SLAC PEP-II Interaction Region complex enabled the first
successful direct calculation of the mode spectrum of this geometry, and
resulted in the decision by SLAC to choose the Tau3P electromagnetics
code for further PEP-II IR design studies.

*Biology.* Certain microbial cells are of great interest to DOE as a
possible bioremediation agent for heavy metal waste products. In some
instances, these cells flocculate and it is hypothesized that this may
be an attempt to shield some individuals from a hostile, high-oxygen
environment. To better understand this behavior, we have focused our
effort on the development of a computational biology tool called the
VMCS (Virtual Microbial Cell Simulator). The VMCS makes use of several
TSTT technologies such as unstructured mesh generation, mesh
optimization, and TSTT discrete operators. In Figure 1 (left), we show
one confocal image slice of the floc which is composed of 10-20 thousand
individuals. By stacking such images we can reconstruct the 3D geometry
of the floc and generate an unstructured mesh (center). Using this mesh
we solve a set of reaction/diffusion equations to get the concentration
of oxygen as a function of space and time (right). These calculations
confirm that there is an oxygen gradient from the edges of the floc into
the center.

**Contact Information:**

James Glimm, Brookhaven National Laboratory

Phone: 631-333-8155 <glimm@bnl.gov>

David L. Brown, Lawrence Livermore Nat. Lab

Phone: 925-424-3557 [dlb@llnl.gov](mailto:dbl@llnl.gov)

Lori Freitag Diachin, Lawrence Livermore Nat. Lab

Phone 925-422-7130 <diachin2@llnl.gov>