Beruflich Dokumente
Kultur Dokumente
HEXPRESS™v3.1
Unstructured Grid Generator
- September 2013 -
NUMECA International
Chaussée de la Hulpe, 189, Terhulpsesteenweg
B-1170 Brussels
BELGIUM
HEXPRESS™ iii
Contents
Project/Quit 2-19
Internal Surface 2-19
Internal Surface/Edit 2-19
Edit->Copy 2-20
Edit->Translate 2-20
Edit->Rotate 2-20
Edit->Scale 2-20
Edit->Mirror 2-21
Internal Surface/Modify Curve 2-21
Modify Curve->Add Control Point 2-21
Modify Curve->Remove Control Point 2-21
Modify Curve->Modify Point 2-22
Modify Curve->Modify Point On Surface 2-22
Modify Curve->Discretization 2-22
Modify Curve->Divide 2-23
Modify Curve->Reverse Orientation 2-23
Modify Curve -> Set Name 2-23
Internal Surface/Modify Surface 2-23
Modify Surface-> Set Name 2-23
Internal Surface/Select 2-23
Select->Cartesian Points 2-24
Select->Curves 2-24
Select->Surfaces 2-24
Internal Surface/View 2-25
View->Points 2-25
View->Curves 2-26
View->Surfaces 2-26
View->Hide Selected Cartesian Points 2-27
View->Hide Selected Curves 2-27
View->Hide Selected Surfaces 2-27
View->Control Points 2-27
View->Curve Orientation 2-27
Internal Surface/Delete 2-27
Delete Cartesian Points 2-28
Delete->Curves 2-28
Delete->Surfaces 2-28
Grid Menu 2-28
Grid/Periodicity... 2-28
Grid/Boundary Conditions... 2-30
Face selection 2-31
Filters 2-33
Face grouping 2-33
Face type specification 2-34
Face name 2-34
Blank/Unblank 2-34
Periodic BC search 2-34
Grid/Non Matching Connections... 2-35
Full Non Matching Connections 2-35
Rotor/Stator Connections 2-40
Grid/Mesh Quality... 2-42
Negative cells 2-43
Concave and twisted cells 2-43
iv HEXPRESS™
Contents
HEXPRESS™ v
Contents
vi HEXPRESS™
Contents
HEXPRESS™ vii
Contents
viii HEXPRESS™
Contents
HEXPRESS™ ix
Contents
x HEXPRESS™
Contents
HEXPRESS™ xi
Contents
xii HEXPRESS™
CHAPTER 1: Getting Started
1-1 Overview
Welcome to the HEXPRESS™ User’s Guide, a presentation of NUMECA’s fully automatic hexa-
hedral grid generator. This chapter presents the basic concepts of HEXPRESS™ and shows how to
get started with the program by describing:
• what is HEXPRESS
• how to use this guide,
• how to start HEXPRESS™.
1-2 Introduction
1-2.1 What is HEXPRESS™
HEXPRESSis an automatic unstructured hexahedral mesh generator software designed to auto-
matically generate meshes in complex 2D and 3D geometries.
HEXPRESS generates, following a top-down revolutionary approach, meshes only containing
hexahedral elements.
1-2.2 Features
The advanced unstructured code of HEXPRESS™ enables to create mesh for a large range of
industrial machines designed for internal, external or turbomachinery flow.
HEXPRESS features:
— A direct interface to Parasolid™ models. HEXPRESScan automatically import Para-
solid™ models involving solid bodies. The models can be visualized in wireframe and solid
modes. HEXPRESSprovides simple CAD manipulations functions:
— Unite, Subtract, Intersect, Delete, Transform solid bodies.
HEXPRESS ™ 1-1
Getting Started Introduction
1-2 HEXPRESS™
Introduction Getting Started
1-2.4 Approach
HEXPRESS™ 1-3
Getting Started How to Use This Manual
— HEXPRESS removes all cells located outside the computational domain or intersecting
the geometry.
3. Snap to Geometry: HEXPRESS projects the mesh on the geometry and recovers lower
dimensional geometry features by some very specific corner and curve capturing. The robust-
ness and accuracy of these algorithms are unique to HEXPRESS
4. Optimize: HEXPRESS optimizes the mesh to ensure that all cells are convex and of high
quality. The optimization algorithms are unique to HEXPRESS
5. Viscous Layers: HEXPRESSinserts additional layers of high aspect ratio cells in the mesh
by further anisotropic cell subdivisions in order to generate a mesh suitable for resolving highly
sheared flows.
1-4 HEXPRESS™
First Time Use Getting Started
1-3.2 Conventions
Some conventions are used to ease information access throughout this guide:
• Commands to type in are in italics.
• Keys to press are in italics and surrounded by <> (e.g.: press <Ctrl>).
• Names of menu or sub-menu items are in bold.
• Names of buttons that appear in dialog boxes are in italic.
• Numbered sentences are steps to follow to complete a task. Sentences that follow a step and are
preceded with a dot (•) are substeps; they describe in detail how to accomplish the step.
A light bulb in the margin indicates a section with a description of expert parameters.
HEXPRESS™ 1-5
Getting Started How to Start HEXPRESS™ Interface
• Each user willing to use HEXPRESS™ or any other NUMECA software must perform a user
configuration as described in the installation note.
When these points are checked the software can be started as described in the installation note or
section 1-5 of this users guide.
1-6 HEXPRESS™
Required Licenses Getting Started
<NUMECA_INSTALLATION_DIRECTORY>\FineMarine31_#\bin\hexpress.exe <Enter>.
where NUMECA_INSTALLATION_DIRECTORY is the directory indicated in section 1-4.1.
And HEXPRESS™ (64bits) can be launched from a Dos shell by typing:
<NUMECA_INSTALLATION_DIRECTORY>\Hexpress31_#\bin64\hexpressx86_64.exe <Enter> or
<NUMECA_INSTALLATION_DIRECTORY>\FineOpen31_#\bin64\hexpressx86_64.exe <Enter> or
<NUMECA_INSTALLATION_DIRECTORY>\FineMarine31_#\bin64\hexpressx86_64.exe <Enter>.
where NUMECA_INSTALLATION_DIRECTORY is the directory indicated in section 1-4.1.
HEXPRESS™ 1-7
Getting Started Required Licenses
1-8 HEXPRESS™
CHAPTER 2: User Interface
2-1 Overview
This section describes the appearance and use of the HEXPRESS Graphical User Interface
(GUI).
The HEXPRESS GUI is divided into several main components as shown in Figure 2.1.0-2:
• Menu bar
• Toolbar
HEXPRESS ™ 2-1
User Interface Welcome Dialog Box
Menu Bar
Toolbar
Graphics Area
Message area
Keyboard input area Viewing buttons
Grid parameters area Mouse coordinates Control Area Information area
The following sections describe these components as well as one additional important features:
keyboard shortcuts.
2-2 HEXPRESS™
Menu Bar User Interface
— Import a Stereo Lithography Triangulation (STL), i.e. a file with extension ".stl". Please
refer to section 4-3 on page 4-21.
— Import a CAD model in Parasolid™ format, i.e. a file with extension ".xt" or ".xt_txt".
Please refer to section 4-2 on page 4-4.
— Import ANSYS mesh (see 7)
— Import CGNS mesh (see 7)
— Execute a python script
— Quit to exit HEXPRESS
HEXPRESS™ 2-3
User Interface Menu Bar
2-3.1.2 Project/Open
Project/Open is used to open an existing project, previously created by HEXPRESS. A file
chooser window (Figure 2.3.1-1) is opened to enable selection of an existing HEXPRESS project
file with an ".igg" extension.
Upon selection of a valid project, HEXPRESS closes the current project and opens the new one.
The old project is not automatically saved before being closed. Therefore, be sure that the current
work is saved before this option is used.
An unstructured project from HEXPRESS™/Hybrid or a multiblock structured project from IGG™
or AutoGrid5™ can also be loaded into HEXPRESS.
2-4 HEXPRESS™
Menu Bar User Interface
User is also allowed to convert the structured mesh with the desired multigrid level through mesh
converter dialog box. If the option Keep finest grid only is activated, it saves the project by keep-
ing the finest grid only.
The user is then requested to specify a new project name for the converted project. The converter
defines a new HEXPRESS computational domain by triangulating the surfaces of the quadrilat-
eral multiblock grid. Boundary conditions are exported into the new HEXPRESS project. All
blocks connected by matching mesh faces (CON boundary condition) are concatenated to define
single computational domain.
When the multiblock structured project from IGG™ contains a butterfly mesh, they
all have to be split inside IGG™ before loading into HEXPRESS.
When the structured project from IGG™ or AutoGrid5™ contains undefined patches
(UND), they all have to be changed in another type (for example CON if at the connec-
tion between blocks) before loading into HEXPRESS™ otherwise the concerned patches
will be considered as an internal surface in the converted mesh.
2-3.1.3 Project/Save
Project/Save saves the current project. When saving for the first time, a new file name must be
specified, through a file chooser, by the user with the extension ".igg". The saving procedure writes
information in the following files:
HEXPRESS™ 2-5
User Interface Menu Bar
2-6 HEXPRESS™
Menu Bar User Interface
2-3.1.5 Project/Import...
Following files can be imported:
a) Project/Import.../Project
Project/Import.../Project reads an external mesh file ".igg". Several mesh files can be opened.
This enables multiblock computations within FINE™/Open or FINE™/Marine.
b) Project/Import.../Domain
Project/Import.../Domain reads an external geometry domain file ".dom". Several domains files
can be opened. This enables multiblock computations within FINE™/Open or FINE™/Marine.
c) Project/Import.../Parasolid
Project/Import.../Parasolid reads external geometry files in Parasolid™ format ".x_t". Several
Parasolid™ files (Parasolid™ and CATIA v5) can be opened when defining the geometry before
the domain creation. Versions up to 24.0.193 are supported.
d) Project/Import.../STL triangulation
Project/Import.../STL triangulation reads external geometry files in STL format ".stl". Several
STL files can be opened when defining the geometry before the domain creation.
f) Project/Import.../ANSYS mesh
Project/Import.../ANSYS mesh reads external mesh files in ANSYS format ".cdb" v8.0.
HEXPRESS™ 2-7
User Interface Menu Bar
g) Project/Import.../CGNS mesh
Project/Import.../CGNS mesh reads unstructured 3D mesh stored in a CGNS format and converts
it to its native mesh format. The input mesh is not necessary pure hexahedral, i.e. it might contain
tetrahedron, prism, pyramid cells and can contain hanging nodes.
When converting the mesh, the boundary conditions will be recovered and corresponding HEX-
PRESS™ boundary conditions will be set. In addition for pure hexahedral input meshes, the opti-
mization and the viscous layer insertion can be performed in HEXPRESS™ on these meshes.
The option does not import CGNS mesh including multiple blocks. It only imports
single block mesh.
h) Project/Import.../HEXPRESS/Hybrid mesh
Project/Import.../HEXPRESS/Hybrid mesh allows to read unstructured volume meshes created
by HEXPRESS™/Hybrid and saved in HEX format.
2-3.1.6 Project/Export
a) Project/Export.../StarCD
The StarCD export functionality is available to the user via menu Project/Export.../StarCD. Four
files are saved in the directory and with the project name specified by the user through a file
chooser:
— ’project_name.cel’ contains the cells definition in terms of nodes
— ’project_name.vrt’ contains the coordinates of the vertices
— ’project_name.cpl’ contains the coupling definitions between cells through faces presenting
hanging nodes (Figure 2.3.1-6)
— ’project_name.bnd’ contains the list of boundary faces with boundary condition information
2-8 HEXPRESS™
Menu Bar User Interface
The connectivity file is written using the following FORTRAN ASCII format:
I9 6X 9I9 1X I4
Cell number, eight vertices, cell type number, cell key
where:
— cell type number is the region of the cell. HEXPRESS currently outputs all cells in the
same region with index 1.
— cell key defines the type of the cell:
1. Fluid cell
2. Solid cell
3. Baffle
4. Shell
5. Line
6. Point
All cells currently exported by HEXPRESS are fluid cells (cell key is equal to 1).
• The file "project_name.vrt" stores the nodes coordinates which are exported with the following
FORTRAN format:
I9 6X 3G16.9
Vertex number, three coordinates
• The file "project_name.bnd" stores the list of boundary facets. A boundary in StarCD is a mesh
facet connected to a geometry surface. Boundaries are grouped in regions. Boundary mesh fac-
ets are exported with the following FORTRAN format statement:
I8 6X 4I9 2I7 A
Boundary number, four vertices, region number, patch number, region type, (characters)
where:
— The region number corresponds to the ID of a topological face of the HEXPRESScompu-
tational domain.
— The patch number is set to 0 in HEXPRESS.
— The region type defines the type of boundary condition. HEXPRESS exports the follow-
ing StarCD boundary condition:
HEXPRESS™ 2-9
User Interface Menu Bar
INLE: inlet
OUTL: outlet
WALL: wall
• The cell to cell connection referred to as “couple” in StarCD defines the transition between
coarse and fine mesh cells with hanging nodes. A couple allows the faces of several (small) cell
slaves to be connected to one master (large face). Couples are exported with the following FOR-
TRAN format in the file "project_name.cpl":
I8 1X I5 1X I8/7(I9,I2)
Couple number, number of cells, type of coupling, CELL1, FACE1, CELL2, FACE2....
where:
— The type of coupling is set to 1 by default in 3D
— CELL1: the index of the master cell
— CELL2: the index of a slave cell
— FACE1, FACE2: the number of the face in the cell (0->5)
b) Project/Export.../Fluent
This Fluent export functionality is available to the user via menu Project/Export.../Fluent. An
ASCII file is saved in the directory and with the project name specified by the user as
"project_name.msh". The format of this exportation complies with Fluent 6.3.
A Fluent mesh file contains certain partitions of information called zones. Each zone is a separate
block that contains information about objects of one type: faces, cells, nodes, hierarchy tree, com-
ments, etc. Each zone must be enclosed in parentheses.
The content of a zone depends on the particular type of the zone. Each zone has an ID needed for
successful referencing the information stored in the zone. Each zone has a header including general
information related to the zone: initial and final indices of the elements described in the zone, com-
ment text, etc. This header must be enclosed in parentheses as well. The header of a zone of a cer-
tain type must be followed by the zone body. It includes detailed information about the mesh
objects described in the zone. The body must be enclosed in parentheses. Zones may be either
optional or required (zones 0, 1 and 2 are optional, all other zones are required). Below is a short
description of the zone types that are used for exportation by HEXPRESS
2 Dimensions Dimensionality
2-10 HEXPRESS™
Menu Bar User Interface
Remarks:
1. The mesh generation strategy of Fluent is essentially conformal. Non-conformity is the result of
mesh adaptation by the Fluent flow solver. HEXPRESS exports only leaf cells1 on finest level
to the Fluent file, because the cell hierarchy supported in HEXPRESS cannot be correctly
described in terms of the Fluent mesh file format. Face hierarchy is preserved only partially. As
only leaf cells are exported, only their faces must be exported in order to preserve consistency
between cells and faces (only faces or nodes referenced by leaf cells must be exported). Thus,
the face hierarchy is preserved for exported faces only: if one leaf cell references a face and
another one references its child face (generated face), then the parent-child dependency is
exported to a Fluent file.
2. Fluent mesh generator does not officially support anisotropic refinement. HEXPRESS, on the
contrary, is able to generate fully or partially anisotropic meshes. Fluent flow solver however
accepts meshes that contain anisotropicity and behaves properly during computations. However,
it is not recommended to perform a mesh check (via Fluent’s menu Grid/Check) because it will
result in multiple warnings reporting incorrect number of child faces encountered in zones with
index 59.
3. As ASCII mode is used to export file into FLUENT format, the floating point values such as
coordinates of mesh nodes should be written in a fixed format with a certain fixed number of
digits after decimal point. The current version supports exportation with 12 digits, unlike ver-
sion 1.1 where only 6 digits were written.
The table below lists the dependency between Fluent and HEXPRESS boundary condition types.
Any of the Fluent boundary conditions is applied by selecting the appropriate boundary condition
type of HEXPRESS. The correspondence is not unique because of the large number of boundary
conditions available in Fluent. Moreover, groups and set up of boundary conditions are also
exported to Fluent.
HEXPRESS™ type Fluent type ID Fluent type description
EXT 9 pressure-far-field
INL 10 velocity-inlet
OUT 36 outflow
MIR 7 symmetry
PER 12 or 8 periodic or periodic-shadow
SOL 3 wall
ROT 4 or 5 (or 3) pressure-inlet or pressure-outlet (or wall)
HEXPRESS™ 2-11
User Interface Menu Bar
c) Project/Export.../Samcef-Bacon
HEXPRESS exports conformal hexahedral meshes in the Samcef/Bacon ASCII mesh file format.
This option is available to the user via menu Project/Export.../Samcef-Bacon. An ASCII file is
exported in the user-defined directory and denoted "project_name.bacon".
HEXPRESS Samcef/Bacon
0 0
1 1
2 2
3 3
4 5
5 4
2-12 HEXPRESS™
Menu Bar User Interface
HEXPRESS Samcef/Bacon
6 7
7 6
This file format is only compatible with fully conformal meshes (mesh presenting no hanging nodes
- see Figure 2.3.1-6).
d) Project/Export.../CGNS
The menu Project/Export…/CGNS offers the possibility to export meshes generated by HEX-
PRESS in standard CGNS format. The CGNS file will contain coordinates of mesh vertices, cell
connectivity, parent-child information of mesh faces and edges, boundary faces connectivity and
boundary conditions.
The CFD General Notation System (CGNS) provides a general, portable, and extensible standard
for the storage and retrieval of computational fluid dynamics (CFD) analysis data. It consists of a
collection of conventions, and free and open software implementing those conventions.
The CGNS system is designed to facilitate the exchange of data between sites and applications, and
to help stabilize the archiving of aerodynamic data. The data are stored in a compact, binary format
and are accessible through a complete and extensible library of functions.
The finest mesh for all domains will be exported and the following data will be stored in the file:
• Coordinates of nodes
• Connectivity of cells
• Connectivity of cell faces on the boundary (surface mesh)
• Boundary conditions
General information such as file structure on CGNS web site: www.cgns.org
The CGNS file will contain one base. The name of this base is “Unstructured data”. The base will
be divided into zones. One zone corresponds to one domain. Here is the description of each zone:
• Zone type: Unstructured
• Zone name: name of the domain
— Vertex coordinates
Only the finest grid is considered. The vertex Cartesian coordinates are stored under the node
‘GridCoordinates_t’. The names of each component are respectively “CoordinateX”, “Coordi-
nateY”, and “CoordinateZ”.
— Cell connectivity
HEXPRESS™ 2-13
User Interface Menu Bar
The cell connectivity is stored under the node ‘Elements_t’. All the cells generated by HEXPRESS are
hexahedral, with no internal vertex, so the CGNS cell type ‘HEXA_8’ has been chosen to define them.
Moreover the cell connectivity definition in HEXPRESS differs from the CGNS definition:
FIGURE 2.3.1-8 HEXPRESS (left picture) and CGNS (right picture) connectivities
e) Project/Export.../NASTRAN
HEXPRESS can export mesh files to NASTRAN format (".bdf") in single or double precision (the
choice is asked during exportation). The selection between single and double precision is done after
clicking on Nastran menu.
2-14 HEXPRESS™
Menu Bar User Interface
f) Project/Export.../OpenFOAM
The mesh is converted into polymesh representation accepted by OpenFOAM1. The latter is based
around faces. Internal cells connect 2 cells. Boundary faces address a cell and a boundary patch.
Each face is assigned an ‘owner’ cell and ‘neighbour’ cell so that the connectivity across a given
face can simply be described by the owner and neighbour cell labels. In the case of boundaries, the
connected cell is the owner and the neighbour is assigned the label ‘-1’. The I/O specification con-
sists of the following files:
1) points a list of vectors describing the cell vertices, where the first vector in the list represents ver-
tex 0, the second vector represents vertex 1, etc.;
2) faces a list of faces, each face being a list of indices to vertices in the points list, where, the first
entry in the list represents face 0, etc.;
3) owner a list of owner cell labels, the index of entry relating directly to the index of the face, so
that the first entry in the list is the owner label for face 0, the second entry is the owner label for face
1, etc;
4) neighbour a list of neighbour cell labels;
5) boundary a list of patches, containing a dictionary entry for each patch, declared using the patch
name.
To know how many cells are in their domain, there is a note in the FoamFile header of the owner
file that contains an entry for nCells.
When exporting an imported structured mesh (converted in unstructured) only the
finest grid level is supported. It is not possible to export in OpenFOAM a coarser grid
level.
g) Project/Export.../CEDRE
HEXPRESS can export mesh files to CEDRE format (".dat" and "_bcs.dat"). The file is com-
posed by five sections including generality, node coordinates, connectivity: faces to nodes, connec-
tivity: face to cells and marked faces (for boundary conditions).
1. [1] OpenFOAM , User Guide , Version 1.6 , 2009 and [2] OpenFOAM , Programmer’s Guide, Version 1.6 ,
2009.
HEXPRESS™ 2-15
User Interface Menu Bar
2-3.1.8 Project/Script...
Actions executed by the user through the HEXPRESS™ interface are recorded in a Python-like
script giving added flexibility for automation of geometry creation and mesh generation.
Project/Script.../Save All... is used to save the dynamic recording of all commands performed by
the user since the beginning of its session.
Project/Script.../Execute... is used to run a python script file containing HEXPRESS™ com-
mands. A file chooser is opened to select a file with a ".py" extension. Upon selection of a valid file,
the script is executed in the current session and the result is visualized in the graphical window.
Depending on the content of the script, operations will be added to the current project or a new
project will be automatically opened before operations are performed (the previous project is
closed). If the script being run contains a syntactical error it will be aborted and a message will
appear in the shell.
2-16 HEXPRESS™
Menu Bar User Interface
Project/Script.../Re-execute Last can be used to rerun the last script that was run using the
Project/Script.../Execute... command. This option is most useful when writing own scripts manu-
ally to rapidly test it on the fly.
2-3.1.10 Project/Preferences...
Graphic tab gives choices for the graphics driver.
Only drivers (X11 and/or OPEN_GL) usable on the platform are present.
On Windows platform, this thumbnail is not available.
Mesh generation tab allows expert users to modify the memory allocation and the preference for
multigrid level.
• Chunksize. The default memory value is set to 40,000 (no units) and usually is unchanged. It
specifies the amount of memory to reserve (pre-allocation) before complex object initialization.
If this amount of memory is too small, the memory will be over-fragmented, and we can reach a
bottleneck. At the contrary, if it is too large, there won't be memory limitation, but the software
will be slower. There is no specific recommendation about the value to set, it depends on the
size of the generated mesh.
Suggestion: increase the chunksize by 150,000 until the software can allocate all the
necessary memory. For information, the chunksize has been set to 700,000 to allocate 3.5
Gb on a SGI platform.
HEXPRESS™ 2-17
User Interface Menu Bar
• The parameter Keep finest grid only saves the project by keeping the finest grid only.
Loading tab allows users to choose if they want to load the mesh when opening the project or not.
By default this parameter is not activated, i.e. mesh will not be loaded. The mesh will be loaded
automatically when actions requiring manipulations of mesh are activated. For instances:
• Mesh visualization using the mesh icon
• All mesh cutting tools
• Cell viewer
• All mesh export options
• All mesh quality check options
• Mesh transformation
• FNMB computation
• Delete block option
• Multiblock option
2-18 HEXPRESS™
Menu Bar User Interface
— If a mesh generation step of one block is done/undone (e.g. executing a mesh generation step
or deleting the previous step), the whole mesh will be reloaded first. This is mandatory since
when saving the project, the whole .hex file containing the mesh of each block, needs to be
rewritten.
The message shown in Figure 2.3.1-14 appears at bottom left of the GUI when a project is loaded
in HEXPRESS.
When executing python scripts or opening a project in batch mode, the mesh is always
loaded.
2-3.1.11 Project/Quit
Project/Quit ends the interactive session. A dialog box opens up to confirm the end of the session.
Please notice that the current work is not automatically saved when exiting HEXPRESS.
HEXPRESS™ 2-19
User Interface Menu Bar
a) Edit->Copy
Internal Surface/Edit /Copy is used to create new curves and surfaces by cloning the selected
geometry curves and surfaces.
After the cloning, new entities can be transformed directly through this tool:
Translation(t), Rotation(r), Scale(s), Mirror(m), None(q)
To perform a simple copy, enter <q> and press <Enter>. Other operations are strictly equivalent to
the corresponding ones of the Edit menu.
After the cloning, all currently selected geometry entities are unselected and the new created enti-
ties are selected. This allows to perform other editing operations on these entities without having to
manually select them.
b) Edit->Translate
Internal Surface/Edit /Translate is used to translate all the selected geometry entities (curves and
surfaces) along a user-defined vector. The following prompt is given to specify the translation vec-
tor:
Translation vector (q)
>> 1 1 1
A curve used in the definition of a surface (i.e. lofting curve) cannot be freely translated, since it
would implicitly change the definition of the surface. To translate such a curve a copy must first be
made (see 20. The copy can then be freely translated.
To quit this option, enter <q> and press <Enter>.
c) Edit->Rotate
Internal Surface/Edit /Rotate is used to rotate all the selected geometry entities (curves and sur-
faces) around a user-defined line. The following prompts are given to specify the rotation line:
Rotation axis vector (q)
>> 0 0 1
Rotation axis origin (q)
>> 0 0 0
Rotation angle (degree) (q)
>> 90
A curve used in the definition of a surface (i.e. lofting curve) cannot be freely rotated, since it
would implicitly change the definition of the surface. To rotate such a curve a copy must first be
made (see 20. The copy can then be freely rotated.
To quit this option, enter <q> and press <Enter>.
d) Edit->Scale
Internal Surface/Edit /Scale is used to scale all the selected geometry entities (curves and sur-
faces) with a user-defined scale factor. The following prompt is given to specify the scaling factor
in the three directions:
Scale factor (x y z) (q)
>> 1 1 1
A curve used in the definition of a surface (i.e. lofting curve) cannot be freely scaled, since it would
implicitly change the definition of the surface. To scale such a curve a copy must first be made (see
20. The copy can then be freely scaled.
2-20 HEXPRESS™
Menu Bar User Interface
e) Edit->Mirror
Internal Surface/Edit /Mirror is used to mirror all the selected geometry entities (curves and sur-
faces) according to a mirror plane. The following prompts are given to specify the mirror plane:
Mirror Plane Normal (q) ?
>> 0 0 1
Mirror Plane Origin (q) ?
>> 0 0 0
A curve used in the definition of a surface (i.e. lofting curve) cannot be freely mirrored, since it
would implicitly change the definition of the surface. To mirror such a curve a copy must first be
made (see 20. The copy can then be freely mirrored.
To quit this option, enter <q> and press <Enter>.
Obviously, if a curve has only two control points, these ones cannot be removed.
To quit the option, press <q> or the right mouse button.
HEXPRESS™ 2-21
User Interface Menu Bar
Modification of tangents is only possible for cspline curves. In this case, select the
tangent to be modified with the left mouse button and move the cursor to indicate the
new tangent direction. The new direction of the tangent can be entered from the key-
board by typing the new coordinates ’x y z’ in the graphics area and pressing <Enter>.
Attraction is also available by still pressing <a>.
e) Modify Curve->Discretization
Internal Surface/Modify Curve/Discretization allows the user to change the number of points
used to discretize the curve. These points are used to draw the curve on the screen. This command
applies to all the selected curves.
The following prompt is given to enter the number of intermediate points between two consecutive
control points of the curve:
Number of discretization points between control points (q) ?
>> 10
Enter <q> and press <Enter> to quit this command.
2-22 HEXPRESS™
Menu Bar User Interface
f) Modify Curve->Divide
Internal Surface/Modify Curve/Divide allows the user to divide a selected curve. After the divi-
sion the old curve is removed from the geometry repository and two new curves (bsplines) are cre-
ated. The following prompt is given when activating the option:
Select the division point (a = attraction, q = quit) a:On
The division point is displayed as marker (cross surrounded by a circle) and can be specified by
selecting a point with the mouse within the limits of the curve or it can be entered with the key-
board.
It is possible to attract the division point to edges grid points by enabling the attraction mode.
Attraction to points is activated or deactivated by pressing <a> within the graphics area.
To quit this command, press <q> or the right mouse button.
HEXPRESS™ 2-23
User Interface Menu Bar
a) Select->Cartesian Points
Internal Surface/Select/Cartesian Points allows the user to select or unselect one or more visible
Cartesian points with the mouse. When selected, the Cartesian points appear highlighted in blue
(default) else they appear in white. The following prompt appears when selecting this option:
Select Cartesian Point(s) (a = all, q = quit)
Subsequent operations are done with the mouse in the graphics area:
•moving the mouse over a non-selected point highlights it,
•pressing the left mouse button selects it,
•pressing one more time unselects it,
•pressing the right button or <q> terminates the selection process.
It is possible to select or unselect all points at once by pressing <a> in the graphics
area. The first time <a> is pressed all the points are unselected. The next time, <a> acts
as a toggle.
b) Select->Curves
Internal Surface/Select/Curves allows the user to select or unselect one or more visible curves
with the mouse for subsequent operations in geometry modelling or grid generation. When selected,
the curves appear highlighted in yellow (default). The following prompt appears when selecting
this option:
<1> Select curve(s), <1 Drag> Area selection, <3> quit, (a = all)
<1> corresponds to left mouse button, <2> to middle mouse button, <3> to right
mouse button.
Subsequent operations are done with the mouse in the graphics area:
•moving the mouse over a non-selected curve highlights it,
•pressing the left mouse button selects it,
•pressing one more time unselects it,
•pressing the left mouse button without releasing it and dragging the mouse draw a rectangle.
Releasing the left button selects all the curves having a part in this rectangle,
•pressing the right button or <q> terminates the selection process.
It is possible to select or unselect all curves at once by pressing <a> in the graphics
area. The first time <a> is pressed all the curves are unselected. The next time, <a> acts
as a toggle.
During the selection, the information area is used to display information about the current curve.
Typical information is: curve name, arc length of the discretization curve,...
c) Select->Surfaces
Internal Surface/Select/Surfaces allows the user to select or unselect one or more visible surfaces
with the mouse for subsequent operations in geometry modelling (i.e surf-surf intersection) or grid
generation (i.e face grid generation). When selected, the boundary curves of the selected surfaces
appear highlighted in red (default) else they appear in blue.
Surface selection is possible by simple positioning of the mouse over the surface. When several sur-
faces are stacked on top of each other, HEXPRESS provides a way to sweep through the surfaces
before selecting the desired one.
The following prompt appears when selecting this option:
2-24 HEXPRESS™
Menu Bar User Interface
<1> corresponds to left mouse button, <2> to middle mouse button, <3> to right
mouse button.
Subsequent operations are done with the mouse in the graphics area:
• Move the mouse to a surface to select (unselect). The surface is ready for selection (unse-
lection) when it becomes highlighted.
• Left-click to select (or unselect) the surface. The surface changes its highlight to reflect its
new selection status.
• It is possible to select several surfaces at once by successive <Ctrl> + left-clicks.
• When several surfaces are stacked on top of each other, HEXPRESS takes by default, the
closest surface to the user in the direction of the user’s eyes. The user can sweep through
the surfaces by middle-clicking the mouse, until the desired surface is highlighted. Left-
click then allows to select the highlighted surface.
It is possible to select or unselect all surfaces at once by pressing <Ctrl> + <a> in the
graphics area. The first time <Ctrl> + <a> is pressed all the surfaces are unselected. The
next time, <Ctrl> + <a> acts as a toggle.
During the selection, the information area is used to display information about the current surface,
such as its name.
a) View->Points
Internal Surface/View/Points allows the user to choose which Cartesian points are displayed. A
point chooser (Figure 2.3.2-2), showing all the points in the geometry repository, is opened to select
the points. The visible points are highlighted. To make one or more points visible, select them with
the left mouse button in the chooser, then press Apply. The points are automatically displayed in the
graphics area.
HEXPRESS™ 2-25
User Interface Menu Bar
The <Ctrl> key is used in combination with the left mouse button to select several points in the
chooser.
The <Shift> key is used in combination with the left mouse button to select a range of points in the
chooser. A range of points can also be selected by pressing the left button, dragging the mouse and
releasing the left button.
A filter, using regular expression search, is provided to select or unselect points by their name.
b) View->Curves
Internal Surface/View/Curves allows the user to choose which curves are displayed. A curve
chooser (Figure 2.3.2-2), showing all the curves in the geometry repository, is opened to select the
curves. The visible curves are highlighted. To make one or more curves visible, select them with the
left mouse button in the chooser, then press Apply. The curves are automatically displayed in the
graphics area.
The <Ctrl> key is used in combination with the left mouse button to select several curves in the
chooser.
The <Shift> key is used in combination with the left mouse button to select a range of curves in the
chooser. A range of curves can also be selected by pressing the left button, dragging the mouse and
releasing the left button.
A filter, using regular expression search, is provided to select or unselect curves by their name.
c) View->Surfaces
Internal Surface/View/Surfaces allows the user to choose which surfaces are displayed. A surface
chooser (Figure 2.3.2-3), showing all the surfaces in the geometry repository, is opened to select the
surfaces. The visible surfaces are highlighted. To make one or more surfaces visible, select them
with the left mouse button in the chooser, then press Apply. The wireframe of the surfaces are auto-
matically displayed in the graphics area.
2-26 HEXPRESS™
Menu Bar User Interface
The <Ctrl> key is used in combination with the mouse to select several surfaces in the chooser.
The <Shift> key is used in combination with the mouse to select a range of surfaces in the chooser.
A range of surfaces can also be selected by pressing the left button, dragging the mouse and releas-
ing the left button.
A filter, using regular expression search, is provided to select or unselect surfaces by their name.
g) View->Control Points
Internal Surface/View/Control Points acts as a toggle to show or hide the control points of all
selected curves.
h) View->Curve Orientation
Internal Surface/View/Curve Orientation acts as a toggle to show or hide the orientation of the
selected curves. An arrow is displayed indicating the orientation of the curve.
HEXPRESS™ 2-27
User Interface Menu Bar
2-28 HEXPRESS™
Menu Bar User Interface
— Propagate: allows to apply the same settings from the selected block to all the other ones.
In the Periodicity - Edition dialog box (Figure 2.3.3-2), the following inputs can be specified:
Periodicity name - The user can change the name of the mesh periodicity.
Periodicity types - Periodicity can be specified through rotation, translation and mirror conditions.
— Rotation: domains are rotated by a specified angle around a selected axis (Figure 2.3.3-3).
The rotation axis is defined by the rotation axis direction (axis) and the anchor point (origin).
The number of repetitions is defined indirectly by imposing the number of periodicities for
the domain considered (i.e. a compressor including 36 blades passages should have a
number of periodicities of 36).
FIGURE 2.3.3-3 Mesh before (left) and after (right) rotation repetition
HEXPRESS™ 2-29
User Interface Menu Bar
FIGURE 2.3.3-4 Mesh before (left) and after (right) translation repetition
— Mirror: domains can be mirrored with respect to a mirror plane, defined by an origin and the
axis (normal to that plane).
The Apply button accepts and apply the current settings to the specified domain(s) while the Clear
button resets all parameters to default values.
Periodic boundary conditions at the domain faces can either be matching (PER) or full non-match-
ing (FNMB). The matching PER connections can be automatically found by using the "Search Peri-
odic BC" button shown in Figure 2.3.3-6. Non matching connections (NMB), Periodic matching
connections (PER) and Partially non matching connections (PERNM) can be preserved from
IGG™ or AutoGrid5™ meshes.
2-30 HEXPRESS™
Menu Bar User Interface
retrieved for the mesh entities. When invoking the menu item or pressing the icon in the icon
bar, the following dialog box (Figure 2.3.3-6) is opened:
Boundary conditions menu allows to define the type of boundary condition imposed on a patch or
a group of patches. The type of boundary condition for a patch can influence the mesh generation
process. For instance, a box from the Box adaptation will refine only Solid surfaces (SOL). The
other menu influenced by this choice is the Viscous layers menu: it will only list patches flagged as
Solid (SOL). In any case, they are mandatory for the flow solvers and should be correctly defined.
a) Face selection
The boundary condition settings dialog box lists all the faces of the domain, according to the cur-
rent Name, Type or Block filters. A face can be selected by left-clicking in the face browser or inter-
actively in the graphics area. This face is then automatically visualized in the graphics area. It is
possible to select several faces at once in the following ways:
1. While holding the <Ctrl> key down, select the desired faces in the browser.
2. While holding the <Shift> key down, select two faces delimitating a range of faces.
3. While pressing the left mouse button, drag the mouse and release the left button to select a range
of faces.
4. Pressing <Ctrl> + <a> keys down will select all patches.
5. Interactively in the graphics area depending of the selection options (shortcut <o>):
• <Ctrl> + left-click or left-click on successive faces,
HEXPRESS™ 2-31
User Interface Menu Bar
• Draw a rectangle in the graphics area to select all surfaces which are completely or partly
inside the rectangle. For this purpose, hold <Ctrl> key and drag the mouse with the left-
click.
6. Clicking on Select button and move mouse and left-click in the popup menu to select the type of
face selection.
• Select All Blanked allows to select all blanked faces in the graphics area.
• Select Face By Area allows to select all the faces with an area in the range specified by the
user.
• Select Face By Name allows to select all the faces whose name match the input name. A
dialog box is provided to input the name. The name can be a regular expression (i.e. if the
input is "channel*" all the faces whose name begins with channel will be selected)
• Select Geometrically Similar Faces allows to select all the faces with an area and a perim-
eter (under a tolerance of 0.03) identical to the selected face in the list.
• Select Tangent Faces allows to select all the faces tangent to each other (neighbouring
faces presenting an angle above the specified angle), starting from the list of selected faces.
2-32 HEXPRESS™
Menu Bar User Interface
The shortcut <h> in the graphics area will display hints. There are information about mouse button
bindings and shortcuts.
b) Filters
The different filters allow the display of specific faces in the browser while hiding the other faces.
The Name filter displays faces by name. Enter or choose an expression and all faces whose name
contains this expression will be listed.
The Type filter lists all faces of a given type (e.g. SOL, INL, OUT, MIR, EXT, NMB, PER, PERNM
etc).
The Block filter lists all faces of a given block (interesting for multi-domain project).
A multiblock structured project from IGG™ or AutoGrid5™ can also be loaded into
HEXPRESS. In this case, full matching (CON) are concatenated to define a single
computational domain.
FNMB connections are flagged as SOL*.
Rotor-stator interfaces are flagged as ROT.
c) Face grouping
The face grouping allows to group together selected patches with the same kind of boundary condi-
tions. It is possible to select them from the boundary conditions dialog box by selecting patches and
licking on Group button but also with the picking method by clicking on them in the graphics area
and then on Group item in the right-click menu.
HEXPRESS™ 2-33
User Interface Menu Bar
FIGURE 2.3.3-7 Warning for users about losing NMB, PER and PERNM connections
Users can also set the BC type interactively for face or group of faces in the graphics
area through the right-click menu.
e) Face name
This option allows to set a name to a geometrical face. This name is used further in all the other
menus of the unstructured mesh generator to reference this face.
The Set name action is also available by right-clicking on the face or group of faces in
the menu but as well in the graphics area.
f) Blank/Unblank
It is possible to completely hide faces and make them unselectable, by using the Blank/Unblank
functionality (right-click in the menu or in the graphics area) or by double clicking on the check
box on the left of the surface name. The check box actually shows the state of the surface: unblank
(ticked) or blank (unticked).
g) Periodic BC search
This option allows automatic search among SOL and UND patches for periodic matching faces
(PER). After the search is performed, the corresponding faces will be set to PER automatically as
shown in Figure 2.3.3-8. Only one of the periodic faces will be trimmed. After the trimming step, a
pair of staircase-like faces will be obtained and matching connections is established for the vertices
belonging to the periodic faces.
2-34 HEXPRESS™
Menu Bar User Interface
To disable the usage of periodic connections, users must set the periodic patches from PER to non
PER boundary condition type. The Search periodic BC button will be hidden from the interface if
no rotational periodicity is defined in the project.
It is to be noticed that before defining a full non matching connections, the concerned
patches should have a valid type. The type should still be undefined (UND) or set to
solid (SOL) otherwise the patch won’t appear in the Non Matching Connections Defini-
tion dialog window. When creating the full non matching connection, the related patch
type is set to SOL*. Then when deleting the full non matching connection, the type of the
HEXPRESS™ 2-35
User Interface Menu Bar
Patch 3 Patch 2
Second FNMB
connection
2. A patch closed on itself cannot be used if the connection region includes the closing part. In
this case, the patch must be divided in two patches.
3. Two patch points cannot be coincident. For example, a O-type patch with a singular line or
a triangular patch cannot be used in a FNMB connection.
2-36 HEXPRESS™
Menu Bar User Interface
4. In case of periodic FNMB connections, all the patches defining the connection must have
the same periodicity information (section 2-3.3.1 on page 2-28) and the button Periodic
has to be activated (Figure 2.3.3-9 - right side).
Select the menu Grid/Non Matching Connections.... It opens the dialog box shown on
Figure 2.3.3-9 - left side. This dialog box is showing all FNMB and rotor/stator connections already
set.
HEXPRESS™ 2-37
User Interface Menu Bar
The process of the computation involves that one side of the connection is triangulated whereas the
other side is projected on it. Default values should normally be used. If the computation fails,
parameters can be tuned. These parameters are local to each connection and saved into it, therefore
to be taken into account they must be set before creating the connection or the button Compute must
be pressed once a parameter is modified.
Maximum projection distance: when the projection distance of a point is greater than this value,
it is rejected.
Minimum projection distance: when all the points of a patch (contained in the projected side of
the connection) have a projection distance greater than this value, the patch projection is
rejected.
Number of smoothing iterations: before projection, some smoothing steps are done on the pro-
jection normals.
Periodic: when one or more periodicities have been defined in the Grid/Periodicity menu, the
connection should be defined accordingly. The periodicity and the number of repetition should
be entered to allow periodic FNMB connection that is not covering the same area. This value is
"1" in case of a classic periodicity and "2" or more in case of a periodicity by repetition.
2-38 HEXPRESS™
Menu Bar User Interface
Reverse triangulated side: to reverse the triangulated side which is by default the one containing
the greater number of points.
Clicking on Search Connections will perform an automated search of all the full non
matching connections (a limitation is still present for axi-symmetric configuration)
If the two faces to detect are flat and represented by too few triangles, the detection
may fail. The workaround is to discretize the domain with more triangles.
To compute a FNMB connection:
Once a connection is defined, it is possible to visualize the triangulation of the common region by
pressing the Compute button. This triangulation is not directly used in HEXPRESS but only
serves to visualize and compute the triangulation that will be used by the solver and to verify that
the connection is correctly performed.
Select all the desired connections with <Ctrl> and click on the Compute button: all the
connections are computed sequentially. It is also possible to select them by dragging the
mouse in the list or by selecting a group using the <Shift> button of the keyboard.
To view and/or delete an existing FNMB connection:
• Left-click on the desired connection in the connection list to select it.
• If the connection is already performed, the concerned patches (blue) and the resulting con-
nection (red and yellow) are highlighted in the graphics area.
HEXPRESS™ 2-39
User Interface Menu Bar
• To list only the patches involved in the desired connection, click on Edit button.
• Press the Delete button to remove the selected FNMB connection (the type of the corre-
sponding patches is unchanged).
b) Rotor/Stator Connections
In practice, the rotor/stator connection allows to connect two domains presenting different periodic-
ity and/or different rotation speed (i.e. multistage turbomachine). The definition of such connection
consists of the following:
• A connection name.
• A list of "left" patches defining one side of the connection.
• A list of "right" patches defining the other side of the connection.
The patches in one list are not restricted to belong to the same face or same block.
The patches defining the Rotor and the Stator should be divided in two parts at least:
four different points are required by the algorithm.
The rotor/stator patches should not include regions where R=0.
Select the menu Grid/Non Matching Connections.... It opens the dialog box shown on
Figure 2.3.3-9 - left side. This dialog box is showing all FNMB and rotor/stator connections already
set and allows the user to add a new one by clicking on the button Add. This button opens a new
dialog box (Figure 2.3.3-9 - right side.). It contains two patch browsers to define the left and right
patches lists. The use of the patch browsers is the same as for the Boundary Conditions dialog box.
To define a rotor/stator connection:
• Enter a name for the connection.
2-40 HEXPRESS™
Menu Bar User Interface
• Select the patches defining the "left" side. These patches are highlighted in light blue the
graphics area.
• Select the patches defining the "right" side. These patches are highlighted in dark blue in
the graphics area.
• Select the type of connection: Rotor/stator. Once this is selected, the parameters for rotor/
stator connections will appear as shown in Figure 2.3.3-12.
Once a connection is created, patches can be added and/or removed from it. Simply update patches
lists by clicking on Edit and modify the patches.
Click on Search Connections performs an automated search for full non matching
HEXPRESS™ 2-41
User Interface Menu Bar
connections. Clicking on Yes in the confirmation dialogue if the search for Rotor/Stator
connections is also desired. Please take note that this action may take a long time.
Select all the desired connections with <Ctrl> and click on the Compute button: all the
connections are computed sequentially. It is also possible to select them by dragging the
mouse in the list or by selecting a group using the <Shift> button of the keyboard.
To view and/or delete an existing rotor/stator connection:
• Left-click on the desired connection in the connection list to select it.
• If the connection is already performed, the concerned patches and the resulting connection
are highlighted in the graphics area.
• To list only the patches involved in the desired connection, click on Edit button.
• Press the Delete button to remove the selected rotor/stator connection (the type of the corre-
sponding patches is unchanged).
2-42 HEXPRESS™
Menu Bar User Interface
Three parameters of the histogram display may be adjusted for the six last criteria of this list
(Figure 2.3.3-14):
• Minimum value, the lower bound of the displayed criterion interval (From:)
• Maximum value, the upper bound of the displayed criterion interval (To:)
• Number of intervals determines the number of bars of the histogram (Number of steps:)
Each bar represents the number of cells whose criterion value is included in the bar interval. By
left-clicking on one of the bars, the corresponding cells are displayed in the HEXPRESSgraphic
area. Cells are displayed in a color varying depending on the value of the quality criterion.
The dialog box allows also to detect the negative, concave, twisted and relaxed cells. They can be
selected from the Criterion pop down menu. When one of these criteria is selected, no histogram is
displayed and the Manual Correction button can be selected (when cells detected) for an interactive
correction of the mesh (see next section for more details).
The Show markers check button activates the circle markers display of for each vertex of displayed
cells, which facilitates small cells localization of in the computational domain.
a) Negative cells
An important check of the mesh quality is to detect the presence of negative cells, i.e. cells with a
negative volume. The criterion is available for hexahedral, tetrahedral, prism and pyramidal cells.
The number of negative cells is displayed when negative cells is selected as criterion.
HEXPRESS™ 2-43
User Interface Menu Bar
h3
h1 h2
ijk = h i h j h k i j k
h max
AR = ----------
h min
where h min and h max are respectively the shortest and longest cell edges.
e) Volume criterion
Volume criterion available for hexahedral, tetrahedral, prism and pyramidal cells, corresponds to
the histogram of the cell volume distribution in the whole computational domain. The volume units
are linked to the units of the domain used to perform the mesh within HEXPRESS™.
T max – T e T e – T min
EquiAngularSkewness = max ---------------------------
- ---------------------------
180 – T e Te
T min and T max are respectively the minimum and the maximum angle of a face or cell
T e is the angle for an equiangular face or cell (60 for triangular face, 90 for quadrilateral face and
90 for hexahedral cells)
2-44 HEXPRESS™
Menu Bar User Interface
V V
AdjacentCellVolumeRatio i = max ------j ------i
V i V j
V j is the volume of the neighboring cell to the face j other than cell i .
D D
ExpansionRatio j = max ------i ------j
D j Di
D j is the distance between face centroid for neighboring cell to the face j other than cell i
The maximum value of the three directions is assigned mesh expansion ratio for the cell.
For the faces having children faces (see Figure 2.3.3-10), expansion ratio is calculated using the
formula:.
2x 1 x 2 + x 3
MeshExpansionRatio = max ---------------- ----------------
x 2 + x 3 2x 1
HEXPRESS™ 2-45
User Interface Menu Bar
j) Relaxed Cells
In case the relaxing geometry option has been used during optimization step (see 43), by clicking
on the Relaxed cells criteria, it is possible to check the number of relaxed cells and visualize them in
the graphics area at the same time.
k) Manual Correction
When the negative or concave cells criteria is selected in the Mesh Quality dialog box, the button
Manual Correction is clicked to open the interactive mesh modification dialog box (see
Figure 2.3.3-17).
To perform an interactive mesh correction, proceed as follows:
1. In the Mesh Quality dialog box, select the criteria corresponding to the cells to be corrected
(negative or concave cells).
2. Select the Manual Correction button (if there are negative or concave cells appearing in the
Graphics area), the message "<1> Select Cell, <3> quit" appears in the message area.
<1> corresponds to left mouse button, <2> to middle mouse button, <3> to right
mouse button.
3. Click on the cell to be corrected with the left mouse button, the Manual Mesh Correction dia-
log box appears (see Figure 2.3.3-17). The dialog box is made of four main parts:
2-46 HEXPRESS™
Menu Bar User Interface
• On the left, the list of the nodes from the selected cell. When a node is selected in this list,
the other parts are updated and the selected node appears in red in the graphics area.
• On the right side, the cells around the selected node are listed, with the currently selected
cell highlighted in green. In this list, the first column contains the cell number, the second
column indicates if the cell is currently represented in the graphical area (in that case, it is a
"1" otherwise it is a "2") and the third column indicates the quality value of the cell. This
value represents the energy of deformation: greater the value is, more deformed the cell
becomes. If the volume is negative, then the volume is written; and if the cell is concave or
twisted, the menu will display "Concave" or "Twisted".
• In the lower middle part, the coordinates of the currently selected node are displayed and
small arrows can be used to move the node along the X, Y or Z axis. Each click on an arrow
button moves the node by a step that can be controlled in the step entry situated below the
node coordinates.
• In the upper middle part, the gradient of the quality value is displayed. The gradient is com-
puted as the partial derivative of the quality value with respect to a displacement of the cur-
rent node in the X, Y or Z direction.
4. When a cell node is moved, the quality values are updated. The quality value is interpreted as
follows:
• A negative value indicates a negative cell. The quality value is then the volume of the cell.
• A B character indicates that the cell is concave in the slow mode.
• A positive value indicates that the cell is neither negative nor concave. Small values indi-
cate cells with good quality. The higher the value is, the worse is its quality.
5. Representation of a cell in the graphical area can be added or removed by selecting the desired
cell in the cell list (on the right side of the dialog box) and by clicking on the Show/Hide button.
6. The cell that is selected for modification can be changed in two different ways:
• by selecting the desired cell in the cell list (on the right side of the dialog box) and by click-
ing on the Select button.
• When the message "<1> Select Cell, <3> quit" is present, by left-clicking on any of the
cells represented in the graphical area in order to update the dialog box to the selected cell.
<1> corresponds to left mouse button, <2> to middle mouse button, <3> to right
mouse button.
7. During the interactive correction, the initial position of all the nodes may be restored by select-
ing the Reset button.
HEXPRESS™ 2-47
User Interface Menu Bar
8. When the interactive modification is finished, press the Ok button to validate the modification
or press Cancel to discard all the modifications and close the dialog box.
The transformations can only be performed if the mesh has been fist snapped.
a) Rotate
The following dialog box appears when selecting the Rotate thumbnail. It allows to specify the ori-
gin and direction of the rotation axis as well as the angle of rotation in degree.
The Apply button allows to perform the transformation on the active block or on all the blocks.
b) Translate
The following dialog box appears when selecting the Translate thumbnail. It allows to specify both
direction and magnitude of the translation vector.
2-48 HEXPRESS™
Menu Bar User Interface
The Apply button allows to perform the transformation on the active block or on all the blocks.
c) Scale
It is possible to scale a mesh with the following dialog box. The scaling factor must be specified for
each direction.
The Apply button allows to perform the transformation on the active block or on all the blocks.
d) Axisymmetric
The following dialog box appears when selecting the Axisymmetric thumbnail. It allows to specify
the angle of the axisymmetric transformation. It is also possible to impose the number of cells
equally spaced in theta direction (Nb of layers in theta).
HEXPRESS™ 2-49
User Interface Menu Bar
The transformation from 2D to Axisymmetric is applied on the active block or all blocks when
clicking on Apply button.
The mirror plane must be aligned with Cartesian axis including the point (0,0,0).
2-50 HEXPRESS™
Menu Bar User Interface
The Apply button allows to perform the transformation on the active block or on all the blocks.
The mesh used for mirroring is considered as final and can not be further refined or
modified in the current session. In case refinement or modification are really needed,
save the mesh project and open it again in a new session.
This option is present for backward compatibility only with projects before v2.5-4.
2-3.4 View Menu
2-3.4.1 Face Viewer
This menu provides the opportunity to decide how to represent the patches one by one, or by group
if any. Shading, edges, color or mesh can be represented or not. Please read section 2-5.5.2 on page
2-80 to know more about this menu.
HEXPRESS™ 2-51
User Interface Menu Bar
2-3.4.2 View/Cells...
View/Cells... menu allows to display a list of cells specified by their indices.
The list of cells is specified as a comma (or a space) separated list. Each item is a single number or
a set of two numbers separated by a "-" symbol. A "-" separating pair of numbers is used to specify
a range of element numbers. The first cell in the list is referred to "0".
A shrink factor can be specified. A value of 0.0 indicates that the element is displayed with its true
geometric size. A factor higher than 0.0 indicates that the element is reduced in size following the
formula:
Pi = Pc + 1 – SF Pi – Pc
where,
SF: Shrink factor. If SF=0, no shrink. If SF=1, full shrink. 0.0 SF 1.0
2-52 HEXPRESS™
Menu Bar User Interface
Apply and Close to respectively apply the new parameter and close the window.
2-3.4.6 View/Perspective
View/Perspective is used as a toggle to switch between orthogonal and perspective projection in
the graphics area. By default, orthogonal projection is used.
When using a perspective projection, the selection of curves and edges and the render-
ing of hidden surfaces may not succeed.
HEXPRESS™ 2-53
User Interface Menu Bar
2-3.4.7 View/Repetition...
In order to display grid repetitions, the mesh periodicity has to be defined (section 2-3.3.1 on page
2-28). The View/Repetition... menu allows to repeat the domain and mesh (Figure 2.3.3-3 on
page 2-29.) by specifying the number of repetitions.
2-3.5 STL
The STL menu allows to adapt STL geometry files before creating the domain. Please refer to sec-
tion 4-3 on page 4-21 for a description of this menu.
2-3.6 Tools
2-3.6.1 STARCD->STL
The STARCD->STL command is used to convert a surface mesh from StarCD format to a ".stl"
file and its associated ".stl.prop" file. These files can then be imported in HEXPRESS. The mesh
to convert is selected by the user using a file chooser. Either the ".vrt" or the ".cel" file may be
selected. However, the tool expects to find both ".vrt" and ".cel" files. The surface mesh may con-
tain triangles and/or quadrilaterals. In the last case, a quadrilateral is exported as two triangles in the
resulting ".stl" file. The associated property file ".stl.prop" is built based on the information con-
tained in the ".cel" file.
2-54 HEXPRESS™
Menu Bar User Interface
2-3.6.3 Tools/Distance
Tools/Distance is useful to measure the distance between two points or between a point and a line.
The following dialog box will appear, showing the distances computed along principal directions
between the two points:
HEXPRESS™ 2-55
User Interface Menu Bar
2-3.7 Plugins
2-3.7.1 Concept
The purpose of this menu is to provide a plugin mechanism where users can put their own python
scripts and access them through the interface, via a Plugins menu. NUMECA will also provide
some python scripts that users can load.
In the above example, the Marine module has been loaded from the installation package of
FINE/Marine, and the hexpress module is a user-defined folder which contains personal scripts.
Under Linux, it is also possible to activate a module from the command line by
launching HEXPRESS in the following way:
hexpress -module <module_name> -niversion ...
2-56 HEXPRESS™
Menu Bar User Interface
A user can create his own python scripts with HEXPRESS macro commands pro-
vided in Chapter 7.
HEXPRESS™ 2-57
User Interface Menu Bar
LppBelow = 1.5
LppAbove = 1
LppSide = 3
LppBehind = 3
— User-defined: user can prescribe his own numbers. Default are the ones from Resistance.
• Configuration: defines if the case should be symmetric or not. If the geometry file is already
split in two, ’Symmetric’ should be selected. In case the geometry file is the entire body and the
goal is to simulate half of it, select ’Symmetric’. In case the geometry file is the entire body and
the goal is to simulate the entire body, select ’Non-symmetric’.
• Body orientation: defines the orientation of the reference frame related to the location of the
center o f gravity of the body.
• Reference: defines the reference length (automatically or not) and speed.
2-58 HEXPRESS™
Menu Bar User Interface
• Mesh density: defines the type and number of refinements for each patch depending on its name.
Here is the table of refinement criteria.
If one can define names in the CAD software, the script will be able to recognize them and
define mesh settings accordingly. In the script, a ’Coarse’ mesh correspond to the 1st level,
’Medium’ to 2nd level and ’Fine’ to 3rd level. Hence if the selected mesh density is ’Medium’,
the 2nd number of refinement level will be selected. The same idea applies for the diffusion.
Example 1: if the geometry contains a patch named "Deck", a Target cell size criterion will be
applied with a maximum number of refinement of 4 and target sizes of (0,0,0). The diffusion
will be set to global (2 by default).
Example 2: if the geometry contains a patch named "Rudder", if the user selected a ’Fine’
mesh, the curvature and the Target cell size criteria will be applied with a maximum number of
refinement of 10 and target sizes of (0,0,0). The diffusion will be set to 1.
If the face name is not in this table, the script will assign a target cell size criteria with a value
of 6 for the maximum number of refinements, using a global diffusion.
• Merge patches with the same name: the feature will parse the list of faces and try to merge the
ones with the same name. Names should be defined carefully in the CAD software to avoid that
too many faces are merged.
• Merge tangential faces: when using it, a feature angle is requested to merge all patches which
are tangential according to this given angle. A low angle will merge more faces whereas an
angle close to 180degrees will merge few faces.
• Viscous layers: for a model scale, we assume that Y+ should be between 20 and 50, and for full
scale between 50 and 300. Hence, according to the mesh density:
— Model scale:
if the mesh density is 'Coarse': Y+ = 50.
if the mesh density is 'Medium': Y+ = 30.
if the mesh density is 'Fine': Y+ = 20.
— Full scale:
if the mesh density is 'Coarse': Y+ = 300.
if the mesh density is 'Medium': Y+ = 150.
if the mesh density is 'Fine: Y+ = 50.
HEXPRESS™ 2-59
User Interface Menu Bar
Viscous layers are then defined and computed for solid faces only and if the face is not called
“DECK” or “Deck” since there is usually no need to insert viscous layers on the deck of a ship
(viscous effects from the air part are negligible).
The script assumes an isotropic mesh is used on the solid walls. Hence, the height of the first
Euler cell on the solid walls can be computed by the script according to the number of refine-
ment: size_euler_cell = Initial cell size / 2**N, with N the Number of refinement on the face.
The script will then computes the number of viscous layers needed to completely fill the Euler
cell and ensure that inflation technique will be activated, based on a stretching ratio of 1.2.
The given kinematic viscosity by the user is used to compute the first layer thickness as an
information, printed in the shell.
• Try to Set buffer type to Type II will impose buffer insertion of Type II for the edges on the Mir-
ror plane for the settings of the snapping step. However, HEXPRESS™ will try to respect this
input but it is not guaranteed that it will be the case after snapping. If not, a warning is raised in
the .rep file or in the report file.
After specification of the inputs, domain is constructed, boundary conditions are also defined
automatically, different internal surfaces are created to allow different zone of refinements and
all mesh settings are setup. The user is invited to check the whole mesh wizard before generat-
ing the mesh.
The domain creation will not work in case the symmetry plane is not perfectly aligned
on the Y plane.
Domain creation is not yet implemented for 2d case.
The geometry should be aligned with X-axis initially. Rotation can be done with CAD
manipulation before if necessary. Z-axis should be the gravity axis.
The geometry should not have a bounding box already included since the script will
create it automatically.
Y+ is based on the supposition that wall function will be used during the computation.
The number of viscous layers is computed based on a theoretical formula and does not
take into account the influence from patches nearby. It is advised to let the inflation
method active or to check the number of viscous layers to insert after the optimization
step.
b) Domhydro
This plugin allows the "domhydro" tool to be launched inside HEXPRESS™ interface. "Domhy-
dro" serves as a tool which can solve the hydrostatic problem of a body using the domain and
boundary conditions files from HEXPRESS™.
b.1)Assumptions
— Horizontal positions of center of gravity and the center of buoyancy are equal. The vertical
position of the center of gravity is approximated considering that the mass is equally distrib-
uted on the shell below the free surface (equal distribution of the mass on the wetted sur-
face). The same distribution of mass is used to approximate the different inertia.
For instance, this should be taken into account especially for superstructures where the
mass in the air part can be important.
2-60 HEXPRESS™
Menu Bar User Interface
FIGURE 2.3.7-2 Illustration of a problematic case where water is considered inside the body
HEXPRESS™ 2-61
User Interface Menu Bar
• p2h: in this mode, the parameters of the body are known (mass, position of the center of grav-
ity), and the tool computes iteratively the hydrostatic and the equilibrium positions.
The equilibrium position corresponds to the hydrostatic position with all the degrees
of freedom free. Indeed, one can decide to freeze one or several degrees of freedom to
compute the hydrostatic position.
In p2h mode, the tool computes the following information, including the rotation and the
translation to apply on the domain if necessary, using the ’Move Part’ feature in Domain
Manipulation for instance:
— Rotation axis
— Rotation angle
— Point of rotation (gravity center)
— Vertical translation
— New position of the gravity center
— Cardan angles (Yaw Rz0, Pitch Ry1, Roll Rx2 in final position (deg.))
— Total wetted surface (final position)
— Projected wetted surface (final position)
— Water plane area (final position)
— Center of buoyancy (final position)
— Cardan angles (Yaw Rz0, Pitch Ry1, Roll Rx2 in equilibrium position (deg.))
— Total wetted surface (equilibrium position)
— Projected wetted surface (equilibrium position)
— Water plane area (equilibrium position)
— Total volume (equilibrium position)
— Immersed volume (equilibrium configuration)
— Volume in the air (equilibrium configuration)
— Estimated Inertia tensor (wetted body surface)
— Estimated Inertia tensor (entire body surface)
2-62 HEXPRESS™
Menu Bar User Interface
• save the HEXPRESS™ project again (under another name if one does not want to lose the pre-
vious names),
• launch "domhydro".
HEXPRESS™ 2-63
User Interface Menu Bar
2-64 HEXPRESS™
Menu Bar User Interface
Additional modification of orientation: (for instance, one can add extra rotations in order to calcu-
late the hydrostatic positions for several roll angles, starting from the same domain file)
Extra Roll angle (deg), Pitch angle (deg) and Yaw angle (deg)
Motion to freeze: it is possible to freeze the roll or pitch during the calculation of the hydrostatic
position.
Characteristics of the body:
Mass of the body, default: 0.0Kg
Center of gravity: Xcog,Ycog,Zcog
External force: It is possible to add an external force (resultant and moment) to compute the hydro-
static position, taking into consideration a wind effect on a sail for instance. This force can be a fol-
lower effort (default) or a non-follower one. With the non-follower, the direction of the force does
not change when the body moves: this is the case an extra mass is attached onto a body. To summa-
rize:
• follower efforts: the force direction does change according to the body motion
• non-follower efforts: the direction of the force remains fixed (like gravity)
Fx,Fy,Fz, default = (0.0,0.0,0.0) N
Mx,My,Mz, default = (0.0,0.0,0.0) N.m
Xapp,Yapp,Zapp coordinates of the application point, default = (0.0,0.0,0.0) m
Expert parameters:
Tolerance : collapsed points tolerance, default = 1e-06 m
Maximum number of iterations, default = 1000
b.5)Examples
b.5.1) Inertia Matrix is unknown
A classic situation is when the geometry is received in its hydrostatic position and all the boat’s
characteristics are known except the inertia matrix. The inertia matrix is mandatory when solving
the motion thanks to the Newton’s laws. In this case, one can use "domhydro" in h2p mode to calcu-
late the inertia matrix.
b.5.2) Sailing boat
Let’s consider the following situation:
• several roll angles of a sailing boat should be simulated (let’s say 2, 5 and 7 deg.),
• the mass and the initial gravity center location are known,
if it is not the case, "domhydro" should be first run in h2p mode.
• the geometry is in its primary configuration.
This procedure should be followed:
1. Launch "domhydro" in p2h mode entering the basic inputs and in particular:
— Cardan angles of the configuration (deg.): 0 0 0,
In case the boat is not in its primary configuration, values different from 0 should be
entered for the initial Cardan angles.
HEXPRESS™ 2-65
User Interface Menu Bar
— additional modification of the orientation (deg.): D_Rz0 D_Ry1 D_Rx2, with D_Rz0=0
D_Ry1=0 D_Rx2=2, which corresponds to the new orientation of the boat.
2. "domhydro" returns the new hydrostatic position of the boat and the domain transformation to
apply in HEXPRESS to put the boat in its new position, including the new Cardan angles.
3. Go back to HEXPRESS and use the ’Move Part’ feature to move the body (or the CAD soft-
ware)
4. Start meshing with the new domain (equilibrium configuration).
5. In the menu Motion parameters of the FINE/Marine interface, the Cardan angles should be
set to their new values.
6. Repeat these actions for the roll angles: 5 and 7 degrees.
b.5.3) Roll decay test
Let’s consider the following situation:
• the idea is to simulate a roll decay test starting from an initial angle of rotation (let’s say 5
deg.),
• the mass and the initial gravity center location are known,
if it is not the case, "domhydro" should be first run in h2p mode.
• the geometry is in its primary configuration.
This procedure should be followed:
• Run ’domhydro’ in p2h mode entering the following information:
— Cardan angles of the configuration (deg.): 0 0 0
In case the boat is not in its primary configuration, the corresponding values should be
entered for the initial Cardan angles.
— additional modification of the orientation (deg.): 0 0 0 corresponding the primary configura-
tion
• "domhydro" returns the new position of the boat to get the hydrostatic position.
• Go back to HEXPRESS and use the ’Move Part’ feature to prepare the domain in hydro-
static position.
• Run ’domhydro’ in p2h mode with the new domain, entering the following information:
— Cardan angles of the configuration (deg.): 0 0 0
— additional modification of the orientation (deg.): D_Rz0 D_Ry1 D_Rx2, with D_Rz0=0,
D_Ry1=0, D_Rx2=5 corresponding the future initial orientation of the boat.
• Keep the roll angle fixed.
• "domhydro" returns the new hydrostatic position of the boat.
• Go back to HEXPRESS.
• Start meshing with the previous domain (it is not necessary to use the ’Move Part’ now).
• In the menu Motion parameters of the FINE/Marine interface, the Cardan angles should be
set to 0 0 0 but in the Initial Conditions tab, the initial rotation angles should be changed to
deltaRx2=5, deltaRy1=0, deltaRz0=0 and initial vertical position of the gravity center to its
new location, found from the last run of "domhydro".
b.5.4) Follower and non-follower forces
Here is an example of a computation of a hydrostatic position. The case is a cube with the following
characteristics:
2-66 HEXPRESS™
Menu Bar User Interface
• center of gravity coordinates: (0,-1,-3), mass: 2000 kg, dimensions: 2x2x2m, centered on point
(0,0,0).
• gravity: -10 m/s2, water density: 1000 kg/m3, air density: 0 kg/m3
— follower force with intensity (0,14142.136,-14142.136) N is applied on the application point
with coordinates (0.,3.,1). The result is illustrated below:
Definition of the body indexes are required. For user who does not want to modify the
names of the patches, they can create a project backup before running ’domhydro’.
HEXPRESS™ 2-67
User Interface Menu Bar
2-68 HEXPRESS™
Toolbar User Interface
It should be noted that if the angle is too important, type I is the only possible choice
and HEXPRESS™ will force type I anyway.
Pressing the Apply button launches the internal surface creation and pressing Close closes the win-
dow. In case the coordinate is outside of the domain, an error will be raised.
2-4 Toolbar
The toolbar contains three icons providing direct access input/output functions. These actions are
also accessible through the menu bar.
Icon Description
Close the current project and opens the welcome dialog box which proposes a list of
options. See the Project/New menu item description (section 2-3.1.1 on page 2-4).
Save the current project. See the Project/Save menu item description (section 2-3.1.3
on page 2-5).
HEXPRESS™ 2-69
User Interface Quick Access Pad
Icon Description
Starts the distance tool which computes the distance between two points selected
on the screen. See the Internal Surface/Distance menu item description (section
2-3.6.3 on page 2-55)
Starts the mesh quality analysis tool.
See the Grid/Mesh Quality... menu item description (section 2-3.3.4 on page 2-
42)
Opens the Grid/Boundary Conditions menu (30)
2-70 HEXPRESS™
Quick Access Pad User Interface
a) Cartesian Point
This command is used to create Cartesian points, that is a point defined by its three Cartesian coor-
dinates x, y and z. The following prompt appears:
Enter Point Coordinates (x y z) ? (q)
>> 0 1 0
Enter the desired coordinates and press <Enter>. The corresponding Cartesian point will be dis-
played in a filled-in circle in the graphics area.
To quit this command, enter <q> and press <Enter>.
HEXPRESS™ 2-71
User Interface Quick Access Pad
b) Curve-Plane Inters
This command is used to create Cartesian points at the intersection between a plane and curves that
must be selected before using this command. The Cartesian points will be displayed in filled-in cir-
cles. The following prompts allowing the selection of the plane will appear:
Enter plane origin
>> 0 0 0
Enter plane normal
>> 0 0 1
To quit this command before the end, enter <q> in the keyboard input area and press <Enter>.
a) Polyline
This command is used to create a polyline by entering a set of control points. Between two points,
the curve is represented as a line segment.
• Using the mouse, the user must simply move the cursor to the desired position and press the left
mouse button to add a control point to the curve.
• Using the keyboard, the user must enter the 3 coordinates separated by a blank, while the cursor
is in the graphics area. The keyboard inputs are automatically echoed to the string input area.
Pressing <Enter> adds a control point to the curve.
• The creation of the curve is terminated by pressing the right mouse button. Notice that the last
curve segment, attached to the mouse movement is not part of the curve.
• When entering the points with the mouse, the depth of the point is automatically fixed by HEX-
PRESS. The current depth can be seen by reading the mouse coordinates in the corresponding
area.
• During the specification of the points with the mouse, it is possible to attract the cursor to exist-
ing points, curves or surfaces. This feature is very interesting since it allows to connect curves
together and to create T junctions. By default this attraction is enabled. To toggle the attraction
to points, press <a> in the graphics area. Similarly, to toggle the attraction to curves or surfaces,
press <c> or <s> respectively. When the cursor is attracted to an entity, a filled-in circle is dis-
played. The attraction works on:
— point attraction: Cartesian points and curves end points if they are visible,
— curve attraction: visible curves,
— surface attraction: visible surfaces,
— vertices and fixed points. This attraction always work and cannot be deactivated.
The point, curve or surface attraction feature is activated or deactivated by pressing respectively
<a>, <c> or <s> repeatedly, while the cursor is in the graphics area.
b) CSpline
This command is used to draw a parametric cubic spline through a set of control points entered with
the mouse and/or with the keyboard.
• Using the mouse, the user must simply move the cursor to the desired position and press the left
mouse button to add a control point to the curve.
• Using the keyboard, the user must enter the 3 coordinates separated by a blank, while the cursor
is in the graphics area. The keyboard inputs are automatically echoed in the string input area.
Pressing <Enter> adds a control point to the curve.
2-72 HEXPRESS™
Quick Access Pad User Interface
• The creation of the curve is terminated by pressing the right mouse button. Notice that the last
curve segment, attached to the mouse movement is not part of the curve and is removed from
the screen.
• When entering the points with the mouse, the depth of the point is automatically fixed by HEX-
PRESS. The current depth can be seen by reading the mouse coordinates in the corresponding
area.
• During the specification of the points with the mouse, it is possible to attract the cursor to exist-
ing points, curves or surfaces. This feature is very interesting since it allows to connect curves
together and to create T junctions. By default this attraction is enabled. To toggle the attraction
to points, press <a> in the graphics area. Similarly, to toggle the attraction to curves or surfaces,
press <c> or <s> respectively. When the cursor is attracted to an entity, a filled-in circle is dis-
played. The attraction works on:
— point attraction: Cartesian points and curves end points if they are visible.
— curve attraction: visible curves.
— surface attraction: visible surfaces.
— vertices and fixed points. This attraction always work and cannot be deactivated.
c) Arc
It opens the following submenu for the selection of various circular arc creation modes:
HEXPRESS™ 2-73
User Interface Quick Access Pad
anchor point
To draw a complete circle, the start point must be equal to the end point. The following prompts are
given for the anchor vector and the two points (data entered with the keyboard):
Enter normal to the arc
>> 0 1 0
Enter normal anchor point (q)
>> 0 0 0
Enter start point
>> 0 1 1
Enter end point
>> 1 1 0
The normal to the arc can be chosen as the screen normal by simply left-clicking in the
graphics area.
For the specification of the normal anchor point, start and end points, it is possible to attract the cur-
sor to existing points, curves or surfaces. This feature is very interesting since it allows to connect
curves together and to create T junctions. By default this attraction is enabled. To toggle the attrac-
tion to points, press <a> in the graphics area. Similarly, to toggle the attraction to curves or sur-
faces, press <c> or <s> respectively. When the cursor is attracted to an entity, a filled-in circle is
displayed. The attraction works on:
— point attraction: Cartesian points and curves end points if they are visible,
— curve attraction: visible curves,
— surface attraction: visible surfaces,
— vertices and fixed points. This attraction always work and cannot be deactivated.
2-74 HEXPRESS™
Quick Access Pad User Interface
respectively <a>, <c> or <s> repeatedly, while the cursor is in the graphics area.
An angle can be specified in place of the end point by pressing <p> when the start point is entered.
The following prompt will appear:
Enter angle
>> 45
Enter the desired angle and press <Enter>.
To quit this tool without creating an arc, press <q> or the right mouse button.
Example:
To draw a circular arc from (1,1,0) to (0,1,1) with centre (0,1,0), enter the following:
plane normal (0,1,0)
anchor point (0,1,0)
start point (0,1,1)
end point (1,1,0)
Notice that entering (0,0,0) for the anchor point would give the same result. Indeed, (0,0,0) is
located on the same arc normal than (0,1,0).
HEXPRESS™ 2-75
User Interface Quick Access Pad
representing the center are displayed; the corresponding values of the radius and center are shown
in the information area. When the end point is entered, it is also displayed in a filled-in circle.
FIGURE 2.5.2-4 Six arcs drawn through two points with a given radius
If the radius is entered through the keyboard input area, it is possible that the value entered is too
small (if value is lower than half distance between start and end point), in which case a warning
message appears. When the radius is entered, the sense of the circular arc can be chosen by pressing
<o> repeatedly. In fact, there are six possibilities to draw an arc between two points and with a
given radius, which includes two possibilities of complete circle, as shown in Figure 2.5.2-4.
Once the correct sense is chosen, simply click on the left mouse button to complete the arc creation.
To quit this tool without creating an arc, press <q> or the right mouse button.
Arc->Point-Point-Point. This menu option is used to create circular arcs through three points. The
following inputs are requested from the user:
• Start point,
• End point,
• Middle point.
All these data can be entered either through the keyboard input area or with the mouse.
During the specification of the points with the mouse, it is possible to attract the cursor to existing
points, curves or surfaces. By default this attraction is enabled. To toggle the attraction to points,
press <a> in the graphics area. Similarly, to toggle the attraction to curves or surfaces, press <c> or
<s> respectively. When the cursor is attracted to an entity, a filled-in circle is displayed. The attrac-
tion works on:
• visible points and curves end points,
• visible curves,
• visible surfaces,
• vertices and fixed points. This attraction always work and cannot be deactivated.
2-76 HEXPRESS™
Quick Access Pad User Interface
Entering the mid point will complete the circular arc (or circle) creation.
To exit the tool without creating an arc, press <q> or the right mouse button.
a) Lofted
This command is used to create a NURBS surface interpolating a set of selected curves. The orien-
tation and the order of the selected curves are taken into account to define the surface.
FIGURE 2.5.2-6 Curves order and orientation when creating a Lofted surface
An automatic creation of internal surface at Z-constant has been implemented and
available thanks to the Marine module in the Plugins menu. See 57 for more details.
b) Coons
This command allows to create a NURBS surface from four selected curves, using a bilinear inter-
polation. The four curves should define a closed region and should have the following orientation:
HEXPRESS™ 2-77
User Interface Quick Access Pad
4 2
FIGURE 2.5.2-7 Curves order and orientation when creating a Coons surface
The four curves must also be selected as indicated in the figure (curve 1 first,...).
c) Import
This button offers the possibility to import an STL surface as an internal surface into HEX-
PRESS™.
This command also allows to import ".dat" geometry files already exported within HEXPRESS™
with the following command.
For multidomain case, the internal surface will be part of the active domain when
importing the file.
d) Export
This command allows to export ".dat" geometry files that can be imported within HEXPRESS™
with the previous command.
Undo Settings
Delete Block
Domain validity check
The Domain Manipulation subpanel (Figure 2.5.3-1) allows to transform edges, faces, parts or an
entire domain composing the current domains of the mesh.
2-78 HEXPRESS™
Quick Access Pad User Interface
• Both edges and faces composing the domain can be manually and/or automatically split and
merged.
• A settings icon allows to define the shortest edge length after split and the feature angle. The
feature angle is the minimum angle between two edges or between the two normals of faces to
merge.
• A "domain validity check" icon allows to control the domain before meshing.
• An "undo" icon allows to undo the last performed operation.
Please refer to Chapter 5 for more illustrated details.
HEXPRESS™ 2-79
User Interface Quick Access Pad
2-5.5 View
The View subpanel (Figure 2.5.5-1) controls viewing and rendering operations on the geometry and
the grid.This subpanel is divided into three frames.
2-5.5.1 Domains
This frame gives the possibility to select in one click the domains to show in the graphics area.
• The button ( ) refers to the face mode viewing. All the viewing modification are applied on
the currently selected face. The face may be selected interactively by left-clicking on the face
into the graphics area or by right-clicking on the face icon ( ). This last operation opens a
dialog box listing all the faces available, called the Face Viewer. The Face Viewer can also be
opened by pressing the dedicated icon .
2-80 HEXPRESS™
Quick Access Pad User Interface
This menu gives an overview of all the visualization options patch by patch or by groups of patches.
A face can be selected by left-clicking in the face browser or interactively in the graphics area. This
face is then automatically visualized in the graphics area. It is possible to select several faces at
once in the following ways:
1. While holding the <Ctrl> key down, select the desired faces in the browser.
2. While holding the <Shift> key down, select two faces defining a range of faces.
3. While pressing the left mouse button, drag the mouse and release the left button to select a range
of faces.
4. Pressing <Ctrl>+ <a> keys down will select all patches.
5. Interactively in the graphics area depending of the selection options (shortcut <o>):
• <Ctrl> + left-click or left-click on successive faces,
• Draw a rectangle in the graphics area to select all surfaces which are completely or partly
inside the rectangle. For this purpose, hold <Ctrl> key and drag the mouse with the left-
click.
HEXPRESS™ 2-81
User Interface Quick Access Pad
6. Clicking on Select button and move mouse and left-click in the popup menu to select the type of
face selection.
• Select All Blanked allows to select all blanked faces in the graphics area.
• Select Face By Area allows to select all the faces with an area in the range specified by the
user.
• Select Face By Name allows to select all the faces whose name match the input name. A
dialog box is provided to input the name. The name can be a regular expression (i.e. if the
input is "channel*" all the faces whose name begins with channel will be selected)
• Select Geometrically Similar Faces allows to select all the faces with an area and a perim-
eter (under a tolerance of 0.03) identical to the selected face in the list.
• Select Tangent Faces allows to select all the faces tangent to each other (neighbouring
faces presenting an angle above the specified angle), starting from the list of selected faces.
Groups, type and names are defined in the Boundary Conditions menu (see 30).
By right-clicking on a face or a group of faces in the menu or in the graphics area, a popup menu
allows to:
— completely hide faces and make them unselectable, by using the Blank/Unblank functional-
ity (right-click in the menu or in the graphics area) or by double clicking on the check box
on the left of the surface name. The check box actually shows the state of the surface:
unblank (ticked) or blank (unticked) (Blank/Unblank),
2-82 HEXPRESS™
Quick Access Pad User Interface
The shortcut <h> in the graphics area will display hints. There are information about mouse button
bindings and shortcuts.
• The button ( ) refers to the block mode viewing. All the viewing modification are applied on
the currently selected block (domain). The block may be selected interactively by left-clicking
on the block into the graphics area.
• The button ( ) applies viewing modifications on all the blocks.
The second buttons row allows to modify the way of displaying surfaces in the graphics area:
displays the topological vertices and edges numbers as text in the graphical area
displays the triangulation from the geometry surfaces or the mesh faces.
• The button ( ) refers to face rendering. This menu is divided in three tabs : one for control-
ling the face rendering (Material), one for controlling the mesh appearance (Mesh) and one for
the Background colors. The settings in first two tabs work according to the active scope: Face,
Block or Grid. When the Face mode is active the settings are applied on the selected faces in the
Face Viewer dialog box.
HEXPRESS™ 2-83
User Interface Quick Access Pad
A Save as Default button is dedicated to save the current settings as preferences. This includes the
material and mesh properties as well as the background colors.
a) Material
The surface material properties are defined by four parameters:
• Diffuse: refers to the fundamental color of the surface.
• Specular: affects the light reflections on the surface. The shape, the strength and the color of
the highlight depends of the material. For instance, a material like cotton tissue will not
have any specular highlight, in comparison to a reflective surface like a mirror that will
have a very bright specular highlight.
—Color: is the color of the specular highlight.
2-84 HEXPRESS™
Quick Access Pad User Interface
—Gloss: defines the extent of the highlight. It is a value ranging from 1 to 4. A value of 1
means that the specular highlight is widespread. It will be the case for rough material. A
value of 4 means that the highlight is very narrow. It will be the case for very smooth
surfaces, like glass.
• Opacity: controls the transmission of light through the surface. An opacity of 1.0 means a
completely opaque surface. An opacity of 0 means a completely transparent surface.
HEXPRESS™ 2-85
User Interface Quick Access Pad
b) Mesh
This tab, used for controlling the mesh lines appearance, allows to control:
• the color of the mesh
• the line pattern
• the thickness of the mesh lines
2-86 HEXPRESS™
Quick Access Pad User Interface
c) Background
The third tab allows to define the background color. of the graphics area.
The edition button Ed. allows the user to specify his own background color independently of the
proposed colors. The look of the menu varies according the operating system.
During the initial and adaptation steps, the user can only control the color and mesh
attributes for the whole mesh and not face by face. This is explained by the fact that dur-
ing these steps, the cartesian mesh is not attached to any face.
No lighting is applied on the mesh solid surface representation during the initial and
adaptation steps.
Lighting of edges does not apply when the color is black.
Clicking on the icon ( ) opens the Camera Position dialogue box as shown in Figure 2.5.5-5
HEXPRESS™ 2-87
User Interface Quick Access Pad
• Save button: Saves the current camera position. A new entry, Camera # will be added in the list
each time the Save button is hit.
• Delete button: Deletes the selected camera position.
• Close button: Closes the dialogue box.
2-88 HEXPRESS™
Quick Access Pad User Interface
For systems using a mouse with only two buttons, the middle mouse button can be
emulated for viewing options by holding the <Ctrl> key while left-clicking.
During viewing operations, HEXPRESS automatically removes all ‘heavy’ graph-
ics representations from the active view, such as solid model or color shading. This is
done to maintain a reasonable speed during rotation, translation or zoom operations. The
complete picture is restored after a viewing operation is finished.
b) Coordinate axis
The coordinate axis button acts as a toggle to display different types of coordinate axis on the active
view, using the following mouse buttons:
• Left-click: turn on/off the display of symbolic coordinate axis at the lower right corner of the
view.
HEXPRESS™ 2-89
User Interface Quick Access Pad
• Middle-click: turn on/off the display of scaled coordinate axis for the active view. The axis
surrounds all objects in the view and may not be visible when the view is zoomed.
c) Scrolling
This button is used to translate the contents of the active view within the plane of graphics window
in the direction specified by the user. The following functions can be performed with the following
mouse buttons:
• Left-click: press and drag the left mouse button to indicate the translation direction. The transla-
tion is proportional to the mouse displacement. Release the button when finished.
The translation magnitude is automatically calculated by measuring the distance between the
initial clicked point and the current position.
• Middle-click: press and drag the middle mouse button to indicate the translation direction. The
translation is continuous in the indicated direction. Release the button when finished.
The translation speed is automatically calculated by measuring the distance between the initial
clicked point and the current cursor position.
d) 3D viewing button
This button enables viewing operations directly in the graphics area. Available operations are 3D
rotation, scrolling and zooming.
After having selected the option, move the mouse to the Graphics area then:
• Press and drag the left mouse button to perform a 3D rotation
• Press and drag the middle mouse button to perform a translation
• Press and drag the middle mouse button, while holding the <Shift> key, to perform a zoom
• Roll the middle mouse button to perform a zoom where the mouse is pointing.
• To select the centre of rotation, hold the <Shift> key and press the left mouse button only on a
vertex. The centre of rotation is always located in the centre of the screen. When changing, the
model is moved according to the new rotation center.
This 3D viewing tool is also accessible using the <F1> key.
e) Rotate about x, y or z axis
The rotation buttons are used to rotate graphical objects on the active view around the X, Y or Z
axis. Rotations are always performed around the centre of the active view and can be performed
with the following mouse buttons:
• Left-click: press and drag the left mouse button to the left or to the right. A clockwise or coun-
ter clockwise rotation will be performed, proportional to the mouse displacement. Release the
button when finished.
• Middle-click: press and drag the middle mouse button to the left or to the right. A continuous
clockwise or counter clockwise rotation will be performed. Release the button when finished.
f) Zoom in/out
This button is used for zooming operations on the active view. Zooming is always performed
around the view centre. The functions can be performed with the following mouse buttons:
• Left-click: press and drag the left mouse button to the left or to the right. A zoom in - zoom out
will be performed, proportional to the mouse displacement. Release the button when finished.
2-90 HEXPRESS™
Quick Access Pad User Interface
• Middle-click: press and drag the middle mouse button to the left or to the right. A continuous
zoom in - zoom out will be performed. Release the button when finished.
g) Region zoom
This button allows the user to specify a rectangular area in the active view that will be fitted to the
Graphics area. After having selected the button,
• Move the mouse to the active view,
• Press and drag the left mouse button to select the rectangular area in the active view,
• Release the button to perform the zoom operation.
These operations can be repeated several times to perform multiple zooms.
• Press <q> or the right mouse button to quit the option.
This tool is also accessed using the <F2> key.
h) Fit button
The fit button is used to fit the content of the active view to the Graphics area without changing the
camera orientation.
i) Original button
The original button is used to fit the content of the active view and reset the default viewpoint.
j) Cutting Plane
This option displays a movable plane that cuts the geometry and the mesh. The surface mesh is dis-
played. The plane is symbolically represented by four boundaries and its normal, and is by default
semi-transparent. Upon hitting the button, the Cutting Plane pop-up as shown in Figure 2.5.6-3
appears. The icon remains yellow as long as the tool is active.
The Cutting Plane dialogue allows the users to specify the origin and direction of the plane. The
Recenter button recomputes the origin of the cutting tool to be at the centre of the screen. At the
same time, the size of the cutting tool outline is recomputed to fit the view. This option is especially
useful after performing zoom on a specific region.
Mouse bindings:
• Left-click + drag: Rotates the plane;
• Middle-click + drag: Translates the plane.
HEXPRESS™ 2-91
User Interface Quick Access Pad
Key bindings:
• <x>, <y> or <z> : Aligns the plane normal along the X, Y or Z axis;
• <n> : Reverts the plane normal;
• <h> : Toggles the hints display;
• <o> : Opens the Cutting plane options dialogue:
Hide cut-away: hides the geometry on the other side of the plane.
Activate transparency: deactivates to make the cutting plane fully transparent
It is advised to deactivate plane transparency when using X11 driver to increase the
execution speed.
Show mesh: deactivates to hide the mesh and view geometry only.
Intersecting cutting plane only: activates to display only cells intersecting the cutting plane. The
cells are displayed through each side of the cutting plane.
Shading: activates to display cells in solid mode. Deactivate for wireframe mode.
Shrink factor: from 0 to 1, the shrink factor reduces the cell size in the X, Y and Z direction.
2-92 HEXPRESS™
Quick Access Pad User Interface
Mouse bindings:
• Left-click + drag : Changes the radius of the cylinder;
• Middle-click + drag : Changes the origin of the cylinder;
• Middle-click + <Ctrl> + drag : Contraints the movement of cylinder’s origin along X, Y or Z
axis. This direction is determined by the initial direction of the mouse after clicking. The closest
direction to the X, Y or Z axis will be retained and it remains until the end of the drag operation.
Key bindings:
• <h> : Toggles the hints display;
• <x>, <y> and <z> : Aligns the cylinder axis along X, Y or Z;
• <o> : Opens the Cutting options dialog box as shown in Figure 2.5.6-7;
HEXPRESS™ 2-93
User Interface Quick Access Pad
Mouse bindings:
• Left-click + drag : Changes the size of the box;
• Middle-click + drag : Changes the origin of the box;
• Middle-click + <Ctrl> + drag : Contraints the movement of box’s origin along X, Y or Z axis.
This direction is determined by the initial direction of the mouse after clicking. The closest
direction to the X, Y or Z axis will be retained and it remains until the end of the drag operation.
Key bindings:
• <h> : Toggles the hint display;
• <o> : Opens the Cutting options dialog box as shown in Figure 2.5.6-7.
2-94 HEXPRESS™
GUI interaction User Interface
HEXPRESS™ 2-95
User Interface GUI interaction
2-96 HEXPRESS™
CHAPTER 3: Meshing
Fundamentals
3-1 Overview
HEXPRESS™ has been developed to ensure a quick management of the grid generation process for
external and internal configurations. The software is able to generate an unstructured hexahedra
mesh in any "water-tight" computational domain (".dom").
The software provides a highly interactive user interface allowing a easy setup of the mesh genera-
tion for complex geometries. Based on a wizard approach, the mesh is generated step by step
through a minimum user inputs. The mesh wizard involves five different steps. Each step must be
successfully accomplished before proceeding to the next:
• Initial mesh
HEXPRESS creates an initial mesh surrounding the computational domain.
• Adapt to geometry
HEXPRESS adapts the initial mesh such that the cell sizes satisfy geometry dependent
criteria and removes afterwards cells intersecting the geometry or located outside the com-
putational domain.
• Snap to geometry
HEXPRESS projects the adapted mesh onto the geometry and recovers lower dimen-
sional features such as topological edges (curves) and topological vertices (corners). Since
the technology in HEXPRESS is based on a top-down approach, the adapted mesh does
not conform to the geometry. A simple projection on the surface would not preserve ridges
or sharp corners, that is why a unique technology has been developed inside of HEX-
PRESS to perform this capturing while ensuring the highest quality mesh. Additional
cells are also introduced during this stage to obtain a smoothly hexahedra mesh.
• Optimize
Though the snapping step already ensures a high quality mesh, some distorted cells may
exist. A powerful mesh optimization tool is implemented in HEXPRESS that allows the
conversion of concave cells in convex ones.
• Viscous layers
Finally, HEXPRESS can insert layers of high aspect ratio cells tangentially to the wall in
order to correctly resolve boundary layers.
HEXPRESS ™ 3-1
Meshing Fundamentals Mesh Domain Definition
FIGURE 3.2.0-1 Internal application (left) and external application (right) domain
HEXPRESS accepts three different CAD formats as input for the topology and geometry descrip-
tion of the computational domain:
• Parasolid & CATIA models. can be imported and its different bodies can be accessed.
Recall here that the computational domain must be described as a single closed volume.
• STL (Stereo Lithography Triangulation) model representation can be imported together
with additional information about the geometry attributes of the triangles, required to cor-
rectly reconstruct the topology of the model.
• Computational domain file ".dom" is the HEXPRESS native model format. It is a dis-
cretized representation of the computational domain containing all topology information.
The computational domain is of course ready for HEXPRESS grid generation.
3-2 HEXPRESS™
Mesh Domain Definition Meshing Fundamentals
Unify, delete
subtract, intersect
Spec. length.
tolerances, ...
Import STL
Create Group
Merge
Reverse
Reverse
tolerance
Create Domain
DOM
HEXPRESS™ 3-3
Meshing Fundamentals Mesh Generation Steps
3-3.2.1 Refinement
In this action, cells are successively subdivided such that specific geometrical criteria are satisfied.
3-4 HEXPRESS™
Mesh Generation Steps Meshing Fundamentals
3-3.2.2 Trimming
The trimming step removes all the cells intersecting or located outside of the geometry. HEX-
PRESS automatically finds the cells located inside the computational domain. At the end of the
process, a staircase mesh is obtained including all the interior cells (see Figure 3.3.2-3).
HEXPRESS™ 3-5
Meshing Fundamentals Mesh Generation Steps
3-3.4 Optimization
The mesh obtained after the snapping action may involve poor quality cells usually located close to
corners and curves. Some of these cells are concave or may even present a negative volume. A cell
is defined as concave (the cell looks like a "boomerang") if the Jacobian of the transformation to a
unit cube has at least one zero value for a point located inside of the cell.
HEXPRESS provides specific algorithms to convert concave cells to convex ones by slightly dis-
placing their vertices. A novel approach is also implemented to improve the orthogonality of con-
vex cells. In most instances, convex cells are important to ensure the stability and the robustness of
a flow solver. Furthermore mesh adaptation applied to concave cells may also create negative chil-
dren cells.
Negative cells should be prohibited. Usually, HEXPRESS is able to deliver a mesh without any
negative cell. However, the presence of negative cells is usually a sign of an inadequate choice of
cell sizes in a geometrical complex region. Further mesh refinements will usually solve the prob-
lem.
3-6 HEXPRESS™
Mesh Quality Meshing Fundamentals
3-5 Multi-Domain
The introduction of multi-domain option largely enhance HEXPRESS™ capabilities, with the pos-
sibility to import and manage several domains and meshes in the same project. Furthermore it
allows to merge meshes exported from HEXPRESS™/Hybrid, IGG™ and AutoGrid5™ (structured
NUMECA mesh generators) with HEXPRESS™ domains as illustrated in Figure 3.5.0-1.
5TM
When dealing with a multi-domain project, several "water-tight" computational domains (".dom")
have to be loaded within HEXPRESS™ through the menu /Project/Import.../Domain. When the
domains are imported, their selection is performed by left-clicking on it in the graphic area or by the
Active block entry in the tool bar.
HEXPRESS™ 3-7
Meshing Fundamentals Batch Mode
When HEXPRESS™ meshes are generated based on each imported domain, addi-
tional existing structured or unstructured meshes can be added into the project through
the menu Project/Import.../Project.
Finally before saving the whole project, connections between generated and/or imported meshes
have to be specified through the menu Grid/Non Matching Connections.... This menu allows to
specify a user-defined connection between meshes. Two types of connection can be defined: full
non matching connection and rotor/stator connection. The last type, in practice, allows to connect
two domains presenting different periodicity and/or different rotation speed, while the first type
allows to connect two domains presenting the same periodicity and rotation speed (more details in
section 2-3.3.3 on page 2-35).
This command should be used with HEXPRESS™ standalone version only. For
FINE™/Open and FINE™/Marine packages, please change "31_#" to "open31_#" or
"marine31_#" respectively.
3-8 HEXPRESS™
Batch Mode Meshing Fundamentals
Batch mode treats also multi-domains meshes and computations of full non matching
connections.
HEXPRESS™ 3-9
Meshing Fundamentals Batch Mode
3-10 HEXPRESS™
CHAPTER 4: Geometry Definition
4-1 Overview
This chapter is presenting the different CAD operations necessary to convert respectively a CAD
model into a computational domain to mesh within HEXPRESS. The resulting computational
domain is stored in a file with extension ".dom" (see section A-4 on page A-2 for a description).
Different CAD operations allow to create the solid model which will be converted into a computa-
tional domain: unification of bodies, bounding box creation, bodies substraction and bodies inter-
section. After conversion to a discretized computational domain, further tools are available to edit
the computational domain and to merge surfaces.
Figure 4.1.0-1 presents a flow chart of the successive CAD manipulations needed to create a valid
computational domain for HEXPRESSstarting from Parasolid™ or CATIA models, STL trian-
gulations and StarCD surface meshes:
1. A bounding box can be added to Parasolid™ or CATIA bodies to define the computational
domain of the required region surrounding bodies, e.g. for external flow simulation.
2. Parasolid™ and CATIA bodies can be added, subtracted or intersected.
3. The solid model of the computational domain is then exported, in a discretized format, by
triangulating the surface of its closed volume.
4. The triangulation of the computational domain, annotated with geometry attributes, can be
exported into a ".stl" and a ".prop" file for further editing.
5. Triangulations can be directly imported using a ".stl" format file together with associated
property file ".prop", which gives a geometry attribute to each triangle of the triangulation.
This additional information allows the automatic creation of topological information by
HEXPRESS.
6. An additional tool allows to import StarCD surface meshes and convert them into a trian-
gulation format: ".stl" and ".prop" files.
HEXPRESS ™ 4-1
Geometry Definition Overview
Unify, delete
subtract, intersect
Spec. length.
tolerances,...
Import STL
Create Group
Merge
Reverse
Reverse
tolerance
Create Domain
DOM
4-2 HEXPRESS™
Overview Geometry Definition
HEXPRESS is equipped with a Parasolid CAD engine. Therefore, any CAD model native to
this engine is transparently loaded by the mesh generator. Other native models must be translated to
the Parasolid format using external software before being processed (except for CATIA v5 for-
mat). A CAD model exhibits complex features which are unnecessary for the flow simulation. It is
therefore useful to remove unneeded geometry details from the model before starting the mesh gen-
eration. In HEXPRESS, this removal is not applied to the model directly but the complexity of
the computational domain is simplified by merging surfaces. The common edges between the
merged surfaces are then removed and are not captured in the mesh (see section 6-7 on page 6-33
for a discussion of the corner and curve mesh capturing functionalities). This merging is performed
at the topology level, hence no NURBS (Non Uniform Rational Bi-Spline) or surface representa-
tion is reconstructed. Geometry simplification in HEXPRESS is therefore accomplished with
minimum overhead. Figure 4.1.0-2 presents the computational domain of a draft tube before (top)
and after (bottom) simplification by surface merging.
FIGURE 4.1.0-2 Triangulated Parasolid CAD model before (top) and after (bottom)
surface merging
The user is referred to section A-4 on page A-2 for a description of the format of the file (suffix
".dom") storing the definition of HEXPRESScomputational domain.
HEXPRESS™ 4-3
Geometry Definition CAD Model
HEXPRESS expects solid bodies. HEXPRESS is not able to perform any editing
operation on sheet bodies. In fact, sheet bodies are made by surfaces but not considered
as 3D solid and closed bodies.
HEXPRESS uses the Parasolid™ v24.0.193 library, thus all Parasolid™ models up
to version 24 can be imported.
To obtain a complete list of supported models version numbers, the user is referred to the
"para_schema" subdirectory in the HEXPRESS installation directory. This subdirectory contains
all Parasolid™ schemes compatible with HEXPRESS.
HEXPRESS provides several basic editing capabilities (unify, subtract, intersect, delete) in its
solid modelling session to create an unique solid body representing the computational domain.
4-4 HEXPRESS™
CAD Model Geometry Definition
4-2.2 Editing
When a solid model is successfully imported, the next step is to build a solid body describing the
computational domain. One of the imported bodies may represent the body, in which case the edit-
ing steps can be bypassed. Alternatively, the computational domain can be obtained by performing
Boolean operations on the solid bodies in the Parasolid™ database.
A box creation capability is also available in order to create a bounding box in the case where the
computational domain is the complement of a specific body, e.g. for external flow around a body.
The editing operations are accessed through the Quick Access Pad/CAD Manipulation/Create/
Edit options (Figure 4.2.2-1) which allow the user to create and modify bodies.
a) Dialog box
This dialog box allows the user to specify the coordinates of two opposing points used to define a
box (Figure 4.2.2-2).
HEXPRESS™ 4-5
Geometry Definition CAD Model
5. Press Accept to generate the box and quit the box creation tool.
Because of Parasolid limitations, the coordinates of a box are limited by the range:
First corner X: -500, Y: -500, Z: -500 and Opposite corner X: 500, Y: 500, Z: 500
b) Interactive creation
The two opposing points of the box may be interactively specified by clicking in the graphics area.
1. A default box appears in the graphics area. Move the cursor to the desired location and left-
click on the first point.
2. While moving the cursor around, the drawing of the box is updated according to the cursor
position. Move the cursor to the desired location and left-click to place the second (oppo-
site) point.
3. Left-click to accept the box and quit the box creation tool.
The box creation tool can be aborted at any time, either by pressing the Cancel button
in the dialog box, or by right-clicking in the graphic area.
An accepted box cannot be modified later. It must be deleted and a new box created
but before clicking on Accept, the position of the box can be adapted by left-clicking on
box corner (when highlighted in yellow) and moving the cursor to the desired location or
by typing the coordinates (x,y,z) into the creation box dialog box. Nevertheless, it is
much easier to use the X,Y,Z plane views for box fitting.
a) Dialog box
This dialog box allows the user to specify the origin of the cylinder, its direction, its height and its
radius (see Figure 4.2.2-3).
4-6 HEXPRESS™
CAD Model Geometry Definition
2. Press the Apply button, which allows the direction definition and disables the first one.
3. Specify the direction (X,Y,Z) of the direction.
4. Press the Apply button, which allows the height definition.
5. Press Enter on the keyboard and specify the radius.
6. Press Enter and click on Accept to generate the cylinder and quit the cylinder creation tool.
Because of Parasolid limitations, the coordinates of a box are limited by the range:
First corner X: -500, Y: -500, Z: -500 and Opposite corner X: 500, Y: 500, Z: 500
b) Interactive creation
The cylinder may be interactively created by clicking in the graphics area.
1. A default dialog box appears in the graphics area. Move the cursor to the desired location
and left-click to confirm the position of the origin.
2. While moving the cursor around, the drawing of the cylinder is updated according to the
cursor position. Move the cursor to the desired location and left-click to confirm the direc-
tion and the height of the cylinder.
3. Move the cursor to adapt the radius and left-click to confirm.
4. Left-click to accept the cylinder and quit the creation tool.
The cylinder creation tool can be aborted at any time, either by pressing the Cancel
button in the dialog box, or by right-clicking in the graphic area.
An accepted cylinder cannot be modified later. It must be deleted and a new cylinder
created, but before clicking on Accept, the radius can be adapted by directly specifying
its value in the dialog box. Nevertheless, it can be easier to use the X,Y,Z plane views
for cylinder fitting.
a) Dialog box
This dialog box allows the user to specify the summit of the cone, its direction, its height and the
radius at the basis (see Figure 4.2.2-4).
HEXPRESS™ 4-7
Geometry Definition CAD Model
b) Interactive creation
The cone may be interactively created by clicking in the graphics area.
1. A default dialog box appears in the graphics area. Move the cursor to the desired location
and left-click to confirm the summit position.
2. While moving the cursor around, the drawing of the cone is updated according to the cursor
position. Move the cursor to the desired location and left-click to confirm the direction and
the height of the cone.
3. Move the cursor to adapt the basis radius and left-click to confirm.
4. Left-click to accept the cone and quit the creation tool.
The cone creation tool can be aborted at any time, either by pressing the Cancel button
in the dialog box, or by right-clicking in the graphic area.
An accepted cone cannot be modified later. It must be deleted and a new cone created,
but before clicking on Accept, the basis radius can be adapted by directly specifying its
value in the dialog box. Nevertheless, it can be easier to use the X,Y,Z plane views
for cone fitting.
a) Dialog box
This dialog box allows the user to specify the origin of the plane, its normal direction, its size (see
Figure 4.2.2-5).
4-8 HEXPRESS™
CAD Model Geometry Definition
b) Interactive creation
The plane may be interactively created by clicking in the graphics area.
1. A default dialog box appears in the graphics area. Move the cursor to the desired location
and left-click to confirm the origin position.
2. While moving the cursor around, the drawing of the plane is updated according to the cur-
sor position. Move the cursor to the desired location and left-click to confirm the normal of
the plane.
3. Specify the plane size in the dialog box and press Enter.
4. Click on Accept to create the plane.
The plane creation tool can be aborted at any time, either by pressing the Cancel but-
ton in the dialog box, or by right-clicking in the graphic area.
An accepted plane cannot be modified later. It must be deleted and a new plane cre-
ated, but before clicking on Accept, the origin and the normal values can be modified in
the graphics area. The radius can also be adapted by directly specifying its value in the
dialog box. Nevertheless, it can be easier to use the X,Y,Z plane views for
plane fitting.
HEXPRESS™ 4-9
Geometry Definition CAD Model
a) Dialog box
This dialog box allows the users to specify the origin and radius of the sphere. See Figure 4.2.2-6.
The sphere creation tool can be aborted at any time, either by pressing the Cancel but-
ton in the dialog box, or by right-clicking in the graphic area.
An accepted sphere cannot be modified later. It must be deleted and a new sphere shall
be created, but before clicking on Accept, the sphere radius can be adapted by directly
specifying its value in the dialog box.
4-10 HEXPRESS™
CAD Model Geometry Definition
4-2.2.6 Subtract
a) Overview
A Boolean subtract operation may be performed between a target body and a list of tool bodies. The
target body and tool bodies are selected either in a dialog box or by picking in the graphic area.
3. Select the tool body (or bodies) (bodies to be subtracted from the target body).
4. Press the Perform button.
If the Boolean subtract operation between the target body and the tool bodies is successfully per-
formed, the target body is modified and the tool bodies are deleted.
Only one target body may be selected, but several tool bodies can be selected.
All bodies except the target can be selected simultaneously by pressing ’a’ in the
graphic area.
The Boolean subtract operation tool can be aborted at any time, either by pressing
Cancel button or by right-clicking in the graphic area.
a) Overview
A Boolean unite operation can be performed between a target body and a list of tool bodies. The
target body and tool bodies can be selected either in a dialog box or by picking in the graphic area.
HEXPRESS™ 4-11
Geometry Definition CAD Model
Only one target body can be selected, but several tool bodies can be selected.
Orientation of the Parasolid™ bodies is very important (Figure 4.2.2-9)
3 Parasolid™ bodies Select 1st body Select 2nd body Bodies not well united
to unite yellow pipe blue box because
1st body is not well oriented
All bodies except the target can be selected at the same time by pressing ’a’ in the
graphic area.
The Boolean unite operation tool can be aborted at any time, either by pressing Cancel
4-12 HEXPRESS™
CAD Model Geometry Definition
The Unite operation gives good results in term of bodies but not of surfaces. In fact,
surfaces remain disconnected after this operation. For example, the unite operation on
three solid bodies results in a general body, which could be (depending on the case)
unsuitable for further operations with HEXPRESS™.
4-2.2.8 Intersect
a) Overview
A Boolean intersection operation can be performed between a target body and a list of tool bodies.
The target body and tool bodies can be selected either in a dialog box or by picking in the graphic
area.
Only one target body can be selected, but several tool bodies can be selected.
All body except the target can be selected simultaneously by pressing ’a’ in the
graphic area.
The Boolean intersect operation tool can be aborted at any time, either by pressing
Cancel button or by right-clicking in the graphic area.
HEXPRESS™ 4-13
Geometry Definition CAD Model
4-2.2.9 Delete
a) Overview
This function allows the user to delete one or several bodies. These bodies may be selected either in
a dialog box or by picking in the graphic area.
4-2.2.10 Transform
The Transform button allows to scale, rotate or translate the selected Parasolid entities.
4-14 HEXPRESS™
CAD Model Geometry Definition
The operations (translation, rotation, scaling) are applied to the active bodies selected from the Vis-
ualization/Selection page after clicking on the Apply button:
• For the rotation, the origin, axis and angle in degree have to specified,
• For the translation, the translation direction has to be specified. The specified vector includes
the magnitude of the translation,
• For the scaling, the scaling factor along the X, Y and Z directions should be specified. The scal-
ing factors have to be strictly positive.
When different scaling factors along the X, Y and Z directions are imposed, depend-
ing of the complexity of the geometry, the scaling may not succeed.
4-2.2.11 Undo
The Undo button allows to undo CAD manipulations up to 10 successive operations. The undo
functionality is available for CAD manipulations except the Create Domain and Save functionali-
ties.
HEXPRESS™ 4-15
Geometry Definition CAD Model
The validation of the discretization and the creation of the domain object (".dom" file) is accom-
plished by pressing the Create button.
It is very important to notice that a poor triangulation will certainly lead to a bad mesh. On the con-
trary, a good triangulation will allow to capture the geometry correctly.
FIGURE 4.2.2-14 Differences between a poor triangulation (left) and a good one (right)
a) Faceting
The faceting step allows the user to adapt the default resolution discretization if necessary.
The following parameters control the creation of the triangulation of the selected body.
4-16 HEXPRESS™
CAD Model Geometry Definition
• Minimum length: the minimum edge length of the triangulation facets. A default value is
automatically computed by the system.
• Maximum length: the maximum edge length of the triangulation facets. A default value is
automatically computed by the system.
• Curve chordal tolerance: the maximum distance between a curve and the corresponding tri-
angulation edges. A default value is automatically computed by the system.
• Surface plane tolerance: the distance tolerance in model units between a surface and its tri-
angulation, i.e. the maximum distance between a facet and its corresponding surface. A
default value is automatically computed by the system.
• Curve resolution: the maximum angle in degrees between a curve and the triangulation
edges, i.e. the maximum of the sum of the angles between the edge and the curve tangents
measured at the extremities of the edge. Values may range from 1.0 to 30. A default value is
automatically computed by the system.
• Surface resolution: the angular tolerance in degrees between a surface and its triangulation.
Values may range from 1.0 to 30. degrees. A default value is automatically computed by the
system.
Pressing the Apply button updates the faceting of the model taking into account the new parameters.
The Default buttons, associated to each of these parameters, reset their values to the default ones.
Best Practice:
The Minimum length should be smaller that the minimum geometrical entity to capture. Usually,
curve and surface resolutions should be equal to 5 for a correct triangulation up to 2 for a precise
triangulation. Curve chordal and surface plane tolerances can be divided by 100 most of times but
should be tuned according to the case.
Each geometry to export gives different default faceting settings. Users are invited to make a first
try only with a visual but satisfying triangulation keeping in mind that the mesh quality depends on
the triangulation.
c) Export parameters
Several parameters can be modified:
• Reverse triangulation orientation: always check that the orientation of the triangulation is
consistent (see section 4-3.3.3 on page 4-25 on how to select facets and to check their orien-
tation), i.e. all triangle normals point either inside the domain or outside the domain. Since
the standard orientation convention is to have normals pointing inwards, the "Reverse trian-
gulation orientation" item should be checked in the latter case.
• Merge tolerance: refers to the minimum distance between vertices. Vertices closer than this
reference length will be considered duplicate and merged. No limitation check is performed
on the merge tolerance. Choosing a tolerance that is too large may prevent HEXPRESS
from successfully creating the ".dom" computational domain.
HEXPRESS™ 4-17
Geometry Definition CAD Model
Pressing the Create button opens a file chooser window that enables the user to set the name of the
new domain. Once it is done, the domain is created and imported (Figure 4.2.2-15):
If No is pressed, the Create domain dialog box remains opened. If Yes is pressed, all bodies are
deleted, the new domain is imported and is ready for meshing.
When loading CAD Parasolid™ or CATIA v5 entities, the name of the surfaces will be transferred
in the created domain. For each domain face, a name will be assigned in two different ways:
• If the CAD file contains surface names, there are transferred to the domain faces during domain
construction,
• Faces of boxes created via CAD Manipulation will have a name of type
“bodyname_face_facenumber”, e.g. B1_face_1 for instance.
Triangulation settings are saved during the creation of the domain and written in the
domain file (".dom"). They are written in the line following the line with the orientation
face flag. For instance, for a single block case, it is the 6th line of the ".dom" file. Please
check Appendix A-4 for a description of the domain format and triangulation parame-
ters.
4-2.2.13 Save
The Save button creates a Parasolid™ file to save a backup file after performing CAD manipulation
operations or to modify this Parasolid™ file in an external CAD software. Clicking on Save button
opens a file chooser to enter the name of the Parasolid™ file and will save all entities selected in the
Visualization/Selection menu.
4-18 HEXPRESS™
CAD Model Geometry Definition
4-2.3 Visualization/Selection
This page contains a browser to select, show, and hide bodies.
When loading a CAD Parasolid™ or CATIA v5 geometry, bodies or sheets names appear in the
Visualization/Selection page. To manipulate them, select one or several bodies or sheets and per-
form the actions present in the Create/Edit page or the actions coming from the right-click menu.
4-2.3.1 Selection
A body can be selected at any time by left-clicking on its name, it is then highlighted in the graphics
area. Multiple selections are made by <Ctrl>-left-clicking. If a body is already selected, <Ctrl>-
left-click unselects it. It is also possible to select bodies by left-clicking on them in the graphic area:
• The select tool must be started by pressing the Select button.
• The body under the cursor is highlighted. If several bodies lie under the cursor, they can be
cycled by middle-clicking. The highlighted body can be selected/unselected by left-click-
ing.
• Right-clicking exits the selection tool.
HEXPRESS™ 4-19
Geometry Definition CAD Model
• Sew: edges of selected bodies are merged with a tolerance specified by the user.
It is also possible to hide all the bodies by pressing Hide All button, and to display all bodies by
pressing Show All button. The Select button allows a mouse picking selection of the bodies
(Figure 4.2.3-5).
4-20 HEXPRESS™
STL Model Geometry Definition
4-3.2 Import
Colored STL files can be imported by clicking on the STL button ( ) of the Welcome to HEX-
PRESS dialog box (see Figure 2.2.0-1 on page 2-3) or using Project/Import.../STL triangulation
menu. The additional property file with extension ’.prop’ if existing is also automatically imported.
HEXPRESS™ 4-21
Geometry Definition STL Model
This dialog box needs the inputs STL Merge Tolerance and Feature Angle Tolerance so as to cre-
ate the groups. The default values are shown in the dialog box. The actions associated to the buttons
Preview and Apply are the following:
• Preview: when clicking on this button, it will generate the preview of the STL file in the
graphics area. It will show the groups with colors created by using above input parameters.
• Apply: this button apply the settings and creates the groups. All created groups created will
be added to the data structure.
a) Viewing/Selection
Select: this button in the Edit page provides the user various selection modes. When user clicks on
this button, an interactive tool for selecting the groups with the mouse is enabled, together with a
selection mode dialog box shown in figure 6 below. It has various group selection options described
below:
• Single Selection: groups can be selected by left-clicking on the mouse. If user clicks on a
selected group again, then that group will become as non-selected group. The selection is
cumulative, which means that when clicking on several different groups (without the need
of pressing shift), the groups are added to the current selection. The shortcut <a> can be
used in the graphics area to select or unselect all groups at once.
4-22 HEXPRESS™
STL Model Geometry Definition
Front Group can be used to select groups which are in front of the others (the ones
which are visible when shaded representation is active). The groups which are in the
back will not be selected.
Front and Back Groups: both front and back groups will be selected, if this option
is selected.
• Rectangular Selection: groups can be selected by drawing rectangle around the groups to
be selected.
Inside Only option selects the groups which are inside the drawn rectangle.
Inside + Intersecting option selects the groups which are inside as well as intersect-
ing the rectangle.
• Polygonal Selection: in this mode, a polygon is drawn around the groups to select.
Inside Only option selects the groups which are inside the drawn polygon.
Inside + Intersecting option selects the groups which are inside as well as intersect-
ing the polygon.
HEXPRESS™ 4-23
Geometry Definition STL Model
View/Select page is a tree view (see Figure 4.3.3-2) in which all the group names present in the
STL file will be shown:
— Press the left-mouse button to select the group under the mouse.
— Press <Shift> + left-mouse button to add a group to the current selection.
— Press <Ctrl> left mouse button to add a group to the current selection.
— Press the right-mouse button to pop up the floating menu shown on
— Selecting the “Root” of all the groups will select all the groups in the tree
Upon selection in this menu, the related operation will be performed on all selected groups:
— Hide: this will hide the selected groups.
— Show as wireframe: the selected groups will be displayed in a wireframe mode (boundaries
of the groups).
— Show as solid: the groups will be visible in solid view mode.
— Show as triangulation: in this mode, the facets of the groups will be visible.
— Rename: this will change the name of the groups. In case only one group was selected, the
user will enter the name directly on top of the current name. When more than one group are
selected, a dialog box will be popped-up so as to enter the common root name for all the
selected groups. Each group will then be renamed <new_name>_1, <new_name>new_n.
— SortGroup-Ascending or SortGroup-Descending: click on this menu to sort the selected
groups in the ascending or descending order.
4-24 HEXPRESS™
STL Model Geometry Definition
b) Manipulation
This is used to perform different operations on STL file such as merging or splitting groups. It is
also possible to undo the last operation. The functions of various buttons used in this menu are
explained below.
Merge: this button will be used to merge the selected groups of the STL file. To select or unselect
groups, left-click on the mouse. To quit the merge operation, right-click on the mouse.
Split: this button will be used to split the selected group in two groups. The required steps to per-
form the split operation are:
• Select the group to be split,
• Click on the Split button,
• Select two split points on the boundary of the group. The points should be on the edges of
the facets which are the boundary edges of the group. After selecting two valid split points
HEXPRESS™ will automatically generate the path.
• Right-click to quit the split operation.
Undo: this button will undo the last operation on the STL file.
Create Domain: this button creates the domain based on the present surfaces.
If the original STL file contains surface names, there are transferred to the domain
faces during domain construction.
4-3.3.3 STL/Edit
HEXPRESS™ provides simple operations to edit the imported STL file in the menu bar.
a) Mirror geometry
STL/Edit/Mirror geometry mirrors the whole STL representation relative to a specified mirror
plane.
The following prompt controls the definition of the mirror plane:
PLANE: point =
>> 0. 0. 0.
PLANE: normal =
>> 1. 0. 0.
To quit this command before the end, enter <q> in the keyboard input area and press <Enter>.
b) Translate geometry
STL/Edit/Translate geometry translates the whole STL representation by the specified translation
vector.
The following prompt controls the definition of the translation vector:
Translation vector =
>> 1. 0. 0.
To quit this command before the end, enter <q> in the keyboard input area and press <Enter>.
HEXPRESS™ 4-25
Geometry Definition STL Model
c) Rotate geometry
STL/Edit/Rotate geometry rotates the whole STL representation by the specified angle around an
axis defined by a point and a direction vector.
The following prompt controls the definition of the mirror plane:
Rotation axis vector (q)
>> 0. 0. 1.
Rotation axis origin (q)
>> 0. 0. 0.
Rotation angle (q)
>> 10.
The angle is expressed in degrees.
To quit this command before the end, enter <q> in the keyboard input area and press <Enter>.
d) Clear all
STL/Edit/Clear all clears all groups and cell lists. The graphical representation is removed from
the view and deleted.
e) Information
STL/Edit/Information outputs information regarding the triangulation attributes to the console
shell. A typical output appears as follows:
STLDiscretisation Information
------------------------------
---> nb. triangles : 14330
---> nb. vertices : 42990
---> nb. groups : 13
---> groups
0 12059
1 936
2 37
3 10
4 38
5 39
6 42
7 982
8 46
9 10
10 44
11 45
12 42
unselected 0
These information can be useful to check the discretization of each face. The total amount of cells is
also computed to get an idea about how many triangles the complete domain will contain. Besides,
information about the minimum and the maximum coordinates are computed as well as the mean
coordinates and the volume of the geometry.
The user is also asked for a reference length. All triangle edges shorter than this reference length are
considered as degenerated and then collapsed.
Absolute Tolerance for size information =
>> 1e-6
4-26 HEXPRESS™
STL Model Geometry Definition
To quit this command before the end and have no further information displayed in the console shell,
enter <q> in the keyboard input area and press <Enter>.
Additional information about potential degenerated triangles is displayed in the console shell.
4-3.3.4 STL/Export...
To quit this command before the end, enter <q> in the keyboard input area and press <Enter>.
To quit this command before the end, enter <q> in the keyboard input area and press <Enter>.
When performing the action, the export operation is applied to the active domain only
and is resulting in an ASCII or binary STL file completed with a property file including
surface definitions for ASCII STL file.
HEXPRESS™ 4-27
Geometry Definition StarCD Surface Mesh
The additional surfaces are not modifying the limits of the domain but can be used during the adap-
tation step in order to refine the mesh in the neighbourhood of these new geometrical entities.
Please refer to section 2-5.2 for more details.
4-28 HEXPRESS™
CHAPTER 5: Domain Manipulation
5-1 Overview
This chapter is presenting the different domain operations necessary to clean or adapt a computa-
tional domain before generating the mesh within HEXPRESS™. The resulting computational
domain is stored in a file with extension ".dom" (see section A-4 on page A-2 for a description).
When a first computational domain has been created, domain operations allow to improve its defi-
nition by splitting/merging its edges and faces. Finally, tools allow to check the validity of the
domain.
HEXPRESS ™ 5-1
Domain Manipulation Domain Manipulation
5-2 HEXPRESS™
Domain Manipulation Domain Manipulation
Undo Settings
Delete Block
Domain validity check
Split Edges: allows to split manually selected edge one by one using mouse picking. To select the
edge, just pick it in the graphics area at the position where it should split.
Merge Edges: allows to merge manually selected edge one by one using mouse picking. To select
the vertex, just pick it in the graphics area at the position where the edges should be merged (loca-
tion of the vertex).
HEXPRESS™ 5-3
Domain Manipulation Domain Manipulation
Merge Edges Automatically: allows to merge automatically edge based on a feature angle.
When clicking on the icon, the following dialog box appears.
Define angle to be used for feature detection allows to define an angle over which the merging is
performed. The default feature angle is 140 degrees.
Display options allows to define the way the merging will be displayed:
• Activate ’Zoom in to display the set of edges being merged’ to center the graphics area on the
merged edges.
• Activate ’Do not modify display’ to keep defaults graphics area zoom.
When clicking on OK to start the merging, the edges could then be merged one by one (Merge) or
fully automated (Merge All).
Split Faces: allows to split manually selected face one by one using mouse picking. Faces can be
manually split by a new edge (two points) or a plane (three points).
Toggle <m> allows to select the way to split the face (by an edge or a plane).
The two points have to be specified to create this edge in the graphics area on the face to be split.
Selected face is displayed in green.
5-4 HEXPRESS™
Domain Manipulation Domain Manipulation
In cases HEXPRESS™ cannot find an optimal split path just with two points, a third point (to
define a plane) in addition to the usual two points can be specified on the face boundary for identi-
fying good split path.
Merge Faces: allows to merge manually faces based on a common existing edge. The edge has to
be specified to create the new merged face. To select the edge, just pick it in the graphics area. The
faces that are going to be merged together are displayed in green.
After this operation, two faces are unified in one but vertices are not automatically
merged. Users can decide to keep or merge the corresponding edges.
HEXPRESS™ 5-5
Domain Manipulation Domain Manipulation
Merge Faces Automatically: allows to merge automatically face based on a feature angle.
When clicking on the icon, the following dialog box appears.
Define angle to be used for feature detection allows to define an angle over which the merging is
performed. The default feature angle is 140 degrees.
Display options allows to define the way the merging will be displayed:
• Activate ’Zoom in to display the set of faces being merged’ to center the graphics area on the
merged faces.
• Activate ’Do not modify display’ to keep defaults graphics area zoom.
Boundary conditions type allows to adapt the merging process when different boundary condition
type detected:
• Activate ’Merge faces and assign UND type to the resulting face’ to reset the boundary con-
dition for the resulting faces.
• Activate ’Do not merge faces’ to avoid merging of faces having different boundary conditions.
When clicking on OK to start the merging, the faces could then be merged one by one (Merge) or
fully automated (Merge All).
After this operation, two faces are unified in one but vertices are not automatically
merged. Users can decide to keep or merge the corresponding edges.
5-6 HEXPRESS™
Domain Manipulation Domain Manipulation
Merge Face Selection: allows to merge a set of selected faces in the graphics area or in the Merge
Faces dialog box. With this option, the user simply selects the faces he wants to merge and then
performs the merging by pressing the Merge button. Click on icon to undo the performed
merging operations.
A face can be selected by left-clicking in the face browser or interactively in the graphics area. This
face is then automatically visualized in the graphics area. It is possible to select several faces at
once in the following ways:
1. While holding the <Ctrl> key down, select the desired faces in the browser.
2. While holding the <Shift> key down, select two faces delimitating a range of faces.
3. While pressing the left mouse button, drag the mouse and release the left button to select a range
of faces.
4. Pressing <Ctrl> + <a> keys down will select all patches.
5. Interactively in the graphics area depending of the selection options (shortcut <o>):
• <Ctrl> + left-click or left-click on successive faces,
• Draw a rectangle in the graphics area to select all surfaces which are completely or partly
inside the rectangle. For this purpose, hold <Ctrl> key and drag the mouse with the left-
click.
HEXPRESS™ 5-7
Domain Manipulation Domain Manipulation
6. Clicking on Select button and move mouse and left-click in the popup menu to select the type of
face selection.
• Select All Blanked allows to select all blanked faces in the graphics area.
• Select Face By Area allows to select all the faces with an area in the range specified by the
user.
• Select Face By Name allows to select all the faces whose name match the input name. A
dialog box is provided to input the name. The name can be a regular expression (i.e. if the
input is "channel*" all the faces whose name begins with channel will be selected)
• Select Geometrically Similar Faces allows to select all the faces with an area and a perim-
eter (under a tolerance of 0.03) identical to the selected face in the list.
• Select Tangent Faces allows to select all the faces tangent to each other (neighbouring
faces presenting an angle above the specified angle), starting from the list of selected faces.
The shortcut <h> in the graphics area will display hints. There are information about mouse button
bindings and shortcuts.
Move Part: allows to translate and/or rotate and/or scale one or more parts of a domain consisting in
several disjoined parts (a part can also be a body onto a mirror patch). For instance, the option
5-8 HEXPRESS™
Domain Manipulation Domain Manipulation
allows to rotate a rudder of a boat, rotate a body around its pitch angle or to move the loads of an
aircraft.
The operations (translation, rotation, scaling) are applied to the parts selected in the left list of the
Move Parts dialog box after clicking on the Apply button:
• for the rotation, the origin, axis and angle in degree have to specified,
• for the translation, the translation direction has to be specified. The specified vector includes the
magnitude of the translation.
• for the scaling, the scaling factor along X,Y,Z directions has to be specified.
When performing a scaling on a domain including a mirror face, it does not move dur-
ing the scaling by translating the domain to the origin before the scaling and then trans-
lating back to its original place after the scaling.
An Undo button is directly available in the window to come back to the previous posi-
tion.
Delete: allows to delete a domain when dealing with a multi-domains project. The option is avail-
able only for a multi-domain project without generated mesh and will delete existing FNMB con-
nections related to the domain.
The "undo" operation does not restore FNMB connections. They have to be recom-
puted.
Replace Domain: allows to replace a domain in an existing project. The main objective to use an
existing HEXPRESS project on similar geometries (domain). The replacement works as follows:
1. Open the original mesh project.
HEXPRESS™ 5-9
Domain Manipulation Domain Manipulation
2. Click on the Replace Domain icon (mesh should not be generated but mesh settings can be
present).
5-10 HEXPRESS™
Domain Manipulation Domain Manipulation
The menu is divided in two tabs: edges and faces matching. They are dedicated to manual match-
ing. The left column lists the faces/edges of the original domain whereas the right column gives the
list of the faces/edges of the replacement domain. Their number can be different (for instance, when
patches have been merged or split), in that case select one or several patches from the replacement
domain to match with one patch of the original domain (the contrary is not possible since we cannot
apply two different mesh settings to the same patch). For this purpose, the Match and Unmatch but-
tons are present below the lists.
When the Hide matched elements option is ticked, the geometrical entities which have been
already matched (automatically or manually) are hidden. Otherwise, matched entities are shown in
italic.
The Zoom in to selected entity option will allow to perform an automatic zoom each time a new
element is selected.
Once all entities are matched, or once the user decides that enough entities are matched, pressing
the Ok button will finish the procedure. Otherwise, the Cancel button comes back to the original
domain.
Domain replacement stops if the number of blocks are not the same.
Undo: allows to undo the last domain manipulation action.
HEXPRESS™ 5-11
Domain Manipulation Domain Manipulation
FIGURE 5.3.0-14 Domain check validity: invalid domain (left) - valid domain (right)
Settings: allows to adapt the values for the feature angle and the shortest edge length after splitting.
By default the values are respectively 140 degrees and 0.0001 (based on imported geometry unit).
For instance, the surfaces with an angle of less than 140 degrees between them will not be available
for merging during the manual face merge action. To be able to merge more surfaces, reduce this
number. When defined, the automatic merging will:
• merge edges and faces presenting an angle over the feature angle.
• merge edges presenting a length under the shortest edge length.
5-12 HEXPRESS™
CHAPTER 6: Mesh Wizard
6-1 Overview
The mesh wizard helps to build an unstructured hexahedral mesh into a valid HEXPRESScom-
putational domain see section on page 4-3). Recall that a computational domain is represented by
a set of topological faces (surfaces) connected together by topological edges (curves). A topological
edge separates two topological faces and may be connected by topological vertices (corners). Each
topological face is represented by a triangulation which linearly approximates the input CAD
geometry. Similarly, topological edges are defined by a list of points. When a topological edge is a
loop, it is denoted cyclic.
The mesh wizard involves five different steps (see Figure 6.1.0-1). Each step must be successfully
accomplished before proceeding to the next:
• Initial mesh"
HEXPRESS creates an initial mesh surrounding the computational domain (see section
6-5 on page 6-7 for more information).
• Adapt to geometry
HEXPRESS adapts the initial mesh such that the cell sizes satisfy geometry dependent
criteria and removes afterwards cells intersecting the geometry or located outside the com-
putational domain (see section 6-6 on page 6-10 for more information).
• Snap to geometry
HEXPRESS projects the adapted mesh onto the geometry and recovers lower dimen-
sional features such as topological edges (curves) and topological vertices (corners). Since
the technology in HEXPRESS is based on a top-down approach, the adapted mesh does
not conform to the geometry. A simple projection on the surface would not preserve ridges
or sharp corners, that is why a unique technology has been developed inside of HEX-
PRESS to perform this capturing while ensuring the highest quality mesh. Additional
cells (buffer insertion) are also introduced during this stage to obtain a smoothly conform-
ing hexahedra mesh (see section 6-7 on page 6-33 for more information).
• Optimize
Though the snapping step already ensures a high quality mesh, some distorted cells (con-
cave or negative) may exist. A powerful mesh optimization tool is implemented in HEX-
HEXPRESS™ 6-1
Mesh Wizard Mesh Wizard Actions
PRESS that allows the conversion of concave cells in convex ones (see section 6-8 on
page 6-41 for more information).
• Viscous layers
Finally, HEXPRESS allows to insert layers of high aspect ratio cells tangentially to the
wall in order to correctly resolve boundary layers (see section 6-9 on page 6-44 for more
information).
After an action is checked, the pop-up window containing all the corresponding parameters can be
accessed by left clicking on the button beside the check box. The user can then modify the proposed
default values. The "Initial mesh", "Snap to geometry" and "Optimize" parameters should generally
be left at their default values. The parameters related to the "Adapt to geometry" action should be
modified by the user to select suitable mesh adaptation criteria (see section 6-6 on page 6-10 for
more details). Furthermore, the insertion of viscous layers ("Viscous layers" action) is also depend-
ent on user choices (see section 6-9 on page 6-44 for more details).
6-2 HEXPRESS™
Mesh Wizard Actions Mesh Wizard
After completion of the mesh generation process, consisting of executing all checked actions, the
color of the action boxes turns either green or red. A green box means that the mesh generation
action is completed successfully while a red color indicates that a problem occurred (the user is
referred to the different sections of this chapter describing in more details the various mesh genera-
tion actions for a description of potential problems). A red color button indicates a blocking prob-
lem. Depending on the circumstances, it may indicate a mesh quality problem, a difficulty during
the step or may simply indicate some potential problems in the existing domain file.
A mesh generation action can be deactivated, returning to the previous action, by left-clicking on its
corresponding box. If a mesh was generated by the previous action, it will be loaded and a valid
previous state of the mesh will be recovered.
When an action is performed, the obtained mesh is saved in a temporary file. This
means that after performing three successive actions, three intermediate meshes are
saved (i.e. suffix "_init.hex", "_adapt.hex", "_snap.hex",etc) and these are finally saved
in a subdirectory "/cache/" when saving the mesh (menu Project/Save or Project/Save
as...).
Example: Figure 6.2.2-2 presents a mesh wizard status in which the "Initial mesh", "Adapt to geom-
etry" and "Snap to geometry" steps were completed successfully.
By left clicking on the "Snap to geometry" action, this last action is deactivated and the mesh status
after completion of the "Adapt to geometry" action is recovered.
HEXPRESS™ 6-3
Mesh Wizard 2D/3D Mesh Generation
• Ok. Exits the panel and saves the modifications on the parameters. This button is not avail-
able when action has been performed;
• Go. Saves the parameters and launches the mesh generation process for the concerned
action, if this last action is checked for execution. The panel is closed upon completion of
the task. This button is not available when action has been performed;
• Cancel. Exits the panel without saving any modification on the parameters.
Exactly two mirror (MIR) planes should be present (it cannot be more or less) per
block (domain).
6-4 HEXPRESS™
2D/3D Mesh Generation Mesh Wizard
The two dimensional grid generation mode must be selected before executing any
action on the mesh wizard. All specific mesh action parameters related to the Z-axis are
disabled in this mode. Therefore, changing mesh generation mode during the mesh gen-
eration will lead to an error message: the user is invited to delete completely the mesh to
change the mesh generation mode.
HEXPRESS™ 6-5
Mesh Wizard 2D/3D Mesh Generation
• In the Grid/Mesh transformation menu, set the angle and the number of cells in theta direc-
tion. Click on <Apply> to generate the axi-transformation (see section 2-3.3.5 on page 2-48).
• To create a rotation periodicity, first go to the Grid/Periodicity menu, and define a rotation
periodicity with an angle around Z axis (see section 2-3.3.5 on page 2-48). This angle should
correspond to the number of times the axi-symmetric should be repeated to get a 360 degrees
mesh.
• Then change MIR faces to SOL in the Grid/Boundary Conditions menu and go to the Grid/
Non Matching Connections menu to manually add a FNMB connection with periodicity for
rotating patches (see section 2-3.3.3 on page 2-35).
6-6 HEXPRESS™
Imposing Boundary Conditions Mesh Wizard
HEXPRESS™ 6-7
Mesh Wizard Initial Mesh
rectangular or cylindrical. The section Subdivide the domain bounding box is dedicated to rectan-
gular boxes and the section Create cylindrical mesh to initial cylindrical boxes. Furthermore, the
user is able to import his own unstructured mesh.
6-8 HEXPRESS™
Initial Mesh Mesh Wizard
The refinement parameters menu is then modified according to the choice of an initial cylindrical
mesh: the target cell sizes X, Y and Z are replaced by R, Theta and Z in the adaptation criteria.
HEXPRESS™ 6-9
Mesh Wizard Adapt To Geometry
The mesh refinement algorithm used in HEXPRESS (see section 6-6 on page 6-10)
assumes that all cells of the initial mesh are oriented in the same way with respect to the
X, Y and Z axis. This is true for the initial mesh obtained by subdivision of the computa-
tional domain bounding box. However, this is not necessarily the case for a HEX-
PRESS mesh obtained after snapping to the geometry. Indeed, the additional cells
introduced during buffer insertion (see section 6-7 on page 6-33) may be randomly ori-
ented. In this situation, anisotropic refinement may lead to unexpected refinement pat-
terns and isotropic refinement should be enforced.
A converted structured project from IGG™ or AutoGrid5™ can be used as initial
mesh. Before converting, the IGG™ or AutoGrid5™ mesh should not contain undefined
patches (UND) otherwise the concerned patches will be considered as internal surface
and may lead to problem during adaptation step. All "UND" have to be changed in
another type (for example CON if at the connection between blocks) before loading into
HEXPRESS™.
6-10 HEXPRESS™
Adapt To Geometry Mesh Wizard
For the criteria involving the user specification of target sizes (along the X, Y and Z axis) such as
the volume criterion and surface target size criterion, the mechanism used for anisotropic refine-
ment depends on the orientation of the cell with respect to the Cartesian axes. In case of the default
initial mesh, the cells are simply oriented along the axes (X, Y and Z axis). Thus, cell sizes are inde-
pendently compared to the target sizes and the cell refinement is triggered accordingly along each
axis.
HEXPRESS™ 6-11
Mesh Wizard Adapt To Geometry
For surface refinement criteria, such as the distance and the curvature criteria, HEXPRESS com-
putes target sizes in a reference framework attached to the surface with base vectors formed by the
two surface tangents and normal. These target sizes are mapped onto the cell reference axis and
compared to the actual cell size in order to determine the type of refinement to apply to the cell. In
practice, cells which are oriented sufficiently parallel to surfaces may be subdivided anisotropically.
A cell, oriented at 45 degrees between the surface tangent and the cell principal axis, will never be
refined anisotropically.
The anisotropic refinement can be controlled by a parameter available in the list of expert parame-
ters of the surface adaptation criteria (see Figure 6.6.4-8 on page 6-26).
The Refinement and trimming parameters dialog box contains refinement and trimming parameters
as shown in Figure 6.6.1-3.
6-6.1.1 Refinement
This action consists of successive refinements of the initial mesh in order to satisfy the adaptation
criteria (Figure 6.6.1-4).
6-12 HEXPRESS™
Adapt To Geometry Mesh Wizard
The refinement parameters (available when clicking on Parameters... button - Figure 6.6.1-3) are
organized into a notebook, divided into 4 panels qualified as global, curve adaptation, surface
adaptation and box adaptation parameters (see Figure 6.6.2-1).
6-6.1.2 Trimming
The trimming step removes all the cells intersecting or located outside of the geometry. HEX-
PRESS automatically finds the cell located inside the computational domain. At the end of the
process, a staircase mesh is obtained including all the interior cells (see Figure 6.6.1-5).
HEXPRESS™ 6-13
Mesh Wizard Adapt To Geometry
a) Enable refinement
By default this parameter is activated and it gives access to Curve, Surface and Box refinement
tabs. If not, the relevant tabs will be grayed out.
b) Enable trimming
By default this parameter is activated and it allows users to access the trimming parameters in Trim-
ming tab.
c) Refinement diffusion
When a cell is flagged for refinement, it is advisable to also tag its neighbours for refinement in
order to ensure a sufficiently smooth transition between fine and coarse cell regions. This process is
called "refinement diffusion". The integer value of the refinement diffusion parameter corresponds
to the number of layers of neighbours cells on which the diffusion of the refinement tag is applied.
For example, a value of 2 means that the neighbours of a cell are flagged for refinement together
with the neighbours of the neighbours. In addition, the type of diffusion applied in HEXPRESS
creates square shaped refinement regions for the sake of grid smoothness. Figure 6.6.2-2 shows the
diffusion of refinement to neighboring cells of surface intersecting cells. The default value is set to
2.
6-14 HEXPRESS™
Adapt To Geometry Mesh Wizard
( )
HEXPRESS™ 6-15
Mesh Wizard Adapt To Geometry
FIGURE 6.6.2-4 Meshes with Prevent refinement of exterior cells deactivated (left) and
activated (right)
The final number of cells should not vary with and without this functionality. Only the
number of cells during the adaptation step changes.
This feature can decrease the RAM memory during the adaptation step. The gain is
more important for big cases. A speed up has also been observed for big cases.
For cases with initial anisotropic meshes, imposing isotropic refinement near domain
corners usually gives better results if trimming is activated.
6-16 HEXPRESS™
Adapt To Geometry Mesh Wizard
FIGURE 6.6.2-5 Meshes with Apply trimming by distance enabled (left) and disabled (right)
The curve selection and the parameters controlling the edge refinement are the same
as for the surfaces. Refer to section 6-6.4 for more details.
HEXPRESS™ 6-17
Mesh Wizard Adapt To Geometry
Best Practice:
This feature can be used in addition to Surface refinement to capture more accurately leading and
trailing edges of a wing or a blade, for instance. In this context, the refinement onto the surfaces can
be decreased and the number of refinements of the corresponding curves should be increased. As a
result, the number of cells will be less important for the same accuracy.
The number of refinement prescribed into the Curve refinement are disconnected
from the number of refinements of the surfaces from the Surface refinement menu. For
instance, for a surface with 4 curves, a number of refinements of 5 for curves and 3 for
the surface, will create 2 extra refinements on the curves.
6-18 HEXPRESS™
Adapt To Geometry Mesh Wizard
Usually, only solid surfaces ("SOL") are used for refinement but all surface types are
present in the list for particular cases (as internal flows for instance).
During each adaptation iteration, HEXPRESS detects all the cells which intersect the surfaces or
the geometrical surfaces created with the Geometry menu (more details in section 2-3.2 and sec-
tion 2-5.2). The criteria specified for a specific surface are then applied. This actually results in
comparing the cell size to the target either computed automatically by the system (for distance and
curvature criteria) or specified by the user (for target cell sizes criterion).
HEXPRESS™ 6-19
Mesh Wizard Adapt To Geometry
b) By picking
Geometry surfaces can also be selected interactively by left-clicking on the surface in the graphics
area (<Ctrl> - left-click or left-click allow multiple selection by picking depending of the option
selected (<o>)).
The selected surfaces are displayed in pink whereas a potential surface for selection is in green
(mouse in on the surface but did not select it). <Ctrl> + <a> combination selects or unselects all
surfaces.
c) Rectangle Selection
An other possible selection is to draw a rectangle in the graphics area to select all surfaces which
are completely or partially inside the rectangle (depending of selected option <o>). For this pur-
pose, hold <Ctrl> key and drag the mouse with the left-click.
d) Select Identical
By right-clicking on a face or a group of faces, the action Select Identical will select all the faces
with the same settings from the list.
• Select All Blanked allows to select all blanked faces in the graphics area.
6-20 HEXPRESS™
Adapt To Geometry Mesh Wizard
• Select Face By Area allows to select all the faces with an area in the range specified by the user.
• Select Face By Name allows to select all the faces whose name match the input name. A dialog
box is provided to input the name. The name can be a regular expression (i.e. if the input is
"channel*" all the faces whose name begins with channel will be selected)
• Select Geometrically Similar Faces allows to select all the faces with an area and a perimeter
(under a tolerance of 0.03) identical to the selected face in the list.
• Select Tangent Faces allows to select all the faces tangent to each other (neighbouring faces
presenting an angle above the specified angle), starting from the list of selected faces.
g) Blank/Unblank
It is possible to completely hide faces (or groups of faces) and make them unselectable, by using the
Blank/Unblank functionality (right-click in the menu or in the graphics area) or by double clicking
on the check box on the left of the surface name. The check box actually shows the state of the sur-
face: unblank (ticked) or blank (unticked).
h) Invert Selection
It is possible to invert the current selection by using the Invert Selection functionality (right-click
in the menu or in the graphics area, or shortcut <i>).
i) Undo Selection
It is possible to undo the successive selections by using the Undo Selection functionality (right-
click in the menu or in the graphics area, or shortcut <u>).
HEXPRESS™ 6-21
Mesh Wizard Adapt To Geometry
Pressing <Enter> in the highlighted input frame or pressing again the criteria will
apply the same setting for all surfaces.
6-6.4.3 Active
A geometry surface can be activated or deactivated by left-clicking on the Active check button. An
inactive surface does not interfere in the mesh refinement process, i.e. the adaptation criteria which
were previously defined for this particular surface will no longer be applied to its intersecting cells
(it will appear in grey in the adaptation window).
6-6.4.4 Refinement
The maximum number of refinement per surface can be specified by entering a value in the Refine-
ment sub-panel.
6-22 HEXPRESS™
Adapt To Geometry Mesh Wizard
The default value is an arbitrary large number such that the parameter is essentially inactive. In this
case, the global maximum number of refinements controls the adaptation process (see section 6-6.2
on page 6-13).
The maximum number of refinements per surface ultimately controls the refinement of cells inter-
secting that surface (if it is presenting a value lower than the global maximum number of refine-
ments). This parameter supersedes any other selected adaptation criteria. Fine tuning of this
parameter is useful when it may be difficult to determine the appropriate cell target size, or if the
distance and curvature criteria yield a prohibitive number of cells.
a) Distance criterion
Description
The aim of the distance criterion is to allow enough refinements of the cells in order to fill any gaps
between very close surfaces with a sufficient amount of cells. HEXPRESS automatically pre-
computes the distances between nearby surfaces which are flagged as solid ("SOL") and/or any sur-
face type ("MIR", "EXT",...) and/or geometrical surfaces created with the Geometry menu. This
distance is computed and saved in a file with suffix ".dist" for each triangle defining the surface.
Distance criterion works only for cells intersected by appropriate surfaces. If a cell lies
between two surfaces with active distance criterion and it is not intersected by them it
might be refined due to diffusion, but it will not be refined because of the distance crite-
rion. That means that the distance criterion does not guarantee Ngap of cells between sur-
faces.
HEXPRESS™ 6-23
Mesh Wizard Adapt To Geometry
A ray is traced from the centroid of the triangle parallel to the normal, its intersection with the other
surfaces is computed to give the distance to the closest surface. This distance is divided by the
required number of cells in gaps to provide a target cell size in the direction normal to the surface.
Cells which intersect the surface are given the computed target size. In fact, the target size is pro-
jected on the principal axis of the cell and compared to the actual cell size. If the cell is essentially
oriented parallel to the geometry, it is likely that it will be refined anisotropically tangentially to the
wall. The expert parameter Anisotropic extent (discussed on page 6-27) may be used to control the
trigger of anisotropic refinement depending on the cell orientation with respect to the surface.
Distance criterion works only for cells intersected by appropriated surfaces. If a cell
lies between two surfaces with active distance criterion and it is not intersected by them
it might be refined due to diffusion, but it will not be refined because of the distance cri-
terion. That means that the distance criterion does not guarantee the number of cells in
gap between surfaces.
How to apply?
The distance criterion is activated by left-clicking on the Distance check button (Figure 6.6.4-5).
b) Curvature criterion
Description
The aim of this adaptation criterion is to automatically compute a target cell size suitable for resolv-
ing curved surfaces. Smaller cells are expected where the geometry has high curvature. The number
of triangles intersected by a cell are used to measure the local curvature of the surface (Figure 6.6.4-
6). The following deviations are computed, after projecting the normals in the principal directions1
of the cell:
i
j = max n j – min n k j , j = 1 ,2 ,3
i
where n j corresponds to the jth component of the ith normal triangle.
1. We define the principal directions of a cell by the three vectors joining the centroids of the three pairs of
opposite faces.
6-24 HEXPRESS™
Adapt To Geometry Mesh Wizard
FIGURE 6.6.4-6 Cell intersecting triangles of a surface (Arrows are triangle normals)
How to apply?
The curvature criterion is enabled by left-clicking on the Curvature check button (Figure 6.6.4-5).
Description
In addition to the previously discussed automatic adaptation criteria, the user can enforce his own
requirements by specifying his own target cell sizes for each geometrical surface. The size of a cell
intersecting a geometrical surface are compared to the prescribed user target and the cell is refined
until its actual size is lower than the target.
How to apply?
The target cell size criterion is enabled by left-clicking on the Target cell sizes check button
(Figure 6.6.4-5) and by specifying values for the cell size (Figure 6.6.4-7) in the X, Y and Z Carte-
sian axes (if 3D mesh):
Example (2D):
D = 1.0 (chord length = 1.0, 1 cell only)
dx = 1/50 = 0.02 (50 cells desired)
→ Resulting nx = 5.64
D = 1.0 (chord length = 1.0, 1 cell only)
dy = 0.1/15 = 0.0067 (15 cells desired)
→ Resulting ny = 7.23
HEXPRESS™ 6-25
Mesh Wizard Adapt To Geometry
a) Aspect ratio
Description
In expert mode it is possible to modify the maximum allowable aspect ratio (Figure 6.6.4-8) for a
cell intersecting a surface. The maximum aspect ratio is computed as follows:
- - -----
- ------ -
AR = max ------ ------ ------ ------
where correspond to the cell size in the respective principal direction of the cell. The
default value for this parameter is set to 2. It is not recommended to increase this default value
above the current value, indeed larger values may alter the robustness of the geometry capturing
algorithms and lead to poor quality meshes.
Influence on refinement
When a cell is triggered for refinement along some of its principal directions, the aspect ratio of the
resulting subdivided cells is pre-computed. If the aspect ratio exceeds the maximum allowable
value then the cell is triggered for refinement in the other directions in order to limit the aspect ratio
of the new cells. Notice that this aspect ratio constraint only applies to cells intersecting surfaces.
Cells which are refined by diffusion of the refinement tags are not subject to this constraint. There-
fore, after the trimming phase, the remaining cells may exhibit aspect ratio exceeding the prescribed
value.
6-26 HEXPRESS™
Adapt To Geometry Mesh Wizard
This criteria is used by HEXPRESS only when Curvature is used as adaptation cri-
teria.
Backward compatibility is not ensured with the previous expert parameter present in
v2.8 and before since the nature of the parameters completely changed. The user is
invited to define advanced adaptation criteria again.
It is a positive factor which controls the size of the cell in curvature based refinement for particular
refinement level. It can be calculated as:
F = RC
where,
R = Radius of curvature,
C = Size of the cell,
F = Curvature refinement factor.
In the curvature based refinement, the cell will be marked for refinement only if the cell size C is
greater than the value (R / F), noted as CF.
The value of CF will only depend upon the value of curvature refinement factor F, since the radius
of curvature will be constant.
Influence on refinement
If the value of F is increased then the value of CF will be less important: the cell size after refine-
ment will be decreased and hence the number of cells will be increased.
c) Anisotropic extent
This expert parameter controls the sensitivity of the anisotropic mesh refinement procedure. It con-
trols how well a cell must be oriented with respect to a surface in order to be triggered for aniso-
tropic refinement. For an application of the distance criterion, if a cell is perfectly oriented
tangential to a surface, the refinement will be triggered only tangentially to the wall, or normally to
the wall if the surface is highly curved.
This parameter is an angle specified in degrees and varying between 45 and 90 degrees. For values
close to 90 degrees, anisotropic refinement will occur only for cells which are well oriented with
respect to surfaces, on the contrary, for values close to 45 degrees, anisotropic refinement predomi-
nates over isotropic refinement. The default value of this parameter is 85 degrees.
Influence on refinement
The anisotropic extent parameter influences the refinement triggered by the distance criterion. The
distance criterion essentially computes a target cell size in the direction normal to the surface and
seeks to apply it to the intersecting cells. Therefore, for the well oriented cells with respect to the
surface, i.e. essentially tangential to the surface, refinement will be triggered to decrease the cell
size in the direction normal to the wall by subdividing the cell tangentially to the wall. The value of
the anisotropic extent parameter controls the maximum deviation that allows anisotropic refine-
ment.
As described in section b) on page 6-24, the curvature criterion measures the maximum deviation
between the normal components of surface triangles intersecting by a cell in order to compute an
estimate of the surface curvature. Three deviation values are computed for the three Cartesian axis.
If one deviation is large compared to the others, the curvature of the surface measured in this partic-
HEXPRESS™ 6-27
Mesh Wizard Adapt To Geometry
ular direction is much larger than in the other directions, which leads to a refinement of the cell in
this direction. The anisotropic extent parameter acts as a threshold value that controls refinement in
a particular direction.
d) Refinement diffusion
When a cell is flagged for refinement, it is advisable to also tag its neighbours for refinement in
order to ensure a sufficiently smooth transition between fine and coarse cell regions. This process is
called ‘‘refinement diffusion’’ and can be applied globally or locally.
By default the refinement diffusion is applied globally by specifying an integer value of the Refine-
ment diffusion parameter under the Global parameters thumbnail. In addition for each curve, sur-
face or volume box on which refinement parameters are applied, a local refinement diffusion
integer value can be imposed instead of the Global one.
The local refinement diffusion allows to impose a higher value of refinement diffusion on internal
surface as for the internal surface for Marine applications (for free surface capturing).
For each iteration of the adaptation process, the cells inside or intersecting a volume box are tagged.
The size of the tagged cells is compared to user specified target cell size and refined if necessary.
6-28 HEXPRESS™
Adapt To Geometry Mesh Wizard
A sector is created by left-clicking on the New sector button (see Figure 6.6.5-1) and by specifying
the origin and axis of the cylinder, the mimimum/maximum radius, start/end angles and height of
the sector.
A sector can be modified or deleted by left-clicking and right-clicking on it in the list and select
respectively Edit Sector or Delete Sector (also left-clicking on the Delete button (see Figure 6.6.5-
1)).
6-6.5.3 Active
A box or sector can be activated or deactivated by the user by left-clicking on the Active check but-
ton (see Figure 6.6.5-1). A deactivated box and sector do not influence the computational domain
refinement.
HEXPRESS™ 6-29
Mesh Wizard Adapt To Geometry
6-6.5.4 Parameters
The maximum number of refinement per box/sector can be specified by entering a value in the
Parameters sub-panel.
The default value is an arbitrary large number such that the parameter is essentially inactive. In this
case, the global maximum number of refinements controls the adaptation process (see section 6-6.2
on page 6-13).
The maximum number of refinements per box/sector ultimately controls the refinement of cells
intersecting the solid surfaces and included in the box/sector (if it is presenting a value lower than
the global maximum number of refinements). This parameter supersedes any other selected adapta-
tion criteria. Fine tuning of this parameter is useful when it may be difficult to determine the appro-
priate cell target size.
The target sizes (Figure 6.6.5-2) correspond to the cell size measured along the Cartesian X, Y and
Z axes.
Every cell within (if button Volumic activated) or intersecting the box/sector is tagged for potential
refinement. The size of these cells is compared with respect to target size and if it is larger than the
target, the cell is flagged for refinement in the corresponding direction. The refinement is aniso-
tropic.
For FINE™/Marine users, this parameter is checked by default when defining boxes
and sectors for refinement.
6-30 HEXPRESS™
Adapt To Geometry Mesh Wizard
which refinement parameters are applied, a local refinement diffusion integer value can be imposed
instead of the Global value.
The local refinement diffusion allows to impose a higher value of refinement diffusion on selected
box or sector.
For MIRROR patches loaded from previous versions of HEXPRESS, the flag will
be automatically set to Not used for trimming in the patch list.
HEXPRESS™ 6-31
Mesh Wizard Adapt To Geometry
Only planar patches aligned with Cartesian axis are present in this menu.
The patch selector dialog box contains a list of the selectable patches. This list contains three col-
umns:
• Patch name: names of the selectable patches of the domain.
• Boundary conditions type: boundary conditions set for each domain patch.
• Trimming flag: trimming flag set to each domain patch.
The selection of faces can be performed in two ways.
— Selection of faces in list view:
In this mode, faces can be selected by simply clicking on the rows in the list view. If the user
selects a selected face, then this face will be unselected (toggle operation).
Multiple faces can also be selected by pressing the <Ctrl> key or the <Shift> key on the key-
board. All faces in the list can be selected by pressing the <Ctrl> + <a> keys. The selected faces
will be highlighted in the graphics window.
— Selection of faces in the graphics window:
This selection mode can be used for selecting faces of the domain in the graphics window with
the help of a mouse left-click. To select the face, simply click on the face highlighted in green
color that needs to be selected. The selected face will be highlighted in pink color. This selection
process can be cumulative, meaning that if the user selects the first face and then wants to select
another face with left-click or <Ctrl> + left-click (depending of the selected option <o>), that
face will be selected along with the previously selected face. All selected faces will be high-
lighted in pink color.
Faces which are selected in this selection mode will also be highlighted in the list view so as to
maintain the synchronization of the selection process in both selection modes.
It is possible to completely hide faces and make them unselectable, by using the Enable/Disa-
ble functionality (right-click in the menu or in the graphics area) or by double clicking on the
check box on the left of the surface name. The check box actually shows the state of the surface:
enabled (ticked) or disabled (unticked).
6-32 HEXPRESS™
Snap to geometry Mesh Wizard
HEXPRESS™ 6-33
Mesh Wizard Snap to geometry
6-34 HEXPRESS™
Snap to geometry Mesh Wizard
FIGURE 6.7.2-2 Mesh without buffer insertion (left) - with buffer insertion (right)
The projected mesh often contains highly distorted cells. Some facets of the surface mesh, with ver-
tices connected to the same curve, may look like triangles. These are actually degenerate quadrilat-
erals with three vertices projected onto a curve. The same pattern may also appear inside of the
volume. To overcome this situation and recover a high quality mesh, one or two layers of additional
cells are extruded from the surface mesh towards the inside of the computational domain
(Figure 6.7.2-2).
The buffer insertion algorithm introduces topologically additional cells, i.e. initially the cells
present a zero thickness, they are then inflated by application of smoothing.
HEXPRESS™ 6-35
Mesh Wizard Snap to geometry
Number of iterations. The smoothing algorithm consists of successive displacements of the verti-
ces to the centroid of the cavity defined by the surrounding cells. This procedure is very common in
mesh generation and is similar to the solution of a Laplace equation whose unknowns are the coor-
dinates of the vertices. The default value of the number of successive passes is set to 25. Generally,
it should not be modified by the user.
Snapping option for every curve can be chosen between the three following possibilities:
• Must be captured (default option): means that if the curve is not captured, then mesh gen-
eration process stops,
• Must be skipped: means that the curve must not be captured,
• Can be skipped: means that if the curve cannot be well captured in 3D cases, instead of
skipping the whole curve HEXPRESS™ will try to capture some segments from the curve
and skip the other ones. For 2D cases, if the curve cannot be well captured, it will be
skipped.
The <Ctrl> key can be used in combination with the left mouse button to select several curves. The
<Shift> key can be used in combination with the left mouse button to select a list of curves in the
chooser. In addition, by right-clicking on a curve in the list, the action Select Identical will select
all the curves with the same settings from the list and the action Zoom in will zoom to all the
selected curve.
Interactively in the graphics area the curves can be selected depending of the selection options
(shortcut <o>):
• <Ctrl> + left-click or left-click,
6-36 HEXPRESS™
Snap to geometry Mesh Wizard
• Draw a rectangle in the graphics area to select all curves which are completely or partly
inside the rectangle. For this purpose, hold <Ctrl> key and drag the mouse with the left-
click.
The shortcuts <u>, <i> and <h> allow to respectively undo successive selections of curves, invert
current selection of curves and display hints in the graphics area. There are information about
mouse button bindings and shortcuts
Depending upon the buffer insertion type settings to domain curves, the buffer insertion in snapping
process of the mesh generation will be affected.
HEXPRESS™ 6-37
Mesh Wizard Snap to geometry
There is a limitation of the method: if more than 3 curves are connected to a domain vertex, and one
of the curves is of type I, then all other curves connected to the vertex will be of type I too. Hence it
is not always possible to get the pattern of type II, even for convex edges and type I for concave
edges. In this case, HEXPRESS will automatically set the buffer of this problematic edge to the
default type and a message will be written in report file. Once the snapping is performed, the buffer
insertion menu displays the type effectively used during the snapping.
This menu shows the list view which contains all the edges present in the domain. The edges can be
selected from the list view in two ways:
— Selection by list view:
This mode provides the selection by mouse left-clicking on the name of the curve. The toggle
operation can also be used. The <Ctrl> key can be used in combination with the left mouse but-
ton to select several curves. The <Shift> key can be used in combination with the left mouse
button to select a list of curves in the chooser. Multiple selection by mouse dragging is also pro-
posed.
By right-clicking on a curve, the action Select Identical will select all the curves with the same
settings from the list.
By right-clicking on a curve in the menu, the action Zoom in will zoom to all the selected curve.
— Selection in graphics window:
In this mode of selection, the edge can be selected by clicking on the edge in the graphics area.
If user left clicks on a selected edge, the edge will be deselected. Similarly, <Ctrl> + left-click
on the edge will select the multiple edges. The selected edge in the graphics area will be high-
lighted in the list view, so as to maintain the synchronization in between selection through list
view and through graphics window. The selected edge will be highlighted in the yellow color.
Snapping problems can appear on vertices, edges, faces or can be due to holes in the
mesh.
6-38 HEXPRESS™
Snap to geometry Mesh Wizard
Curve marked as can be skipped in the Curve Snapping menu are highlighted in
blue as well.
The blue curves are removed from display under one of the following circumstances:
•The user unticks the Initial Mesh step (this also deletes the mesh).
•After the adapt step has been completed.
•After the optimization step has been completed.
•If snapping step has been completed successfully and no curves failed to be captured.
— Face viewer: the Face viewer dialog box contains information about patch names and IDs
(see section 2-5.5.2).
HEXPRESS™ 6-39
Mesh Wizard Snap to geometry
capturing. The highest degree of such nodes is therefore 6, but in general vertices with degree larger
than 4 are rare and may not be present close to a corner as candidates for capturing, which may
jeopardize the capture of high degree corners.
TABLE 7. Topology constraints
6-40 HEXPRESS™
Optimization Mesh Wizard
two relevant domain faces. The holes detected will be shown in blue wire form in the graphics area.
Information for the holes will also be reported in the status line and report. The best way to check a
particular hole is to highlight two relevant domain faces in different colors and use zoom in and
rotation as shown in the example shown in Figure 6.7.5-2.
If there is a hole in the mesh attributed to a pair of domain faces and a domain edge
common to the same pair of faces is not captured then the mesh faces near this non-cap-
tured edge will be mistakenly identified as faces forming a hole.
Holes in the mesh attributed to a single domain face (i.e. a domain face close to itself)
can not be visualized because such holes are not detected.
6-8 Optimization
6-8.1 Overview
The mesh obtained after the snapping action may involve poor quality cells usually located close to
corners and curves. Some of these cells are concave or may even present a negative volume. A cell
is defined as concave (the cell looks like a "boomerang") if the Jacobian of the transformation to a
unit cube has at least one zero value for a point located inside of the cell. In practice, the concave
property is tested by checking the negativeness of the volume of the tetrahedral subdividing the cell
(see Figure 6.8.1-1). This kind of subdivision is, of course, not unique and should therefore be cho-
sen carefully.
HEXPRESS™ 6-41
Mesh Wizard Optimization
FIGURE 6.8.1-1 The cell on the left is concave because tetrahedron abcd has a negative
volume. The cell on the right is on the contrary convex.
The number of poor quality cells can be checked using the mesh quality analysis tool (see section 2-
3.3.4 on page 2-42).
HEXPRESS provides specific algorithms to convert concave cells to convex ones by slightly dis-
placing their vertices. A novel approach is also implemented to improve the orthogonality of con-
vex cells.
In most instances, convex cells are important to ensure the stability and the robustness of a flow
solver. Mesh adaptation applied to concave cells may also create negative children cells.
Negative cells should be prohibited. Usually, HEXPRESS is able to deliver a mesh without any
negative cell. However, the presence of negative cells is usually a sign of an inadequate choice of
cell sizes in a geometrical complex region. Further mesh refinements (adapt to geometry) will usu-
ally solve the problem.
The removal of all the concave cells of the mesh and their transformation to convex hexahedral are
usually accomplished. However, for some intricate geometries, the number of remaining concave
cells may be of the order of 1 to 5 per million cells. This depends on the adequacy of cell sizes with
respect to geometry length scales.
6-8.2 Advanced
The Advanced parameters of the "optimization" step are accessed by left-clicking on the Advanced
>>> button.
6-42 HEXPRESS™
Optimization Mesh Wizard
The number and the visualization of the relaxed cells can be done through the mesh
quality menu (see section j) "Relaxed Cells" on page 2-46) after the optimization step.
HEXPRESS™ 6-43
Mesh Wizard Viscous Layers
The CPU time can be significantly increased with increasing optimization iterations.
It is not guaranteed that extra optimization iterations always give better mesh quality.
Limitation: possible improvements of mesh quality can be lost after insertion of vis-
cous layers.
6-44 HEXPRESS™
Viscous Layers Mesh Wizard
FIGURE 6.9.2-1 Global menu for a fixed first layer thickness method
HEXPRESS™ 6-45
Mesh Wizard Viscous Layers
The evolution of the size of the layers normal to the wall is therefore controlled by a power law:
i
h i = h 0 ,i = 0 n – 1
6-46 HEXPRESS™
Viscous Layers Mesh Wizard
This constraint is overcome with the inflation and insertion method of the viscous layers. In that
case, the inflation algorithm can be activated and the cells over a number of layers close to the solid
boundaries are progressively deformed so as to adapt to the user constraints. As a result, not only
the thickness of the buffer layer is modified, but deformation can also progress inside the inviscid
core so as to maintain a satisfactory stretching factor
This inflation process ensures that the first cell size, stretching factor and number of layers selected
by the user to fill in the viscous layers can be satisfied. However, the user is allowed to relax this
constraint and define a range in the desired number of layers (instead of a fixed value). The number
of layers is then said “floating”, and be freely selected by HEXPRESS within a prescribed range
selected by the user.
Relaxing such a constraint can be largely beneficial since the inflation is strongly related to 3D
Laplacian smoothing algorithms, which makes this process iterative and CPU consuming with
respect to basic viscous layer insertion (without inflation).
HEXPRESS™ 6-47
Mesh Wizard Viscous Layers
FIGURE 6.9.2-4 Global menu for a variable first layer thickness method
This method, once activated in the global tab, allow the variation of the first layer thickness. It
requires three user-inputs for each: a geometric expansion factor, a number of layers and an aspect
ratio of the viscous layer that is adjacent to the surface-mesh.
Such a method would allow a smoother and better insertion of the viscous layers, for any refine-
ment level. Currently, in case a surface contains several refinement levels, the inflation will be
working for the bigger cells, and then the viscous layers will be crushed into the first layer of the
Euler mesh for lower refinements. Such effect would not occur anymore as the first layer thickness
will be depending upon the local refinement level.
See section 6-9.3.4 for the details about the required inputs for each surface or groups of surfaces.
The inflation is always active for this method. Please read previous section for more information
about the inflation method.
In the advanced sub menu (Advanced >>> button), the Inflation factor has been
introduced to control the inflation speed performed at each iteration. Hence, if this factor
is high, the inflation runs fast but can break down. On the contrary, if the factor is
smaller, the inflation is slower but more robust. The default is the optimum value.
6-48 HEXPRESS™
Viscous Layers Mesh Wizard
FIGURE 6.9.3-1 Viscous layer insertion parameters for the fixed first layer thickness method
The viscous layer parameters are available when clicking on Active button (Figure 6.9.3-1).
The shortcut <h> in the graphics area will display hints. There are information about
mouse button bindings and shortcuts.
b) By picking
Geometry surfaces can also be selected interactively by left-clicking on the surface in the graphics
area (<Ctrl> + left-click or left-click allow multiple selection by picking depending of selected
option (<o>)). The selected surfaces are displayed in pink whereas a potential surface for selection
is in green (mouse in on the surface but did not select it). <Ctrl> + <a> combination selects or
unselects all surfaces.
HEXPRESS™ 6-49
Mesh Wizard Viscous Layers
c) Rectangle Selection
An other possible selection is to draw a rectangle in the graphics area to select all surfaces which
are completely or partially inside the rectangle depending of the option (<o>). For this purpose,
hold <Ctrl> key and drag the mouse with the left-click.
d) Enable/Disable
It is possible to completely hide faces (or groups of faces) and make them unselectable, by using the
Enable/Disable functionality (right-click in the menu or in the graphics area) or with shortcut <b>
or by double clicking on the check box on the left of the surface name. The check box actually
shows the state of the surface: enabled (ticked) or disabled (unticked).
e) Select Identical
By right-clicking on a face or a group of faces, the action Select Identical will select all the faces
with the same settings from the list.
f) Zoom In
By right-clicking on a face or a group of faces in the menu or in the graphics area, the action Zoom
in will zoom to all the selected faces.
g) Invert Selection
It is possible to invert the current selection by using the Invert Selection functionality (right-click
in the menu or in the graphics area, or shortcut <i>).
h) Undo Selection
It is possible to undo the successive selections by using the Undo Selection functionality (right-
click in the menu or in the graphics area, or shortcut <u>).
6-50 HEXPRESS™
Viscous Layers Mesh Wizard
Pressing <Enter> in the highlighted input frame will apply the same value for all sur-
faces.
6-9.3.3 Active
A selected surface can be activated or deactivated for viscous layer insertion by left-clicking on the
Active check button (Figure 6.9.3-1).
6-9.3.4 Parameters
The "appropriate number of layers" can be computed only when an optimized mesh is
available (otherwise, the symbol "NA" is mentioned instead of a number).
When the imposed three parameters are generating viscous layers that are going
locally out of the first cell size close to the solid wall, this last cell will be uniformly split
respecting only the number of viscous layers imposed by the user (Figure 6.9.3-3).
HEXPRESS™ 6-51
Mesh Wizard Viscous Layers
FIGURE 6.9.3-4 Surface settings for fixed first layer thickness method
L0
D 0 = ---------
-
AR 0
6-52 HEXPRESS™
Viscous Layers Mesh Wizard
with AR0 the aspect ratio of the surface-mesh layer and L0 the average of the edges size connected
to the node where the insertion of the first layer is performed. L0 is computed with the formula:
N
a0i
L 0 = i----------------
=0 -
N
Then the next layer will be computed by the same method, except that the aspect ratio ARi evolves
thanks to the formula:
AR i + 1 = AR i f
6-9.4 Troubleshooting
The activation of the inflation method in the Graphical User Interface does not necessarily mean
that the inflation algorithm will be executed. Inflation is only necessary and active in cases where
the combination of the first cell size, stretching factor and number of layers do not match with the
HEXPRESS™ 6-53
Mesh Wizard Viscous Layers
thickness of the buffer layer. Therefore, in case the constraints fixed on these 3 parameters can be
fulfilled without the need to inflate the buffer layer, the inflation algorithm will not be executed,
whether inflation is or not active in the graphical user interface.
Effective execution of the inflation algorithm can however be controlled looking into the shell at
the average ratio real-to-target cell size. This parameter defines the average ratio between the cur-
rent size of the buffer layer and some target value that HEXPRESS will try to reach iteratively
during the inflation process. In any case, inflation will be effective only if the ratio is smaller than 1.
In other cases, the buffer layer thickness is large enough to insert the viscous layers and insertion
will proceed directly without inflation. This process is usually very quick with comparison to infla-
tion.
FIGURE 6.9.4-1 Information in the shell when inflation will be effectively executed
FIGURE 6.9.4-2 Information in the shell when inflation will not be executed
An other situation can happen: inflation is activated and performed because the “Aver-
age ratio real-to-target size” is smaller than 0.9 has mentioned in Figure 6.9.4-2, but the
6-54 HEXPRESS™
Viscous Layers Mesh Wizard
resulting mesh after optimization of the mesh with viscous layers is not of acceptable
quality because there are concave, twisted or negative cells remaining. Therefore the
inflation is cancelled and the normal viscous layers are inserted.
After the inflation, some mesh surface vertices might not be snapped to the geometry anymore. In
this context, mesh surface vertices mean the grid points on the geometry boundary. This limitation
is illustrated in Figure 6.9.4-3.
When HEXPRESS detects these unsnapped vertices, a warning as shown in Figure 6.9.4-4 will
appear in the shell and in the report file to inform the user. The geometry edges with unsnapped ver-
tices will be listed as well. To avoid this problem, users can add additional refinements in the area
where a deviation from the geometry is found.
HEXPRESS™ 6-55
Mesh Wizard Viscous Layers
6-56 HEXPRESS™
CHAPTER 7: Python Scripts and
Plugins
7-1 Overview
Actions executed by the user through the HEXPRESS™ interface are recorded in a python-like
script giving added flexibility for automation of geometry creation and mesh generation. The
Project/Script... menu allows to edit and save the script while it can be executed using the Project/
Script.../Execute menu or the Execute Python script in the Welcome to HEXPRESS dialog box.
To launch a python script with HEXPRESS™ in batch, the command is:
hexpress -niversion 31_# -batch -script PATH_TO_SCRIPT/script.py -print
HEXPRESS ™ 7-1
Python Scripts and Plugins Project Commands
Project/Script.../Save All... is used to save the dynamic recording of all commands performed by
the user since the beginning of its session.
Project/Script.../Execute... is used to run a python script file containing HEXPRESS™ com-
mands. A file chooser is opened to select a file with a ".py" extension. Upon selection of a valid file,
the script is executed in the current session and the result is visualized in the graphical window.
Depending on the content of the script, operations will be added to the current project or a new
project will be automatically opened before operations are performed (the previous project is
closed). If the script being run contains a syntactical error it will be aborted and a message will
appear in the shell.
Project/Script.../Re-execute Last can be used to rerun the last script that was run using the
Project/Script.../Execute... command. This option is most useful when writing own scripts manu-
ally to rapidly test it on the fly.
The supported commands for writing python scripts are described below, all other commands, even
if recorded, are not officially supported.
All actions running in HEXPRESS™ GUI cannot be all recorded as python scripts.
When replaying a python script that has been recorded automatically, it may be that the graphics
representations are not identical as in the initial session.
7-2 HEXPRESS™
Viewing Commands Python Scripts and Plugins
example 1: HXP.save_project("/tmp/my_hexpress_project.igg")
example 2: HXP.save_project() # overwrites my_hexpress_project.igg
• close_project() closes the current project and initializes a new one.
• set_mesh_generation_mode(mode) sets the mesh generation mode to 2D or 3D. Default is 3D.
This function should only be called when the project must be 2D. It must be called directly after
the domain importation.
mode can have the values "2D" or "3D".
• export_fluent(filename) saves the mesh in Fluent format under the specified file name. Note
that the extension is ignored and ".msh" extension is used instead.
• export_cgns(filename) saves the mesh in CGNS format under the specified file name.
• export_nastran(filename, precision) saves the mesh in NASTRAN format under the specified
file name and precision format (1 for single, 2 for double).
• get_numeca_dir_() returns the path of the installation.
HEXPRESS™ 7-3
Python Scripts and Plugins Geometry Commands
7-4 HEXPRESS™
Geometry Commands Python Scripts and Plugins
HEXPRESS™ 7-5
Python Scripts and Plugins Geometry Commands
7-6 HEXPRESS™
Geometry Commands Python Scripts and Plugins
• new_cspline (p1,..,pi)
• new_cspline (name,p1,...pi)
Constructs a cspline. See polyline for details about arguments.
• create_arc_ppp(startpoint,endpoint,midpoint,name) creates an arc through three points
(startpoint,endpoint,midpoint). name specifies the name assigned to the arc. The name may not
already be used by another curve in the repository.
• create_arc_cnpp(orig,normal,startpoint,endpoint,name) creates an arc through two points
(startpoint,endpoint) and perpendicular to an anchored vector. origin specifies the anchor point.
normal specifies the anchor vector direction. name specifies the name assigned to the arc. The
name may not already be used by another curve in the repository.
• create_arc_nppr(normal,startpoint,endpoint,radius,sense,name) creates an arc through two
points (startpoing,endpoint) with a given radius and perpendicular to a normal. normal speci-
fies the normal vector. radius specifies the arc radius. sense specifies the arc position. name
specifies the name assigned to the arc. The name may not already be used by another curve in
the repository.
HEXPRESS™ 7-7
Python Scripts and Plugins Geometry Commands
7-8 HEXPRESS™
Geometry Commands Python Scripts and Plugins
HEXPRESS™ 7-9
Python Scripts and Plugins Geometry Commands
Example:
neg,concave,twisted = get_active_domain().get_mesh_bad_cells_count()
print "Number of Negative Cells = ", neg
• get_mesh_orthogonality() returns the min, max and average orthogonality, as well as its stand-
ard deviation
• get_mesh_aspect_ratio() returns the min, max and average aspect ratio, as well as its standard
deviation
• get_mesh_expansion_ratio() returns the min, max and, average expansion ratio, as well as its
standard deviation
• get_mesh_skewness_range() returns the skewness between 0-5 , 5-15 , 15-25 degrees
• get_mesh_max_skewness() returns the maximum skewness in the mesh.
• split_face(face, x1,y1,z1,x2,y2,z2,smallEdgeLength) splits a face in two with two points and
returns the newly created faces.
(x1,y1,z1) and (x2,y2,z2) are the coordinates of the points on the two edges where splitting must
take place.
face can be either the id of the face or an object of type DomainFace. The return value are two
faces of type DomainFace.
smallEdgeLength is the shortest edge length after splitting.
• split_face(face, x1, y1, z1, x2, y2, z2, smallEdgeLength, x3, y3, z3) splits a face in two with
three points (i.e. to use a plane) and returns the newly created faces.
face can be either the id of the face or an object of type DomainFace. The return value are two
faces of type DomainFace.
(x1, y1, z1) and (x2, y2, z2) are the coordinates of points on the two edges where splitting must
take place.
(x3, y3, z3) is a point anywhere on the face.
smallEdgeLength is the shortest edge length after splitting.
• merge_faces(face1, face2) merges two faces of the Domain and return the newly created face.
face1 and face2 can be either the ids of the face or objects of type DomainFace. The return
value is of type DomainFace.
• merge_face_list(facelist) merges the list of faces passed as input. The faces must belong to the
same domain and must be contiguous.
facelist is a list of DomainFace objects or a list of faces identifiers.
• merge_all_edges(featureAngle) merges all possible pairs of edges of the domain whose angle
at the common vertex is larger than the featureAngle.
• create_adaptation_group(name,faceList) creates a new adaptation group for the domain.
name is the name of the group. faceList is the list of faces to put in the group. The list can con-
tain either the id of the faces (integer) or objects of type DomainFace. The function returns an
object of type SurfaceAdaptationGroup
• get_adaptation_group(name) returns the surface adaptation group identified by name. The
function returns an object of type SurfaceAdaptationGroup.
• num_adaptation_groups() returns the number of surface adaptation groups.
• create_VL_group(name,faceList) creates a new viscous layer group for the domain. name is
the name of the group. faceList is the list of faces to be in the group. The list can contain either
the id of the faces (integer) or objects of type DomainFace. The function returns an object of
type VLGroup.
• get_VL_group(name) returns the viscous layers group identified by name. The function
returns an object of type VLGroup.
• num_VL_groups() returns the number of viscous layer groups.
7-10 HEXPRESS™
Mesh Generation Commands Python Scripts and Plugins
HEXPRESS™ 7-11
Python Scripts and Plugins Mesh Generation Commands
teta_min and teta_max specify the limits of the mesh along the azimuthal direction, in degrees.
example: HXP.init_cylindrical_mesh(10, 20, 10, "Z", Point(0,0,0), 5 , 10 , 0 , 180)
• init_mesh_from_file(filename) initializes the mesh from an existing HEXPRESS™ mesh.
filename is the name of the existing mesh, in .hex format.
• generate_initial_mesh() generates the initial mesh, based on previously defined parameters.
example: HXP.init_cartesian_mesh(10, 5, 5)
HXP.generate_initial_mesh ()
• set_global_number_of_refinements(num_refinement) specifies the global number of refine-
ments during the mesh adaptation step.
num_refinement must be an integer.
• get_global_number_of_refinements() returns the global number of refinements for the active
block.
• enable_refinement(bool) enables or disables refinement step according to the input parameter
bool.
bool should be True or False.
• enable_trimming(bool) enables or disables trimming step.
bool should be True or False.
• set_advanced_global_parameters(diffusion, min_size, max_size, global_max_aspect_ratio,
num_cell_in_gaps) sets expert global generation parameters.
diffusion is the value of refinement diffusion.
min_size is the smallest cell size.
max_size is the largest cell size.
global_max_aspect_ratio is the value for global maximum aspect ratio.
num_cell_in_gaps is the number of cells to insert in gaps.
• set_prevent_exterior_cells_refinement(bool) prevents refinement on exterior cells.
bool should be 1 or 0.
• set_isotropic_refinement_in_corners(bool) enables isotropic refinement in the corner.
bool should be 1 or 0.
• set_trimming_by_distance(bool) enables trimming by distance.
bool should be 1 or 0.
• create_refinement_sector(axis, origin_x, origin_y, origin_z, radius_min, radius_max,
start_angle, end_angle, height) creates refinement sector with user-defined parameters.
• create_refinement_cube(x1, y1, z1, x2, y2, z2) creates refinement with two opposite points.
• refinement_box(box_number).set_position(x_min, y_min, z_min, x_max, y_max, z_max)
defines a new position for the refinement box specified.
• refinement_box(box_number).set_adaptation_flags(bool1, bool2) enables refinement for the
refinement box/sector specified according to input value bool1.
bool1 should be 0 or 1.
bool2 should be 0 or 1 (0 = surface only & 1 = volumic)
• refinement_box(box_number).set_refinement_level(n_max) specifies the maximum number
of refinements for the refinement box/sector specified.
n_max must be an integer.
• refinement_box(box_number).set_target_size(nx, ny, nz) specifies the target sizes along X,
Y and Z axis for the refinement box/sector specified.
example: HXP.refinement_box(2).set_target_size(0.01, 0.01, 0.1)
• refinement_box(box_number).set_max_aspect_ratio(ratio) specifies the maximum aspect
ratio for the refinement cells.
7-12 HEXPRESS™
Mesh Generation Commands Python Scripts and Plugins
HEXPRESS™ 7-13
Python Scripts and Plugins Mesh Generation Commands
7-14 HEXPRESS™
Mesh Generation Commands Python Scripts and Plugins
HEXPRESS™ 7-15
Python Scripts and Plugins Mesh Generation Commands
All the commands below have the same definition as the member functions from the
DomainFace class. Please read section 7-5.2 for more information about the functions.
7-16 HEXPRESS™
Mesh Generation Commands Python Scripts and Plugins
All the commands below have the same definition as the member functions from the
DomainEdge class. Please read section 7-5.3 for more information about the functions.
HEXPRESS™ 7-17
Python Scripts and Plugins Dialogue box creation
7-18 HEXPRESS™
Dialogue box creation Python Scripts and Plugins
• ComboBox
• Label
The following container widgets (widgets that can contain other widgets) can be created:
• Frame
• LabelFrame
• NoteBook
• PanedWindow
• DialogueBox
Each widget comes with an associated class with a (reduced) number of functions to modify or
access the value of the widgets.
These functions and classes aims at mimicking some functionalities of the Tcl/Tk
toolkit. It is not meant to provide extensive functionalities for creating advanced dia-
logue boxes. Only a reduced subset of features is provided. Any feature not described in
the above commands is not available.
7-6.1 Classes
7-6.1.1 Variable class
These objects are mostly used with RadioButton widgets to set and query the state of the buttons.
• Variable(value) constructs a variable with the specified initial value.
• setValue(value) sets the value of the variable.
• getValue() returns the value of the variable, as a string.
HEXPRESS™ 7-19
Python Scripts and Plugins Dialogue box creation
7-20 HEXPRESS™
Dialogue box creation Python Scripts and Plugins
HEXPRESS™ 7-21
Python Scripts and Plugins Dialogue box creation
7-22 HEXPRESS™
Dialogue box creation Python Scripts and Plugins
button(text,command) creates and returns a Button widget, passing all the arguments to the
object.
checkbutton(text,initValue,command) creates and returns a CheckButton widget, passing all the
arguments to the object.
radiobutton(text,variable,value,command) creates and returns a RadioButton widget, passing all
the arguments to the object. See RadioButton class.
entry(label,command,width) creates and returns an Entry widget, passing all the arguments to the
object.
list(items) creates and returns a List widget, passing all the arguments to the object.
label(text) creates and returns a Label widget. See Label class.
combobox(label,items,command) creates and returns a ComboBox widget, passing all the argu-
ments to the object. See ComboBox class.
labelframe(text) creates and returns a LabelFrame widget, passing all the arguments to the object.
See LabelFrame class.
HEXPRESS™ 7-23
Python Scripts and Plugins Dialogue box creation
close.pack(side="right") #the action "pack" will show the button and put it on the
right of the dialogue box
apply.pack(side="right")
def apply(self):
try:
domain = HXP.get_active_domain() #defines "domain" which contains a list of
the active domain
except Exception, value:
Warning(value.args[0])
return #goes out of the function "apply"
b = domain.get_xyz_box() #returns the box containing the domain and stores the infor-
mation in the variable "b"
7-24 HEXPRESS™
Dialogue box creation Python Scripts and Plugins
HEXPRESS™ 7-25
Python Scripts and Plugins Dialogue box creation
7-26 HEXPRESS™
APPENDIX A: File Format
solid
:
:
facet normal 0.0 0.0 1.0
outer loop
vertex 1.0 1.0 0.0
vertex -1.0 1.0 0.0
vertex 0.0 -1.0 0.0
endloop
endfacet
:
:
endsolid
HEXPRESS™ A-1
File Format ’.prop’ file format specification
The last line should be the keyword "endsolid". The lines between the above contain descriptions of
3 vertex facets including their normal. Note that the ordering of the vertices is very important since
it gives the orientation of the facet and should comply with the right hand rule.
The facet normals may remain unspecified and set by default to 0. 0. 0. and will generally be gener-
ated by the parsing software/system. The main restriction placed upon the facets in STL files is that
all adjacent facets have to share two common vertices.
• It should be read simultaneously with the ".stl" file. The nth triangle in the ".stl" file is associ-
ated with the nth attribute in the ".prop" file. The number of attributes stored in the ".prop" file
is equal to the number of triangles in the ".stl" file.
• An attribute is an integer value which corresponds to the ID of a topology face. For n topolog-
ical faces, the attributes range from 0 to n-1.
• Each group of triangles must be related.
The file format is the following:
ng
attribute0
:
:
attributen-1
A-2 HEXPRESS™
’.dom’ file format specification File Format
File header
Domain file is an ASCII file. It starts from a 3 line header as follows
• The first line contain the file description in the form:
Multidomain - Created by HEXPRESS version on date ,
where version is the HEXPRESS version and date is the file creation date in format MM/DD/
YYYY.
• Second line contains the domain file format version has the form
Version version
where version is the .dom format version written as a fixed point number. Example: Version 2.3
• Third line has the form
HEXPRESS™ A-3
File Format ’.dom’ file format specification
NUMBER_OF_BLOCKS N ,
where N is the number of blocks.
The file header is followed by N sections, each section defines a domain for one block.
A-4 HEXPRESS™
’.dom’ file format specification File Format
HEXPRESS™ A-5
File Format ’.dom’ file format specification
A-6 HEXPRESS™
Index
INDEX
Numerics chunksize 2-17
2D 6-4 clear cache 2-16
3D viewing 2-90 concave cells 2-43, 2-44, 2-45, 6-42
control points
A adding new 2-21
action 6-2 deleting 2-21
active 6-22 hide 2-27
adaptation 1-3, 3-4 modifying 2-22
box 6-28 convention 1-5
curve 6-17 convert
surface 6-18 domain --> STL 2-54
anisotropic extent 6-27 StarCD --> STL 2-54
ANSYS 2-7 coordinate axis 2-89
aspect ratio 2-44, 6-26 corner capture 6-34
auto button 6-8 correction manual 2-46
axis 2-89 create
axi-symmetric 2-49, 6-5 box 4-5
curve 2-71
B domain (Parasolid) 4-15
background 2-87 surface 2-71
batch mode 3-8 curvature 6-24
boundary conditions 2-30, 6-7 ref factor 6-26
type 2-33, 2-34 curve
bounding box 4-1, 4-5, 6-8 adaptation 6-17
box adaptation 6-28 capture 6-34
buffer insertion 6-35, 6-37 create 2-71
delete 2-28
C display curve 2-26
CAD hide 2-27
manipulation 1-1, 2-70 modify
model 4-4 add control point 2-21
cancel 6-4 discretization 2-22
capture divide 2-23
corner 6-34 modify control point 2-22
curve 6-34 remove control point 2-21
Cartesian point 2-24, 2-27, 2-28, 2-71 reverse orientation 2-23
CATIA orientation 2-23, 2-27
import 1-2, 2-7 select 2-24
V5 4-3 show curve orientation 2-27
CEDRE 2-15 snapping 6-36
short names 2-16 cut-away 2-92
cell view 2-52 cutting plane 2-91, 2-93
CGNS 2-8, 2-13 cylindrical
check 4-20 sector 6-29
HEXPRESS™ i
Index
INDEX
D viewer 2-80
delete 4-14 faceting 4-16
curve 2-28 features 1-1
surface 2-28 file management 1-4
text 2-53 filter 2-33
diffusion 6-14 fit view 2-91
depth 6-28 fixed first layer thickness 6-46
discretization 2-22, 2-23, 4-17 Fluent export 2-10
display format A-1
curve 2-26 full non matching 2-35, 3-8
point 2-25
surface 2-26 G
distance 6-15, 6-23 gap 6-15
domain geometry 3-2, 5-1
convert STL 2-54 getting start 1-1
definition 3-2, 5-1 go 6-4
import 2-7 graphics area 1-6, 2-95
manipulation 2-78, 5-2 grid
validity 2-79, 5-2, 5-11 boundary conditions 2-30
domhydro 2-60 level 2-51
driver 1-6 mirror 2-30
non matching 2-35
E parameters area 2-89
edge periodicity 2-28
merge 2-79, 5-2, 5-3 quality 2-42
split 2-79, 5-2, 5-3 repetition 2-30, 2-54
edit rotation 2-48
mirror 2-21 transformation 2-48
rotate 2-20 translation 2-29, 2-48
scale 2-20
translate 2-20 H
export 1-2, 2-8, 4-27 hand symbol 1-5
Fluent 2-10 hexahedral 1-1
Samcef-Bacon 2-12, 2-13 HEXPRESS/Hybrid 2-8
StarCD 2-8 hide
curve 2-27
F curve control points 2-27
face surface 2-27
displacement 2-52 hints 2-33
merge 2-79, 5-2, 5-5
merge list 5-7 I
select 2-32, 2-82, 5-8, 6-20 import 2-7, 4-21
split 2-79, 5-2, 5-4 CATIA 1-2, 2-7
ii HEXPRESS™
Index
INDEX
mesh file 6-10 geometry 4-25
Parasolid 2-7 modify curve 2-21
STL 1-2, 2-7 mouse coordinates area 2-88
information 4-26 MSW driver 1-6
area 2-88 multi-domain 3-7
initial mesh 1-3, 3-4, 6-7 multigrid Level 2-51
insert text 2-53
installation 1-5 N
interface 2-1 NASTRAN 2-14
internal surface 2-19, 2-69 negative cells 2-43
intersect 4-13 new project 2-4
invert 2-33, 2-83, 5-8, 6-21 NURBS 4-3
J O
Jacobian 6-42 open
existing project 2-4
K new project 2-4
keyboard input area 2-88 OpenFOAM 2-15
OPENGL driver 1-6
L optimization 1-4, 3-6, 6-41
layer 6-51 orientation 4-12
license 1-7 of curve 2-23, 2-27
light bulb 1-5 original view 2-91
orthogonality 2-44
M overview 2-1
manual correction 2-46
material 2-84 P
menu bar 2-3 pair of scissors 1-5
merge 2-79, 4-3, 5-2 Parasolid 1-1
edge 5-3 import 2-7
face 5-5 patch
face list 5-7 filter 2-33
mesh visualization 2-31
adapt 1-3 periodicity 2-28
files 1-4 perspective 2-53
generation 3-4 picking 4-11, 6-20, 6-49
initial 1-3 plugins 2-56
optimize 1-4 marine 2-57
snap 1-4 PNG 2-17
viscous layers 1-4 point
wizard 6-2 display 2-25
meshing fundamentals 3-1 preferences 2-17
message area 2-88 print as PNG 2-17
mirror 2-21, 2-30, 2-69 project 2-10
HEXPRESS™ iii
Index
INDEX
management 1-4 sew 4-20
menu 2-3, 2-4 shading 2-92
new 2-4 shortcuts 2-95
preferences 2-17 shrink factor 2-52, 2-92
print 2-17 smoothing 6-35
quit 2-3, 2-19 snap surface 6-34
save 2-5 snapping 1-4, 3-6, 6-33
save as 2-6 solid 4-20
projection 6-35 split 2-79, 5-2
distance 2-38 edge 5-3
python 7-1 face 5-4
StarCD 4-28
Q convert STL 2-54
quality 2-42, 2-67 StarCD export 2-8
quick access pad 2-70 start 1-1, 6-3
quit 2-3, 2-19 interface 1-6
step 6-3
R STL
refinement 3-4, 6-12 import 2-7
rendering 2-87 model 4-21
repetition 2-30, 2-54 stop 6-3
reverse triangulation 2-39 stretching ratio 6-46
rotate 2-20 structured 1-2, 2-5
geometry 4-26 substract 4-11
rotation 2-48 surface
rotor/stator 3-8 adaptation 6-18
connection 2-40 create 2-71
delete 2-28
S display surface 2-26
Samcef-Bacon export 2-12, 2-13 hide 2-27
save modify
project 2-5 discretization 2-23
project as 2-6 select 2-24
scale 2-20 show lofting curves 2-27
script 2-16, 7-1
scrolling 2-90 T
sector 6-29 target cell size 6-25, 6-30
select text
curve 2-24 delete 2-53
face 2-32, 2-82, 5-8, 6-20 insert 2-53
surface 2-24 tolerance 2-41, 4-17
selection 4-19 toolbar 2-69
settings 2-79, 5-2, 5-12 topology 3-2, 5-1
iv HEXPRESS™
Index
INDEX
transform Parasolid 4-14
transformation 2-48 Y
translate 2-20 Y-projection 2-89
geometry 4-25 Y-rotation 2-90
translation 2-29, 2-48
transparency 2-92 Z
triangulation 1-2, 4-2, 4-17, 4-20 zoom area 2-91
reverse 2-39 zoom in/out 2-90
trimming 3-5, 6-13, 6-31 Z-projection 2-89
twisted cells 6-42 Z-rotation 2-90
U
undo 2-33, 2-79, 2-83, 5-2, 5-8, 5-11, 6-21
Parasolid 4-15
unite 4-11
unstructured 1-2
V
validity check 5-11
variable first layer thickness 6-48
vertex tolerance 2-41
view
cell 2-52
curve orientation 2-23, 2-27
original 2-91
perspective 2-53
repetition 2-54
subpanel 2-80
viewing buttons 2-89
viscous layers 1-4, 3-7, 6-44
visualization 4-19
volume 2-44
volumic 6-30
W
welcome 2-2
wireframe 4-20
X
X11 driver 1-6
X-projection 2-89
X-rotation 2-90
HEXPRESS™ v