You are on page 1of 164

USER GUIDE

pro-STAR WITH AUTO MESH GENERATION

VERSION 3.26

CONFIDENTIAL — FOR AUTHORISED USERS ONLY

© 2005 CD-adapco
TABLE OF CONTENTS
1 INTRODUCTION
2 AUTOMATIC MESHING METHODOLOGY
Methodology Overview ............................................................................................ 2-2
Geometry Import and Surface Preparation ............................................................... 2-3
Subsurface Generation .............................................................................................. 2-5
Volume Mesh Generation ......................................................................................... 2-6
Cell Layer Extrusion and Assembly ......................................................................... 2-9
3 AUTOMESH MODULE OPERATION
Module Startup .......................................................................................................... 3-1
Database Operation ................................................................................................... 3-2
Saving Panel Settings ................................................................................................ 3-6
Viewing Batch Output .............................................................................................. 3-7
Error Trapping .......................................................................................................... 3-9
Adding Batch Commands ....................................................................................... 3-10
Deleting Local Batch and Temporary Files ............................................................ 3-11
4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
CAD Data Formats ................................................................................................... 4-1
Surface Preparation ................................................................................................... 4-2
Surface checking ............................................................................................. 4-3
Deleting surface shells ..................................................................................... 4-7
Fixing surface problems .................................................................................. 4-9
Vertex modification tools .............................................................................. 4-14
Edge and corner feature extraction ................................................................ 4-17
Identification of non-extrusion and variable-subsurface surfaces ................. 4-21
Resurfacing, Optimisation and Quad Morphing ..................................................... 4-22
Resurfacing options ....................................................................................... 4-22
Surface optimisation options ......................................................................... 4-24
Quad morphing options ................................................................................. 4-25
Surface triangulation ..................................................................................... 4-26
New Surface Generation ......................................................................................... 4-26
Creating a uniform new surface .................................................................... 4-27
Creating a non-uniform new surface using a custom mesh ........................... 4-29
Surface Wrapping ................................................................................................... 4-30
Retaining edges ............................................................................................. 4-32
Surface wrapper refinement options .............................................................. 4-33
Leak detection ............................................................................................... 4-36
Surface Smoothing .................................................................................................. 4-37

Version 3.26 i
Creation of a Box for External Aerodynamic Cases ...............................................4-40
Volumes of Intersecting Surfaces ............................................................................4-42
Command input examples ..............................................................................4-43
Volume Subdivision (CCUT) ..................................................................................4-44
5 AUTOMESH SUBSURFACE GENERATION
Basic Subsurface Generation .....................................................................................5-1
Variable Subsurface Depth ........................................................................................5-2
Inclusion of Interior Zero-Thickness Baffles ............................................................5-4
Method #8 Advanced Options ...................................................................................5-5
Subsurface Method #4 ...............................................................................................5-6
Advanced options for subsurface method #4 ...................................................5-7
Offset surface eps .............................................................................................5-8
Avoiding self intersection ................................................................................5-8
Subsurface Checking .................................................................................................5-9
6 AUTOMESH VOLUME MESH GENERATION
Generation of Trimmed-Cell Volume Meshes ..........................................................6-1
Generation of a basic trimmed-cell mesh ........................................................6-1
Trimmed cell advanced options .......................................................................6-3
Trimmed-cell mesh checking ...........................................................................6-4
Cell division .....................................................................................................6-5
Trimmed-cell mesh fixing using TetFix ..........................................................6-7
Trimmed-cell mesh fixing by hand ................................................................6-13
Custom meshes ..............................................................................................6-14
User-defined classification and unstructured mesh refinement .....................6-15
Automatic mesh refinement and classification (template generation) ...........6-19
Parallel processing with custom meshes ........................................................6-25
Generation of Tetrahedral Volume Meshes ............................................................6-27
Surface preparation for tetrahedral meshes ....................................................6-28
Basic tetrahedral mesh generation .................................................................6-28
................................ Advanced options for the Delaunay tetrahedral mesher 6-29
Tetrahedral cell quality checking, re-meshing and smoothing ......................6-32
Generation of Hybrid Volume Meshes ...................................................................6-35
Surface preparation ........................................................................................6-35
Hybrid mesh generation .................................................................................6-36
Cell quality checking, re-meshing and smoothing .........................................6-37
7 AUTOMESH EXTRUSION LAYER GENERATION AND ASSEMBLY
Creation of Extrusion Surface ...................................................................................7-1
Extrusion Surface Checking ............................................................................7-2
Extrusion Layer Generation ......................................................................................7-2

ii Version 3.26
Inclusion of layers for internal baffle walls ..................................................... 7-4
Local surface property settings ........................................................................ 7-5
Advanced options ............................................................................................ 7-7
Extrusion Layer Checking ............................................................................... 7-7
Mesh assembly .......................................................................................................... 7-7
Exporting Grids from pro-STAR .............................................................................. 7-8

APPENDIX
A CELL LIBRARY
B AUTOMESH BATCH COMMANDS
Batch Commands for Surface Generation ............................................................... B-1
Batch Commands for Subsurface Generation .......................................................... B-2
Batch Commands for Classification and Refinement .............................................. B-6
Batch Commands for Volume Mesh Generation ..................................................... B-7
Batch Commands for Extrusion Layer Generation ................................................ B-14
Batch Commands for General Run Time Options ................................................. B-15
AutoMesh Output ................................................................................................... B-15
ammbatch Parameter Equivalence to pro-STAR Commands ................................ B-16

Version 3.26 iii


Chapter 1 INTRODUCTION

Chapter 1 INTRODUCTION
pro-STAR’s Auto Mesh module provides a powerful meshing environment capable
of solving complex grid generation problems for the CFD/CCM solvers developed
by CD-adapco. It also features additional capabilities such as new surface creation,
surface repair and subsurface generation, plus a wide range of other tools and
operations related to high quality mesh generation. All the above operations are
carried out within a process-oriented set of GUI panels within the pro-STAR
environment. A Mesh Wizard is also provided for users who want to generate a
mesh with the minimum of effort.
The AutoMesh Module is capable of automatically creating up to three different
types of mesh:

Trimmed Hexahedral mesh with trimmed-cell polyhedra


Tetrahedral Tetrahedral cells
Hybrid Hexahedral core with pyramidal and tetrahedral cells

All these grid types can include near-wall layered elements for accurate turbulence
and heat transfer modelling. Examples of each are shown in Figure 1-1.

Trimmed Cell Tetrahedral Hybrid


Figure 1-1 Examples of possible mesh types

To generate a high quality CFD grid, the following four stages are completed, as
explained in detail in individual chapters of this volume:
• Geometry Import and Surface Preparation (Chapter 4)
• Subsurface Generation (Chapter 5)
• Inner Volume Mesh Generation (Chapter 6)
• Cell Layer Extrusion (Chapter 7)

The surface preparation stage involves making the surface acceptable for further use
within the Module, as all mesh generation stages require a completely closed
surface. This could include fixing any holes or mismatches on the surface or even
completely re-surfacing the entire domain by making a new surface or using the
surface wrapper to provide a closed volume. Alternatively, pro-STAR’s
CAD/Surface Preparation Module can be used to carry out this task automatically
starting from an IGES, VDA, STEP or native CAD data file.
The subsurface generation stage provides a copy of the surface a specified
distance inside (for internal flows) or outside (for external flows) the original. This
is needed so that a layered volume can be generated at the cell extrusion stage, once

Version 3.26 1-1


INTRODUCTION Chapter 1

the volume mesh generation step has been completed to produce a trimmed cell,
tetrahedral, hybrid or polyhedral grid.
The Module also includes automatic feature refinement and implementation of
custom (user-specified) template meshes for trimmed-cell grids. For all mesh types,
refinement can be included after the mesh generation process has been competed to
better capture localized gradient changes in the CFD analysis. Internal (zero-
thickness) walls can also be included for all mesh types, including a near-wall
orthogonal layer of cells.
AutoMesh grids can be used for a wide variety of CFD applications, from
internal flow in coolant blocks, manifolds and ports, to external aerodynamics in car
underhoods and external bodies. Whether large or small, component detail can be
maintained using optimized cell distribution around the model geometry.
This manual is meant to provide a working introduction to the AutoMesh
Module and is designed to be used in conjunction with a set of meshing tutorials that
guide the user through specific features within it. It is recommended that users
complete all these tutorials before attempting to build their own grid.
Please also note that a good working knowledge of general pro-STAR features
is beneficial to learning how to use this Module.

1-2 Version 3.26


Chapter 2 AUTOMATIC MESHING METHODOLOGY

Chapter 2 AUTOMATIC MESHING METHODOLOGY

STAR-CAD:
IGES, VDA STAR-Design Nastran
CAD DATA Native CAD STAR-Works STL Patran
STEP STAR-PRO/E
STAR-CAT5
Ideas

AutoMesh
CAD/Surface .ezs Module
Module
Resurface
SURFACE
IMPORT & New Surface
CLEANUP Surface
AutoMesh .dbs Wrapper AutoMesh
Module Smoother Module

SUBSURFACE Generate Subsurface

User Mesh
Template Auto
Refinement
VOLUME
MESH

Trimmed Tetrahedral Hybrid


Cell

EXTRUSION Generate Extrusion Layers

ASSEMBLY Assemble / Export

Figure 2-1 Overview of automatic meshing methodology

Version 3.26 2-1


AUTOMATIC MESHING METHODOLOGY Chapter 2
Methodology Overview

Methodology Overview
The Automatic Meshing Module provides a quick and easy way of generating
meshes of complex geometries for existing CD-adapco software users. Its GUI
interface is based on pro-STAR, but with the addition of a special set of AutoMesh
panels. These panels guide the user through a process oriented environment (see
Figure 2-1) and do all the work required to generate a grid. Some examples of the
panels are shown below:

Figure 2-2 AutoMesh GUI panels

In addition to the panels, there is also an independent mesh database system


incorporated into the Module. This database system allows the retrieval and storage
of grid entities such as cells, vertices, cell couples and splines. This allows the
Module to produce multiple grids for a given model without overwriting or losing
previous results.
The AutoMesh ammbatch program can be run from the pro-STAR command
line or as a batch process independent of the graphical front end. However, the
easiest way of accessing the Module is via the pro-STAR GUI. The batch
commands can still be accessed via various ‘batch command windows’
incorporated into the AutoMesh panels. This gives you the option of using many

2-2 Version 3.26


Chapter 2 AUTOMATIC MESHING METHODOLOGY
Geometry Import and Surface Preparation

additional features included in the Module. The AutoMesh GUI is the main subject
of this manual, but some of the additional batch commands will be mentioned where
appropriate.
The automatic meshing methodology for creating a high-quality, finite-volume
CFD grid is broken up into four main steps:
• Geometry Import and Surface Preparation
• Subsurface Generation
• Volume Mesh Generation
• Cell Layer Extrusion and Assembly

An overview of the overall process is given below, including example pictures to


illustrate each main step.

Geometry Import and Surface Preparation


CAD data geometry can be imported directly using a number of different formats,
including STL, NASTRAN and PATRAN. IGES, VDA, native CAD and STEP
data should be first processed via pro-STAR’s special CAD Import and Surface
Preparation Module before being imported by the AutoMesh Module. Surfaces for
use within the Module should be composed of equal-sized facets (elements) and be
completely enclosed, with a one-to-one relationship between each element. For
tetrahedral, hybrid and polyhedral meshes, the surface must also be triangulated. All
edges and corners of importance within the model should also be highlighted by
using line and point cells, respectively. If the original surface intended for use
within the Module passes these criteria, you may progress directly to the second
stage, namely subsurface generation.

Figure 2-3 Original surface data after import

Figure 2-3 above shows a typical STL-style CAD surface of a diffuser after import.
However, if the surface contains any holes and/or mismatches, these should be
fixed using the AutoMesh facilities before proceeding any further. For the above

Version 3.26 2-3


AUTOMATIC MESHING METHODOLOGY Chapter 2
Geometry Import and Surface Preparation

example, the required closed surface with edges (line cells) and corners (point cells)
is shown in Figure 2-4.

Figure 2-4 Closed surface data with edges and corners

Further, if the surface contains long and thin elements (as is typical for STL data),
or is not completely closed or is composed of elements with a large size variation,
then a Resurface, New Surface or Surface Wrap operation should be performed
using the AutoMesh Module. The Resurface and New Surface options both
maintain the important detail of the original surface but will be composed of near
equal-sized elements, which is important for creating a good quality subsurface.
Before creating this revised surface, all edge and corner definitions should be
included, plus any fixes for holes and mismatches. The resurfaced surface for the
example is shown in Figure 2-5 below:

Figure 2-5 Resurfaced surface data generated by the Module


2-4 Version 3.26
Chapter 2 AUTOMATIC MESHING METHODOLOGY
Subsurface Generation

If the original CAD definition is such that it can never meet some or all of the above
criteria, it can be re-surfaced using the Module’s surface wrapper. This method
provides a closed volume definition suitable for trimmed cell meshes but may
involve an amount of geometry de-featuring (which is sometimes desirable). The
surface wrapper is particularly useful when you have more than one geometry
components that are not joined together but need to be meshed as one unit. The
wrapper can effectively make a closed-volume surface out of all the constituent
surfaces and even help close off holes and mismatches.
It is also recommended that the surface be smoothed before proceeding to the
subsurface generation stage. This is especially critical when a tetrahedral, hybrid or
polyhedral grid is being formed. An additional option which may be useful for
certain applications is the quad morpher. This feature allows you to convert a
triangulated surface into one composed of quadrilaterals. An example surface for
the diffuser case is shown in Figure 2-6 below:

Figure 2-6 Quad morphed geometry created by the Module

Subsurface Generation
Once the above surface requirements are met, you can move onto the second stage
of the process, which is generation of a subsurface. The latter is created in order to
allow generation of extruded cell layers at a later stage of the meshing process.
To generate the subsurface, the Module simply shrinks the original surface mesh
in all directions by a user-specified distance. It then creates a new shell surface —
the subsurface — inside (or outside) the original. This surface is composed entirely
of triangular shells. You may also specify surfaces which should not be shrunk —
this is usually desirable at faces located at ‘open’ boundaries, such as inlets and
outlets, where no extrusion layer is normally required. The subsurface mesh for the
above example is shown in Figure 2-7:

Version 3.26 2-5


AUTOMATIC MESHING METHODOLOGY Chapter 2
Volume Mesh Generation

Figure 2-7 Combined surface and subsurface mesh

The orange and purple surfaces in the picture show the original model geometry,
while the red shaded inner region is the subsurface generated from it. The two end-
surfaces have not been shrunk — the subsurface and model surface are coincident
on this plane. The Module can also include a surface-to-subsurface gap thickness
that varies between different parts of the model, thereby allowing greater control on
the value of y+ (see “Wall functions” on page 6-13 of the User Guide) and hence
more accurate turbulence modelling in the CFD calculations.

Volume Mesh Generation


The subsurface created as described above is used to generate the inner volume
mesh. This can be of the trimmed cell type, the all-tetrahedral type or the hybrid
type. The choice of grid type is up to the user and is usually dependent on solution
quality requirements and machine memory constraints.
The trimmed cell mesh uses special adjustment and cutting processes based on
an underlying structured grid (either cartesian or cylindrical). The adjustment
process simply moves those vertices in the underlying bounding mesh that are close
to the subsurface, onto the subsurface itself. The cutting process is then executed;
cells that fall completely outside the subsurface are discarded, while cells that are
completely inside are left unchanged. However, cells that straddle the subsurface
are cut so as to follow the surface contour as best as possible, using a library of
available cell shapes.

2-6 Version 3.26


Chapter 2 AUTOMATIC MESHING METHODOLOGY
Volume Mesh Generation

Figure 2-8 Trimmed cell mesh

In certain instances, the Module cannot resolve the mesh definition correctly and
creates ‘unresolved’ cells in the mesh. This notifies the user that interaction is
required at this stage before proceeding any further. Unresolved cells must be
‘fixed’ or eliminated via the various tools and options provided by the interface.
An automatic refinement process is also possible for trimmed cell meshes,
whereby cells next to the walls or some other specified feature can be identified
using the built-in classification procedure and refined to any reasonable degree.
This process can be combined with the ‘custom mesh’ feature, which allows user-
defined unstructured hexahedral grids to be imported and used instead of the default
structured grid. This allows trimmed cell grids to have suitably aligned cells in order
to further reduce discretisation errors in the CFD solution. Both the refinement and
custom mesh options reduce or eliminate the chance of unresolved cells being
created and are therefore recommended for default use.

Figure 2-9 Refined trimmed cell mesh

Version 3.26 2-7


AUTOMATIC MESHING METHODOLOGY Chapter 2
Volume Mesh Generation

All-tetrahedral meshes are built using a Delaunay type mesher and are hence
directly dependent on the quality of the starting surface. The tetrahedral mesher can
also include internal features, such as baffles, that split the domain either partially
or wholly. The diffuser tetrahedral mesh is shown below for comparison:

Figure 2-10 Tetrahedral mesh

Hybrid meshes use a combination of the above two techniques to automatically


produce a high- quality, versatile grid. The bulk of the solution domain volume is
composed of hexahedral cells, identified during the classification process for the
trimmed cell mesh. Surrounding the hexahedral cells is a layer of pyramidal cells
that form a transition into the tetrahedral cells on the outside, built using the
advancing front mesher. As for the all-tetrahedral grid, the mesh does not contain
any cell coupling.

Figure 2-11 Hybrid mesh

2-8 Version 3.26


Chapter 2 AUTOMATIC MESHING METHODOLOGY
Cell Layer Extrusion and Assembly

Cell Layer Extrusion and Assembly


The final stage in the process is to extrude the surface cells of the inner mesh back
to the original surface imported by the Module. This action forms a set of cell layers
next to wall surfaces. Straight lines are used between the inner mesh and the surface,
so that the orientation of cells inside the layers conforms as much as possible to the
original surface shape. The extrusion layer cells for the trimmed cell example is
shown below:

Figure 2-12 Extrusion layers for trimmed cell volume mesh

This method is the same regardless of the mesh type used to build most of the grid
volume. The extrusion mesh is always composed of
• prisms in the case of a tetrahedral mesh,
• prisms and possibly hexahedra in the case of a hybrid mesh,
• either prisms, hexahedra or trimmed cell shapes 2 and 8 for a trimmed cell
mesh (see Appendix A for an explanation of the cell shape classification).

A non-linear fill ratio can be included at this stage allowing the near-wall cell to be
thinner than the ones further into the interior. This can work in tandem with the
variable subsurface control mentioned on page 2-6. A different number of cell
layers can also be specified for different regions in the grid.
Once the extrusion is complete, the volume grid can be combined with the
extrusion layer. The result for the three mesh type examples are shown Figure 2-13.

Version 3.26 2-9


AUTOMATIC MESHING METHODOLOGY Chapter 2
Cell Layer Extrusion and Assembly

Trimmed Cell

Tetrahedral

Hybrid

Figure 2-13 Combined volume and extrusion meshes

No vertex merging or cell coupling is required between the volume mesh and the
layers — the AutoMesh Module accounts for the numbering sequence
automatically during the extrusion stage. The assembled grid is now ready for use
in the rest of pro-STAR or exported to any other pre-processing software.

2-10 Version 3.26


Chapter 3 AUTOMESH MODULE OPERATION
Module Startup

Chapter 3 AUTOMESH MODULE OPERATION


This chapter contains an overview of some basic operations that the user needs to
know in order to successfully use the Automatic Meshing Module. The topics
covered are:
• Module Startup
• Database Operation
• Saving Panel Settings
• Viewing Batch Output
• Error Trapping
• Adding Batch Commands
• Deleting Local Batch and Temporary Files

A description of each is given below.

Module Startup
Once pro-STAR has been installed, the following two additional system programs
are set up for accessing the automatic meshing facilities:

proam Runs the GUI version of the AutoMesh Module


ammbatch Runs the automatic batch mesh generator

For the GUI version, you will need to enter the pro-STAR environment as described
in Chapter 2 of the User Guide. You should type either

proam
or
prostar -amm

at the command line to launch pro-STAR with the Automesh module enabled. As
usual, you will then be invited to choose between the X-Motif (xm), OpenGL (glm)
or Mesa (mesa) graphics drivers for running the GUI interface. The AutoMesh GUI
facilities may then be displayed by selecting Advanced > AutoMesh from the main
window’s menu bar.
Alternatively, if you are using the STAR-Launch front-end (see “Using
STAR-Launch” on page 2-8 of the User Guide), the AutoMesh facilities can be
accessed by selecting Pre-Post > pro-STAR/amm from the STAR-Launch menu
bar once the working directory has been set.
If pro-STAR issues a message to increase the model’s array sizes, use either the
prosize script to update the local parameter file (param.prp) permanently (see
Chapter 21, “Resizing pro-STAR” in the User Guide) or use the MEMORY command
within pro-STAR to increase it temporarily.
The ammbatch program, which generates a mesh by running in batch mode, is
generally started from within pro-STAR by using either the BAMM command or the
AutoMesh panels and Mesh Wizard. Alternatively, you may run ammbatch from
your window’s command line and supply instructions via a batch data file.
The location of temporary files created by the above process is controlled by the
environment variable TMPDIR. This should be set to the directory path where you
want the temporary files stored. For example:

Version 3.26 3-1


AUTOMESH MODULE OPERATION Chapter 3
Database Operation

setenv TMPDIR /tmp

The default location of the temporary files varies according to yout machine’s
operating system.

Database Operation
The Automatic Meshing Module contains an independent database system that
allows the user to store several grids of different types while in the process of
generating the final mesh. These grids are stored permanently in a file called
casename.dbs, where casename is the user-supplied project name at the
beginning of the session. As well as containing cells and vertices, a database can
also store entities such as cell couples and splines belonging to the grid.
These storage operations are carried out using the DBASE command or the
database tool on the front of the AutoMesh panel, as shown below:

Figure 3-1 Database tool in AutoMesh panel

On starting up the Module for the first time, the database is empty, i.e. no cells, cell
couples or vertices are stored. When a mesh is either loaded or generated by the
Module, the resultant cell and vertex set can be stored (or ‘stacked’) within the
database by issuing the DBASE command as follows:
dbase,put,{data_base_id},{database_mesh_type},{write_option}

where

data_base_id 1, 2, 3 or any suitable integer value


database_mesh_type one of surface, subsurface, trim, star or
polygon
write_option either new or overwrite

Note that only the current cell set is stored using the above command, plus any
vertices and cell couples that belong to the cell set. Any splines in the current spline
set are also saved. In the database panel tool, the ‘put’ operation is performed by
using the Update button, as shown below:

Figure 3-2 Database Put options

Two options are available, namely write all cells to the database or just the current
cell set. Before a mesh is placed in the database, the correct database type should be
selected from the pull-down menu shown in Figure 3-3:

3-2 Version 3.26


Chapter 3 AUTOMESH MODULE OPERATION
Database Operation

Figure 3-3 Database grid type pull-down menu

The default set of database grid types in the pull-down menu is set up to
accommodate the basic AutoMesh methodology. There are five different database
grid types to choose from, namely:
surface: All reference surfaces imported into the Module (dbase 1, 2, 3, 4 & 6)
subsurface:Subsurface meshes created from reference surfaces (dbase 5)
trim: All AutoMesh trimmed cell and other volume meshes (dbase 15, 22 &
23)
star: All classified and custom meshes for use within the Module (dbase 11
& 12)
polygon: Extrusion surfaces (dbase 21)

Only one grid type should be stored under any given database entry. In the database
tool, a default entry number (Active Database ID) is automatically entered,
corresponding to the chosen grid type. If you wish to use a different value, it should
be changed before the Update button is used.
Meshes can be retrieved from the database by issuing command

dbase,get,{data_base_id}, or
dbase,add,{data_base_id},{offset values}

The former command replaces the current model in the Module’s working space
with a copy of the model in the database; the latter command adds the contents of
the database model to the current working model, based on the given offsets. The
offset values determine how the numbering for each entity is calculated, based on
the initial grid being added to. Further information on the offset values can be found
in the pro-STAR Commands volume.

Version 3.26 3-3


AUTOMESH MODULE OPERATION Chapter 3
Database Operation

Figure 3-4 Database Get options

In the database panel tool, the meshes are retrieved using the Load button as shown
above. The three Add options correspond to the following operations:

Add - Auto Offset — Use default vertex, cell and cell table offsets
Add - No Vertex Offset — Set vertex offset to zero, all others to default
Add - No Cell Table Offset — Set cell table offset to zero, all others to default

The default offset values are the maximum values for the current mesh, which is the
‘safest’ way of adding two or more database entries together. This allows different
types of mesh to be combined on screen without corrupting the underlying
numbering system. However, when two or more ‘similar’ meshes are added
together (e.g. two trimmed cell meshes, or a surface and a subsurface), then the cell
table offset can be set to zero as they all use the same cell table indices. Similarly,
when combining the extrusion layers with the core volume mesh, both vertex and
cell table offsets can be set to zero.
Using the Load > Get, Load > Add and Update options includes the cell
couples and vertices appropriate to the cell set selected. The diagram on Figure 3-5
below helps explain the database setup:

PUT/UPDATE
DATABASE
(stored in .dbs file)

WORK SPACE 1
(stored in memory/.mdl file) 2
3
Working
Model 4
.
.
.

GET/LOAD/ADD .
.
Figure 3-5 Database operation

3-4 Version 3.26


Chapter 3 AUTOMESH MODULE OPERATION
Database Operation

The contents of the database can be listed using command

dbase,list, or
dbase,list,{data_base_id},,long

The latter form of the command lists all details pertaining to the database grid and
is useful for checking the settings used in creating a given mesh. In the AutoMesh
panel, the database list can be viewed from the Process Tools > View Detail
Database Listing pull-down menu, as shown below:

Figure 3-6 Detailed database listing

However, a more convenient way of viewing the database entries is by accessing


the Process Tools > Database Summary panel, as shown below:

Figure 3-7 Database organisation tool

Version 3.26 3-5


AUTOMESH MODULE OPERATION Chapter 3
Saving Panel Settings

This panel allows the database entries to be edited, deleted or new ones to be added.
To create a new database entry:
1. Enter a database number in the # box (do not use an existing value)
2. Enter a description of the database in the Description box
3. Choose a database type from the Type pull-down menu
4. Enter the database file name in the Casename box (if different from the
default)
5. Click the Define button to apply the new settings

The new entry will be immediately available in the database tool’s pull-down menu.
Note that the style of lettering in the Description box indicates whether a database
entry contains any data or not — italicised blue letters means that the entry has not
been used yet while black plain letters indicates that the database contains an entry.
Modifying the working model does not affect the database grids in any way —
the database is only modified when the DBASE,PUT operation is used, either via the
command or the GUI. Saving the model file using the SAVE operation only
preserves the working model. If this model already belongs to a database, it can be
deleted (to save disk space) using the DBASE,CLEAR command or the Load >
Clear Work Space GUI option. You should exercise caution before using this
command as the working model is unrecoverable if it does not already stored in a
database or saved in a .mdl file. Note that on resuming from a .mdl file, the
working environment is the same as it was at the point of saving.
Entries held within the database can also be deleted and the database compressed
using the DBASE,DELETE and DBASE,COMPRESS commands, respectively.
Further, the .dbs file is universally compatible with all supported machine types
and can be transferred from machine to machine without any form of conversion or
environment variable being set. If a model case name different to the one used by
the database file name is entered, the database can be accessed using the
DBASE,OPEN command. For example:

dbase,open,filename.dbs
dbase,get,1

The above operation tells the AutoMesh Module to access file filename.dbs
and load entry number 1 in it into the working space. To return to the original
database, the following operations could be performed:

dbase,open,casename.dbs
dbase,put,1,surface,over
Starting surface imported from database filename.dbs

In this case, the surface imported from file filename.dbs is put back as database
entry number 1 in the original casename.dbs file.
The reason for having a database is to allow easy access to the various meshes
created by the AutoMesh Module as part of its normal mode of operation. The
number of databases used is limited only by the amount of disk space available.

Saving Panel Settings


The options and values entered into the AutoMesh panel are not automatically

3-6 Version 3.26


Chapter 3 AUTOMESH MODULE OPERATION
Viewing Batch Output

saved by pro-STAR. If you wish to preserve the settings used in this panel during a
given session, the File > Save Panel Settings option should be used, as shown
below:

Figure 3-8 Saving panel settings

On resuming a given case, the settings are automatically read in by the panel if the
Setup.tcl file is found in your local directory. However, if the Mesh Wizard is
used to create the mesh, the settings are automatically saved to file Setup.tcl
at every step of the process.

Viewing Batch Output


All batch processes, such as new surface, subsurface, volume mesh and extrusion
mesh generation, produce batch output files listing the program feedback during the
process. Viewing this output is useful as it gives a direct indication of how the
automatic meshing operation is doing, as well as reporting any errors that may have
occurred.
If the batch process is started using the AutoMesh panel, the following status
indicator box is displayed on screen as soon as the batch process is started:

Figure 3-9 Batch process status indicator box

This status box displays the current job number, which is the total number of batch
processes run so far for this case. The type of process being run is indicated by the
Command line output. As the job proceeds, the upper bar displays the task progress
so far while the lower one indicates the progress of any sub-tasks spawned by the
main process. To view additional details on the process, click the Detail button; the
panel shown in Figure 3-10 will then replace the status box on screen:

Version 3.26 3-7


AUTOMESH MODULE OPERATION Chapter 3
Viewing Batch Output

Figure 3-10 Detailed batch process viewing window

This window is constantly updated with the latest process details and allows you to
judge what progress is being made. The same progress indicators are also shown at
the top of the panel. If any process fails to run, you should always view this
window’s output to see the cause of the problem.
Clicking the Less button returns the window to the box status panel. On both
panels, clicking the Stop button terminates the current process. When the process is
complete, the message Done appears next to the Status label and the two status bars
will have both reached their end-point.

Figure 3-11 Batch process complete indicator

The Stop button is then replaced with a Load button, which allows you to load the
resultant data and display the mesh on screen automatically.
Each batch process creates a local subdirectory called batch_proc_numb,
where proc_numb is the next integer process number, starting from 0001. All
information relating to that batch process is stored in this directory. A number of
different batch processes can be viewed using the Process Tools > View Batch
Jobs panel. An example is shown in Figure 3-12:

3-8 Version 3.26


Chapter 3 AUTOMESH MODULE OPERATION
Error Trapping

Figure 3-12 Batch jobs summary panel

In this panel, the Load button can be used to quickly view the database entry created
by the batch process. The View Log button also allows the individual log files to be
reviewed at any point after the batch process has finished.

Error Trapping
Error message trapping has now been included into the AutoMesh panel. So far, it
is only included in some of the major functions such as surface import and grid
generation steps. Should an error message occur during one of these stages, a
window will be displayed with the error message highlighted in red. An example for
the tetrahedral meshing operation is shown below:

Figure 3-13 Example error trapping message

If an error message is seen during an automatic meshing operation, it must always


be acted upon. The error message will serve as a guide to what the problem is and
how it can be resolved. Note that the error message is preserved in the log file.
This feature will be extended in future to include all AutoMesh operations and
will also include automatic problem resolution. For example, if an error occurred
during the grid generation stage stating that more memory is required, the Module
will signal to the user that the error has occurred, will automatically assign the
necessary memory and then automatically perform the calculation again.
Note that this is a new feature and is not fully tested yet for all operations in the
panel.

Version 3.26 3-9


AUTOMESH MODULE OPERATION Chapter 3
Adding Batch Commands

Adding Batch Commands


Additional options are available in the Module that currently do not have a GUI
operation or command equivalent. Typically, such facilities allow alternative or
new methods to be tried out if the original default method fails. These options are
called Batch Commands and are used in batch processing jobs. They fall into six
main groups:
• Surface Generation
• Subsurface Generation
• Classification and Refinement
• Volume Mesh Generation
• Extrusion Layer Generation
• General Run Time Options

A list of commands for each of the above groups is given in Appendix B of this
manual.
In the AutoMesh panel, batch commands are entered through a special batch
command window, usually located in the Process Tools > Advanced Options
panels. An example batch command window is shown below:

Batch Command
Window

Figure 3-14 Batch command window example

Batch commands are entered directly in this window. The usual format for a batch
command is -batch-command[=value], where value is optional. Each
command should occupy only one line and contain no spaces. Commands can be
entered in any order and will supersede any other equivalent option that may have
been set up via the GUI.
If you are issuing batch commands from your session window’s command line,
these may be entered using the BAMM command as follows:

3-10 Version 3.26


Chapter 3 AUTOMESH MODULE OPERATION
Deleting Local Batch and Temporary Files

bamm,othdel
bamm,other,-batch-command-option1
bamm,other,-batch-command-option2

In future releases of the software, if certain batch commands are found to be useful
in most circumstances, they will be replaced by equivalent GUI options.

Deleting Local Batch and Temporary Files


The Module creates a number of local batch and temporary files during the mesh
generation process. To clear away these files at the end of a session, use the Clear
Batch & Temporary Files button on the AutoMesh front panel, as shown below:

Figure 3-15 Deleting batch and temporary files

On clicking this button, a dialog box will appear asking for confirmation that you
wish to proceed with the operation. Note that only non-critical files are deleted by
this process. However, all batch process log files are included in the deletion.

Version 3.26 3-11


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
CAD Data Formats

Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE


PREPARATION
The starting point for all automatically-generated meshes is the import of some kind
of surface description from a CAD package. The importance of preparing these
surfaces for use within the AutoMesh Module cannot be overemphasised. There is
a direct link between the quality of the working surface and the resultant mesh
produced by the Module. Therefore, it is important for the user to understand all
checking procedures available and what tools are used to fix any problems found by
the checks.

CAD Data Formats


The Module can currently import files in any of the following formats:

STL (binary or coded) Patran


Ideas Nastran
Tgrid Grid3D
CGNS STAR-CD Cell, Vertex and Database files
In the AutoMesh panel, these CAD data files are accessed as shown below:

Figure 4-1 Importing geometry files of various formats

Version 3.26 4-1


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Surface Preparation

Additional tools in this set of panels allow model data organisation and multiple
cross section definitions to visualise geometry features in greater detail.
Surface quality can vary a great deal from one format to another, depending upon
the CAD data source and which process was used to convert it. For example, solid
modelling CAD packages such as Catia can produce high-quality, closed and
uniform surfaces that can be used without further modification within the
AutoMesh Module. On the other hand, CAD models saved in IGES or VDA format
and then translated directly by the Module often end up with mismatches and a large
variation in element size, as well as having holes or missing data. Even
closed-format data such as STL are sometimes not an ideal starting point for
creating subsurfaces within the Module — the long, thin triangular elements that are
characteristic of this conversion can often cause problems.
The recommended route for generating surfaces within the AutoMesh Module
makes use of the CAD data import faciliities of the Surface Preparation Module,
included in the pro-STAR software suite and described in a separate manual, as
follows:
• Export CAD data as an IGES or VDA file
• Read the IGES/VDA file using the Surface Module utilities
• Use the automatic or manual CAD repair facilities in the Surface Module to
clean up the IGES/VDA data and re-triangulate
• Export the triangulated surface prepared by the Surface Module as a
pro-STAR/AutoMesh database file
• Read this file automatically on starting up the AutoMesh Module

Additional details on these processes are included in the CAD Import and Surface
Meshing manual mentioned above. Alternatively, instead of using the IGES or
VDA formats, direct CAD readers (including UniGraphics, Catia, PRO/E and the
STEP format) can be licensed to read the corresponding CAD data files directly into
the Surface Module. Please contact your CD-adapco representative for additional
details on licensing these features.

Surface Preparation
Ideally, the model surface for use in the AutoMesh Module should possess the
following characteristics:
• Completely enclosed with one-to-one facet connectivity
• Near-equal-size facets
• Feature edges and corners defined
• Special surfaces identified
• Triangulated
• Smoothed

The last two points are especially critical for the successful generation of tetrahedral
and hybrid meshes. If the surface was prepared using the Surface Module as
described in the previous section, the exported surface will contain all the above
characteristics and no further work is necessary. In instances where the Surface
Module was not used to prepare the surface, the AutoMesh Module contains all the
required tools to check the surface, fix any problems and even re-surface the entire
geometry if necessary, so that a better quality surface (as defined above) is

4-2 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Surface Preparation

achieved.
In general, the overall process used is as follows:
• Check the surface
• Fix problems
• Extract feature edge and corner definitions
• Identify special surfaces
• Re-triangulate using the Resurface or New Surface options
• Optimise/smooth the surface

A description of the tools and options used to prepare the surface after import is
given below, based on the GUI panels. Command equivalents are also given for the
most important operations. All procedures apply for all mesh types to be created
unless otherwise stated.
Surface checking
You are advised to make a visual check of the model by rotating it around and
zooming in on various features to check the integrity of the surface. This, however,
is not always possible and is not crucial. This is simply done to get a feel of the
model surface and identify any obvious defects that were not expected. The surface
can then be checked by the Module.
The command that performs the surface check is SCHECK. There are several
types of possible errors that the surface check can identify:

Holes Open holes or surfaces that are not closed


Mismatches Mismatched surfaces at edges
Multiple Edges Multiple edges joined together
Shared Edges Shells sharing two or more edges
Sharp angles Sharp angles between shells
Needle shells Long thin triangular shells
Orientation Incorrect shell normal directions
Self intersection Self intersection of the surface data
Non-manifold Interlacing volume domains

The SCHECK,ALL,,ALL,,,NEWS form of the command will perform checks


necessary to find all the above problems. However, as this may result in a large
number of different problems being found, it is suggested that a series of checks be
performed in turn and the resulting problems (if any) fixed along the way using the
tools available within the Module. A summary of the various checking options for
each of the above errors is given below:

Version 3.26 4-3


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Surface Preparation

Surface Property Check Option

Holes/Mismatches SCHECK,ALL,,FREE,,,NEWS
Multiple Edges SCHECK,ALL,,MULT,,,NEWS
Shared Edges SCHECK,ALL,,TWO,,,NEWS
Sharp Angles SCHECK,ALL,,SHARP,,,NEWS
Needle Shells SCHECK,ALL,,NEEDLE,,,NEWS
Orientation SCHECK,ALL,,ORIENT,,,NEWS
Self Intersection SCHECK,ALL,,INTERSECT,,,NEWS
Non-Manifold SCHECK,ALL,,MANI,,,NEWS

These checks will place the error-related shells into the current cell set so that they
can be plotted using the Cell Plot button. Typically, critical errors that need to be
resolved are any holes, mismatches and duplicate edges that may exist on the
surface. Orientation problems only need to be fixed if you intend to build either a
tetrahedral or a hybrid volume mesh. The remaining checks are typically used for
the new surface, subsurface or extrusion surface stage of the meshing methodology.
Examples of each type of error are given in Figure 4-2 and Figure 4-3.

Holes (Free Edges)

Mismatches (Free Edges)

Multiple Edges

Figure 4-2 Type of surface problems and fixing tools

4-4 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Surface Preparation

Shared Edges

Sharp Angles

Needle Shells

Shell Normal Orientation

Self Intersection

Merged

Non-manifold Topology

Figure 4-3 Type of surface problems and fixing tools (continued)

In the AutoMesh GUI, surface checks are performed using the Prepare Surfaces >

Version 3.26 4-5


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Surface Preparation

Surface Tools > Surface Checks panel, as shown below:

3 4

Figure 4-4 Surface checking panel

The sequence used in this panel to check a surface is:


1. Cell Selection: Decide whether to check the whole surface or just the cell set
2. Check Option: Choose the required check option(s)
3. Run Check: Run the selected checks
4. Print Summary: Print a summary of the results to a file or on screen

Once the Run Check button has been pressed, the resultant failed quantities (if any)
are listed in the quantity (Qty) box. An example is shown in Figure 4-5.

4-6 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Surface Preparation

Figure 4-5 Example results from a surface check

A Plot button also becomes active to the left of the test description. This button can
be used to display the surface shells next to where the error lies — if the Highlight
Failed Edges option is selected then line marker cells will also be created to further
highlight the error.
Once you have a picture of where the errors are, the Clear Edge Markers button
can be pressed to remove all such marker cells. The Plot All Cells button can be
pressed instead to return to the original model. It is important to clear out the check
markers before continuing, otherwise the marker cells will corrupt the surface
actions that follow.
Deleting surface shells
Surface cleanup tools that can fix problems indicated by the surface checks are
located in the Prepare Surfaces > Surface Tools > Surface Cleanup panel, as
shown in Figure 4-6:

Version 3.26 4-7


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Surface Preparation

Figure 4-6 Surface cleanup (fixing) panel

In general, some surface elements may have to be deleted before they can be fixed.
This can be done in one of six ways using the Mark Cells to Delete button, as
shown below:

Figure 4-7 Options for Deleting Surface Shells

4-8 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Surface Preparation

All options simply modify the indicated cells to be of a different cell type (type 49
by default). These cells are then permanently deleted when the Delete Marked
Cells button is pressed. Each of the six options is briefly discussed below:

Mark Cells to Delete Based on Edge Angle


This option allows a surface to be marked for deletion based on an edge angle given
in the Edge Angle box. The cursor should be used to select a starting cell face.

Mark Cells to Delete Based on Zone


Draws a zone with the screen cursor around the shells to be marked for deletion.
Only visual shell faces completely within the zone are deleted.

Mark Cells to Delete Using Cursor


Uses the screen cursor for marking individual shell faces that are to be deleted.

Mark Cells to Delete Based on Cell Type


Uses the screen cursor to select a cell face that belongs to a certain cell type. All
shells of this type will be marked.

Mark Cells to Delete via the Cell Set


Marks the shells in the current cell set for deletion.

Mark Cells to Delete Based on Edge Lines


Assuming that the surface has edge lines added to it, this option allows the surface
to be marked based on the surrounding edge line cells. The cursor should be used to
mark the starting shell face, from which the surface will grow until it reaches the
bounding edge lines. All shells contained within this surface will be marked.

Once the shells have been marked for deletion using any combination of the above
techniques, the Delete Marked Cells button should be pressed. A dialog box will
appear indicating how many shells have been marked and asking if the user wishes
to continue. Pressing the Yes button will permanently remove the shells from the
surface.
Fixing surface problems
Five different methods of fixing problems are possible within the Module. These
are:
• Filling Holes
• Local Re-Creation of Surfaces
• Zipping Edges
• Deleting Small Elements
• Re-Orientation of Shell Normals

The fixing tool to use depends on the results of the surface checking routine.
Initially, you are advised to fix only mismatched edges and holes in the surface. You
should then decide whether a new surface should be created, based on the following
criteria:

Version 3.26 4-9


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Surface Preparation

If the number of remaining surface problems is high, or if the surface is


composed of high aspect ratio shells or shells with a large variation in area, then a
new surface should be created. However, if there are few or no remaining problems
and the surface is composed of near equal-sized elements, then you need not make
a new surface. As long as the remaining problems are fixed, as indicated by the
SCHECK,ALL,,ALL,,NEWS command, no further action is necessary and you
may proceed to the next step.
The decision on whether to make a new surface is usually obvious in most cases,
and arises as a result of poor quality in the original data. More details of how to
create a new surface are given later on in this chapter.
Each of the above five fixing techniques is briefly discussed below with
reference to the command and GUI options available.

Filling holes
The command that allows holes to be filled is HFILL. Before it can be used, the
active cell type must be a shell. The command is typically used to fill holes one at
a time or all of them at once. Typical commands options for these two actions are:

hfill,auto,cset Fill all holes


hfill,vx,cset Fill individual hole based on an edge point

The GUI options that perform hole filling are shown below:

Figure 4-8 Options for Fixing Surface Holes

The active cell type used for filling the hole is given in the box next to the button.
Choosing the Using Point on Hole Edge option allows you to choose a vertex on
the hole’s edge as the starting point for the hole file. Once the hole is filled, the
cursor remains active, allowing another point to be selected if desired. The Fill All
Holes option will fill all holes with the indicated cell type automatically.
Note that the hole must form a continuous loop for the HFILL operation to work.

4-10 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Surface Preparation

The loop must also be in a given plane, otherwise an inconsistent surface will be
obtained. In the case of a separated loop, i.e. a doughnut shape with one surface
inside another, the gap must be branched using a hand-made surface element (see
below) so that a closed loop is formed.

Local re-creation of a surface


Surface elements can be created by using the screen cursor to select corner points
representing the outline of the figure. Any three- or four-sided figure can be
constructed by using command CDX as follows:

cdx,shell

The active cell type must be a shell before this command can be used. In the GUI,
option Using Cursor can be used to create the figure. The cell type that will be used
for the new shell is given in the box next to the button, as shown below:

Figure 4-9 Option for local re-creation of surface

Any new shells created using the above process are automatically added to the cell
set and plotted on screen when the operation is complete. Note that a three-sided
figure (a triangle) must have 4 nodes as part of its definition, where the 4th node is
identical with the 3rd. In all cases, the vertex point click pattern must be regular (i.e.
continuing in the same direction) for a given shell. An example is shown below:

1x

x
x 3,4
2

Figure 4-10 Fixing the surface using the cursor option

Local surface re-creation is typically used to fill small holes and fix incorrect

Version 3.26 4-11


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Surface Preparation

geometries such as badly defined corners and edges, etc.

Zipping mismatches
Mismatches are similar to holes except that the surfaces edges are close together. In
other words, a mismatch occurs when two surface edges are coincident but not
joined. Command EZIP can be used to fix this type of problem as follows:

ezip,,cset,,,auto

The above command options will fix as many mismatched edges as possible within
a given number of iterations or until all the problems have been fixed. In the GUI,
the EZIP option is as shown below:

Figure 4-11 Option for zipping edges

A triangulation process is used to generate new elements so that edges are matched
and joined automatically. Any new shells created by the process will be of the same
cell type as their nearest neighbour. It may be necessary to use this operation more
than once to zip up all free edges within the model.

Deleting small elements


It may sometimes be necessary to remove extremely small shell elements that exist
in the surface. This can be easily done by increasing the tolerance value used in the
EZIP command. In the GUI, this is implemented as shown in Figure 4-12:

4-12 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Surface Preparation

Figure 4-12 Option for Deleting Small Elements

The result of this action is a better-defined surface that is less prone to subsurface
errors at a later stage.

Fixing orientation problems


After importing or converting the surface data, it may be necessary to re-orient the
elements so that the shell normals are pointing outwards. This is only required when
a tetrahedral or hybrid mesh is to be generated or when the Module informs you to
do so during the checking process. If any of these situations occurs, re-orient the
shells by typing command:

corient,all

This will fix any shells that did not originally meet the outwards-pointing normal
criterion. In the GUI, this option is available in the Prepare Surfaces > Surface
Tools > Shell Orientation panel shown in Figure 4-13:

Version 3.26 4-13


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Surface Preparation

Figure 4-13 Shell Orientation Fixing Panel

Pressing the Orient Cells button will fix any shell normals for the given Cell
Selection.
Vertex modification tools
Additional hand-fixing tools in the form of vertex modification functions are
available within the AutoMesh panel. These tools are located at the bottom of
several GUI panels and fall into three groups:

Merge: Merge vertex points (based on a cell set, vertex set or zone).
Modify: Modify existing points (by filling, smoothing or moving).
Create: Create new vertex points (based on filling, splines or existing points).

The tools are located at the bottom of the Surface Tools > Surface Cleanup panel,
plus other appropriate panels within the AutoMesh Module, as shown in Figure
4-14:

4-14 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Surface Preparation

Figure 4-14 Location of Vertex Modification Hand Fixing Tools

The examples given in Figure 4-15 below outline how to use the Vertex
Modification tools for fixing surface shells. Note that in each instance the VUndo
button can be pressed to undo the last vertex operation performed.

Version 3.26 4-15


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Surface Preparation

1
x
2x

x3

Re-filling Vertices

Smoothing Vertices

1 2 1 2
x x x

Moving Vertices

1 2 1
x x

Merging Vertices

2 1 2
x x

Filling New Vertices

2x
1x
New Vertex on Spline
2
3x x

y y
1x z z
New Vertex from XYZ
x x

Figure 4-15 Vertex modification tools

4-16 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Surface Preparation

Edge and corner feature extraction


Feature extraction is normally done after the surface has been checked and fixed.
Line and point cells are used in order to maintain those sharp edges and corners
within the surface that are required in the final volume mesh. There are many ways
in which this can be done, two of which are discussed here. Generally, line cells are
created first to represent the edges and point cells are created afterwards based on
the line cells.

Creating edge lines and corner points


The GUI panel that performs the edge and corner feature extraction is located under
Prepare Surfaces > Edge Tools > Edge/Point Generation, as shown below:

Figure 4-16 Edge and corner feature extraction panel

Method 1 — Automatic batch method


This assumes that a checked and fixed surface is stored under the Surface DBID
database entry (here shown as 1). Pressing the Create Feature Lines button will
instruct the Module to add line cells to the surface based on the supplied Edge
Angle. The resultant surface that includes line edges and corner points will be

Version 3.26 4-17


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Surface Preparation

placed in the indicated Output DBID database entry (no. 3 in the example) and
plotted on screen. This operation can also be performed using the BAMM command
as follows:

bamm,surface,1,3,45,,over

This method has the advantage that it will also check the surface stored in the input
database entry and triangulate the resulting surface. It also has an option to break up
surface element edge lengths.

Method 2 — Interactive method


This method assumes that edges and points are added to the surface currently stored
in the cell set. Pressing the Create Edges button will extract line cells based on a
given angle. The Create Points button should then be pressed to extract the point
cells for the corners. The cell types to be used for the lines and points are specified
in the boxes next to each button. For the equivalent command-line operations, use
the LIVE command as follows:

live,surface,create
cset,news,shell
live,edge,create,45
cset,news,line
live,corner,create

The cell types used for the lines and points in this case are the next highest entries
available in the cell table, plus one. The disadvantage of this method is that it does
not check the surface. The resulting mesh should be placed into the database for
further use.
Cleaning up edge lines and corner points
In instances where too many or too few edges have been created, the Edge Cleanup
panel can be used to improve the feature definition, as shown in Figure 4-17.

4-18 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Surface Preparation

Figure 4-17 Edge cleanup panel

The Mark Edges to Delete button can be used to remove unnecessary edges. The
options included with this button are shown below:

Figure 4-18 Edge line deletion options

Version 3.26 4-19


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Surface Preparation

All these methods simply change the edge lines to be a different cell type, which are
then deleted at the end of the process. Each of the four options is briefly discussed
below:

Mark Edges to Delete Based on Point Cells


Allows you to delete a series of line cells in one step by choosing a cell centre. The
ends of the line cells should either have point cells or be “free” (i.e. unconnected).

Mark Edges to Delete Based on Zone


Allows a zone to be drawn around the line cells to be deleted. Only line elements
completely within the zone are removed.

Mark Edges to Delete Using Cursor


Allows individual line elements to be picked using the cursor, based on the centre
of the cell. Turning on the Shrink option (at the bottom of the panel) is useful in
this instance.

Mark Edges to Delete via the Cell Set


Modifies the line elements in the current cell set to be of the type to be deleted.

Once the edges to be deleted have been marked, the Delete Marked Edges button
should be pressed to delete the cells permanently.
Additional new line cells can also be created by hand using the Create Edges
button on the panel. Three options are available, namely Using Cursor, Chase Line
and Between Cell Types, as shown below:

Figure 4-19 Create edge options

The Using Cursor option creates edge cells using two clicks of the screen cursor to
define each line. The Chase Line option allows a continuous set of line cells to be
chased along a surface grid line, given starting, intermediate and end points selected
via the screen cursor. The number of intermediate points depends on the surface

4-20 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Surface Preparation

quality, but should generally be spaced 3 to 5 cells apart. Line cells will then be
automatically created along the grid line to represent a continuous edge. The line
cells are automatically added to the cell set and displayed on screen when the Done
button is pressed in both cases. The last option, Between Cell Types, automatically
creates line cells between different cell types in the starting surface.
A similar panel is provided for point-cell cleanup and is used in the way
described above. Note that point cells are based on a single vertex point and must
belong to a point cell type.
Identification of non-extrusion and variable-subsurface surfaces
In most cases, non-extrusion surfaces will be required where cell layers are not
needed in the final volume mesh. Additionally, you may want to include a
variable-depth subsurface to better accommodate the local conditions on y+ or to
include an internal feature plane (in tetrahedral meshes only). In order to achieve
this, the surface cell types need to be modified such that the feature surface is of a
different cell type to the rest of the model. The Modify Cell Types button in the
panel located under Prepare Surfaces > Surface Tools > Surface Cleanup can be
used for this purpose.

Figure 4-20 Modification of surface cell type options

Each of the available six options is discussed briefly below. All cells will be
modified to the cell type given in the Ctype box next to the Modify Cell Types
button.

Modify Cell Types Based on Edge Angle


Shells for modification are selected with the screen cursor based on the angle given
in the Edge Angle box. The cursor should be used to click on a starting cell face on
the surface, from which the surface will grow outwards until an edge having an
angle greater than the one specified is reached.

Version 3.26 4-21


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Resurfacing, Optimisation and Quad Morphing

Modify Cell Types Based on Zone


Draw a zone with the screen cursor around the shells to be modified. Only visual
shell faces completely within the zone are altered.

Modify Cell Types Using Cursor


Use the screen cursor to select individual shell faces that are to be modified.

Modify Cell Types Based on Cell Type


Use the screen cursor to select a cell face that belongs to a given cell type. All shells
of this type will be modified to the new type.

Modify Cell Types via the Cell Set


Modify the current cell set to be of the indicated type.

Modify Cell Types Based on Edge Lines


This option modifies the surface on the basis of the surrounding edge line cells,
assuming that the surface has such edge lines added to it. The cursor should be used
to select a starting shell face, from which the surface will grow until it reaches the
bounding edge lines. All shells contained in this surface will be modified.

Surfaces that require different cell types can be modified at any stage of the surface
preparation, prior to commencing the subsurface generation stage. The final surface
should be placed back into an available database entry for further use.

Resurfacing, Optimisation and Quad Morphing


The AutoMesh Module can resurface any given starting surface and provide a
re-triangulated surface of better quality, based on a maximum and minimum surface
edge length criterion. The purpose of this operation is to take any badly triangulated
surface (such as one created from STL data) and provide a better definition for
trimmed and tetrahedral cell generation. The resurfacing operation also aids the
subsurface generator by reducing the chance of errors occurring at that stage of the
process. In addition to resurfacing, the Module can also optimise (smooth) the
resultant surface and convert the surface triangles into squares, commonly known
as quad morphing.
Resurfacing options
The resurfacing options can be accessed via the Prepare Surfaces > Surface Tools
> Resurface panel, as shown in Figure 4-21.

4-22 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Resurfacing, Optimisation and Quad Morphing

Figure 4-21 Resurface panel

The shell surface to be resurfaced is contained in the current working model (not in
a database). You can resurface all the shells, the current cell set, or shells of a given
cell type, depending on the selected Set Option. A minimum and maximum Cell
Size must also be entered (in model geometry units). These sizes should be carefully
selected as they directly control the quality of the resultant final surface. It is
recommended that the values of Maximum Cell Size / Minimum Cell Size do not
exceed 5. The Threshold value should also not be greater than approximately
1/10th of the Minimum Cell Size and acts as an absolute criterion for minimum
edge lengths. Once these values are set, the Resurface button can be pressed to
carry out the operation. The status of the process will be shown by the panel’s batch
process Status indicator.
Once the process is complete, the Module will return the resurfaced surface and
replace the original working model. At this point, you can decide to continue with
the next step of the process, namely surface optimisation, or start over by pressing
the Restore Starting Surface button.
The inclusion or omission of edge lines does not affect the resurfacing process
in any way. Cell table types within the original surface are also maintained in the
final surface. The starting surface need not be closed.

Version 3.26 4-23


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Resurfacing, Optimisation and Quad Morphing

An example result of a resurfacing operation is shown in Figure 4-22 below:

Original STL Type Data

Resurfaced Data

Figure 4-22 Example of resurfacing a starting surface

Surface optimisation options


The default Improve Triangulation Quality process re-triangulates the starting
surface only. If you wish to further improve the surface quality, the Optimize for
Tetrahedral Mesh or Optimize for Trimmed Mesh option should be selected and
the Resurface button pressed again to carry out the operation (Figure 4-23).

Figure 4-23 Surface optimisation options


4-24 Version 3.26
Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Resurfacing, Optimisation and Quad Morphing

The choice of optimisation scheme is dependent on the grid you wish to produce and
the result will vary slightly depending on which option is selected. When the
process is complete, the original starting surface is replaced by the resurfaced
version but the result is not saved in the database. It is up to the user to decide if the
result should be saved or not.
Quad morphing options
Quad morphing is an additional option provided by the Module, whereby a closed
triangulated surface is converted into square or quadrilateral elements. This option
is not normally required as part of the AutoMesh process but may be useful in
particular applications where the prepared surface is to be exported to third-party
software.
Before using the quad morpher, it is recommended that the surface should be
prepared as for normal use within the Module, be completely triangulated and
composed of nearly equal-sized elements. You should then select the Convert to
Quads option in the Resurface panel, as shown below:

Figure 4-24 Quad morphing option selected

The Resurface button can then be pressed to start the process. The Status bar will
show the progress being made by the quad morphing algorithm. When the operation
is complete, the Module will return a quad morphed surface in the working model
space. The result is not saved in the database.
An example of quad morphing is shown in Figure 4-25.

Version 3.26 4-25


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
New Surface Generation

Original Triangulated
Data

Quad Morphed
Surface

Figure 4-25 Quad morphing example

Surface triangulation
If you start with a surface composed of elements other than triangles, the Module
can automatically triangulate the surface if desired. To do this, select the
Triangulate option in the Resurface panel and press the Resurface button. The
Module will then proceed with triangulating the surface contained in the current
working model and return with the completed surface. This surface can then be
saved in the database for further use or optimised using the smoothing options in the
Resurface or Surface Smoother panels.
A similar operation can be carried out using the BAMM command as follows:
bamm,surface,{data_base_in_id},{data_base_out_id},,,over

In this case, the original surface should be contained in database entry


{data_base_in_id} and the result will go to database entry
{data_base_out_id}. A maximum edge length can also be provided as part of
the BAMM,SURFACE operation, so that large elements can be further reduced in
size. Additional information on the BAMM command can be found in the pro-STAR
Commands volume.

New Surface Generation


The AutoMesh Module can generate a new uniform or non-uniform closed surface
by using the trimmed cell ‘adjust and cut’ process on the original surface and then
outputing only the surface cells of the new mesh. If any unresolved cells were
produced as part of this process, the surface is projected back onto the original one.

4-26 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
New Surface Generation

Creating a uniform new surface


A uniform new surface can be created after the following actions have been
performed:
• Original surface data imported
• Mismatches and holes fixed
• Non-extrusion/variable-subsurface surfaces identified
• Edges and corners defined by line and point cells
• Resultant mesh placed in the database

The Prepare Surfaces > Create New Surfaces > New Surface Option GUI panel
shown below can be used for this step:

Figure 4-26 Create new surfaces panel

The prepared surface stored in the database is indicated by the Surface DBID
identifier. The new surface to be created will be based on an average facet size given
by the Cell Length value. A surface based on Cartesian or cylindrical coordinates
Version 3.26 4-27
AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
New Surface Generation

may be chosen by changing the Csys value to match the desired coordinate system.
When the Generate New Surface button is pressed, the new surface created will be
placed in the database, as indicated by Output DBID, and automatically displayed
on screen. The resulting surface can be composed of either 3-, 4-, 5- or 6- sided
shells, with sides approximately equal to the Cell Length value specified. An
example starting surface and resultant uniform new surface are shown below:

Original STL Data Uniform New Surface

Figure 4-27 Starting surface and resultant uniform new surface example

If a refined custom mesh is to be used, the database entry ID is identified in the


Custom Mesh box when the option button next to it is selected (see below for more
details on this). It is also possible to limit the extent of the domain over which a new
surface is created by turning off the Auto option and supplying Geometry Range
values.
The purpose of creating a new surface is to improve the surface geometry
definition with regards to subsurface generation. It is also a good starting point for
making surfaces that are to be used for tetrahedral and hybrid mesh volumes, as
these are surface-dependent meshing schemes. The output surface from this process
should be treated as the new model geometry and the normal methodology followed
to create the final grid. All original surface lines, points and cell types are preserved
by this process. Note that the usual surface checks described at the beginning of this
chapter should be performed on the new surface and any problems fixed using the
tools described. However, a CORIENT operation need not be performed if the
surface has not been subsequently modified in any way.
Since the new surface feature limits the trimmed cell ‘adjust and cut’ process to
the surface detail only, a smaller cell length than normal can be used to generate a
higher-quality surface definition. In general, you should not use the same cell length

4-28 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
New Surface Generation

for the new surface and the trimmed cell mesh as this causes the ammbatch
program to slow down due to internal tolerance calculations.
Creating a non-uniform new surface using a custom mesh
In addition to the preparatory steps required for a uniform new surface, a
non-uniform new surface also requires a refined custom mesh to be built. The
purpose of the custom mesh is to provide additional surface details in selected areas
by including refinement in the underlying base grid. Details on how to build a
refined custom mesh are provided in Chapter 6.
The non-uniform new surface option is activated by selecting the Custom Mesh
option, as shown below:

Figure 4-28 Activating the custom mesh option for non-uniform new surface creation

The Cell Length value is now determined from the custom mesh and no additional
input is required. The surface output to the database will contain finer surface details
in areas of refinement and coarser shells elsewhere. Note that, by default, the shells
at the interface between fine and coarse areas on the surface are not joined together.
The edge zipper (EZIP) operation should be run in order to fix this and the surface
put back into the database before continuing.
The advantage of creating a non-uniform new surface is that additional surface
details can be captured for specific features using a smaller cell length while a
coarser surface is created for other parts of the geometry. This is more efficient, both
in terms of memory usage and for all other related operations, as the surface
contains fewer cells than the equivalent uniform surface based on the feature cell
length.

Version 3.26 4-29


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Surface Wrapping

Surface Wrapping
In instances where the original CAD geometry is of extremely poor quality and
contains multiple surfaces, unconnected regions and other ambiguities, or an overly
complex definition, the new surface and resurface functions would most likely fail
and not provide a closed triangulated starting surface from which to continue with
volume meshing. The current release of the AutoMesh module contains a new
surface wrapping technique for use in the above instances and provides the user
with a suitable starting surface based on the original CAD data.
This wrapped surface can achieve many different aims simultaneously when
applied to poor quality CAD data — these include:
• Providing a closed, triangulated and manifold surface definition
• Simplifying complex geometries and removing internal surfaces
• ‘Skinning’ double surfaces and filling gaps and “leaks”
• Including baffle thickness/inflation
• Including refinements based on curvature, proximity and/or cell types

A surface wrapping panel, shown below, is provided in the AutoMesh module


under the Prepare Surfaces > Create New Surfaces > Surface Wrapper menu.

Figure 4-29 Surface wrapper options

4-30 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Surface Wrapping

The initial triangulation of the CAD data is not important and does not affect the
process turn around time. To produce a wrapped surface the following steps should
be followed:
1. First, the CAD data to be wrapped should be imported and saved under the
CAD Surface ID database entry
2. Based on the units of the geometry, the Feature Size value should then be set.
An average feature size value is recommend at first.
3. The level of detail required for the final wrapped surface can be determined
using the Refinements option. The user can select from Low Detail,
Medium Detail, High Detail and No Refinement. Each option sets a
pre-defined value for the minimum size for curvature- and proximity-based
refinements which in turn affect the level of surface detail captured. The
preset values can be seen by pressing the Settings... button for the appropriate
Refinements selection.
4. The Volume of Interest is then selected. Four options are provided:
(a) External - Wrapped surface of external geometry
(b) Largest Internal - Wrapped surface of largest internal geometry
(c) Nth Largest - Wrapped surface of nth largest internal geometry
(d) Seed Point - Wrapped surface of volume starting from seed vertex

5. Pressing the Wrap Surface button performs the surface wrapping operation
and saves the surface to the database entry indicated by Surface Wrap ID.
The surface is also automatically plotted on the screen.

An example of a bad quality starting STL surface and the resultant wrapped surface
is shown below:

Original CAD Data

Surface Wrapped Result

Figure 4-30 Starting STL surface and resultant wrapped surface

Version 3.26 4-31


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Surface Wrapping

Edges and other sharp features in the starting CAD data are only maintained if line
cells representing the features are included (see “Retaining edges” below). Cell
table definitions in the starting CAD data will also be maintained by default in the
final surface.
The goal of the surface wrapper is simply to provide a closed, triangulated and
manifold surface starting from a poor-quality initial geometry or geometries. It is
therefore essential that you resurface and/or smooth the final surface using any of
the tools described elsewhere in this chapter before proceeding to the next step of
the meshing process. Some minor manual repair of the wrapped surface may also
be necessary at this time prior to the resurface/smoothing step in the process. A leak
detection option is available to assist with locating holes that may exist in the
wrapped surface.
Retaining edges
If line cells are included in the starting CAD surface, the wrapper will include edge
retention by default as part of the wrapping process. The option is activated from
the Process Tools > Advanced Options > Surface Wrapper Batch Options
panel, as shown below:

Figure 4-31 Edge retention advanced options for surface wrapper

In general, it is always recommend to include line cells in the starting CAD data if
possible and leave the Edge Retention option turned on. CAD data not containing
line cells will be unaffected by this option. An example comparison of the resultant
wrapped surface with and without edge retention is shown in Figure 4-32.

4-32 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Surface Wrapping

Figure 4-32 Comparison of wrapped surface with edge retention turned off and on

Surface wrapper refinement options


The Refinements Settings button gives access to additional surface wrapping
refinement options, as shown below:

Figure 4-33 Surface wrapper refinement settings

Curvature- and proximity-based refinements


The Minimum Size values for Curvature and Proximity Based Refinements are
pre-set by the selection made in the main panel for Refinements. These are 2(n-1)
divisors of the Feature Size set in the main panel and these can be altered by the
user if desired. The Points Around a Circle value can be increased to improve the
definition of triangulation around cylindrical objects. Where two surface are in
close proximity, the Points in a Gap value ensures a minimum number of surface
triangles in this region. A Floor value can also be set to limit the refinement on
surfaces that are in close proximity to one another. Any surfaces found to be within
each other’s Floor value will be treated as one surface by the refinement scheme.
Version 3.26 4-33
AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Surface Wrapping

Curvature-based refinements, however, can only be included on those parts of


the starting CAD data that are topologically connected. That is, the vertex points are
merged and neighbouring shells have a one-to-one edge connection. Those parts of
the surface data that are not connected, as is typical for multiple STL data sets,
refinements will be based on proximity only. Two options are available for avoiding
this problem, should it be encountered:
1. Perform a vertex merge on the starting CAD data prior to running the surface
wrapper
2. Re-run the surface wrapper using the initial wrapped surface as the starting
CAD data

The resultant wrapped surfaces will be similar whichever option is selected.

Closing gaps
The Close Large Gaps option (turned off by default) can be activated in cases
where open holes exist in the starting CAD geometry. Turning this option on allows
the user to set a Gap Closure Size which is a 2(n-1) multiple of the Feature Size
value. A Volume value also needs to be set, corresponding to the approximate
volume of the domain containing the gaps. The gap closure routine will be applied
to all domains whose volume is equal to or greater than the specified value.
In addition, the Solid Locations panel can be used to provide seed points for
volumes that do not fit into one of the minimum volume criteria specified above.
The panel is displayed by pressing the Settings button, as shown below:

Figure 4-34 Starting seed locations for volumes requiring gap closure

For each volume that has gaps needing to be closed, a seed location should be
specified inside the volume using the X, Y and Z entries. The seed location should
be as close to the center of the volume as possible, especially in cases where the gap
size is large. The Pick button allows either a single vertex point to be selected for
the volume of interest or the current cell set to be used. A Description of the volume
can also be entered. Any settings made in this panel overrule the Volume setting in
the main Wrapper Settings panel for Close Large Gaps.

4-34 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Surface Wrapping

Including baffles
The Baffle Thickness option (turned on by default) allows a thickness to be applied
to any internal surfaces representing baffles in the fluid domain. The units used are
the same as those in the imported geometry. Note that the Volume of Interest
option must also be set to Largest Internal in order for the Baffle Thickness to be
included for closed volumes.

Local surface properties


The Settings option for Local Surface Properties allows the specification of
surface sizes based on individual cell table types in the original CAD data. Pressing
the Settings button opens the Local Surface Properties panel, as shown below:

Figure 4-35 Surface wrapper local surface properties

The values in this panel will override any values set in the main and wrapper
settings panels. In the above panel, you should first activate an entry by selecting an
Active Entry button and enter a Description of the refinement item if desired.
Next, the CAD surface Cell Type(s) or Group(s) can be chosen from the Select
menu. The appropriate cell type(s) or group(s) are entered in the Type/Group box,
separated by a comma if more than one is used. Alternatively, the Pick button can
be used to pick specific shell surfaces if the surface or subsurface mesh of interest
is currently loaded and displayed on screen.
The Option parameter allows a specific type of operation to be selected — the
options are as follows:
• Feature Size — Specific triangle size to be used
• Gap Size — Maximum size of gaps/holes to be filled
• Gap and Feature Size — Combined feature and gap size specification
• No. Points Around a Circle — Min. number of triangles around a cylindrical
shape
• No. Points in a Gap — Minimum number of triangles in a gap
• No. Points Between Edges — Minimum number of triangles between edge
lines
• Minimum Cell Size — Alternate minimum triangle size

The specific value to be used for the selected cell type or group in the CAD surface
can then be set using the pre-defined range in the Value pop up. The values listed
are based on the Feature Size parameter, which must first be set in the main

Version 3.26 4-35


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Surface Wrapping

Surface Wrapper panel. The Action option allows you to temporarily disable the
settings while still maintaining the values in the panel for future use.
Any combination of valid local surface properties can be set for each cell table
type that exists in the starting CAD surface. To apply the settings, press the Close
button and check that the correct number of active settings appears in the main
Wrapper Settings panel.

Contact prevention
In cases where multiple domains are in close proximity to one another, the surface
wrapper would normally merge them together and provide a single, closed, wrapped
volume. To avoid this, the Prevent Contact option (turned off by default) can be
activated and the cell types of each separate domain specified so as to keep the
volumes distinct and separate in the wrapped surface. Pressing the Settings button
opens the Prevent Contact Settings panel shown below:

Figure 4-36 Contact prevention settings

For each volume pair that should not be merged, the appropriate cell type or types
should be specified as Type/Group A and Type/Group B entries. A Floor value
can also be set, which is the minimum distance at which contact prevention is
guaranteed. Any surfaces found to be less than this distance apart are not guaranteed
to be separated in the wrapped surface. A Floor value greater than 0 must always
be specified. A Description of the contact prevention surfaces may also be entered.
Pressing Close saves the specified values.
Leak detection
Once the wrapped surface has been generated, a leak detection operation can be run
in order to find any gaps that were inadvertently introduced into the final surface.
The leak detection options can be accessed by entering the Leak Detection panel
from the main Surface Wrapper panel or from the Wrapper Settings panel. The
panel shown in Figure 4-37 will appear:

4-36 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Surface Smoothing

Figure 4-37 Leak detection options

In order to check for leaks, two points must be specified, one inside the volume and
one outside. A path can then be calculated between the two points using either the
Graph or Cartesian Method in order to establish the presence of absence of a leak.
The internal point is specified via the Inside Option - the default Cell Set option
automatically calculates a point based on the size of the current cell set.
Alternatively, the Specify option can be used to fix a specific location inside the
wrapped volume. For the external point, set via the Outside Option, three default
settings are provided, namely Box-26pnts, Box-14pnts and Box-8pnts. These
specify 26, 14 and 8 external points respectively in the shape of a box so that a leak
calculation may be run for each internal/external pair in turn. The greater the
number of external points that are specified the greater the chance of detecting a
leak. Alternatively, Specify can be selected for the Outside Option and the number
of points (No. Points) specified. The Plot Seed Points button can be used to display
the location of the internal and external seed points.
The Generate Trace button can then be pressed to determine whether a leak
exists for each internal/external pair. For each leak found, a trace composed of line
cells will be added to the wrapped surface indicating the path from the inside to the
outside. The leak areas can thus be easily identified and fixed by hand before
proceeding to the next step of the meshing process.

Surface Smoothing
Before proceeding to the subsurface generation stage, it is recommended that the
prepared surface be smoothed so as to eliminate any problematic geometry
definitions. For cases where a tetrahedral or hybrid volume mesh is to be created,
this stage is essential for ensuring a good quality grid.
The surface smoothing options are located in the Prepare Surfaces > Surface
Tools > Surface Smoother panel, as shown below:

Version 3.26 4-37


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Surface Smoothing

Figure 4-38 Surface smoothing options panel

To smooth the surface in the current cell set, press the Smooth button or use the
TETGEN command with the SMOOTH option as follows:
ctab,5,shell,2
tetgen,smooth,2,reco,modi

where ‘2’ indicates the number of smoothing iterations to perform. By default, the
smoother will smooth the original surface directly and may create additional shells
due to surface reconstruction (see below). During smoothing, the Module will
output some useful information regarding the surface, as shown below:

TRIANGLE QUALITY CHECK NO. OF CELLS PERCENTAGE


.75 < TRIQ < 1.00 2018 65.43
.50 < TRIQ < .75 986 31.97
.30 < TRIQ < .50 75 2.43
.10 < TRIQ < .30 4 .13
TRIQ < .10 1 .03

Iteration Avg. Displacment Max. Displacement


1 .244247 1.39321
2 .136041 1.16300

4-38 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Surface Smoothing

TRIANGLE QUALITY CHECK NO. OF CELLS PERCENTAGE


.75 < TRIQ < 1.00 2776 90.01
.50 < TRIQ < .75 294 9.53
.30 < TRIQ < .50 14 .45
.10 < TRIQ < .30 0 .00
TRIQ < .10 0 .00

The success of the smoothing operation can be judged by looking at the percentage
increase of cells in the quality range 0.50 — 1.0. In the above example, it can be
seen that there is a significant gain in quality by smoothing the surface by just two
iterations. It is recommended that no surface elements should have a quality of
below 0.3 for tetrahedral and hybrid meshes. Since the quality of the surface is not
known a priori, it is recommended that a smoothing operation be done for one or
two iterations to check the values and a decision made on whether to smooth further
or not.
To smooth a copy of the surface, of cell type given by the New Cell Shell Type
value, select the Create Duplicate Surface button on the panel or use the following
command:

tetgen,smooth,2,,add

This will create an additional copy of the surface which is then smoothed, thus
enabling you to see the direct effect of smoothing. Any line and point elements are
preserved as well, although vertices are allowed to be smoothed in the direction
along the line elements. Also, any natural surface angles greater than 45° are
preserved while those below are included in the smoothing process.
A further option within the command is to reconstruct parts of the surface where
a number of facets are joined to a single point, as shown in Figure 4-39.

Figure 4-39 Surface before and after reconstruction

This option would identify such areas of the mesh and reconstruct the surface
definition to improve quality. To omit this option while smoothing the surface, turn
off the Reconstruct Surface button on the GUI panel or issue command:

tetgen,smooth,2,noreco,modify

This command can significantly modify the surface geometry by adding and
deleting cells, so you are advised to keep a back-up copy of the surface in the
Version 3.26 4-39
AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Creation of a Box for External Aerodynamic Cases

database or use the ADD option to generate a copy first. This operation can be
repeated as many times as necessary until a satisfactory surface discretisation is
achieved. It should also be noted that smoothing is only carried out on the current
cell set, allowing you to smooth either the whole or part of the surface geometry.
Once a smoothed surface has been obtained, you should place the resultant mesh
back into the database by choosing the Update > Write Cell Set option on the GUI
with the appropriate surface database mesh type set or by typing command:

dbase,put,4,surface,over
Smoothed,reference,surface

As stated earlier, you should not smooth the subsurface mesh as this will destroy the
surface normal correlation between subsurface and reference surface, resulting in
the formation of a poor quality extrusion layer. Therefore, all surface modifications
should be carried out prior to the subsurface generation.

Creation of a Box for External Aerodynamic Cases


For external aerodynamic cases, where flow around an object is to be calculated, it
is necessary to include an additional surface surounding the object so that the
AutoMesh Module meshes the outside of the domain instead of the inside. If such a
surface was not available in the original CAD data file, it can be created by the
Module.
The panel that allows this operation is in Prepare Surfaces > Create New
Surfaces > Generate Box Around Surface, as shown in Figure 4-40.

4-40 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Creation of a Box for External Aerodynamic Cases

Figure 4-40 External box generation options

The current cell set should contain the model that requires a box. The sequence of
actions needed to generate a box is shown below:

Figure 4-41 Box geometry options

Version 3.26 4-41


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Volumes of Intersecting Surfaces

1. The Get Geometry Range button should be pressed first to determine the
maximum and minimum geometrical extent of the model
2. If a cell type other than the default is required for the box, it should be
specified as a new Cell Type
3. The range end-points can be altered if desired, as well as the number of shells
in each direction by entering new values in the # boxes
4. The Generate Box button can then be pressed to generate a regular external
surface around the object

If a box is required as part of the overall geometry make-up, the relevant action may
be taken at any point prior to the subsurface generation stage. Remember to add
edge lines and corner points to the box using the Edge and Point tools in the panel,
as well as to save the entire surface back in the database for further use.

Volumes of Intersecting Surfaces


The AutoMesh module can automatically perform various Boolean-type operations
on the volumes of two intersecting closed surfaces and output the corresponding
results. This is useful in instances where the user starts with multiple (separate)
surfaces that intersect but wishes to create a single closed volume out of them for
further operations, such as subsurface generation or re-surfacing.
Three options are provided within ammbatch that can automatically take the
specified input database surfaces and output a connected closed surface according
to the following definitions:

Intersection:The intersection (internal) volume of two intersecting surfaces


Union: The union (external) volume of two intersecting surfaces
Difference:The difference (external) volume of two intersecting surfaces

A fourth option is available where all surfaces involved in the operation are closed
and classified with a different cell type. This allows you to obtain any required
combination of surfaces should the above three options not give the desired result.
The set of 2D examples shown in Figure 4-42 below illustrate the different
intersection options available by default.

4-42 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Volumes of Intersecting Surfaces

Starting Volumes Intersection Result

Union Result Difference Result


Figure 4-42 Default volume intersection options

In the above examples, the two starting volumes intersect each other but are
independent. The green (shaded) volumes represent the different types of result
from each option.
Command input examples
The intersection operation is currently performed by a combination of batch
commands plus the BAMM,SURFACE command (normally used to create edges and
corners for a given surface). The starting surfaces should be placed under a given
database entry of type ‘Surface’ and an appropriate combination of the commands
shown below issued to perform the operation.
In the examples shown below, the following settings are used:

closed volume 1 cell type = 10


closed volume 2 cell type = 11
starting database entry = 3
output database entry = 4

Output from the process is sent to file bamm.proc.lst in the local directory.
This can be viewed while the process is running so that you will know when all
operations are complete. The Process Tools > View Batch Jobs panel can also be
used for this purpose.

Example 1 — Intersection:
bamm,othdel
bamm,other,-set-operation=intersection
bamm,other,-set-operation-ictid1=10

Version 3.26 4-43


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Volume Subdivision (CCUT)

bamm,other,-set-operation-ictid2=11
bamm,surface,3,4,,,over

Example 2 — Union:
bamm,othdel
bamm,other,-set-operation=union
bamm,other,-set-operation-ictid1=10
bamm,other,-set-operation-ictid2=11
bamm,surface,3,4,,,over

Example 3 — Difference:
bamm,othdel
bamm,other,-set-operation=difference
bamm,other,-set-operation-ictid1=10
bamm,other,-set-operation-ictid2=11
bamm,surface,3,4,,,over

Example 4 — Classification:
bamm,othdel
bamm,other,-set-operation=classification
bamm,other,-set-operation-ictid1=10
bamm,other,-set-operation-ictid2=11
bamm,surface,3,4,,,over

In the above case, the following additional options can be set:

-set-operation=inside1
-set-operation=outside1
-set-operation=inside2
-set-operation=outside2

Where a range of cell table types are used for each volume, then the batch
commands

bamm,other,-set-operation-idmin1=cell_table_id
bamm,other,-set-operation-idmax1=cell_table_id
bamm,other,-set-operation-idmin2=cell_table_id
bamm,other,-set-operation-idmax2=cell_table_id
can be used to specify ranges (idmin1 to idmax1 for the first volume and
idmin2 to idmax2 for the second volume).

Volume Subdivision (CCUT)


The AutoMesh Module includes a powerful function called CCUT (short for Cell
Cut) that allows you to subdivide the volume within a surface into component parts.
This enables the trimmed cell mesher to mesh different parts of the model
independently, using different coordinate systems, cell densities or even a custom
mesh.
The CCUT operation can subdivide such a volume using a planar, cylindrical,

4-44 Version 3.26


Chapter 4 AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION
Volume Subdivision (CCUT)

spherical or conical cut. At the intersection points on the surface, a continuous


integral joint is formed based on the common subdividing interface. This common
interface can then be included in two or more separate surface database entries,
enabling the AutoMesh module to mesh them individually afterwards. It is
recommended that a unique cell type is assigned to the cut interface in order to make
identification easier.
Note that the CCUT operation extends in the direction of the cut from minus
infinity to plus infinity if the entire cell set is used. If a local cell set is defined, then
the cut is only performed within the range of the cell set.
Example commands for each type of operation are shown below; a GUI
equivalent will be included in a future version of the Module. Additional
information on the CCUT command can be found in the pro-STAR Commands
volume.

Planar Cut (using a known value):


To perform a planar cut at X=10 in the global Cartesian coordinate system, type:

ctab,20,shell,2
ccut,,all,,,1,x,10
cplot

Similar cuts can also be made in the Y and Z direction.

Planar Cut (using the cursor):


A planar cut can be made on the surface as long as the viewing direction is
perpendicular to the cut surface. For example:

ctab,20,shell,2
view,0,0,1
cplot
ccut,,all,,,cursor
cplot

Cylindrical Cut:
A cylindrical cut at a radius of R=5 in cylindrical coordinate system 10 can be made
by typing:

ctab,20,shell,2
ccut,,all,,,10,cyli,5.0

Limiting values for the applied angle and the Z-axis length can also be included as
part of this command.

Spherical Cut:
A spherical cut at radius R=2.0 in spherical coordinate system 3 can be made as
follows:

ctab,20,shell,2
ccut,,all,,,,3,spherical,2.0

Version 3.26 4-45


AUTOMESH GEOMETRY IMPORT AND SURFACE PREPARATION Chapter 4
Volume Subdivision (CCUT)

cplot

Conical Cut:
A conical cut with a cone angle of 30° (with respect to the Z-axis) can be made by
typing:

ctab,20,shell,2
ccut,,all,,,1,cone,30
cplot

The cone angle plus its Z-axis length can be included as part of this command. More
information on CCUT is available in the pro-STAR Commands volume.

4-46 Version 3.26


Chapter 5 AUTOMESH SUBSURFACE GENERATION
Basic Subsurface Generation

Chapter 5 AUTOMESH SUBSURFACE GENERATION


Once the final, prepared surface mesh is placed into the database system, the next
step is to create the subsurface mesh. In effect, the surface mesh is ‘shrunk’ (for
internal flows) or ‘expanded’ (for external flows) to form the subsurface mesh, at a
distance away from the original equal to a specified cell length. This operation is
needed so that a volume mesh can be created, based on the subsurface and extruded
back to the original surface at a later stage to form the near-wall cell layers. A
description of how this is done is given below, along with additional options
available for this process.

Basic Subsurface Generation


The panel that contains the subsurface generation options is in Generate Mesh >
Subsurface, as shown below:

Figure 5-1 Subsurface generation options

The surface from which the subsurface is to be prepared is indicated by Surface


DBID. Any surface shell types that do not require extrusion layers are entered in the
No Subsurface Cell Type box. If more than one surface shell type is required, the

Version 3.26 5-1


AUTOMESH SUBSURFACE GENERATION Chapter 5
Variable Subsurface Depth

values should be separated by a comma. The Pick button may also be used to select
surface shell types directly by clicking on the faces of different cells in the model.
The distance by which the subsurface will be moved from the main surface is given
by the Subsurface Thickness setting — only one fixed distance is allowed in the
panel.
When the Generate Subsurface button is pressed, the Module will create the
subsurface and place the result into the database entry indicated by the Subsurface
DBID. Surfaces of the type given for the No Subsurface Cell Type will not be
moved in, except at the edges to accommodate any neighboring surface movement.
The resulting surface will be composed entirely of triangular shells and will also be
automatically displayed on screen. Modification of the subsurface mesh is limited
to movement of vertices only; no new vertices or cells should be created and none
should be deleted. Any line and point cells defined in the original surface mesh will
also be preserved in the subsurface mesh.

Variable Subsurface Depth


A variable subsurface depth can be specified during the subsurface generation
stage, allowing different thicknesses to be used for the extrusion layers around the
model. This process is based on the original shell types specified in the model
surface. For example, if two different subsurface depths are to be created in addition
to the one coresponding to the normal extrusion thickness, the model’s surface
definition must be modified so that at least three shell types are used in it.
To activate this feature, the Use Variable Thickness button should be selected
from the Subsurface Generation panel, as shown below:

Figure 5-2 Activating the variable subsurface option

Different depths can be allocated to each part of the surface by using the
Subsurface Thickness table shown in Figure 5-3, accessed by pressing the
Variable Thickness button on the main subsurface generation panel.

5-2 Version 3.26


Chapter 5 AUTOMESH SUBSURFACE GENERATION
Variable Subsurface Depth

Figure 5-3 Cell properties table allowing variable subsurface depth settings

A descriptive label can be entered in the Description box for the given Cell Type.
The Value parameter indicates the cell type that requires the variable subsurface, of
depth equal to the value entered in the Thickness box. These entries are
automatically applied when the Close button is pressed. Note that the values can be
less than or more than the default subsurface depth applied in the main panel.
This feature is useful for cases where the turbulence model employed requires
good control on y+ values and is illustrated in Figure 5-4.

Variable
Subsurface
Variable
Subsurface
Normal Thickness

Cell Type #1 Cell Type #2 Cell Type #3

Figure 5-4 Use of variable subsurface depth for localized y+ control

It can also be used in ‘constricted’ parts of the model geometry to control a self-
intersection condition of the subsurface, over and above the “Avoiding self
intersection” on page 5-8 (see the example shown in Figure 5-5).

Version 3.26 5-3


AUTOMESH SUBSURFACE GENERATION Chapter 5
Inclusion of Interior Zero-Thickness Baffles

Variable
Subsurface
Cell Type #2

Cell Type #1

Normal
Thickness
Cell
Type #2

Figure 5-5 Use of variable subsurface for geometry constrictions

Where the subsurface depth changes from one region to the next, a gradual change
in depth is produced in the transition region, as seen in the above figure.

Inclusion of Interior Zero-Thickness Baffles


If you intend to include zero-thickness interior baffles within the final trimmed-cell,
tetrahedral or hybrid mesh, the subsurface generation step (as well as the extrusion
layer stage) must include information relating to these feature(s). Currently, the
Module allows inclusion of interior baffles as long as the surface contains a single
layer of shells representing these features. The shells can be connected to an outer
(manifold) surface or can be completely disconnected (i.e. floating in space). They
can also fully disconnect one part of the solution domain from another as long as the
vertices on the edges are the same (i.e. merged).
The interior shells are identified via the Baffle Cell Type(s) option on the
Subsurface Generation panel, as shown below:

Figure 5-6 Interior zero-thickness baffle specification

5-4 Version 3.26


Chapter 5 AUTOMESH SUBSURFACE GENERATION
Method #8 Advanced Options

Each different cell type used for interior baffles should be entered in the box or
selected from a screen plot using the Pick button. During the subsurface generation
step, the Module will split the shell surface(s) and create a duplicate subsurface on
opposite sides of the feature, as shown in the example below:

Interior
Shells

Starting Surface Subsurface


Figure 5-7 Subsurface created for interior baffles

In the case of a completely disconnected interior shell, a subsurface will be formed


completely around the feature at the set distance.
The interior baffle option can also be combined with the variable subsurface
feature such that a different distance between subsurface and interior baffle shells
is established compared to the rest of the geometry. Chapter 7, “Extrusion Layer
Generation” contains additional information on restrictions that can be applied once
layers have been formed based on an interior feature of this kind.

Method #8 Advanced Options


The default subsurface algorithm used in the current STAR-CD release is called
Subsurface Method #8 and is based on an algebraic marching procedure. It can
take into account surface proximity, user input and various quality and validity
checks in order to guarantee that an acceptable final subsurface is always created.
Method #8 combines the advantages of the earlier default techniques (Method #7
and Method #4) in that it always tries to maintain the angles present in the original
surface as well as the depth specified by the user.
It is recommended that this method be used for all geometries as it has been
designed to always produce a valid subsurface, regardless of geometric
complexities (assuming a good quality starting surface). Method #8 also includes a
capability for automatically reducing the local subsurface depth to zero in areas
where the resulting mesh would be poor or invalid. An example of this is a
non-manifold or “pinched” topology, or topologies with open ends. As a result, the
final extrusion layer my contain pyramidal and tetrahedral cells in the transition
areas to account for the reduced and zero-thickness areas.
If a zero-thickness subsurface layer is undesirable, you should investigate the
areas of concern, improve the starting surface quality in such areas using the tools
available in pro-STAR and then re-create the subsurface. As an aid, the Subsurface

Version 3.26 5-5


AUTOMESH SUBSURFACE GENERATION Chapter 5
Subsurface Method #4

Thickness plot, described in the “Subsurface Checking” section, can be used to


help identify the areas of reduced or zero thickness in the starting surface.
Pressing the Advanced Options... button brings up the Advanced Subsurface
Generation options panel for the algorithm, as shown below:

Figure 5-8 Advanced options for subsurface method #8

It is recommended that you should only access and change these values if instructed
to do so by a CD-adapco Technical Support Engineer or authorized agent.

Subsurface Method #4
The Subsurface Method #4 algorithm can be used in instances where the surface
shell size is large compared with the subsurface depth. It simply moves the vertices
in a direction normal to the surface and does a limited amount of smoothing. It tends
to work well for simple geometries where there are no concave surfaces and an
uniform depth is specified. The default options chosen for the algorithm minimize
the run time for the subsurface generation. The algorithm is activated by specifying
the batch command option

-subsurface-method=4

5-6 Version 3.26


Chapter 5 AUTOMESH SUBSURFACE GENERATION
Subsurface Method #4

in the method#8 Advanced Options panel, or by turning off the Advanced


Subsurface option in the Process Tools > Advanced Options panel. It also
supports the variable subsurface depth option described earlier but does not support
interior zero-thickness baffles.
Advanced options for subsurface method #4
The advanced options for subsurface generation using Method #4 can be accessed
by selecting the Subsurface Generation tab in Process Tools > Advanced
Options from the main AutoMesh panel. The following panel will appear:

Figure 5-9 Advanced Subsurface Options for Method #4

The panel allows access to various iteration parameters that control the algorithm’s
convergence. The convergence history can be used to judge how well the subsurface
generation worked. To view the convergence history, include batch command

-subsurface-verbose

in the panel’s batch command window.


If the iterative process does not converge, it might be useful to change some of
the parameter settings. The following two values can be adjusted:

No of Iterations(default = 500)
Relaxation(default = 0.1)

In cases of non-convergence, the number of iterations should be increased to 800 or


so. The relaxation factor can be decreased (say, to 0.05), but only if the number of
iterations is also increased. Increasing the relaxation factor (to 0.5) makes the vertex
movement ‘stiffer’, which can sometimes help produce a suitable subsurface (see
Figure 5-10). The relaxation value should always be greater than 0 but less than 1.

Version 3.26 5-7


AUTOMESH SUBSURFACE GENERATION Chapter 5
Subsurface Method #4

Iter = 100
Iter = 500
UR = 0.1
UR = 0.5

Figure 5-10 Effect of increasing maximum number of iterations and under-relaxation

Further, the scheme of Method #4 can create the subsurface in more than one step.
For example, if a value of 2 is specified for No. Steps, the procedure will first
generate a subsurface at half the given depth value, and then generate a second one
based on the first in order to achieve the final desired subsurface depth. This feature
should be used only if advised by a CD-adapco Technical Support Engineer or
authorized agent.
Offset surface eps
This value should be changed if spurious vertices (e.g. spikes) are placed on the
subsurface when using Method #4. Recommended values are in the range 0.01 to
0.3.
Avoiding self intersection
If the subsurface depth parameter is too large, the subsurface mesh may intersect
itself, especially in long, thin parts of the model geometry. The Module can report
such instances if the following batch command setting is included in the Advanced
Options batch command window:

-subsurface-intersection

Alternatively, the Avoid Self Intersection feature can be selected which will
automatically detect surfaces that may intersect and keep them apart from each
other. An example of this is shown below:

Self
Intersection

Self Intersection Avoidance Off Self Intersection Avoidance On

Figure 5-11 Self intersection avoidance option

5-8 Version 3.26


Chapter 5 AUTOMESH SUBSURFACE GENERATION
Subsurface Checking

In addition to avoiding self intersection, the Compatibility Tolerance value can be


set using the batch command

-compatibility-tolerance=value

This option controls the amount of movement performed by the avoidance scheme.
A low value (<0.1) means that the subsurface will closely follow the original
surface while a larger value (>0.5) means more freedom is allowed. The default
value of 0.3 is a compromise between the two and should be suitable for most cases.
Figure 5-12 illustrates the effect of different values.

CT > 0.5 CT < 0.1

Figure 5-12 Effect of Compatibility Tolerance with Self Intersection Avoidance

Subsurface Checking
The checks prescribed for the original surface must also be performed for the
subsurface in order to ensure its validity for further operations. Any problems that
are highlighted should be fixed in a manner that observes the following axiom: a
direct relationship exists between surface and subsurface, such that no elements or
vertices can be made or destroyed. Effectively, this restricts any fixing only to
movement of vertices.
You can perform an additional set of visual checks using the Plot... button on the
Subsurface Generation panel. The set of available options are shown below:

Figure 5-13 Subsurface Visual Checks

The first option, Surface and Subsurface, automatically plots the starting surface
and subsurface together in clipped hidden format. This allows you to view the inside
of the solution domain and verify visually if the subsurface intersect the main
surface in areas where it shouldn’t.
An example surface and subsurface clipped hidden type plot is shown in Figure
5-14.

Version 3.26 5-9


AUTOMESH SUBSURFACE GENERATION Chapter 5
Subsurface Checking

Figure 5-14 Example Surface and Subsurface Combined Plot

The last two options in the Plot... pull down menu are Thickness Contour and
Subsurface and Thickness Contour which plot contours showing the layer
thickness achieved by the subsurface generation process. This method enables you
to spot any unexpected problems more readily than during the subsurface
generation stage and to decide if the result is suitable for the next step in the meshing
process.
An example subsurface Thickness Contour result is shown below:

Figure 5-15 Example of Subsurface Thickness Contours

5-10 Version 3.26


Chapter 5 AUTOMESH SUBSURFACE GENERATION
Subsurface Checking

Since you have more flexibility to fix the starting surface rather than the subsurface,
the latter’s depth value is plotted on the starting surface. Thus, you can review this
information and fix the starting surface directly should any problem arise. A new
subsurface can then be created from the saved starting surface and the process
repeated until all problems are eliminated.
If Subsurface Thickness values are plotted, you should remember to reset
pro-STAR to its Geometry Plot plotting mode using the GUI or command
POPT,GEOM. To gain additional clarity while reviewing the Subsurface
Thickness plot, pro-STAR’s ‘glm’ or ‘mesa’ graphics driver versions should be
used so as to allow surface lighting effects to be included.

Version 3.26 5-11


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Trimmed-Cell Volume Meshes

Chapter 6 AUTOMESH VOLUME MESH GENERATION


The choice of which type of volume mesh to generate is entirely up to the user. If
all surface preparation procedures described in Chapter 4 have been followed, all
three options are available for use. This chapter deals with the methods that should
be used to successfully generate each mesh type and also describes any advanced
options that are also available.

Generation of Trimmed-Cell Volume Meshes


The panel for generating a trimmed-cell volume mesh based on a subsurface is
located under Generate Mesh > Grid Generation > Trimmed Cell, as shown
below:

Figure 6-1 Trimmed-cell volume generation panel

Generation of a basic trimmed-cell mesh


The required input for this panel is as follows:
1. The prepared surface database ID is entered in the Surface DBID box
2. The corresponding subsurface generated from this surface is entered in the
Subsurface DBID box

Version 3.26 6-1


AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Trimmed-Cell Volume Meshes

3. The Cell Length parameter is entered, plus the coordinate system Csys to be
used for the mesh
4. Finally, the Grid DBID is entered to select the database entry under which the
end mesh should be stored

Pressing the Generate Grid button instructs the Module to perform the following
steps:
• Build a structured grid
• Classify inside/outside/intersecting cells
• Adjust grid vertices that are close to the subsurface
• Cut intersecting cells to follow the surface
• Output the final volume mesh

By default, the Module creates an underlying structured mesh based on a Cartesian


coordinate system, with cells whose edge length is equal to the Cell Length value.
Alternatively, you can choose a cylindrical coordinate system or use the system
created for a previously-defined custom mesh (see the “Trimmed cell advanced
options” below). This structured mesh is then classified, which means that cells
completely outside the subsurface, cells completely inside the subsurface and cells
that intersect the subsurface are distinguished from each other.
To help the trimmed-cell cutting procedure, the vertices of the intersecting cells
are projected (or ‘adjusted’) onto the subsurface if they fall within a specified
distance from it. The intersecting cells are then cut so that they best follow the
subsurface contour, using the Module’s library of cell shapes (see Appendix A for
examples and a summary of available shapes). Once this process is complete, the
final mesh is saved under the selected database entry and displayed on screen. The
mesh will be composed of cells belonging to cell type 1.
The quality of a trimmed-cell mesh depends greatly on the Cell Length
parameter chosen — it is up to you to find a balance between model detail and the
resulting number of cells. The spatial extent of the inner mesh is controlled by the
maximum and minimum X, Y and Z values specified in the Geometry Range. This
allows you to mesh different parts of the model separately. The mesh can then be
connected together later, either by using coupled cells (see Chapter 4, “Cell
Couples” in the User Guide) or by merging the interface vertices (by hand if
necessary, see Chapter 3, page 3-25).
If the resultant mesh is not suitable, the above process should be repeated but
with a different cell length parameter and until a satisfactory result is obtained.
Once a suitable mesh has been created, it may be found to contain unresolved
cells (cell types 2 and 3). These will be in mesh regions where the Module could not
cut trimmed cells into one of the currently acceptable cell shapes. Such cells occur
for a number of reasons:
• Too much geometrical detail for the selected cell size
• Too much detail due to inappropriate underlying mesh placement
• The surface is too complex to be adequately represented

The following action can be taken by the user to remedy the situation:
• Reduce the cell length parameter
• Shift the mesh slightly by 0.01 × cell length in a particular direction

6-2 Version 3.26


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Trimmed-Cell Volume Meshes

• Re-align the underlying structured mesh


• Use cell division (see the Advanced Options below)
• Use Fix with AFT (Advancing Front Tetrahedral) and/or Grow and TetFix
(see the Advanced Options)
• Use a custom mesh
• Use unstructured mesh refinement

Note that the Fix with AFT and Grow and TetFix options are on by default. Both
features involve replacing unresolved areas with tetrahedral cells that fit exactly
with their neighbouring cells. The Module automatically generates appropriate cell
couples to maintain the mesh continuity. Alternatively, you can use Cell Division
to place tetrahedral cells only in recognised unresolved areas. More details of how
to use this feature are given in the “Cell division” section of this chapter. Both the
Fix with AFT and Grow and TetFix options can be disabled using the Advanced
Options panel.
If you reach a point where a small number of unresolved cells have been obtained
with otherwise good mesh quality, the mesh may then be fixed by hand. This is a
process that gets easier with time as you become more familiar with the available
cell shapes and fixing techniques. Full use should be made of the Remesh Region
Using TetFix and Hand Fix Region panels available under the Mesh Tools option,
as these have been designed specifically for the cell fixing stage.
Trimmed cell advanced options
By default, a uniform cell length is used for all cells within a trimmed-cell mesh.
For instances where it is beneficial for cells to have an aspect ratio greater than
unity, the Advanced Options panel can be used to specify the X-, Y- or Z- cell
length in addition to the default value. Pressing the Advanced Options... button
opens the panel shown in Figure 6-2.

Figure 6-2 Aspect ratio settings for trimmed cells

Version 3.26 6-3


AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Trimmed-Cell Volume Meshes

Setting the X-, Y- and Z-Cell Length parameters to a value other than 0 or just the
default Cell Length shown in Figure 6-1 will result in the underlying grid having
cells of the appropriate aspect ratio. Note that this may result in an increase in the
number of unresolved cells as the cutting algorithm will behave differently. Note
that the default Cell Length value always needs to be set for the purpose of
checking tolerances.
Trimmed-cell mesh checking
A trimmed-cell mesh should be subjected to a set of checks in order to assure its
quality. This is especially important in instances where you have previously fixed
unresolved mesh areas.
The panel containing these checks is located in Generate Mesh > Mesh Tools
> Cell Quality Checks, as shown in Figure 6-3.

3 4

Figure 6-3 Trimmed-cell mesh checking options

The sequence for checking the trimmed-cell volume is as follows:


1. Cell Selection — Decide whether to check all fluid cells or just the current
cell set
2. Check Option — Choose the required check option(s)
6-4 Version 3.26
Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Trimmed-Cell Volume Meshes

3. Run Check — Run the selected checks


4. Print Summary — Print a summary of the numerical results to file or on
screen

Once the Run Check button is pressed, the resultant failed quantities (if any) are
listed in the quantity Qty box. An example is shown in Figure 6-4.

Figure 6-4 Results from trimmed-cell checking

In this example, a total of ten errors were reported when the Run Check button was
pressed. Of these, two unresolved (type 2) and two problem (type 3) cells were
detected in the volume grid, plus an additional eight cells that failed the
minimum-volume criterion check. One further cell is disconnected from the main
volume, indicating an additional error.
The failed cells can be viewed on screen by pressing the Plot button next to the
test description. All cells that have failed these checks must be fixed before
continuing with the meshing process.
Cells that failed the volume criterion might not be incorrect. If the model units
are in meters, a very low volume check limit (say 10-5) is suggested as a starting
point. Note that negative-volume cells could also be left-handed cells, and should
be checked for this error first by using the CHECK,ALL,,RIGHT,NEWS
command. If any cells are found to be left-handed, they can be fixed using command
CFLIP.
The above checking procedure may become an iterative process as problem cells
are found and fixed along the way. All checks should be re-performed if any new
cells are created to fix errors.
Cell division
The default meshing process in the Module contains a method of ‘filling in’
problem cells of type 3 with tetrahedral cells, thereby reducing or eliminating the
number of problem areas in the mesh. Type 3 cells are produced in areas where the
Module recognises the cell topology required but is currently unable to place a valid
STAR-CD cell in that place. This procedure is on by default if the Trimmed Cell
panel is used to generate the mesh, but can be turned off by activating the Disable
Cell Division button in the Advanced Options panel (Figure 6-5).
All type 3 cells that would be produced during a normal ‘adjust and cut’ run (i.e.
no cell division) are now replaced with tetrahedra and automatically coupled to the

Version 3.26 6-5


AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Trimmed-Cell Volume Meshes

neighbouring cells (see Chapter 4, “Mesh Structure” in the User Guide).


The default process can lead to a number of small tetrahedral cells being
produced, depending upon geometric complexity. The Volume Factor value in the
Advanced Options panel can be used to limit the smallest tetrahedral cell
produced.

Figure 6-5 Cell division and volume factor advanced options

If you specify this option for a given value in the range 0 — 1.0, cell division does
not take place unless all the tetrahedra that would be produced for a given problem
area have a volume greater than ‘value’ × (Cell Length)3. In other words, all
tetrahedral cells produced will have a volume greater than ‘value’ × volume of cell,
as illustrated in Figure 6-6 below.

Vt

Vc
Vc = CL3
Cell
Vt > Vc * VF Length

Figure 6-6 Cell division volume factor criterion

6-6 Version 3.26


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Trimmed-Cell Volume Meshes

Typical values for good results are around 0.01 to 0.03. Cell couples created as part
of this process are automatically carried through with the mesh.
To turn off this feature, specify the -no-cell-division batch command
during the cell ‘adjust and cut’ procedure, or select the Disable Cell Division button
in the Trimmed Cell > Advanced Options panel.
Trimmed-cell mesh fixing using TetFix
The TetFix routine is a simple method of automatically fixing unresolved cells that
may have been produced using the trimmed-cell meshing process. The routine
basically replaces the unresolved cell and its neighbours with tetrahedral cells,
similarly to the cell division technique. However, the tetrahedral cells produced
have a larger volume compared with the cell division ones and are generally easier
to manipulate. They are coupled to the rest of the trimmed-cell mesh using the
coupled cell matching techniques described in Chapter 4, “Cell Couples” of the
User Guide.
The exact steps followed by the scheme are:

Step 1 — Isolate the unresolved cell(s) and its neighbours


Step 2 — Extract the external surface (not including the unresolved cells)
Step 3 — Fix the closed surface elements
Step 4 — Generate a tetrahedral mesh for the closed volume
Step 5 — Couple the tetrahedral cells with the trimmed cells

Step 3 is the only part that currently requires user interaction. However, fixing
surface elements is much easier compared to fixing the equivalent volume elements.
An AutoMesh panel shown in Figure 6-7, called Remesh Region Using TetFix, has
been developed that follows the above five steps.

Version 3.26 6-7


AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Trimmed-Cell Volume Meshes

Figure 6-7 Remesh region using the TetFix panel

The surface fixing stage (step 3) is performed using the Surface Cleanup panel
shown on page 7-15. All other steps are automatically performed using this panel.
A general overview of the procedure, including example results, is given below.

Step 1: Choosing the unresolved cell(s)


The aim of this step is simply to isolate the offending unresolved cells and locate
their nearest neighbours in all directions (Figure 6-8). This is achieved by pressing
the Get Next Unresolved Cell button on the panel. As all unresolved cells are next
to the surface of the model, the neighbouring cells will generally resemble a regular,
structured i, j, k cell block, due to the trimmed-cell methodology. You are allowed
to modify the grid at this point, either by including additional cells or by removing
some, so that a better i, j, k block is obtained. This also helps with the cell-couple
matching operation when tetrahedral cells are added into the main grid.

6-8 Version 3.26


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Trimmed-Cell Volume Meshes

Figure 6-8 Selecting an unresolved cell

If two or more unresolved cells exist in close proximity to each other, they should
be fixed at the same time. There is no limit to the number of cells that can be fixed
simultaneously, and they can be contiguous or disconnected from each other.

Step 2: Creating the closed surface


Pressing the Create Closed Surface button extracts the external surface from the i,
j, k block defined in Step 1 using the LIVE,SURFACE,CREATE command. The
resulting closed surface for the above example is shown in Figure 6-9. The
unresolved cells are removed prior to this operation as it makes the surface cleanup
step easier. The surface serves as the starting point for the tetrahedral mesher.
However, in its current form, the surface is not immediately usable and must be
cleaned up by hand.

Version 3.26 6-9


AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Trimmed-Cell Volume Meshes

Figure 6-9 Closed surface from unresolved area

Step 3: Fixing the closed surface


The shells surrounding the unresolved cell area should first be deleted using the
Surface Cleanup panel or the Fix Surface tools, so that a cleanly defined hole
remains on the surface, as shown in Figure 6-10. Pressing the Cleanup Surfaces
button jumps to the correct panel.

Figure 6-10 Surface with unwanted shells removed

6-10 Version 3.26


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Trimmed-Cell Volume Meshes

Once the ‘internal’ shells have been removed, the remaining surface should be
stitched up by hand using either the Surface Cleanup > Fix Surface Problems >
Using Cursor option or the Fix Surface drop-down menu in this panel. The use of
regular three- or four-sided figures is recommended for fixing the surface. The
quality of these cells should also be as high as possible — you should avoid creating
long, thin ones. Any other poor-quality elements in the surface should also be
deleted and re-created. This includes small surface triangles and any warped or
twisted faces. Note also that vertices can only be created or moved on the outward
facing surface — no changes should be made to the internal surface vertices as this
will affect the coupled cell definitions later on. Figure 6-11 shows the fixed surface.

Figure 6-11 Fixed closed surface

You must ensure that the surface is completely closed at this point, otherwise the
remaining steps will fail. However, cell orientation is not important as this is
automatically done by the Module.

Step 4: Running the TetFix routine


The tetrahedral cells can now be created for the closed volume by pressing the Run
TetFix button. Any four-, five- or six-sided elements on the surface are
automatically triangulated before meshing takes place (Figure 6-12). No edge
swapping is done as this can affect the cell couples.

Version 3.26 6-11


AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Trimmed-Cell Volume Meshes

Figure 6-12 Tetrahedral mesh from closed volume

Step 5: Joining back to the grid


The tetrahedral cells can now be joined back to the trimmed-cell grid by pressing
the Join Back Grid button. The unresolved region isolated in Step 1 is
automatically deleted from the domain and the tetrahedral cells used in its place, as
shown in Figure 6-13.

Figure 6-13 Joining the TetFix volume back to the trimmed-cell grid

6-12 Version 3.26


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Trimmed-Cell Volume Meshes

The coupling operation that establishes inter-cell connectivity is also done


automatically and should be visually checked for unmatched areas. If problems
arise, there are two courses of action:
• Hand-fix the coupled-cell matches
• Return to Step 2 and resurface the elements so that the offending triangular
surface can be modified

Trimmed-cell mesh fixing by hand


The panel shown below, located under Generate Mesh > Mesh Tools > Hand Fix
Region, can be used to fix unresolved and problem cells by hand.

Figure 6-14 Cell fixing tools

This panel can be used in a similar way to the Prepare Surfaces > Surface Tools
> Surface Cleanup panel. Note that cells created using the Make Cell button must
conform to the patterns given in Appendix A in order to be correctly defined.

Version 3.26 6-13


AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Trimmed-Cell Volume Meshes

Custom meshes
Before creating a suitable mesh for the current model, the Module automatically
generates a default mesh in the underlying global Cartesian coordinate system. This
mesh is sufficiently large to span the entire volume of the original model, but is
composed entirely of cells arranged in a structured manner.
In certain instances, it may be desirable to have an underlying mesh that varies
in aspect ratio and/or direction in order to capture better the detail of the surface
model. A custom mesh allows this flexibility and is easy to create before deriving a
trimmed-cell mesh from it. An example is shown in Figure 6-15 below.

Normal Underlying Mesh Custom Mesh


Figure 6-15 Custom mesh example

The custom mesh can be structured or unstructured and may include cell couples.
This allows a large degree of flexibility in creating the type of custom mesh best
suited to the model geometry. All custom meshes must also be composed of right-
handed hexahedral cells which must not intersect each other at any point. Cell and
vertex numbering is not important, however.
A custom mesh can be created in pro-STAR using the facilities described in
Chapter 3 and Chapter 4 of the User Guide before being loaded into an AutoMesh
database using the normal GUI database operation or the equivalent command, e.g.

dbase,put,11,star
STAR Custom Mesh

The custom mesh is then identified in the Trimmed Cell panel by selecting the
Custom Mesh option button and entering the database entry number for Custom
Mesh DBID, as shown in Figure 6-16.

6-14 Version 3.26


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Trimmed-Cell Volume Meshes

Figure 6-16 Custom mesh option activated

Other details in the panel should be filled in as normal. If the whole model grid is
to be constructed from the custom mesh, the latter’s dimensions must be sufficiently
large to span the entire surface mesh in all three directions.
During the trimmed-cell ‘adjust and cut’ stage of the meshing process, the
Module will use this mesh as the basis of its target volume mesh. Once the meshing
process is complete, you should carry on as normal, fixing any unresolved cells and
checking the end mesh in the usual manner. The cell extrusion stage is also carried
out as normal.
The custom mesh can also be included as part of a classification operation and
the resulting mesh refined and re-used for the ‘adjust and cut’ part of the trimmed
cell volume.
User-defined classification and unstructured mesh refinement
The Module contains a user-defined mesh refinement technique that can capture
details of features that are significantly smaller than most other features in the
model.
Accordingly, a ‘classified’ mesh is produced as part of the normal trimmed-cell
‘adjust and cut’ process. This simply means that the Module is able to decide which
cells in the original bounding block definition fall entirely inside the model, which
fall entirely outside the model and which intersect its surface. Hence, a ‘classified’
mesh is produced where it is possible to distinguish between these three cases based
on their cell types, as illustrated in Figure 6-17.

Version 3.26 6-15


AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Trimmed-Cell Volume Meshes

Figure 6-17 Example of a classification result

If all or some of the intersecting cells are then selected and grown inwards or
outwards by one cell layer (depending on whether an internal or external mesh is
desired, respectively), and then refined by a factor of , say, 2 × 2 × 2, a mesh is
produced with higher cell density at the model surface but lower everywhere else.
Examples are shown in Figure 6-18 below.

Figure 6-18 Examples of classified mesh refinement

This mesh can then be fed back into the system as a custom (STAR) mesh with
coupled-cell definitions included. A normal trimmed-cell ‘adjust and cut’ process is
then performed and the final mesh produced. This will have a fine structure where
surface detail definition is needed but a coarser one in other areas (usually away
from the walls). Cell coupling between the coarse and fine areas is automatically
included in the final mesh.
As a further step, the refined classified mesh can be further classified by simply
carrying out the above process once again before applying the trimmed-cell ‘adjust
and cut’ process to the custom mesh. This would result in an even finer mesh
resolution near to the surface, thereby enhancing the mesh feature quality. An
example of multiple classification for an external aerodynamics application is
shown in Figure 6-19.

6-16 Version 3.26


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Trimmed-Cell Volume Meshes

Figure 6-19 External aero application using multiple unstructured mesh refinement

The classification process is carried out using either the surface or subsurface mesh.
To perform this operation the Prepare Custom Mesh > Classify Cells panel is
used, as shown below:

Figure 6-20 Mesh classification and refinement options

The surface mesh is identified using the Surface DBID box — this can be either the

Version 3.26 6-17


AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Trimmed-Cell Volume Meshes

main surface or the subsurface mesh. The Cell Length parameter is the starting
length of the initial structured mesh to be made, based on the Coordinate System
specified. The output mesh is placed under the database entry indicated by Output
DBID.
This will be composed of three or more cell types, depending on the original cell
types used for the surface and subsurface. For example, if two cell types, 4 and 5,
were used for the subsurface, then the cell classification produced would be as
follows:

Cell type 1: Outside cells


Cell type 2: Inside cells
Cell type 3: Indeterminate cells
Cell type 4: Intersecting cells
Cell type 5: Intersecting cells

Note that since cell types 1, 2 and 3 are automatically assigned to external, internal
and indeterminate cells, they should not be used for surface and subsurface shell
types. Indeterminate cells are those which the meshing program could not clearly
determine whether they were inside or outside the classification surface.
The refinement process can be done automatically using options in the
Refinement Properties panel shown below:

Figure 6-21 Classified mesh refinement options

In this panel, cell types to be refined are entered in the Value box and the
appropriate Level and Grow values are set. The values are automatically applied
when the Close button is pressed.
In the Classify Cells panel, refinement is initiated by pressing the Refine button.
The Module will proceed to refine the indicated cells and also connect them to the
coarse base mesh. The classified/refined mesh will then be placed under the
Custom Mesh DBID identifier. It is automatically stored as a STAR-type mesh.
The above process can be used for any suitable subsurface definition, even those
with a variable subsurface depth. Cell layers are extruded back as normal after the
trimmed-cell volume mesh has been created. Cell couples are automatically created

6-18 Version 3.26


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Trimmed-Cell Volume Meshes

for areas where coarse and fine cells are extruded side by side.
This method is also suitable for refining solution domain regions where a higher
cell density is needed away from the walls. The relevant panel is accessed from
Prepare Custom Mesh > Additional Tools and is shown in Figure 6-22 below.
Alternatively, the CMREFINE command or the “Refine” STAR GUIde panel (see
also Chapter 4, “Mesh Refinement” in the User Guide) can be used to refine any part
of the grid (including the trimmed cells) at any point after the volume mesh and
extrusion layers have been created. This process can also maintain surface
definition due to improved volume discretisation.

Figure 6-22 Volume cell refinement options

Automatic mesh refinement and classification (template generation)


The AutoMesh Module also contains an automatic mesh refinement option,
whereby the classified refined mesh is automatically created on the basis of certain
elementary surface properties. This feature can be accessed via the Prepare
Custom Mesh > Template Generation panel, as shown in Figure 6-23.

Version 3.26 6-19


AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Trimmed-Cell Volume Meshes

Figure 6-23 Auto refine template generation properties

The refined classified mesh produced by this panel is called a Template Grid and is
stored under database entry 12 (not 11) by default. It does not differ in any way from
a refined classified mesh created via the user-based method described previously,
except that it requires no user interaction.
The panel represents the most efficient and highest quality method of building a
trimmed-cell mesh. For this reason, it is used as part of the default methodology of
the Mesh Wizard and is also recommended for general usage when employing the
AutoMesh panels to create a grid.

Basic template mesh generation options


The Template Generation panel allows the following operations to be carried out:

6-20 Version 3.26


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Trimmed-Cell Volume Meshes

Output Option Action Description Dbase


Template Only Generate a refined mesh without classification 12
cell table types
Classified Generate a refined mesh with classified cell table 12
Template types for the intersecting cells (inside/outside
cells are the same type)
Classified with Generate a refined mesh with classified cell table 12
Sidedness types for the intersecting and inside/outside cells

The above operations are carried out based on the surface or subsurface given by
the Surface DBID setting and produces a mesh in the Output DBID. For the
Classified Template case, note that the output mesh distinguishes only the
intersecting from the non-intersecting cells. i.e. the inside and outside cells are not
differentiated in any way. This is designed to aid users wishing to perform
trimmed-cell computations in parallel (see “Parallel processing with custom
meshes”).
The basic parameters controlling the level of refinement and classification are
discussed below.

Cell size at surface


This is the most important value supplied by the user to set the density of the volume
grid next to the surface. Note that this should not be the same as the size of the
smallest feature on the surface, but an average value that you wish to use for most
of the grid next to the surface.
Maximum cell size
( n–1 )
The Maximum Cell Size is a 2 multiplier of the Cell Size at Surface setting.
This is the starting cell size used by the template generator, which is gradually
refined to reach the desired surface value. The default value is 4× (i.e. n = 4) the Cell
Size at Surface, but can be increased or decreased within the range
1× < CSS < 12×.
Minimum cell size
( n–1 )
The Minimum Cell Size is a 2 divisor of the Cell Size at Surface setting. This
value will be used by the template generator to help determine the smallest cell size
to be used for small features that exist on the surface, based on the local settings
described below. The default value is the Cell Size at Surface /3 (i.e. n = 3) but can
be adjusted within the range /1 < CSS < /12.
Threshold
By default, the Threshold option is not activated as part of the template generation
process. This option should only be used if the trimmed-cell mesh created from a
template based on the normal surface proximity and curvature options contains
unresolved cells.
When this feature is turned on (by selecting a cell size), it allows the template
generation process to perform additional levels of refinement in areas of high
complexity that are the most likely cause of unresolved cells. The refinement cell
Version 3.26 6-21
AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Trimmed-Cell Volume Meshes

size is allowed to decrease to the specified level set for the Threshold option,
overriding the minimum cell size set in the panel.
It is recommended that you start with a threshold value of one level beneath the
minimum cell size and re-run the template and trimmed-cell mesh generation
process. If the resulting mesh still contains unresolved cells, additional levels of
refinement can be specified and the process repeated until the unresolved cell count
is reduced to zero.
Min. points around a circle
This is the minimum number of cells that will be created around cylindrical
elements of the surface shape. However, the refinement cell size is not allowed to
drop below the Minimum Cell Size value to achieve this.
Min. number of points in a gap
This setting determines the minimum number of cells placed between two surface
elements that are in close proximity to each other. However, the cell size cannot go
below the value set by the Minimum Cell Size. A value of ‘0.2’ for the Min
Number of Points in a Gap will produce up to five cells where possible.
Min number of points between edges
This setting determines the minimum number of cells occurences where two edge
lines are in close proximity to each other. Where two parallel edge lines are seen to
cut through the same cell, the cell will be refined to ensure that the minimum
number set is maintained. As in the previous two settings above, the minimum cell
size is not allowed to go below the Minimum Cell Size value.

Once the above settings have been reviewed and altered if desired, the Generate
Template button can be pressed and the Module will proceed to build an
appropriate template and place the result in the Output DBID database entry. You
should review the template mesh carefully and decide if it is suitable for further use
in the trimmed-cell mesher or if the settings need to be tweaked in order to further
improve the result. Use of the advanced template generation options are also
advised at this stage in order to provide a higher quality grid.

Advanced template generation options


Advanced options that can be included as part of the template generation are
discussed below. In general, they allow more detailed control over the refinement
process, especially when the starting surfaces have been identified using different
cell table types.

Local surface properties


The local surface property settings enable you to input specific refinement cell
lengths that will always be maintained for a given surface/subsurface cell table type.
These settings will override any values set in the basic panel and therefore permit
direct control of the resulting template quality. The settings are similar to the ones
used for defining the surface refinement for the surface wrapping scheme.
To specify local surface properties, the Settings... button should be pressed to
bring up the Local Surface Properties panel, shown in Figure 6-24.

6-22 Version 3.26


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Trimmed-Cell Volume Meshes

Figure 6-24 Local Surface Properties panel

In the above panel, you should first activate an entry by selecting an Active Entry
button and entering a Description of the refinement item if desired. Next, the
surface/subsurface Cell Type(s) or Group(s) can be chosen from the Select menu.
The appropriate cell type(s) or group(s) are entered in the Type/Group box,
separated by a comma if more than one is used. Alternatively, the Pick button can
be used to pick specific shell surfaces if the surface or subsurface mesh of interest
is currently loaded and displayed on screen.
The Option parameter allows a specific type of operation to be selected — the
options are as follows:

Feature Size — Specific cell size to be used


Gap Size — Used for surface wrapper refinement only
Gap and Feature Size — Used for surface wrapper refinement only
No. Points Around a Circle — Min. number of cells around a cylindrical shape
No. Points in a Gap — Minimum number of cells in a gap
No. Points Between Edges — Minimum number of cells between edge lines
Minimum Cell Size— Alternate minimum cell size

The specific value to be used for the selected surfaces/subsurfaces can then be set
using the predefined range in the Value pop up. The values listed are based on the
Cell Size at Surface parameter, which must first be set in the main Template
Generation panel. The Action option allows you to temporarily disable the settings
while still maintaining the values in the panel for future use.
Any combination of valid local surface properties can be set for each cell table
type that exists on the surface/subsurface. To apply the settings, press the Close
button and check that the correct number of active settings appears in the main
Template Generation panel. The Generate Template button can then be pressed
to start the process.

Volume-based refinements
The volume-based refinement settings enable you to specify refinement zones as
having a specific template cell size and are defined by minimum and maximum X,
Y and Z values. These settings will override any values set in the basic panel and
therefore allow direct control of the resulting template quality.
To specify volume based properties, the Settings... button should be pressed to
bring up the Volume Refinements panel, shown in Figure 6-25.
Version 3.26 6-23
AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Trimmed-Cell Volume Meshes

Figure 6-25 Volume Refinements panel

In the above panel, first activate an entry by selecting an Active Entry button. Next,
a descriptive name of the region/zone of interest can be entered in the Description
box. The cell size to be specified is then selected from the Size pop-up menu. The
values listed are based on the Cell Size at Surface parameter, which must first be
set in the main Template Generation panel.
The region/zone minimum and maximum X, Y and Z values should then be
entered in the appropriate boxes — all six values must be supplied for a valid
definition. The Plot button can be used to check if the desired geometry range was
entered correctly. The displayed plot will depend on which of the database entries
is currently loaded into the working space. If you specify two volume ranges that
intersect in space but have different cell sizes, the smaller of the two sizes will be
used for the intersecting volume. To apply the settings, press the Close button and
check that the correct number of active settings appears in the main Template
Generation panel. The Generate Template button can then be pressed to start the
process.

Transition growth
The transition growth determines the number of neighbouring cell layers that are
refined at each level of refinement within the template mesh. By default, a single
layer of coarse cells is refined to acquire a finer mesh and the process repeated until
the specified panel requirements are met or until the maximum number of levels is
reached.
The template mesh has a default total of five refinement levels, set within the
range of maximum and minimum cell size in the main panel. For example, the
default Cell Size at Surface of ‘8’ will produce refinements with cell sizes varying
from 64 to 2 over five distinct levels (64 > 32 > 16 > 8 > 4 > 2). To alter the amount
of refinement (i.e. neighbouring cell layers) per level, first set the maximum and
minimum cell size ranges and then press the Settings... button next to the
Transition Growth option. The Auto Refine Grow Propw panel shown in Figure
6-26 will then appear.

6-24 Version 3.26


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Trimmed-Cell Volume Meshes

Figure 6-26 Auto refine transition growth panel

The number of levels listed in the panel depend on the original range specified. The
Factor value should be set to an integer equal to the number of neighbouring cells
to be refined for each level. Pressing the Close button will apply the settings.

Including user meshes for template generation


To allow additional flexibility when using the auto refinement scheme, you can also
input your own hand-built custom mesh and have the Module refine it automatically
based on the supplied parameters. To do this, simply place a copy of the custom
mesh under database entry 11 (or some other convenient database entry), click
Advanced Options, select the Use Custom Mesh option on the Batch Options
panel and indicate the location of the custom mesh entry. The Module will then use
this grid as the basis for the template and not the default Cartesian-based block.
Note that a Cell Size at Surface parameter still needs to be supplied so that the auto
refinement parameters in the panel can take effect during the process. As a guide,
this value should be set to the average cell size in the custom mesh, if the size varies
(as it would, for example, in a cylindrical grid).
As for all custom meshes, the user grid should be composed only of hexahedral
cells. Should you wish to include refinement prior to the template mesh refinement
operation being performed, then only mid-point (2×2×2) cell subdivision should be
done.
Parallel processing with custom meshes
The AutoMesh Module allows a reduction in the memory requirements and/or a
parallel processing capability on single- and multi-processor shared-memory
machines when a custom mesh is used for trimmed-cell meshes. The process is
activated when the Custom Mesh DBID option is selected in the Generate Mesh
> Grid Generation panel, as shown in Figure 6-27.

Version 3.26 6-25


AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Trimmed-Cell Volume Meshes

Figure 6-27 Parallel processing option for trimmed-cell meshes

For a given shared-memory machine with one or more processors, the following
parameters can be set:
• No. Subdomains for Mesh Generation
• Number of Processors to Use
• Unclassified Cell Type(s)

These parameters allow the user to perform two types of operation, namely:
• The production of large (i.e. high cell count) trimmed-cell grids on single or
multi-processor machines where memory limitations would otherwise be a
factor
• The production of trimmed-cell grids on multi-processor machines while
utilising their parallel processing capability for reduced meshing time

The No. Subdomains for Mesh Generation setting controls the number of mesh
domains into which the custom mesh is split up. For example, for a single processor
machine, setting this to a value of 2 instructs the Module to perform the trimmed
mesh operation in two steps, working with one subdomain at a time. This reduces
the overall memory requirement to approximately half of that needed if the entire
domain was trimmed in one go (there is a slight overhead as the entire surface
description is stored for each subdomain). Additionally, if the custom mesh has
been classified and the Unclassified Cell Type(s) values have been entered (see
below for more details), an overall reduction in meshing time can be achieved as
compared to a single domain run for the same grid.
In the case of a shared-memory multi-processor machine, the Number of
Processors to Use could also be set in addition to the No. Subdomains for Mesh
Generation parameter. For example, on a four-processor machine, the Number of
Processors to Use could be set to any value from 2 to 4 to reduce the overall

6-26 Version 3.26


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Tetrahedral Volume Meshes

meshing time by the appropriate factor. For general use, it is recommended that the
No. Subdomains for Mesh Generation value should be the same as the Number
of Processors to Use value. However, the number of subdomains can be greater
than the number of processors if the memory requirements for the job need to be
further reduced on a per domain basis. Note that a separate ammbatch license is
required for each trimmed mesh process invoked when running in parallel. For
example, if the number of processors is set to 4 then four ammbatch licenses will
be needed for the process to work.
Both the above methods are dependent on the Unclassified Cell Type(s)
parameter being correctly set for optimum performance. By default, a custom mesh
created using the auto refine classified template approach described earlier will
result in a grid containing one cell table type, representing cells that do not intersect
the starting surface. This is known as the Unclassified Cell Type and the
appropriate value should be entered into the panel prior to any run. In the case of a
user-defined classified custom mesh, the Unclassified Cell Type(s) are always 1
and 2 by default, representing the outside and inside cells, respectively. Should you
wish to use your own hand-built custom mesh in conjunction with multi- subdomain
and/or parallel processing capability, it is recommended that the custom mesh be
classified first, again resulting in two cell types (1 and 2) being entered as the values
in this panel.
In all the above cases, the Module automatically assembles the trimmed-mesh
subdomains at the end of the process and places the result under the output database
entry. Since the classification process helps optimise the scheme’s performance, it
is not unusual to see superlinear speed-up when creating meshes using the parallel
processing capability. Note also that the mesh from a n-subdomain operation may
differ slightly from the one built using the default single-domain process.

Generation of Tetrahedral Volume Meshes


The current version of the AutoMesh Module contains a Delaunay-based
tetrahedral mesh generator. The Delaunay method relies on the quality of the initial
surface to produce a good quality volume mesh. The tetrahedral mesher can be used
instead of a normal trimmed-cell ‘adjust and cut’ process. However, as the mesh
quality is directly dependent upon the original reference surface quality, it is
recommended that you make use of various surface smoothing options and
triangulation tools available in the Prepare Surfaces panels. This means that if a
tetrahedral mesh is to be built from scratch, these processes should be incorporated
into the methodology in addition to the normal AutoMesh functions.
It is important to note that no change should be made to the subsurface mesh, as
it would invalidate the surface normal information that is used for extrusion later
on. Therefore, all surface smoothing and other surface modifications should be done
prior to the subsurface generation stage.
Tetrahedral mesh quality is judged by comparing the volume of each cell to the
volume of an ‘ideal’ tetrahedral cell. The latter is defined as the regular tetrahedron
that would fit within a sphere defined by the four corner points of the original
tetrahedral cell. Tetrahedral quality values range between 0.0 to 1.0, with 1.0
indicating the highest possible quality.
It is important to pay particular attention to this quality measure as it influences
the solver solution integrity. Therefore, a surface and volume smoother is

Version 3.26 6-27


AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Tetrahedral Volume Meshes

incorporated into the Module to aid the production of good quality meshes. These
smoothers should be used as part of the tetrahedral meshing procedure, as outlined
later in this chapter.
Surface preparation for tetrahedral meshes
Prior to using the tetrahedral mesher, you should ensure that the reference surface
or subsurface is
• properly oriented (with shell normals pointing outwards),
• completely closed, with one-to-one correspondence between shells,
• composed entirely of triangular facets.

If the normal AutoMesh methodology has been followed, the surface should satisfy
the above criteria by default (assuming no errors were made). The BAMM,SURF
operation can be used to triangulate a quad surface using a suitable length value if
required (see Chapter 4, “Quad morphing options”) and the subsurface generator
will triangulate the starting surface, if this has not already been done. It is not critical
to maintain line and point elements on the surface as the tetrahedral mesher will
preserve all surface detail as part of the meshing process (as long as no smoothing
is done).
A good quality surface is one that has the following properties:
• All triangular facets are equilateral
• The area variation from one facet to the next is gradual
• No more than ten elements are connected to the same vertex
• For parallel surfaces that are close together, the element sizes on both sides
should be comparable

You should ensure that the last criterion is met, by visual inspection of the
geometry, and should also refer to Chapter 4, “Surface Preparation” for additional
details.
Basic tetrahedral mesh generation
Once a suitable surface and subsurface have been prepared, the tetrahedral mesh
generators can be run using the GUI panel shown in Figure 6-28.

6-28 Version 3.26


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Tetrahedral Volume Meshes

Figure 6-28 Tetrahedral mesh generation panel

This panel is located under Generate Mesh > Grid Generation > Tetrahedral. As
normal, the surface and subsurface database entries are identified using the Surface
DBID and Subsurface DBID boxes respectively.
The default Delaunay mesher is a batch process and simply produces a volume
tetrahedral mesh based on the input surface. No additional options are required with
this technique. Pressing the Generate Grid button will execute the program and
produce a mesh whose cells are of the type indicated by the Cell Type entry. Prior
to generating the mesh, a series of surface checks are run in order to verify the
integrity of the input surface. These can be disabled by selecting the No Check
option for Check Surface.
Advanced options for the Delaunay tetrahedral mesher
The Conformal Mapping option, which is On by default, ensures that the resultant
tetrahedral volume mesh conforms directly to the starting input surface. This is
usually desirable in cases where a one-to-one face connection with neighbouring
meshes is required, but can result in the production of an inferior mesh as the cells
next to the surface are not modified in any way.
Turning the Conformal Mapping option off allows the AutoMesh Module to
Version 3.26 6-29
AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Tetrahedral Volume Meshes

“swap edges”. This is done in instances where the surface contains non-orthogonal
neighbouring tetrahedral shells whose common edge is such that it produces the
worst of the two possible pairs of shells. An example is shown below:

Figure 6-29 Surface tetrahedral cells with conformal mapping turned off

With conformal mapping turned off, a higher quality volume mesh will result but
its faces will no longer correspond directly to the starting input surface.
The Output Boundary Shells option can be activated in cases where the surface
shells are required on the core mesh. Selecting the Yes option will automatically
include shells corresponding to the subsurface cell table types as part of the core
mesh.
The Delaunay tetrahedral mesher allows the inclusion of internal features. The
term ‘internal feature’ should not be confused with the zero-thickness internal baffle
option described in Chapter 5, “Inclusion of Interior Zero-Thickness Baffles”. In
this case, internal feature refers to the ability of the mesher to place tetrahedral cells
directly onto the faces of shells representing the internal feature, without the need
for orthogonal near-wall layers. This is advantageous in certain circumstances, such
as porous/non-porous or rotating-stationary interfaces where a one-to-one
correlation of cells across the interface has to be achieved. Nevertheless, the option
can also be used to model internal baffles where the accuracy of turbulence
modelling next to the wall is not critical. An example is shown below:

Figure 6-30 Close up of internal feature tetrahedral meshing

To activate the internal feature option, the cell table type representing the internal
feature(s) in the surface/subsurface should be entered into the Internal Feature
Cell Type box or selected using the Pick button. Any number of cell types can be
specified and the internal feature can completely separate the solution domain into
two or more parts if desired.
The Delaunay batch mesher also includes a feature that allows the grid to be built
in separate (multiple) regions and have a different cell type automatically assigned

6-30 Version 3.26


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Tetrahedral Volume Meshes

to each region. This is useful in situations where identifying the different


components of a complex grid after meshing is complete would be difficult or
impossible. In the tetrahedral meshing panel shown in Figure 6-31, the feature is
activated by pressing the toggle button next to the Grid Multiple Regions button.

Figure 6-31 Activating the tetrahedral multiple regions option

The Grid Multiple Regions button can then be pressed to open the region Material
Properties panel shown below:

Figure 6-32 Tetrahedral multiple region settings

To use the multiple regions option, the surfaces must first be properly prepared such
that each region can be uniquely identified as a closed volume composed of one or
more shell types. Additionally, the starting cell table number for the shells used

Version 3.26 6-31


AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Tetrahedral Volume Meshes

must be greater than the total number of individual regions in the domain. For
example, if there are 3 distinct regions, the starting cell table id’s for shells on the
surface must be 4 or greater. The reason for this is that the fluid cell types created
(one cell type per region) will default to cell table types 1 through 3. Note that two
or more regions that share a common interface are allowed, as long as the interface
cell type is unique.
In the panel, you should identify each region in turn and list the appropriate shell
type or types (using Select option Cell Type(s)) that encloses the volume. All
regions covered by the surfaces must be entered into the panel. Pressing the Close
button applies the settings; pressing the Generate Grid button starts the process as
normal.
The final mesh will have all regions automatically coupled together but each will
be identified by a different cell table type. The original shells at the interface
between regions are also maintained in the final mesh as an aid to the selection of
domains.
Tetrahedral cell quality checking, re-meshing and smoothing
Once a tetrahedral grid has been created, you should note the quality of its
constituent cells. A summary is provided at the end of the batch log file produced
for the mesh generation process:

<----------------- MESH STATUS ---------------------->

points: 7806
tetrahedra: 40109
0.75 < TETQ < 1.00 17153 42.77%
0.50 < TETQ < 0.75 22703 56.60%
0.30 < TETQ < 0.50 252 0.63%
0.10 < TETQ < 0.30 1 0.00%
0.01 < TETQ < 0.10 0 0.00%
0.00 < TETQ < 0.01 0 0.00%
max_tetq 9.976e-001, min_tetq 2.852e-001, max_min_tetq 3.798e-001

The tetrahedral cell quality is defined by comparing the volume of a given cell to
that of the ‘ideal’ tetrahedral cell, as illustrated in Figure 6-33.

Vt Tet Quality = Vt / Vi

Vi Good Quality > 0.3


Bad Quality < 0.1

Figure 6-33 Definition of tetrahedral quality

6-32 Version 3.26


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Tetrahedral Volume Meshes

The quality range is between 0 and 1, with 1 being the best possible result. You
should aim to get all cells to have a quality level above 0.3. This can be done using
the Generate Mesh > Mesh Tools > Improve Tetrahedral Grid panel shown
below:

Figure 6-34 Tetrahedral checking, fixing and smoothing panel

Pressing the Plot Quality Bar Graph button will automatically display a bar graph
of the overall tetrahedral cell quality in the grid. A range of ten quality levels
between 0 and 1 is used to establish the overall quality of the grid, as shown in the
example of Figure 6-35.

Version 3.26 6-33


AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Tetrahedral Volume Meshes

Figure 6-35 Example quality distribution for tetrahedral mesh

To identify the worst-quality cells, say those with a quality measure below 0.1, enter
the value in the Quality Limit box and then press the Check button on the panel,
or issue commands:
cset,news,tetra
check,cset,,tetq,0.1,news
cplot

To re-mesh the volume which contain these cells, press the Fix button, or issue
commands:

ctab,5,fluid,2
vset,news,cset
cset,news,vset,any
cset,subs,tetra
tetgen,size

This will automatically delete the bad-quality cells and re-mesh the internal volume
using the normal meshing procedure. The new cells created will have cell type 5.
The newly re-meshed volumes should then be smoothed — note that there is no
need to smooth the entire grid at this point, only the areas where low quality regions
exist. In the panel, press the Smooth button or issue commands:

cset,news,type,5
vset,news,cset
cset,news,vset,any

6-34 Version 3.26


Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Hybrid Volume Meshes

cset,subs,tetra
tetgen,smooth,10

The Check operation can then be performed again to find any remaining
bad-quality cells. It is recommended that the lowest cell quality allowable in the
grid should be around 0.3. Once the highest quality mesh has been obtained, place
it back into the database.
Prismatic extrusion layers can then be generated in the normal way from this
mesh, as for any other type of AutoMesh volume grid.

Generation of Hybrid Volume Meshes


The hybrid mesher is a combination of existing methodologies to create a new
meshing technique. In its basic form, a hybrid mesh consists of a core of hexahedral
cells surrounded by a wrap layer of tetrahedral cells. Pyramidal cells are used in the
transition area between the hexahedral and tetrahedral cells. Prismatic near-wall
layers can also be added into the mesh using the normal methodology within the
Module. The resulting mesh is a high-quality amalgamation of common CFD finite
volume cells with a predominantly hexahedral core.
An example section through a hybrid mesh is shown below:

Prismatic Extrusion
Layer

Tetrahedral Fill

Pyramid Transition
Layer

Core Hexa Cells

Figure 6-36 Example section of hybrid mesh with near-wall layers

Surface preparation
The surface preparation criteria applicable to hybrid meshes are similar to those for
tetrahedral meshes. In short, this means that the bounding surface should be
• fully oriented (with shell normals pointing outwards),
• fully closed, with one-to-one correspondence between shells,
• composed of triangular elements.

To aid the tetrahedral mesh generation process, it is recommended that the surface

Version 3.26 6-35


AUTOMESH VOLUME MESH GENERATION Chapter 6
Generation of Hybrid Volume Meshes

element size should be of the same order as the hexahedral core cell length. Large
surface-element-size to core-cell-length ratios can result in problems such as badly
defined cells or no cells at all.
Chapter 4, “Surface Preparation” contains additional advice on this topic.
Hybrid mesh generation
Once the surface and subsurface have been suitably prepared, the hybrid mesh
generator can be used. The options for it are accessed via the Generate Mesh >
Grid Generation > Hybrid panel shown below:

Figure 6-37 Hybrid meshing panel

To create a hybrid mesh, specify the following:


• The surface and subsurface database entries, identified using the Surface
DBID and Subsurface DBID boxes, respectively.
• The Core Cell Size, referring to the edge length of the hexahedral cells used
for the core. It is recommended that you select a size of approximately the
same magnitude as the average edge length of the starting surface triangles.
• The Gap Fill Ratio, a value in the range 1.3 to 2.0. The lower the value the
smaller the gap between the starting surface and core cells, which will result
6-36 Version 3.26
Chapter 6 AUTOMESH VOLUME MESH GENERATION
Generation of Hybrid Volume Meshes

in fewer tetrahedral cells being produced. The default value of 1.3 will
produce the smallest possible gap.

The Generate Grid button can then be pressed to perform the operation. When the
process is complete, the Module will save a copy of the mesh under the output Grid
DBID database entry.
Although the hybrid meshing technique can be used for virtually all types of
application, there is little or no gain in using it for long, thin geometries where a low
cell count is desired. You should also note that the ‘internal feature’ capability of
the tetrahedral mesher is not retained in the hybrid mesher.
Cell quality checking, re-meshing and smoothing
The quality requirements for tetrahedral cells also apply to hybrid meshes.
However, due to the fact that a hybrid mesh is closely constrained on all surfaces,
the resulting tetrahedral quality distribution will not be as good as for the equivalent
all-tetrahedral mesh. A typical quality distribution is given below:

Figure 6-38 Example quality distribution for tetrahedral cells in a hybrid mesh

Further information may be found in the “Tetrahedral cell quality checking,


re-meshing and smoothing” notes in the “Generation of Tetrahedral Volume
Meshes” section of this chapter.
Prismatic extrusion layers can then be generated in the normal way from this
mesh, as for any other type of AutoMesh volume grid.

Version 3.26 6-37


Chapter 7 AUTOMESH EXTRUSION LAYER GENERATION AND ASSEMBLY
Creation of Extrusion Surface

Chapter 7 AUTOMESH EXTRUSION LAYER GENERATION


AND ASSEMBLY
The extrusion layer generation stage is the last part of the AutoMesh methodology.
It is a two-step process that involves first creating the surface for extrusion and then
the extrusion volume layer itself. Both steps are explained below, as well as how the
final model is assembled at the end.

Creation of Extrusion Surface


The cell faces to be extruded must first be identified on the inner mesh. There are
two ways in which this can be done using the Generate Mesh > Extrusion Layer
> Create Surface to Extrude panel shown below:

Figure 7-1 Identification of extrusion surface options

The two methods are selected from the Method pull-down menu.

Method 1 — Entire surface


Choosing this option and pressing the Create Surface button will create shells with
cell table index Cell Type for any external surface bounding the current mesh
Version 3.26 7-1
AUTOMESH EXTRUSION LAYER GENERATION AND ASSEMBLY Chapter 7
Extrusion Layer Generation

volume. Surfaces that do not require extrusion layers do not need to be deleted as
long as the No Extrusion Cell Type(s) option is specified (see section “Extrusion
Layer Generation” for more details). In other words, as long as the default
AutoMesh methodology is followed, you do not need to remove shells
corresponding the No Subsurface Cell Type(s) in the Subsurface panel (see
Chapter 5, “Basic Subsurface Generation”); the software accounts for them
automatically.
If you do decide to remove the unwanted surfaces, these can be deleted by using
the Surface Cleanup tools in the Prepare Surfaces > Surface Tools panel.

Method 2 — Pick surface


This option allows individual surfaces to be created on the basis of an edge angle
specification. On pressing the Create Surface button, the cursor enables you to
choose a seed vertex from which the surface will grow outwards until an edge
greater than the specified edge angle is reached. This option can be repeated as
many times as necessary in order to build up a complete description of the extrusion
surface.
Once the extrusion surface has been defined, the Save Surface button should be
pressed in order to place its shells into the database. This function should always be
performed using this button as the database also requires information relating to the
highest vertex number created so far. Identifying the largest vertex number in the
cell set ensures that no duplicate vertices will be created in the extrusion mesh. This
in turn means that no vertex merging will be required when the extrusion layer and
volume mesh are combined.
Extrusion Surface Checking
The extrusion surface should be visually checked to make sure there are no holes in
areas where you do not expect them. You should also check that there are no
unexpected disconnected internal surfaces, which will cause problems during cell
layer extrusion. Pressing the Check Surface button on the panel will aid you in this
task.

Extrusion Layer Generation


Once the extrusion surface has been created, checked and saved, you can proceed
to the extrusion layer generation step. The Generate Mesh > Extrusion Layer >
Extrusion Layer Generation panel shown in Figure 7-2 can be used to do this.

7-2 Version 3.26


Chapter 7 AUTOMESH EXTRUSION LAYER GENERATION AND ASSEMBLY
Extrusion Layer Generation

Figure 7-2 Extrusion layer generation options

In this panel, the Surface DBID and Subsurface DBID are identified as normal.
The Extrusion Surface DBID is the database entry that contains the extrusion
surface created during the previous step. Next, the desired number of extrusion
layers can be entered in the No. Layers box — any integer equal to or greater than
1 is allowed.
A non-uniform fill ratio can also be specified using Fill Option Ratio on the
panel. The number in the Value box is the ratio between the last and first layer
thickness. Values less than 1.0 produce layers that are thinner next to wall —
suggested values are in the range 0.5 to 0.9. The default value of 1.0 will produce
equal-thickness layers.
Alternatively, you can select the Wall Thickness option for Fill Option, as
shown in Figure 7-3.

Version 3.26 7-3


AUTOMESH EXTRUSION LAYER GENERATION AND ASSEMBLY Chapter 7
Extrusion Layer Generation

Figure 7-3 Fill options for extrusion layer generation

The Wall Thickness option enables you to specify the thickness of the layer nearest
the wall directly, so as to accurately maintain a uniform near-wall layer for
turbulence and heat transfer modelling (regardless of whether a variable thickness
was used). The remaining layers (should there be more than two in total) will have
a non-uniform ratio applied to them by default, based on the supplied thickness
value. The Wall Thickness Value should not exceed the total subsurface layer
thickness divided by the number of layers. If a value greater than this is supplied,
the Module will automatically limit it to this maximum and apply a uniform ratio to
any additional layers.
If you specify No Subsurface Cell Type(s) shell surfaces during the subsurface
generation step, the same cell table types will also appear for the No Extrusion Cell
Type(s) option. This information enables the Module to ignore the corresponding
surfaces on the extrusion surface so that no extrusion layers are generated for them.
If you decide to delete these surfaces during the extrusion surface creation step, the
No Extrusion Cell Type(s) option can be deactivated or left unspecified.
Once the above information has been entered, the Extrude button can be pressed
to execute the process. When the process is complete, the Module will return with
an extrusion mesh which can be loaded into the database. This mesh should then be
checked as described below.
Inclusion of layers for internal baffle walls
If you select the internal Baffle Cell Type option during the subsurface generation
step (see Chapter 5, “Inclusion of Interior Zero-Thickness Baffles”), it is essential
that the same cell table values are specified in the Baffle Cell Type(s) box of the
Extrusion Layer Generation panel used for the extrusion process. This instructs
the Module to expect to generate cell layers next to any internal walls present in the
domain based on the extrusion surface. Note that no additional modification of the
extrusion surface is required.

7-4 Version 3.26


Chapter 7 AUTOMESH EXTRUSION LAYER GENERATION AND ASSEMBLY
Extrusion Layer Generation

The zero-thickness walls (baffles) created using the above process may only
have limited functionality depending on user needs. If a tetrahedral mesh was
constructed as the main volume mesh, the extrusion process will produce layers that
meet at the interface, having coincident vertices to within a given tolerance. The
extrusion process does not merge these vertices by default, so the volume mesh is
left disconnected at the interface with any internal features. If not merged, these will
be treated as impermeable walls by the STAR-CD solver. Should you decide to
merge them (using the VMERGE command), the mesh will be connected at the walls
and baffle cells can be inserted, which will allow additional modelling capabilities
such as permeability and heat transfer to be included.
For the case of a trimmed-cell mesh, you are limited to the impermeable wall
option as the process does not ensure vertex compatibility on either side of the
interface. This restriction will be lifted in future releases of the Module.
Local surface property settings
An additional level of control on the extrusion layers is provided via the Local
Surface Properties option, shown below:

Figure 7-4 Activation of local surface properties for extrusion

On activating this option and pressing the Settings button, the Extrusion Layer
Properties panel shown in Figure 7-5 will appear.

Version 3.26 7-5


AUTOMESH EXTRUSION LAYER GENERATION AND ASSEMBLY Chapter 7
Extrusion Layer Generation

Figure 7-5 Specification of local surface extrusion layer properties

By having one or more cell table types or groups that correspond to the
surface/subsurface shell types, you can specify alternative extrusion layer
properties that vary from one part of a surface to the next. These are:

# Layers Number of layers


Wall Size Thickness of layer next to the wall
Ratio Non-uniform fill ratio for remaining layers

Note that you need only supply the # Layers value and either one of the Wall Size
or Ratio values. The Module will then calculate the missing value automatically
based on the supplied parameters, in accordance with the earlier descriptions of the
Ratio and Wall Thickness settings. Should you supply both Wall Size and Ratio
values, the Wall Size setting will be the one used.
Any settings specified for the above will override the general settings in the main
panel. Since the number of layers, ratio and/or wall thickness in one grid region
could be different to that in a neighbouring region, cell couples are automatically
created between the different parts of the grid. The extrusion process also
automatically accounts for changes that may occur in regions where a variable
subsurface depth has been used as well. An example grid showing some of the
different extrusion options is shown below:

ELP panel: Default panel: ELP panel: Normal


Variable Layers = 2 Layers = 3 Thickness
Subsurface Layers = 4
Wall Size = 0.5 Ratio < 1.0 Ratio < 1.0

Cell Type #1 Cell Type #2 Cell Type #3

Figure 7-6 Use of local surface properties for extrusion layer generation

7-6 Version 3.26


Chapter 7 AUTOMESH EXTRUSION LAYER GENERATION AND ASSEMBLY
Mesh assembly

Advanced options
Advanced batch command options for extrusion layer generation can be input by
pressing the Advanced Options button to bring up the Extrusion Process tab
shown below:

Figure 7-7 Advanced options for extrusion layer generation

Appendix B contains additional information on the relevant batch commands for


this process.
Extrusion Layer Checking
Extrusion layers should be subjected to the checks in the Cell Quality Checks
panel. Any badly defined cells or cells with negative volume must be fixed before
proceeding to the final stage.

Mesh assembly
The volume mesh and extruded layers can be assembled using the Assembly >
Assemble Model panel shown in Figure 7-8.

Version 3.26 7-7


AUTOMESH EXTRUSION LAYER GENERATION AND ASSEMBLY Chapter 7
Exporting Grids from pro-STAR

Figure 7-8 Final mesh assembly panel

The panel’s default options should be set so that all that is required is to press the
Assemble button. The Module will automatically extract the volume and extruded
mesh from the indicated database entries and then combine them. A copy will also
be saved under the database entry indicated by the Output - Assembly DBID value.
Vertices in the final grid are automatically merged as their offset values are
preserved as part of the process. The mesh is now complete and ready for use in a
STAR-CD analysis or exported (see below) for use with the other solvers offered
by CD-adapco.

Exporting Grids from pro-STAR


pro-STAR’s NGEOM command can be used to export a trimmed-cell, tetrahedral or
hybrid mesh to any of CD-adapco’s solvers using the faced-based CCM file format.
An example command set that will produce a file called casename.ngeom
containing the grid is given below:

dbase,get,23
ngeom,casename.ngeom,,ccm+

7-8 Version 3.26


Chapter 7 AUTOMESH EXTRUSION LAYER GENERATION AND ASSEMBLY
Exporting Grids from pro-STAR

Note that the .ngeom file supports boundary region definitions, so boundary
conditions can be applied to the grid and re-saved in the database (which also
supports boundaries) before being converted.
Additional information on the NGEOM command can be obtained by issuing
comand HELP, NGEOM in the pro-STAR I/O window.

Version 3.26 7-9


APPENDIX

APPENDICES

VERSION 3.26

CONFIDENTIAL — FOR AUTHORISED USERS ONLY

© 2005 CD-adapco
Appendix A CELL LIBRARY

Appendix A CELL LIBRARY


The CDX command can be used to create any of the four ‘normal’ STAR cell shapes
— hexahedron, prism, pyramid or tetrahedron — or any of the six trimmed cell
shapes (shapes 1, 2, 3, 4, 5 and 8). This is done by using the screen cursor to pick
existing vertices in a particular sequence and define the required cell shape. The
new cell created will have the cell type currently set using the CTYPE command.
Shown in the table below is a summary of the command operations, plus some
look-up values for cell parameters that are useful for mesh fixing.

3 4 5 6
Cell Shape Command Vertices Edges Faces → Edges Edges Edges Edges
Hexahedron cdx hexa 8 12 6 – 6 – –
Prism cdx prism 6 9 5 2 3 – –
Pyramid cdx pyra 5 8 5 4 1 – –
Tetrahedron cdx tetra 4 6 4 4 – – –
Shape 1 cdx trim 1 10 15 7 1 3 3 –
Shape 2 cdx trim 2 10 15 7 – 5 2 –
Shape 3 cdx trim 3 10 15 7 1 3 3 –
Shape 4 cdx trim 4 10 15 7 3 – 3 1
Shape 5 cdx trim 5 8 12 6 2 2 2 –
Shape 8 cdx trim 8 12 18 8 – 6 – 2

The sequence of vertex selections for each type of cell shape listed above is shown
in Figure 1-1 and 1-2 on the next two pages. This sequence must be strictly adhered
to at all times in order to create a valid cell. Degenerate cell shapes, where certain
vertices of a cell are collapsed onto other neighbouring vertices, can also be created
and are shown on the remaining Figures. These cells are always such that no single
face has been collapsed in their formation.
The reason for using command CDX is that the user may have to fix unresolved
cells created by the AutoMesh module during the trimmed-cell cutting process. The
quickest way of doing this is by using the CDX command buttons included in the
AutoMesh panel.

Version 3.26 A-1


CELL LIBRARY Appendix A

7 5

8 6

3 3

4 2 4 2

1 1

CDX HEXA CDX PYRAMID

6 4

3
2 4 2

1 1
CDX PRISM CDX TETRA
Figure 1-1 CDX mouse click patterns for normal STAR cells

A-2 Version 3.26


Appendix A CELL LIBRARY

8 8
9 9
10 6 7
10 6 7

5
3 3
4 4
2 2
5 1
1
CDX TRIM 1 CDX TRIM 2

9 8
7
10 7
6

8 3
5 6
3 4
4 2
2 5 1
1 CDX TRIM 5
CDX TRIM 3
11 10
2
6 5 12
9
7 8

7
10
5 4
1
3 6
4 3
8 9 1 2
CDX TRIM 4 CDX TRIM 8

Figure 1-2 CDX mouse click patterns for trimmed cells

Version 3.26 A-3


CELL LIBRARY Appendix A

7 7

8 6 8 6
5

3 3

4 2 4 2

1 1,5

8 6 8

3,7
3,7

4 2 4 2,6

1,5 1,5

6
3
3

5 5,6

2 4 2 4

1 1
Figure 1-3 Degenerate cells for hexahedral and prismatic elements

A-4 Version 3.26


Appendix A CELL LIBRARY

8 8

9 7 9 6,7
10 6 10

5 3 3
5

4 2 4 2

1 1

8 8

9,10 6,7 9,10 6,7

3 3
5

4 2 4 2

1 1,5
Figure 1-4 Degenerate cells for Shape 1 elements

Version 3.26 A-5


CELL LIBRARY Appendix A

8 8

9 7 9 7
10 6 10 6

3 3

4 2 4 2

5 1
1,5
= TRIM 1

8 8

9,10 7 9,10 6,7


6

3 3

4 2 4 2

5 1 5 1
Figure 1-5 Degenerate cells for Shape 2 elements

A-6 Version 3.26


Appendix A CELL LIBRARY

8 8
9 7 9 7

10 6 10 6

5 3 3

4 2 4 2

1 1,5

8 8
7

6 9,10 6,7
9,10

5 3 5 3

4 2 4 2

1 1 = TRIM 1
Figure 1-6 Degenerate cells for Shape 3 elements

Version 3.26 A-7


CELL LIBRARY Appendix A

2
6 5

7 10
1

3 4
8 9

2 2
5

6,7 10 5,10
1 6,7 1

3 4 3 4
8 9 8 9
= TRIM 2
Figure 1-7 Degenerate cells for Shape 4 elements

A-8 Version 3.26


Appendix B AUTOMESH BATCH COMMANDS
Batch Commands for Surface Generation

Appendix B AUTOMESH BATCH COMMANDS


The batch commands currently available in the autimatic meshing module are
split into the following groups:
• Surface Generation
• Subsurface Generation
• Classification and Refinement
• Volume Mesh Generation
• Extrusion Layer Generation
• General Run Time Options

The user is referred to Chapter 3, “Adding Batch Commands”, for further


advice on how these should be implemented.

Batch Commands for Surface Generation


-edge-angle=angle
When processing a surface, add an edge when the angle (in degrees) between
surface shells is at least the specified angle, and add a corner when exactly
three edges meet. This option can only be used if the new surface is to be
output.
-good-surface
Using this option is the same as specifying -no-normal-check and
-no-surface-check.
-input-surface-database=filename,id
This parameter is used to identify where the surface information is located.
filename is the name of a database file and id is the database id of the surface
mesh.
-input-surface-files=vertfile,cellfile
This parameter is used to identify the files that contain the surface vertex and
cell information.
-no-normal-check
-no-surface-check
Use these two options together when the surface is not completely closed and
connected. -no-surface-check turns off checking of the surface topology and
-no-normal-check turns off the process that makes all surface shells have
consistently defined outward-pointing normals.
-output-surface-database=filename,id
When ammbatch generates surface edges, they are generally more than you
would want due to the discretisation of the model surface. As an aid to seeing
what edges and corners have been generated by the program, which only
occurs if the -edge-angle option has been used, and to give you a chance to
change them, this option allows the surface definition to be output. filename
is the name of a database file and id is the database id for the surface mesh.
The default is not to output the surface.

Version 3.26 B-1


AUTOMESH BATCH COMMANDS Appendix B
Batch Commands for Subsurface Generation

-output-surface-files=vertfile,cellfile
When ammbatch generates surface edges, they are generally more than you
would want due to the discretisation of the model surface. As an aid to seeing
what edges and corners have been generated by the program, which only
occurs if the -edge-angle option has been used, and to give you a chance to
change them, this option allows the surface definition to be output.
ammbatch does not check to see if these files exist before writing to them, so
it will overwrite information in existing files. The default is not to output the
surface.
-set-operation-perturb-factor=value
Perturbation factor for the Boolean surface volume intersection scheme.
Values should be in the range 0.0 to 1.0e-6. See Chapter 4, “Surface
Preparation”, for additional details on the -set-operation options.
-surface-only
After the surface has been processed, output the surface and exit ammbatch.
For this option to work correctly, either the -output-surface-database or
-output-surface-files parameter must be set. The default is for the program to
continue after the surface has been processed.
-surface-intersection
Checks to see if the surface intersects itself. The default is not to check.

Batch Commands for Subsurface Generation


-input-subsurface-database=filename,id
Subsurface generation can take quite a bit of time, but you can increase the
processing speed if the subsurface is saved between batch runs. This option
tells ammbatch to read the subsurface from the indicated database file
filename and database id of the subsurface mesh, instead of generating it.
While it is true that the -extrusion option must be set for this option to have
any meaning, it is also true that the extrusion parameters are used when the
subsurface is generated. This means that they will be ignored in a run where
the subsurface is read in. Make sure that the subsurface you specify matches
the extrusion parameters you want to use. The default is to generate the
subsurface, not to read it.
-input-subsurface-files=vertfile,cellfile
Subsurface generation can take quite a bit of time, but you can increase the
processing speed if the subsurface is saved between batch runs. This option
tells ammbatch to read the subsurface from the indicated files instead of
generating it. While it is true that the -extrusion option must be set for this
option to have any meaning, it is also true that the extrusion parameters are
used when the subsurface is generated. This means that they will be ignored
for a run where the subsurface is read in. Make sure that the subsurface you
specify matches the extrusion parameters you want to use. The default is to
generate the subsurface, not to read it.
-no-subsurface-type=type
When generating a trimmed cell mesh, the Module assumes that there will be

B-2 Version 3.26


Appendix B AUTOMESH BATCH COMMANDS
Batch Commands for Subsurface Generation

an extrusion layer for all cell surfaces. If there is a surface for which you do
not want an extrusion layer, you must identify its cells with a unique cell type.
Utilize this option to tell ammbatch which cell type does not have an
extrusion layer. You can use this parameter many times to identify different
cell types that do not have extrusion layers.
-offset-surface-eps=eps
This parameter affects the single-value decomposition routine used during
generation of the subsurface (method 4). Modifying it can rectify spurious
vertex placements on the subsurface. The default value is 0.15. Values
between 0.20 and 0.01 can be useful. Only use this parameters if there are
spuriously-located vertices in your mesh that are also on a surface edge.
-output-subsurface-database=filename,id
Subsurface generation can take quite a bit of time, but you can increase the
processing speed if the subsurface is saved between AutoMesh runs. This
option allows the subsurface to be written after it has been generated.
filename is the name of a database file and id the database id for the
subsurface mesh. The -extrusion option must be set for this option to have
any meaning. The default is not to output the subsurface.
-output-subsurface-files=vertfile,cellfile
Subsurface generation can take quite a bit of time, but you can increase the
processing speed if the subsurface is saved between AutoMesh runs. This
option allows the subsurface to be written after it has been generated and
identifies the files to which the information will be written. The -extrusion
option must be set for this option to have any meaning. ammbatch does not
check to see if these files exist before writing to them, so it will overwrite
information in existing files. The default is not to output the subsurface.
-remove-subsurface-loops=value
Removes self-intersection of the subsurface by moving the vertices in the
intersection onto the intersection line. This helps eliminate the production of
unresolved cells later on when the subsurface is used for trimmed cell
meshing. If value=1, only non-planar intersection regions are considered. If
value=2, non-planar intersection regions and zero-degree angle edges are
considered.
-subsurface-displacement
Outputs the subsurface displacements into file
subsurface_displacements.usr.
-subsurface-compatibility
When this option is specified, the subsurface generation algorithm will check
to see if the subsurface intersects itself or if the local radius of curvature is
smaller than the extrusion layer thickness. In these places, the subsurface
depth is reduced so that a valid, non-intersecting subsurface is generated.
-subsurface-factor=factor
This parameter specifies the thickness of the extrusion layer by providing the
distance between surface and subsurface. The distance is given as the
specified factor times cell length. The subsurface is created if any of the

Version 3.26 B-3


AUTOMESH BATCH COMMANDS Appendix B
Batch Commands for Subsurface Generation

following options are specified: -output-subsurface-database,


-output-subsurface-file, -subsurface-only, -extrusion or -extrusion-only;
and the -subsurface-read parameter is not specified. The subsurface is used
in the cutting procedure instead of the surface if any of the previous options
have been specified. The default value for the subsurface factor is 0.5.
-subsurface-intersection
Checks to see if the subsurface intersects itself. The default is not to check.
-subsurface-limit-ratio=ratio
This option limits the distance a vertex can be displaced during the subsurface
generation. It is specified as a ratio of the subsurface depth. The default is to
limit the displacement and the default ratio is 3.
-subsurface-iterations=iterations
-subsurface-relaxation=relaxation
-subsurface-steps=steps
The extrusion process works by first finding a subsurface, which is nominally
located at the extrusion distance inside the surface. Subsurface calculation
method 4 works by finding the subsurface using only information about
normals to the surface. Subsurface calculation method 5 extends this
calculation. It goes through an iterative process to get the best subsurface
possible. The algorithm works by moving along a normal to the surface a
distance equal to the extrusion layer thickness divided by the extrusion step.
The subsurface mesh is then smoothed using subsurface iterations and a
relaxation factor. The default values are 1, 50 and 0.1 for step, iterations and
relaxation.
-subsurface-method=value
There are currently three different algorithms recommended for calculating
the subsurface. The original method (value=4) works well if the shell size is
large compared to the extrusion layer thickness and should be tried first in all
cases. After any subsurface generation, you should check that the subsurface
is correct by issuing the SCHECK pro-STAR command. If the subsurface is
not correct, you can either fix it using the panel tools or you can try a different
subsurface generation method.
Method 7 (value=7) is based on an algebraic marching procedure that
creates a subsurface and fluid cells (if specified). It can take into account
surface proximity, user sources and various quality and validity checks in
order to guarantee a valid final subsurface. The next ten batch commands
listed below describe the control functions it employs.
Method 8 (value=8) is the default and combines the advantages of both
methods 4 and 7 into one scheme. Please refer to Chapter 5 for additional
information on its usage. A list of advanced options for this scheme is
available on request from the CD adapco Group.
-output-model-database=file.dbs,dbase_id
Used with Subsurface Method 7 and 8. Specifying this option will write out
the fluid cells to the indicated database as well as generating the subsurface.
-march-proximity-factor=real_value
Used with Subsurface Method 7 and 8. Multiplies offset to determine the
B-4 Version 3.26
Appendix B AUTOMESH BATCH COMMANDS
Batch Commands for Subsurface Generation

length of the rays for proximity detection. This is a factor, not a search
distance. Default is 4.0.
-march-gap-ratio=real_value
Used with Subsurface Method 7 and 8.
Thickness in proximity region = gap-ratio*intersection-distance.
Thickness = 2*gap-ratio*intersection-distance if intersecting with
no-subsurface cell type. Default = 0.25
-march-ramp-angle=real_value_degrees
Used with Subsurface Method 7 and 8. Growth rate on flat plate in variable
thickness regions. Default = 25.0
-march-visibility-angle=real_value_degrees
Used with Subsurface Method 7 and 8. Minimum angle at vertex below which
automatic reduction to 0 layers takes place. Default = 5.0
-march-visibility-thresh=real_value_degrees
Used with Subsurface Method 7 and 8. Angle to consider a node visible from
its surrounding faces (probably will not be modified much yet — related to
smoothing). Default = 2.0.
-march-offset-thresh-ratio=real_value
Used with Subsurface Method 7 and 8. Multiplier to obtain a minimum
allowable offset. If magnitude is required to go below this, the vertex is set for
0 layers. Default = 0.1
-march-shrink-factor=real_value
Used with Subsurface Method 7 and 8. Reduction factor for offset in invalid
regions — used for iterating. Default = 0.75
-march-max-area-ratio=real_value
Used with Subsurface Method 7 and 8. Ratio of subsurface/surface face area
that lies between value and 1/value. value=0 implies the measure is off.
Default = 0.1
-march-extend-passes=value
Used with Subsurface Method 7 and 8. Number of extension passes for
cavity/shrink regions. Default = 2
-subsurface-only
In certain circumstances, it is easier and faster to run the Module by storing
the subsurface definition. If this option is set, ammbatch does the subsurface
generation and then stops. For this option to work correctly, both the
-extrusion and -output-subsurface-database or -output-subsurface-files
parameters must be set. The default is for the program to continue after the
subsurface has been generated.
-subsurface-verbose
This option causes ammbatch to output the convergence history of the
subsurface generation.
-surface-nodefeaturing-type=cell type
When used with a subsurface preparation process, this command specifies

Version 3.26 B-5


AUTOMESH BATCH COMMANDS Appendix B
Batch Commands for Classification and Refinement

which surface shell types should not have features removed by the process.
Multiple values are allowed by re-specifying the command.

Batch Commands for Classification and Refinement


-cell-type-parameters=cell type, depth, subsurface thickness,
refinement thickness, refinement in i direction, refinement in j
direction, refinement in k direction
This option is currently used for two purposes. The first is to specify a
subsurface depth that differs from the default depth, as specified using the
-cell-length and -subsurface-factor options. The second is used in
conjunction with the -classify-sidedness option. This specifies a distance
from the surface within which all cells should be assigned to that surface,
even if they do not directly interact with the surface.
While not yet completely implemented, the idea of -cell-type-parameters
is to allow the user to completely specify how an initial mesh is to be refined.
This means that no user intervention throughout the mesh generation process
will be required once the mesh parameters are set up with this command.
Currently, the user must use the -classify-sidedness option to help build a
custom mesh that will be cut by ammbatch.
You need one -cell-type-parameters value for each surface shell type you
wish to have a different subsurface depth or classify by depth. The cell type is
the type of the cells that you want this parameter to apply to. Since there may
be multiple levels of refinement for one region, the depth parameter is
included so that there can be different parameters based on the level of
refinement for a surface region. Depth is 1 for the most coarse region with
higher numbers specifying greater refinement. -classify-depth is used to
specify the depth of the refinement corresponding to a particular
-cell-type-parameters that will be used for a particular ammbatch run.
subsurface thickness is the depth of the subsurface for that surface cell
type. refinement thickness is the distance from the surface cell type within
which cells should be classified as having the same surface cell type.
refinement in the ‘i’, ‘j’ and ‘k’ directions specify how cells in this region
should be refined and are not currently implemented.
All options for this parameter must be specified. Set subsurface thickness
and/or refinement thickness to zero if you do not want to use them. Set
refinement in ‘i’, ‘j’ and ‘k’ directions to 1.
-classify-depth
This option specifies which parameter should be used for the cell type during
a specific ammbatch run by matching it with the depth parameter in the
option -cell-type-parameters.
-classify-sidedness
This option works only when an ‘adjust and cut’ operation has been
requested. Instead of cutting the mesh to the surface, this option causes
ammbatch to output the hexahedral cell mesh that would have been cut and
to assign the cell types listed below to the cells. Cells that are outside the
model surface are assigned a type of 1. Cells that are inside the surface are
assigned a type of 2. Cells that interact with the surface are assigned the same

B-6 Version 3.26


Appendix B AUTOMESH BATCH COMMANDS
Batch Commands for Volume Mesh Generation

cell type as the surface shell that they are closest to, unless that cell type is 1
or 2, in which case it is assigned a cell type of 3. This behaviour can be
changed using the -classify-depth and -cell-type-parameters options. The
default is to perform the ‘adjust and cut’ operation.
-classify-no-outside
When doing a cell classification, you can use this option to tell ammbatch
not to output the cells outside the model.

Batch Commands for Volume Mesh Generation


-adjustment-delete=factor
The ‘adjust and cut’ algorithm adjusts vertex locations before cutting the
hexahedral cells. This vertex adjustment reduces the topological complexity
of the resulting cells by reducing the number of cut edges, which in turn
reduces the number of edges in a face. The amount of movement allowed is
controlled by this parameter. The maximum distance a vertex can move in
order to be on the surface is defined as this factor times the smallest edge
length of all the edges attached to the vertex. factor must be between 0 and
1/3 with a default value of 1/3.
-automatic-refinement=AC,SP,EP,SD,SC,MS,DC1,DC2,DC3,DC4,DC5,GF
Activates the auto-refinement scheme for the BAMM trimmed cell mesher.
This feature can be used to create a template mesh, a trimmed cell mesh or a
new surface with the refinement automatically determined by ammbatch,
based on specified properties (other batch commands determine which type of
mesh is made). The refinement is currently 2:1 in all directions and is
automatically balanced. The level of growth can also be controlled. A
pre-built custom mesh with cell couples can also be read in and further
refined.
The following properties can be set to control where refinement takes
place:

AC (Analytic Curvature) This determines the number of cells around


a closed circle.
SP (Surface Proximity) This determines the minimum number of
cells placed in a gap.
EP (Edge Proximity) Minimum number of cells between feature
edges.
SD (Search Distance) Search distance for surface/edge proximity
(usually 2*SC)
SC (Surface Clustering) Sets the cell size at the surface.
MS (Minimum Cell Size) Sets the minimum cell size allowed to be
produced by AC, SP, EP and DC1->5 for
the mesh.
DC1→DC5 (Discrete Curvature) Not currently used in this release.
GF (Grow Factor) Allows the number of neighbouring cells to
grow before refining.

Any feature can be deactivated by setting its value to zero. See also all other
batch commands that begin with -auto for additional options.
Version 3.26 B-7
AUTOMESH BATCH COMMANDS Appendix B
Batch Commands for Volume Mesh Generation

-auto-refine-only
Create the template mesh only in the supplied database and stop.
-auto-refine-surftype=cell type,cell size
Override the settings provided in the -automatic-refinement option and
refine the cells given by cell type to have the specified cell size. Note that the
cell size must be an integer divisor or multiple of SC (cell size at surface).
-axis-x=x,y,z
-axis-y=x,y,z
-axis-z=x,y,z
These parameters define the orientation of the coordinate system in which the
initial mesh is generated. The origin of the coordinate system is defined using
the -origin parameter. For Cartesian meshes, the grid lines are parallel to the
coordinate axes, while for polar meshes the normal cylindrical system applies
(r is distance from the z axis and angle is measured from the y = 0 plane). The
x, y, z triplet defines a vector parallel to the axis being defined The values
specified are in the global coordinate system and the vector does not have to
be a unit vector. The first axis parameter entered on the command line is
normalized and becomes the definition of that axis. The second axis
parameter entered is normalized and made normal to the first axis parameter
and becomes the definition of the second axis. The third axis definition is
calculated so as to get a right-handed (in the usual sense), orthogonal
coordinate system. At least two axes parameters for different axes must be
entered to define the new coordinate system. Axes parameters after the second
are ignored.
-cartesian
-polar
Generate a Cartesian or polar mesh. The default is a Cartesian mesh. This
option only applies if ammbatch is generating the initial mesh. Alternatively,
you can supply the initial mesh using the -custom-mesh option.
-cell-compress
-no-cell-compress
During the process of generating a mesh, many cells become unused because
they lie outside the model volume. Cell compression reduces the maximum
number of cells in the model. The drawback is that the original cell numbers
follow a block mesh numbering scheme which makes modelling much easier
while cell compression destroys that numbering scheme. Cell compression is
the default.
-cell-division
-no-cell-division
During the process of generating a mesh, cell topologies (e.g. cell shapes) are
generated that cannot be processed by STAR-CD. These cells shapes are
converted into cell shapes STAR-CD can process by subdividing the cell
volumes into simpler shapes. There are currently two methods for doing this
in ammbatch.
The first is to divide the volume using only tetrahedra. The advantage of
this method is that it works well on any cell shape ammbatch generates but

B-8 Version 3.26


Appendix B AUTOMESH BATCH COMMANDS
Batch Commands for Volume Mesh Generation

the disadvantage is that some of the resulting tetrahedra can be of poor


quality.
The second uses pre-programmed shape division. The advantage of
pre-programmed cell division is that it makes cells of better quality but it has
not been programmed for all cell types that ammbatch generates.
These options control the division of volumes into tetrahedra. Cell division
is on by default. See Chapter 6 for more details.
-cell-length=length
The length of cell edges for the generated mesh in the same units as the
surface. This parameter must be specified since there is no default for it.
-cell-length-x=length
-cell-length-y=length
-cell-length-z=length
Allows for the specification of different cells lengths in different axial
directions. NOTE: -cell-length must still be specified.
-cell-splitting
-no-cell-splitting
During the process of generating a mesh, cell topologies (e.g. cell shapes) are
generated that cannot be processed by STAR-CD. These cells shapes are
converted into cell shapes STAR-CD can process by dividing the cell volumes
into simpler shapes. There are currently two methods for doing this in
ammbatch.
The first is to divide the volume using only tetrahedra. The advantage of
this method is that it works well on any cell shape ammbatch generates but
the disadvantage is that some of the resulting tetrahedra can be of poor
quality.
The second uses pre-programmed shape division. The advantage of the
pre-programmed cell division is that it makes cells of better quality but it has
not been programmed for all the cell types ammbatch generates.
These options control the division of volumes using the pre-programmed
division method. Cell splitting is on by default.
-cell-type=type
-cell-type-problem=type
-cell-type-unresolved=type
The cell type is required by STAR-CD to identify a cell as a point, line, shell,
solid or fluid cell. All cells generated by ammbatch are given a cell type of 1
except unresolved (default cell type is 2) and problem (default cell type is 3)
cells. These default cell types can be overridden using these program options.
The default is for ammbatch to generate cell types based on the different cell
shapes it generates.
-cell-type-all
When modifying a model created by ammbatch, it is sometimes easier if
different trimmed cell shapes have different colours. In pro-STAR, cell colour
is controlled by the cell type so that the cell types of different trimmed cell
shapes need to be unique. If this option is specified, all previously specified
cell type options are ignored and a specific set of cell types is used when

Version 3.26 B-9


AUTOMESH BATCH COMMANDS Appendix B
Batch Commands for Volume Mesh Generation

writing out the mesh.


-cells-i=count
-cells-j=count
-cells-k=count
Set the number of cells in the base mesh generated by ammbatch in each
coordinate direction. For polar meshes, ‘i’ is the radial direction and ‘j’ the
azimuthal direction. The default is to have ammbatch calculate the number
of cells based on the cell size in that direction.
-concave-angle=angle
Use this option to specify the angle used to define concavity as measured
using the interior angle between edges or faces. Any angle greater than this
value is considered concave. Specifying an angle of 360 degrees will
effectively turn concave face processing off. The default is 200 degrees.
-cp-match-file=cpMatchFile
If you are running ammbatch and you want it to output information on the
coupled cells generated, specify the file name where you want this
information stored.
-delaunay-mesh
Activates the Delaunay AFT mesher during volume mesh generation, to
create a tetrahedral mesh based on the subsurface. This option must be used in
conjunction with the BAMM command as per any normal batch operation.
-discard-unresolved-faces
Used in conjunction with the -grow-and-tetfix option (see below). Normally,
when unresolved cells are fixed using this process, the faces of the unresolved
cells are used to form the watertight volume. If this is not possible, a
triangulation scheme is called up to stitch up any unresolved holes
automatically. To always discard the unresolved cell faces and always use the
triangulation scheme, set the -discard-unresolved-faces option as part of the
batch process.
-discard-feature-edges
Used in conjunction with the -discard-unresolved-faces option (see above),
this option will further discard the feature edges within the surface in order to
close the surface when using the triangulation scheme.
-divide-concave-angle
When this option is used and tetrahedral cell division is on, ammbatch
checks each face derived for the original hexahedral cell to see if the face is
concave. If any face is concave, the cell is divided into tetrahedra.
-edge-tweak-1
This option causes ammbatch to combine adjacent boundary and
inside/outside segments during edge-processing to reduce the number of
unresolved cells. Should only be used if the original ammbatch run produces
a large number of unresolved cells.
-fix-with-aft
Fix unresolved cells with the Delaunay AFT mesher. This option can be used

B-10 Version 3.26


Appendix B AUTOMESH BATCH COMMANDS
Batch Commands for Volume Mesh Generation

in conjunction with cell division and will help fix unresolved cells. See also
the batch commands -output-unresolved-as-faces and
-output-faces-as-triangles.
-fixed-x=coord
-fixed-y=coord
-fixed-z=coord
These options allows you to fix the location of one grid plane which, since all
the planes are cell-length apart, fixes the location of all the grid planes parallel
to the first. -fixed-x fixes the location of planes of constant x and so on for the
two other parameters. The coordinate values specified are in the grid
coordinate system which is defined by the -origin, -axis-x, -axis-y and -axis-z
parameters. If any of these parameters is not specified, the global Cartesian or
polar systems are used. If the mesh is being generated in a polar coordinate
system, -fixed-x refers to the radial coordinate and -fixed-y refers to the
anglular coordinate.
If -fixed-x and -min-x or -max-x are specified, they must all be consistent.
This means that (a – b)/cell length must be an integer for any combinations (a
and b) of coordinates specified. However, specifying both -fixed-x and -min-x
or -max-x is redundant since the -min-x and/or -max-x parameters have the
same effect of anchoring the grid in space. The advantage of using -fixed-x is
that any grid plane can be specified instead of calculating the location of the
minimum or maximum plane. The same comment holds true in the two other
coordinate directions.
-grow-and-tetfix
Replicates the manual ‘tetfix’ process but within ammbatch instead.
Unresolved cells in the trimmed cell mesh are grown and the outer surface
extracted, triangulated and meshed using the Delaunay AFT mesher. If
successful, the unresolved and neighbouring cells are replaced with the
tetrahedral mesh. See also option -discard-unresolved-faces.
-in-out-level=level
The default calculation of the ‘sidedness’, i.e. finding out if a point is outside,
inside or on the boundary of the model, is robust as long as all the geometry
information exists, e.g. when the surface is totally enclosed and contains only
small holes and overlaps. When the surface contains large holes, the sidedness
calculation can fail resulting in incorrect cell generation. This option makes
the sidedness calculation more robust at the expense of computer time.

level=0: This is the default.


level=1: Next level of robustness and corresponding increase in computer
time.
level=2: Highest level of robustness with maximum increase in computer
time.

-input-custom-database=filename,id
You don’t like the mesh ammbatch is generating? Build your own and read it
using this option. The mesh may be unstructured and may contain cell couples
but it must contain only hexahedral cells. filename is the name of a database

Version 3.26 B-11


AUTOMESH BATCH COMMANDS Appendix B
Batch Commands for Volume Mesh Generation

file and id is the database id of the custom mesh. If there are cell couples, they
must be in the database.
-input-custom-files=vertfile,cellfile
You don’t like the mesh ammbatch is generating? Build your own and read it
using this option. The mesh may be unstructured and may contain cell couples
but it must contain only hexahedral cells.
-input-custom-cpmatches=filename
If your custom mesh contains cell couples and you want to run ammbatch,
you need to specify the name of the file that contains the coupled cell
definitions. The definitions in this file will be modified based on how the mesh
was cut. This option is only used in conjunction with -input-custom-files.
Use pro-STAR command CPWRITE to create this file.
-new-surface
When running an ‘adjust and cut’ operation, you specify this option to have
ammbatch output the surface of the generated model instead of the model.
The cell size controls the density of the surface mesh. Surface edges and
corners are recreated in the new surface. Additionally, the shells in the new
surface have the same cell type as the corresponding shell of the original
surface.
-min-x=coord
-min-y=coord
-min-z=coord
-max-x=coord
-max-y=coord
-max-z=coord
Without specifying any of these options, the initial mesh generated by
ammbatch spans the volume defined by the subsurface but increased by a
small tolerance in each direction, to make sure that the subsurface is totally
enclosed by the mesh. With these options, you can control the minimum
and/or maximum extent of the mesh in a given coordinate direction. These
parameters also have a side-effect of anchoring the mesh at a particular
location (the minimum or maximum coordinate) instead of allowing
ammbatch to place the mesh at an arbitrary location. If you specify the
minimum and maximum coordinate in the same coordinate directions then
((maximum – minimum)/cell length) must be an integer value. The coordinate
values specified are in the grid coordinate system defined by the -origin,
-axis-x, -axis-y and -axis-z parameters. If any of these parameters is not
specified, the global Cartesian or polar systems are used. If the mesh is being
generated in a polar coordinate system, ‘x’ refers to the radial coordinate and
‘y’ refers to the anglular coordinate.
-origin=x,y,z
This parameter defines the origin of the coordinate system in which the initial
mesh is generated. Refer to parameter -axis-x for more information.
-output-model-database=filename,id
All ammbatch model output goes to a database file with name filename and
database id, id. This includes regular, classification, new surface and
B-12 Version 3.26
Appendix B AUTOMESH BATCH COMMANDS
Batch Commands for Volume Mesh Generation

extrusion generation runs.


-output-model-files=vertfile,cellfile
All ammbatch model output, except coupled cell data, goes to these files.
This includes regular, classification, new surface and extrusion generation
runs.
-output-model-cpmatch-file=filename
Coupled cell data from a model generation run go to this file. Only useful in
association with the -output-model-files option.
-output-unresolved-as-faces
Used in conjunction with the -fix-with-aft option. This option will output the
remaining unresolved cells as shells with cell type 44.
-output-faces-as-triangles
Used in conjunction with the -output-unresolved-as-faces batch command.
The shells will be output as triangles if this option is used.
-overlapping-tolerance=tolerance
If your surface contains overlapping surfaces that are separated by distances
greater than the global tolerance, use this parameter to specify the maximum
distance between overlapping surfaces.
-principal-axes
When this option is specified, ammbatch calculates the principal axes of the
surface and builds the initial mesh for the model using these axes as the
primary mesh directions.
-vertex-compress
-no-vertex-compress
During the process of generating a mesh, many vertices become unused
because cells to which they are attached are outside the model or they are
adjusted out of existence. Vertex compression reduces the maximum number
of vertices in the model. The drawback is that the original vertex numbers,
except for the ones generated at a mesh-subsurface intersection, follow a
block-mesh numbering scheme which makes modelling much easier while
vertex compression destroys that numbering scheme. Vertex compression is
on by default.
-vertex-merge
-no-vertex-merge
During the ‘adjust and cut’ process, many vertices are created at places where
the mesh lines cut the subsurface. Since this is a cell-by-cell operation, many
vertices are created at the same location. If vertex merging has been selected,
coincident vertices are found and merged. Vertex merging is on by default.
-volume-factor=factor
The cell division operation can potentially divide cells into cells which are too
small to obtain good result with STAR-CD. This option controls the size of
the resulting cells. If a cell would become smaller than the specified value, the
cell is not divided. The value used for this calculation is the volume of the
original hexahedral cell from which the cell was generated multiplied by the

Version 3.26 B-13


AUTOMESH BATCH COMMANDS Appendix B
Batch Commands for Extrusion Layer Generation

factor specified by this parameter. The default factor is 0.01. For additional
information, refer to “-cell-division” on page B-8 and “-cell-splitting” on
page B-9.

Batch Commands for Extrusion Layer Generation


-input-extrusion-database=filename,id
We generally recommend that the extrusion layer be generated separately,
after all model cleanup has been completed. This option allows ammbatch to
generate the extrusion layer based on the following information:
(a) the surface files specified using either the -input-surface-database or
-input-surface-files option
(b) the subsurface files specified using either the -input-subsurface-files or
-input-subsurface-database option
(c) the current surface of the model specified with this command.

filename is the name of a database file and id is the database id of the


extrusion mesh. The current surface of the model is generated using the LIVE
command on the current model after it has been fixed. If the maximum vertex
is included in the vertex file, the resulting extrusion cells can be read back into
the AutoMesh module without using the offset and merge options. The default
is not to generate the extrusion layer.
-input-extrusion-files=vertfile,cellfile
We generally recommend that the extrusion layer be generated separately,
after all the model cleanup has been completed. This options allows
ammbatch to generate the extrusion layer based on the following
information:
(a) the surface files specified using either the -input-surface-database or
-input-surface-files option
(b) the subsurface files specified using either the -input-subsurface-files or
-input-subsurface-database option
(c) the current surface of the model specified with this command.

The current surface of the model is generated using the LIVE command on
the current model after it has been fixed. If the maximum vertex is included in
the vertex file, the resulting extrusion cells can be read back into the
AutoMesh module without using the offset and merge options. The default is
not to generate the extrusion layer.
-extrude-with-centroid-check
Checks that the centroid of a cell does not fall outside the volume of the cell
during the extrusion layer generation process.
-extrusion=layers
This option controls the existence and number of cell layers in the extrusion
layer. If this parameter is not specified, no extrusion layer will be generated
for the model. If this parameter is entered, it specifies the number of cell
layers to put in the extrusion layer. The extrusion layer thickness is controlled
by the -subsurface-factor parameter. The default value for layers is 0, which

B-14 Version 3.26


Appendix B AUTOMESH BATCH COMMANDS
Batch Commands for General Run Time Options

implies that no extrusion layers are produced. The minimum non-zero value
that should be used is 2.
-extrusion-method=value
A new extrusion method was included for V3150 and later versions of the
Module. To specify the old default method used for all versions up to
V3102.517, set value equal to ‘3’ for the extrusion process.
-extrusion-ratio=ratio
This parameter is used to specify a fill ratio of the extrusion layer. It specifies
the ratio between the last (layer on surface) and the first (first extrusion layer
inside model) layer thicknesses.

Batch Commands for General Run Time Options


-help
Displays all parameters available in ammbatch and then stops.
-global-tolerance=number
Normally, you should not have to use this parameter as the program calculates
the best values to use for a specific problem. In some circumstances, this
calculation results in a global tolerance value that is not optimal. Note that if
you specify a value that is too small, ammbatch may not work correctly
since the real problem here is lack of precision in the coordinates and round
off error.
-machine-id
Shows the machine id used to calculate the lock code and then stops.
-output-binary
-output-coded
Specifying the -output-binary option causes the generated mesh file to be
output in STAR-CD binary format (see pro-STAR commands CWRITE and
VWRITE). -output-coded chooses the STAR-CD coded format. The default
is to output the generated mesh files in the same format as the surface files.
-progress-interval=interval
By default, ammbatch displays a brief message every two minutes giving its
current status. You can change the interval between messages with this option.
A value of zero turns off the progress indicator.
-version
Display the version number and other information on the currently running
program and then stops.

AutoMesh Output
ammbatch model output is specified using either the
-output-model-database or the -output-model-database options. When
using the -output-model-database option and unless you have used the
-output-binary or -output-coded options to change the file type, these files
are in the same format as the input files. Unless the cell types have been
changed using parameters -cell-type=type, -cell-type-problem=type,

Version 3.26 B-15


AUTOMESH BATCH COMMANDS Appendix B
ammbatch Parameter Equivalence to pro-STAR Commands

-cell-type-unrsolved=type, or -cell-type-all, the cell types are 1 for most


cells, 2 for unresolved cells and 3 for other problem cells.
It has been found useful to have the different trimmed cell shapes
displayed in different colours as this not only makes an interesting looking
plot but also makes it easier to modify the mesh. This can be done by using
the -cell-type-all option when generating the mesh. To set up the colour map,
use the BAMM,COLOR command.

ammbatch Parameter Equivalence to pro-STAR Commands


Pro-STAR command BAMM plus the functionality of the AutoMesh panel are
implemented by running the ammbatch program. This section of the manual
documents the ammbatch options that are equivalent to the pro-STAR
functionality:

• BAMM, SURFACE, SURFACE ID, NEW SURFACE ID, FEATURE


ANGLE, MAX LENGTH, /NEW/OVERWRITE/
-input-surface-database="current database",SURFACE ID
-cell-length=1
-surface-only
-output-surface-database="current database",NEW SURFACE ID

If you use the FEATURE ANGLE parameter add:

-edge-angle=FEATURE ANGLE

If you use the MAX LENGTH parameter add:

-surface-maximum-edge=MAX LENGTH

• BAMM, SUBSURFACE, SURFACE ID, SUBSURFACE ID, CELL


LENGTH, FACTOR, /NEW/OVERWRITE/
-input-surface-database="current database",SURFACE ID
-cell-length=CELL LENGTH
-subsurface-only
-subsurface-factor=FACTOR (defaults to 0.5)
-output-subsurface-database="current database",SUBSURFACE ID

You can optionally add:

-no-subsurface-type=54

for each shell type were you want a zero-thickness extrusion layer.

• BAMM, CUT, SURFACE ID, TRIMMED MESH ID, CELL LENGTH,


FACTOR, LAYERS, SUBSURFACE ID, NEW SURFACE ID, CUSTOM
MESH ID, /NEW/OVERWRITE/
-input-surface-database="current database",SURFACE ID

B-16 Version 3.26


Appendix B AUTOMESH BATCH COMMANDS
ammbatch Parameter Equivalence to pro-STAR Commands

-cell-length=CELL LENGTH
-output-samm-cells
-output-model-database="current database",TRIMMED MESH ID

If you specified the SUBSURFACE ID parameter, add:

-input-subsurface-database="current database",SUBSURFACE ID

If you didn’t specify the SUBSURFACE ID parameter and you want an


extrusion layer, add:
-subsurface-factor=FACTOR

Note: -input-subsurface-database and -subsurface-factor are mutually


exclusive. If you specified the LAYERS parameter to generate an extrusion
layer, add:
-extrusion=LAYERS

If you specified the NEW SURFACE ID parameter, add the following


command and make sure to specify the -subsurface-factor.
-output-subsurface-database="current database",NEW SURFACE ID

If you specified the CUSTOM MESH ID parameter, add:

-input-custom-database="current database",CUSTOM MESH ID

• BAMM, EXTRUDE, SURFACE ID, SUBSURFACE ID, POLYGON ID,


EXTRUSION ID, LAYERS, /NEW/OVERWRITE/
-input-surface-database="current database",SURFACE ID
-input-subsurface-database="current database",SUBSURFACE ID
-input-extrusion-database="current database",POLYGON ID
-cell-length=1
-output-samm-cells
-extrusion=LAYERS
-output-model-database="current database",EXTRUSION ID

• BAMM,COLOR

There is no batch equivalent.

Version 3.26 B-17

You might also like