Professional Documents
Culture Documents
HEXPRESS™v4 User Manual
HEXPRESS™v4 User Manual
HEXPRESS™v4
Unstructured Grid Generator
- Oct 2014 -
NUMECA International
Chaussée de la Hulpe, 189, Terhulpsesteenweg
B-1170 Brussels
BELGIUM
HEXPRESS™ iii
Contents
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-20.
— 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 8)
— Import CGNS mesh (see 8)
— 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
FIGURE 2.3.1-2 Dialogue shown upon loading a structured mesh for turbomachinery
applications
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, it has
to be split inside IGG™ before loading into HEXPRESS.
When the structured project from IGG™ or AutoGrid5™ contains undefined patches
(UND), they have to be changed in another type (for example CON if at the connection
between blocks) before loading into HEXPRESS™ otherwise the concerned patches will
be considered as an internal surface in the converted mesh.
HEXPRESS™ 2-5
User Interface Menu Bar
The converter defines a new HEXPRESS computational domain by triangulating the surfaces of
the quadrilateral multiblock grid. Boundary conditions are exported into the new HEXPRESS
project. The inlet (INL) and outlet (OUT) patches will be converted automatically into external
(EXT) patches. In case some rotor-stator connections (ROT) are found in the project, a warning as
shown in Figure 2.3.1-6 is issued. These connections will be converted into simple FNMB connec-
tions (SOL*).
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:
2-6 HEXPRESS™
Menu Bar User Interface
HEXPRESS™ 2-7
User Interface Menu Bar
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.../.dat
Project/Import.../.dat reads external geometry files in ".dat" format. 2D domain creation is possi-
ble by importing the ".dat" file containing complete curve definitions of the 2D geometry or only
wire curves.
Upon importing the file, HEXPRESS™ switches to 2D mode automatically. The imported curves
will be put in XY view and adjusted to full view. In the CAD Manipulation subpanel (Figure 2.3.1-
9), the user has the possibility to create polylines, csplines and arcs. With these options, it is possi-
ble to create a closed contour or bounding box from the imported wire curves.
As soon as a closed contour is formed, by clicking on the Create 2D Domain button, the dialog box
shown in Figure 2.3.1-10 appears for the user to specify the domain size in Z direction. Upon click-
ing on the Create button, the domain can be saved as ".dom" file under user-defined name
2-8 HEXPRESS™
Menu Bar User Interface
The file format must be correct. Otherwise, HEXPRESS™ issues an error message
like "invalid file format or corrupted file!".
Curves in the file should form a closed contour without gaps or self intersections at the
stage of domain creation. This contour should be placed on one of the three Cartesian
planes. The maximum valid gap size between two adjacent curves is 0.5% of the size of
the smallest curve. If this restriction is not satisfied, HEXPRESS™ issues an error mes-
sage.
The height of the 2D domain is positive always. Its minimum value is 10e-4.
The ".dat" file should have the following format:
d) 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 26.0 are supported.
2D domain creation is also possible by importing the Parasolid™ file containing only wire entities.
Upon importing the file, HEXPRESS™ switches to 2D mode automatically. The imported curves
will be put in XY view and adjusted to full view.
The user has the possibility to create polylines, csplines and arcs in the CAD Manipulation sub-
panel (Figure 2.3.1-9). With these options, it is possible to create a closed contour or bounding box
from the imported wire entities.
HEXPRESS™ 2-9
User Interface Menu Bar
Upon clicking the Create 2D Domain button, a dialog box shown in Figure 2.3.1-11 appears. The
default value for each discretization parameter is computed automatically by HEXPRESS™. How-
ever, the discretization resolution of the domain can be modified by the user.
• Maximum length: the maximum edge length of the triangulation facets. The smaller the value,
the denser the discretization.
• Curve chordal tolerance: the maximum distance between a curve and the corresponding triangu-
lation edges. The smaller the value, the denser the discretization.
• Curve resolution: the maximum angle (in degrees) between a curve and the triangulation edges.
The values may range from 1.0 to 30. The smaller the value the denser the discretization.
By clicking on the Apply button, the discretization of the selected geometry with the values speci-
fied for each parameter is updated in the graphics area. By clicking on the Default button, the value
for the associated parameter will be reset to the default one.
It is also possible for the user to modify the domain size in Z direction for 2D domain creation.
Upon clicking on the Create button, the domain can be saved as ".dom" file under user-defined
name.
The discretization parameters are positive always. If the value specified is zero, it
means no limitation is imposed on this parameter.
The limitations mentioned for ".dat" file import apply for Parasolid™ import. See sec-
tion c) on page 2-8.
e) 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.
2-10 HEXPRESS™
Menu Bar User Interface
g) Project/Import.../ANSYS mesh
Project/Import.../ANSYS mesh reads external mesh files in ANSYS format ".cdb" v8.0.
h) 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.
i) 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-12)
— ’project_name.bnd’ contains the list of boundary faces with boundary condition information
HEXPRESS™ 2-11
User Interface Menu Bar
• The file "project_name.cel" stores the connectivity between the cells and the nodes.
Figure 2.3.1-13 presents the connectivity of the NUMECA and StarCD hexahedron cell.
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.
2-12 HEXPRESS™
Menu Bar User Interface
— The region type defines the type of boundary condition. HEXPRESS exports the follow-
ing StarCD boundary condition:
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
HEXPRESS™ 2-13
User Interface Menu Bar
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 Flu-
ent 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 con-
trary, 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 rec-
ommended to perform a mesh check (via Fluent’s menu Grid/Check) because it will result in multi-
ple 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 coordi-
nates 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 version 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)
2-14 HEXPRESS™
Menu Bar User Interface
The FNMB concept does not exist in Fluent. FNMB created in HEXPRESS™ are
thus ignored.
Fluent may present poor results at the periodic boundary conditions but its get better
the finer (better resolution) the mesh is at the periodic connection.
The quality of all HEXPRESS™ mesh files exported to Fluent (with suffix) ".msh"
cannot be checked in T-GRID. Nevertheless, the check is possible directly in Fluent: /
Grid/Check.
Files with suffix ".msh" must be imported in Fluent 6.0 (or more) rather than simply opened like in
Fluent 5.3 and 5.4.
Fluent 6.0 then automatically performs checks on the imported mesh and typically displays a set of
warnings referring to the presence of anisotropic subdivisions in the mesh as explained in the above
mentioned remark. These warnings are indicative and have not been reported to hinder the conver-
gence or the accuracy of the simulation.
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
6 7
7 6
This file format is only compatible with fully conformal meshes (mesh presenting no hanging nodes
- see Figure 2.3.1-12).
HEXPRESS™ 2-15
User Interface Menu Bar
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
The cell connectivity is stored under the node ‘Elements_t’. All the cells generated by HEX-
PRESS are hexahedral, with no internal vertex, so the CGNS cell type ‘HEXA_8’ has been cho-
sen to define them. Moreover the cell connectivity definition in HEXPRESS differs from the
CGNS definition:
FIGURE 2.3.1-14 HEXPRESS (left picture) and CGNS (right picture) connectivities
2-16 HEXPRESS™
Menu Bar User Interface
So there are as many additional ‘Elements_t’ nodes as topological surfaces. Each of these addi-
tional nodes lists the corresponding faces as elements, which CGNS type is ‘QUAD_4’.
— Boundary conditions
The boundary conditions are stored under the node ‘BC_t’. The name of this node is the name of
the BCData.
The boundary conditions can be applied either on nodes, either on boundary faces. Here, each
boundary condition is defined by a list of boundary elements. The lists have been defined previ-
ously in the “Face cell connectivity on the boundary” section.
The boundary condition type is set for each boundary element. Here is the correspondence between
CGNS and HEXPRESS boundary condition types:
e) Project/Export.../NASTRAN
HEXPRESScan 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.
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
1. [1] OpenFOAM , User Guide , Version 1.6 , 2009 and [2] OpenFOAM , Programmer’s Guide, Version 1.6 ,
2009.
HEXPRESS™ 2-17
User Interface Menu Bar
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).
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.
2-18 HEXPRESS™
Menu Bar User Interface
Project/Script.../Edit... opens a dialog box displaying all the commands performed by the user
since the beginning of its session. The user can easily edit this script (add, remove and modify com-
mands). The dialog box contains two pull-down menus. File menu allows to open a script in a sepa-
rate dialog box and to save the script in a file. Run menu allows to run the script shown in the
window under the current session ("Rerun on top").
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.
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.
HEXPRESS™ 2-19
User Interface Menu Bar
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.
• The parameter Keep finest grid only saves the project by keeping the finest grid only.
2-20 HEXPRESS™
Menu Bar User Interface
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
— 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-20 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.
HEXPRESS™ 2-21
User Interface Menu Bar
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.
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
2-22 HEXPRESS™
Menu Bar User Interface
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 22. 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 22. 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
22. The copy can then be freely scaled.
To quit this option, enter <q> and press <Enter>.
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 22. The copy can then be freely mirrored.
To quit this option, enter <q> and press <Enter>.
HEXPRESS™ 2-23
User Interface Menu Bar
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.
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-
2-24 HEXPRESS™
Menu Bar User Interface
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.
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-25
User Interface Menu Bar
The current name of a curve can be at any time known by activating the curve selection option
(<s>) and by moving the mouse on top of the curve. The curve name will appear in the information
area.
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:
2-26 HEXPRESS™
Menu Bar User Interface
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:
<1> Select surface(s), <Ctr-1> Select more, <Ctr-a> Select/Unselect 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:
• 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.
HEXPRESS™ 2-27
User Interface Menu Bar
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.
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.
2-28 HEXPRESS™
Menu Bar User Interface
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.
HEXPRESS™ 2-29
User Interface Menu Bar
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.
2-30 HEXPRESS™
Menu Bar User Interface
HEXPRESS™ 2-31
User Interface Menu Bar
— 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
2-32 HEXPRESS™
Menu Bar User Interface
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 Periodic non matching connections (PERNM) can be preserved from
IGG™ or AutoGrid5™ meshes.
HEXPRESS™ 2-33
User Interface Menu Bar
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,
2-34 HEXPRESS™
Menu Bar User Interface
• 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.
HEXPRESS™ 2-35
User Interface Menu Bar
By right-clicking on a face or a group of faces in the menu or in the graphics area, a popup menu
allows to:
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*.
2-36 HEXPRESS™
Menu Bar User Interface
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
HEXPRESS™ 2-37
User Interface Menu Bar
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.
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.
2-38 HEXPRESS™
Menu Bar User Interface
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
related patches is reset to undefined (UND).
Following rules must be respected when performing FNMB connections:
1. A patch can be contained in only one list (either the left patches list or the right one) of a
single FNMB connection. The following configuration is not allowed as Patch 1 is used in
two FNMB connections. On the contrary, a single FNMB connection should be defined
using Patch 1 on one side and Patch 2 and 3 on the other side.
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.
HEXPRESS™ 2-39
User Interface Menu Bar
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.
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-31) 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.
2-40 HEXPRESS™
Menu Bar User Interface
• Select the patches defining the "right" side. These patches are highlighted in dark blue in
the graphics area.
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.
HEXPRESS™ 2-41
User Interface Menu Bar
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.
2-42 HEXPRESS™
Menu Bar User Interface
• 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 connects two domains presenting different periodicity and/or
different rotation speed (i.e. multistage turbomachine). The rotor/stator interface can be computed
for all meshes including structured IGG, HEXPRESS/Hybrid and HEXPRESS meshes. 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.
HEXPRESS™ 2-43
User Interface Menu Bar
• 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.
2-44 HEXPRESS™
Menu Bar User Interface
Click on Search Connections performs an automated search for full non matching
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).
HEXPRESS™ 2-45
User Interface Menu Bar
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.
2-46 HEXPRESS™
Menu Bar User Interface
c) Orthogonality
Orthogonality is defined only for hexahedral cells by an angle in degrees. An angle close to 90
degrees means a completely orthogonal cell. An angle per cell is computed as follows. Let h 1 , h 2
and h 3 be the unit vectors linking the centroids of two opposite faces of a hexahedral cell as pre-
sented in Figure 2.3.3-15.
h3
h1 h2
ijk = h i h j h k i j k
d) Aspect ratio
The aspect ratio of only hexahedral cell is defined as the ratio of the longest to shortest edge length:
h max
AR = ----------
h min
where h min and h max are respectively the shortest and longest cell edges.
e) Volume criterion
Volume criterion is 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™.
f) Equi-angular skewness
The equi-angular skewness only for hexahedral cells is defined by a value include in [0,1]:
HEXPRESS™ 2-47
User Interface Menu Bar
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)
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
2-48 HEXPRESS™
Menu Bar User Interface
A i and C i are respectively the normal of the face i and the vector connecting the centroid of the cell
to the centroid of the adjacent cell sharing the face i.
1... N is the range of internal faces of a cell.
h*e = (Lf *n * n - Lf
(Lf * n * n = Lf proj
Thus, the criterion is the tangent of the angle between the normal to face vector and Lf vector.
In HEXPRESS™, users can plot this criterion with a given range between 0.0 and 90.0.
By default, the FINE™/Marine flow solver will activate a local limiter when values
above 50 are found. Hence, the user can check the range between 50.0 and 90.0 to view
the "bad" cells from the solver point of view.
HEXPRESS™ 2-49
User Interface Menu Bar
Here 14 critical faces are reported in the solver output file whereas in HEXPRESS™
only 7 cells will be reported. The reason is that HEXPRESS™ counts the cells whereas
the flow solver counts the faces of these cells.
Expansion ratio for face F0 = Max(L1/L0, L0/L1) Expansion ratio for face F0 = Max(L0/((L1+L2)/2) , ((L1+L2)/2)/L0)
Expansion ratio for face F1 = Max(L0/L1, L1/L0) Expansion ratio for face F1 = Max(L0/L1,L1/L0)
Expansion ratio for face F2 = Max(L0/L2,L2/L0)
l) 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.
2-50 HEXPRESS™
Menu Bar User Interface
m) 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-18).
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-18). The dialog box is made of four main parts:
• 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.
HEXPRESS™ 2-51
User Interface Menu Bar
• 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.
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 first snapped.
a) Rotate
The following dialog box appears when selecting the Rotate tab. It allows the user to specify the
origin and direction of the rotation axis as well as the angle of rotation in degrees.
2-52 HEXPRESS™
Menu Bar User Interface
The Apply button allows transformation on the active block or on all the blocks.
b) Translate
The following dialog box appears when selecting the Translate tab. The user can specify both
direction and magnitude of the translation vector.
The Apply button allows transformation on the active block or on all the blocks.
HEXPRESS™ 2-53
User Interface Menu Bar
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 transformation on the active block or on all the blocks.
Once these parameters are defined, the transformation from 2D to Axisymmetric is applied on the
active block or all blocks when clicking on Apply button.
2-54 HEXPRESS™
Menu Bar User Interface
During the transformation, the domain and mesh before axisymmetric transformation are saved.
The periodicity will be established based on the angle specified. The FNMB connection is also
defined automatically. The 2D axis rotates with the domain and turns into a periodicity axis for the
3D mesh generated as shown in Figure 2.3.3-24. Lastly, the mesh generation mode is changed to
3D once the transformation is completed.
It is mandatory to keep the entire cache folder if the user wants to revert the mesh
from axi-symmetric to 2D. Alternatively, the user can save the 2D mesh before transfor-
mation or keep the *.dom file before transformation together with the *.igg file and a
recorded python script defining the transformation.
HEXPRESS™ 2-55
User Interface Menu Bar
After the transformation, the FNMB connection defined can be computed at Grid/Non Matching
Connections.
The mirror plane must be aligned with Cartesian axis including the point (0,0,0).
2-56 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-87 to know more about this menu.
HEXPRESS™ 2-57
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-58 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-59
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-31). The View/Repetition... menu allows to repeat the domain and mesh (Figure 2.3.3-3 on
page 2-32.) 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-20 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-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:
2-60 HEXPRESS™
Menu Bar User Interface
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.
HEXPRESS™ 2-61
User Interface Menu Bar
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 ...
A user can create his own python scripts with HEXPRESS macro commands pro-
vided in Chapter 7.
2-62 HEXPRESS™
Menu Bar User Interface
HEXPRESS™ 2-63
User Interface Menu Bar
• 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’.
2-64 HEXPRESS™
Menu Bar User Interface
• Body orientation: defines the orientation of the reference frame related to the location of the
center of gravity of the body.
• Reference: defines the reference length (automatically or not) and speed.
• Initial free surface position: defines the initial free surface position in Z-direction.
• Scale: performs the scaling on the ship with the scaling factor specified. The speed value and
position of the free surface are automatically updated to ensure the Froude’s similarity between
the two scales.
• Mesh density: Three different mesh levels are available: Coarse, Medium and Fine. They all
correspond to a different initial mesh size but also different refinements on the patches of the
geometries according to the table shown below. The number of cells per length of the ship
(LOA) is fixed whatever the ship type is. Reference length (LOA) is used as the reference value
for the mesh generation parameters.
— Example:
Number of cells per LOA for coarse = 3, medium = 4 and fine = 5.
For mesh adaptation on each patch, the type and number of refinements as well as the diffusion
level will be defined depending on its name based on the table shown below.
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 diffu-
sion 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.
The patches names can be written in different ways: capital letters or not, with a suffix
or prefix, etc. For instance, "surf1_domship_Deck_2" will still be considered as "Deck".
HEXPRESS™ 2-65
User Interface Menu Bar
If a patch names contains two different names from the table, the highest values for
the refinement will be used.
Each refinement has been elaborated to ensure a good Richardson extrapolation. Hence, if one
would like to perform a mesh dependency study using 3 levels, the final value can be extrapo-
lated with a very good precision.
• Extra refinement of wave field: based on Froude’s number (and wave length), the purpose of
these extra refinements is to add extra surfaces to refine accurately the bow wave and the wave
pattern behind the ship. Hence, for shorter wave lengths more refinements will be added in the
X and Y-direction for instance. This option adds a significant number of cells and should be
used with caution. For resistance and motions prediction, this option is not essential. It will
however ensure a very good description of the wave field.
• Merge patches with the same name: merges faces which have the same name. It supposes that
the faces are correctly named with Computation Aided-Design software (such as Cadfix).
Therefore, names should be defined carefully in the CAD software to avoid that too many faces
are merged.
• Merge tangential faces: groups all faces which are contiguous and more or less tangential. A
minimum angle should be chosen. If two contiguous faces have a maximum angle between 0
and , then the faces are grouped. This method is especially helpful when the geometry
imported is a Parasolid file with many faces. A low angle will merge more faces whereas an
angle close to 180 degrees will merge few faces.
Each time two faces are merged, the new face gets an ID (the ID is incremented one by one).
After that, the plugin will assign specific values according to the name of the face: hull, deck,
bow, aft, etc. These are the examples of keywords recognized by the plugin.
See the FINE™/Marine user manual for the C-Wizard mode calculations.
• Fluid properties for viscous layers insertion: The given kinematic viscosity by the user is used
to compute the first layer thickness as an information, printed in the shell.
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 number of viscous layers needed to completely fill the Euler cell is computed with inflation
technique activated and a stretching ratio of 1.2.
• Triangulation density: defines the density desired for the triangulation.
• User-defined Y+: estimates the Y+ through the equation shown below. However, user can also
write its own value.
where:
yplus_max=300
yplus_min=30
2-66 HEXPRESS™
Menu Bar User Interface
The buffer insertion of Type II is activated by default for the edges on the Mirror plane during
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.
— This tool provides parameters based on geometric considerations. Hence, it is advised to
compare the results with real values if they are known (given by the naval architect for
instance).
— In 3D, the body is assumed to be aligned along the X-axis. If it is not the case (for instance
the body has an initial yaw angle), one should specify it in the Cardan angles.
— In 2D, the roll motion of a boat section is defined by the rotation around z0, i.e. the "yaw
Rz0" rotation.
— When using an additional external effort, only the final Z-axis resultant and the moment
along X and Y-axis are taken into account the equilibrium position (the others components
cannot be counterbalanced by hydrostatic forces).
HEXPRESS™ 2-67
User Interface Menu Bar
— The body should not be in a bucket shape (the body is not close by a flat deck and it is
"empty" inside), otherwise if its ground is below the free surface location, water will be con-
sidered inside.
FIGURE 2.3.7-2 Illustration of a problematic case where water is considered inside the body
• 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
2-68 HEXPRESS™
Menu Bar User Interface
— 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)
HEXPRESS™ 2-69
User Interface Menu Bar
2-70 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)
HEXPRESS™ 2-71
User Interface Menu Bar
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.
— 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-72 HEXPRESS™
Menu Bar User Interface
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:
• center of gravity coordinates: (0,-1,-3), mass: 2000 kg, dimensions: 2x2x2m, centered on point
(0,0,0).
HEXPRESS™ 2-73
User Interface Menu Bar
• 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’.
2-74 HEXPRESS™
Menu Bar User Interface
Clicking on the Apply button launches the internal surface creation and clicking Close exits the win-
dow. In case the coordinate is outside of the domain, an error will be raised.
HEXPRESS™ 2-75
User Interface Toolbar
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.
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-6).
2-76 HEXPRESS™
Quick Access Pad User Interface
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-60)
Starts the mesh quality analysis tool.
See the Grid/Mesh Quality... menu item description (section 2-3.3.4 on page 2-
45)
Opens the Grid/Boundary Conditions menu (33)
HEXPRESS™ 2-77
User Interface Quick Access Pad
By switching from 3D to 2D mode, the options in the CAD Manipulation subpanel allow the crea-
tion of polylines, csplines and arcs (Figure 2.5.1-2). In this mode, the user can import Parasolid™
or ".dat" file with only wire curves and get a closed contour or bounding box with the curves
options available. After that, the 2D domain can be created by using the Create 2D Domain button.
The Create 2D Domain step converts a solid representation of the computational domain into a dis-
cretized one. For 2D domain creation with ".dat" file, the user is required to specify the domain size
in Z direction in the Create 2D Domain dialog box shown in Figure 2.3.1-10. For 2D domain crea-
tion with Parasolid™ file, the user can set the discretization resolution by modifying the different
faceting parameters like maximum chordal length, curve chordal tolerance, curve resolution and the
domain size in Z direction (Figure 2.3.1-11).
2-78 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>.
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.
HEXPRESS™ 2-79
User Interface Quick Access Pad
• 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.
• 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:
2-80 HEXPRESS™
Quick Access Pad User Interface
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
HEXPRESS™ 2-81
User Interface Quick Access Pad
>> 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.
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).
2-82 HEXPRESS™
Quick Access Pad User Interface
All these data (except the arc position) can be entered either through the keyboard input area or with
the mouse. 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 arc start and end points, it is possible to attract the cursor 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 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:
— 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.
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.
HEXPRESS™ 2-83
User Interface Quick Access Pad
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.
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.
2-84 HEXPRESS™
Quick Access Pad User Interface
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 62 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:
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.
HEXPRESS™ 2-85
User Interface Quick Access Pad
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.
• 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.
2-86 HEXPRESS™
Quick Access Pad User Interface
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 .
HEXPRESS™ 2-87
User Interface Quick Access Pad
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.
2-88 HEXPRESS™
Quick Access Pad User Interface
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 33).
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),
HEXPRESS™ 2-89
User Interface Quick Access Pad
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.
2-90 HEXPRESS™
Quick Access Pad User Interface
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.
HEXPRESS™ 2-91
User Interface Quick Access Pad
—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.
2-92 HEXPRESS™
Quick Access Pad User Interface
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
HEXPRESS™ 2-93
User Interface Quick Access Pad
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
2-94 HEXPRESS™
Quick Access Pad User Interface
• 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.
HEXPRESS™ 2-95
User Interface Quick Access Pad
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.
2-96 HEXPRESS™
Quick Access Pad User Interface
• 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.
HEXPRESS™ 2-97
User Interface Quick Access Pad
• 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.
2-98 HEXPRESS™
Quick Access Pad User Interface
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.
HEXPRESS™ 2-99
User Interface Quick Access Pad
Mouse bindings:
• Left-click + drag : Changes the radius of the cylinder;
• Middle-click + drag : Changes the origin of the cylinder;
• Middle-click + <Ctrl> + drag : Constraints 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;
2-100 HEXPRESS™
Quick Access Pad User Interface
Mouse bindings:
• Left-click + drag : Changes the size of the box;
• Middle-click + drag : Changes the origin of the box;
• Middle-click + <Ctrl> + drag : Constraints 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.
HEXPRESS™ 2-101
User Interface GUI interaction
2-102 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-38).
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 subtraction and bodies intersec-
tion. 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
If the imported Parasolid™ file contains only wire curves, HEXPRESS™ will be
switched to 2D mode automatically. It is possible to add new curves or adding bounding
box for 2D domain creation. See section d) on page 2-9 and section 2-5.1 for more
details.
HEXPRESS uses the Parasolid™ v26.0 library, thus all Parasolid™ models up to
version 26.0 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 the scaling, rotation or translation of 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 degrees 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.
The discretization of the model is a conformal triangulation of the surface boundary delimiting the
computational domain, it is produced using the faceting capabilities of Parasolid™. Triangles are
grouped according to their original topology faces in the solid model. There is a one-to-one map-
ping between the discretization triangle groups and the solid model topology faces. If no further
operation is performed on the triangulation itself, the curves in the HEXPRESS ".dom" file are
those found in the solid model.
The discretization resolution can be modified by changing the faceting parameters and pressing the
Apply button in the pop-up window.
HEXPRESS™ 4-15
Geometry Definition CAD Model
Pressing the Cancel button in the Create Domain dialog box deletes the current discrete representa-
tion and any work performed on the model is lost.
The validation of the discretization and the creation of the domain object (".dom" file) is accom-
plished by pressing the Create button in the Create Domain dialog box.
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.
• 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.
4-16 HEXPRESS™
CAD Model Geometry Definition
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.
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,
HEXPRESS™ 4-17
Geometry Definition CAD Model
• 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-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.
4-18 HEXPRESS™
CAD Model Geometry Definition
• 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 STL Model
• Sew: merges sheets to make a body 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.
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.
HEXPRESS™ 4-21
Geometry Definition STL Model
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.
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.
4-22 HEXPRESS™
STL Model Geometry Definition
• 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.
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
HEXPRESS™ 4-23
Geometry Definition STL Model
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.
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-24 HEXPRESS™
STL Model Geometry Definition
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>.
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:
HEXPRESS™ 4-25
Geometry Definition STL Model
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
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-26 HEXPRESS™
StarCD Surface Mesh Geometry Definition
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 Internal Surface Geometry
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-42 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-45 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-45 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 four successive actions, four intermediate meshes are saved
(i.e. suffix "_init.hex", "_adapt.hex", "_snap.hex" and "_regularize.hex") 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-52).
• 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-52). 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-38).
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
The operations (translation, rotation, scaling) are applied to the active refinement box/sector after
clicking on the Apply button:
• For rotation: the origin, axis and angle in degrees have to specified;
• For translation: the translation direction has to be specified. The specified vector includes the
magnitude of the translation;
• For scaling: the scaling factor along the X, Y and Z directions should be specified. The scaling
factors have to be strictly positive.
6-6.5.5 Parameters
The maximum number of refinements 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.
6-30 HEXPRESS™
Adapt To Geometry Mesh Wizard
The target sizes (Figure 6.6.5-3) 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.
HEXPRESS™ 6-31
Mesh Wizard Adapt To Geometry
For MIRROR patches loaded from previous versions of HEXPRESS, the flag will
be automatically set to Not used for trimming in the patch list.
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).
6-32 HEXPRESS™
Snap to geometry Mesh Wizard
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).
HEXPRESS™ 6-33
Mesh Wizard Snap to geometry
In addition, the snapping of the mesh onto the geometry may create highly distorted elements. Lay-
ers of additional cells (buffer insertion) are introduced into the mesh to create a body conforming
mesh.
Finally, the mesh is smoothed by moving points on the surface and in the volume in order to obtain
a mesh with a good but not guaranteed quality.
Occasionally, the corner or curve capturing algorithms may fail to capture all the corners or/and
curves of the computational domain. When such a problem occurs, the mesh snapping action
resumes and exits with a specific error code which is reported in the report file (".rep") and the
action box in the mesh wizard turns red indicating that a major failure occurred. A failure to capture
a corner is usually an indication that a problem is present in the geometry, e.g. the surface triangula-
tion is not oriented properly (see section c) on page 4-17). A failure in the curve capturing can gen-
erally be solved by additional cell refinements in the vicinity of the curve, the parameters of the
adaptation action should be modified and this action resumed.
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
HEXPRESS™ 6-35
Mesh Wizard Snap to geometry
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.
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:
6-36 HEXPRESS™
Snap to geometry Mesh Wizard
• 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,
• 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.
6-38 HEXPRESS™
Snap to geometry Mesh Wizard
Snapping problems can appear on vertices, edges, faces or can be due to holes in the
mesh.
Curve marked as can be skipped in the Curve Snapping menu are highlighted in
blue as well.
HEXPRESS™ 6-39
Mesh Wizard Snap to geometry
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).
6-40 HEXPRESS™
Snap to geometry Mesh Wizard
- Split the edge in the problematic zone and set the problematic part to must be ignored in the
expert parameters of the Curve Snapping menu (section 6-7.3).
Cyclic curves are not well captured by HEXPRESS. In this case, split the cyclic curve at the
kinks in order to create corners which will be captured by HEXPRESSor improve the triangula-
tion in the CAD software.
2) Faces not captured
- Add refinements in adaptation menu. To do so, check visually after adaptation step if all faces
have enough cells around them to be captured. At least 5 cells in all direction should be present. If
there is no cell at all between close surfaces, add distance criteria to the corresponding surfaces.
- Check triangulation settings: check visually that all faces are well discretized by showing the tri-
angulation on each surface. Otherwise, go back to CAD manipulation or to the CAD software to
improve them.
3) Sharp edges
- Add curve refinements in adaptation menu.
- Split the edge in the problematic zone and set the problematic part to must be ignored in the
expert parameters of the snapping step.
4) Holes detected
It sometimes happens that if the mesh refinement is not sufficient then the mesh contains holes.
That can happens, for example, in narrow gaps or in the vicinity of acute dihedral angles. In such
situations HEXPRESSwill report the presence of holes in the mesh and for each hole it identifies
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.
HEXPRESS™ 6-41
Mesh Wizard Optimization
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 twisted, concave or may even present a negative vol-
ume.
Twisted cell is a cell with distorted shape. For example shown in Figure 6.8.1-1, a cell is considered
as twisted when vertex c and d of the cell on the left switch their places.
A cell is defined as concave (the cell looks like a "boomerang") if at least one of tetrahedra consti-
tuting the cell has negative volume. In practice, the concave property is tested by checking the neg-
ativeness of the volume of the tetrahedral subdividing the cell (see Figure 6.8.1-2). This kind of
subdivision is, of course, not unique and should therefore be chosen carefully.
FIGURE 6.8.1-2 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-45).
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.
6-42 HEXPRESS™
Optimization Mesh Wizard
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.
HEXPRESS™ 6-43
Mesh Wizard Optimization
The number and the visualization of the relaxed cells can be done through the mesh
quality menu (see section l) "Relaxed Cells" on page 2-50) after the optimization step.
The CPU time can be significantly increased with increasing optimization iterations.
It is not guaranteed that extra optimization iterations always give better mesh quality.
6-44 HEXPRESS™
Viscous Layers Mesh Wizard
Limitation: possible improvements of mesh quality can be lost after insertion of vis-
cous layers.
HEXPRESS™ 6-45
Mesh Wizard Viscous Layers
FIGURE 6.9.2-1 Global menu for a fixed first layer thickness method
6-46 HEXPRESS™
Viscous Layers Mesh Wizard
• y+ estimation
The Estimate button shown in Figure 6.9.2-2 is available only in FINE/Marine package. The
y+ is estimated through the equation shown:
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
HEXPRESS™ 6-47
Mesh Wizard Viscous Layers
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
6-48 HEXPRESS™
Viscous Layers Mesh Wizard
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).
FIGURE 6.9.2-5 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
HEXPRESS™ 6-49
Mesh Wizard Viscous Layers
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.
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.
6-50 HEXPRESS™
Viscous Layers Mesh Wizard
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.
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>).
HEXPRESS™ 6-51
Mesh Wizard Viscous Layers
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).
6-52 HEXPRESS™
Viscous Layers Mesh Wizard
FIGURE 6.9.3-4 Surface settings for fixed first layer thickness method
HEXPRESS™ 6-53
Mesh Wizard Viscous Layers
L0
D 0 = ---------
-
AR 0
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
a 0i
L0 = =0 -
i----------------
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-54 HEXPRESS™
Viscous Layers Mesh Wizard
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
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
HEXPRESS™ 6-55
Mesh Wizard Viscous Layers
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
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.
6-56 HEXPRESS™
Viscous Layers Mesh Wizard
HEXPRESS™ 6-57
Mesh Wizard Viscous Layers
6-58 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™
Project Commands Python Scripts and Plugins
resetNMBtoFNMB 1 to reset all existing PER/NMB/PERNM into FNMB and 0 to retrieve the
missing ".nmb" file.
- Associated dialog box : the warning that appears when the appropriate ".nmb" file is not found
during the importation of a converted HEXPRESS™ project.
example 1: HXP.open_project("my_hexpress_project.igg",1)
example 2: HXP.open_project("my_IGG_project.igg", 1, 1, "/tmp/
my_converted_project.igg", 0, 2, 0)
conversionMode, newFilename, finestLevel, coarsestLevel and resetNMBtoF-
NMB parameters matter only in silent mode.
• import_project(filename, conversionMode, newFilename, finestLevel, coarsestLevel)
imports an existing HEXPRESS™ (.igg) project or a structured IGG project.
example 1: HXP.import_project("my_hexpress_project.igg")
example 2: HXP.import_project("my_hexpress_project.igg", 1, "tmp/
my_converted_project.igg", 0, 2)
• import_2d_domain(filename, zSize, curve_resolution, curve_chordal_tol,
max_chordal_length) imports an external geometry (.dat) file or a Parasolid model for 2D
domain creation. In case of .dat file import, the last three parameters can be omitted.
zSize is the size of the 2D domain in Z direction.
curve_resolution, curve_chordal_tol and max_chordal_length correspond to the discretization
parameters for Parasolid import.
example 1: HXP.import_2d_domain("my_dat_project.dat", 0.15)
example 2: HXP.import_2d_domain("my_parasolid_file.xmt_txt", 0.15, 0.01, 0.1, 0)
• save_project(filename) saves the current project. filename is full path name of the project file.
It must have the extension ".igg". After a first save operation, the filename argument can be
omitted, In that case the project file is overwritten.
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).
• export_foam(filename) saves the mesh in OpenFOAM format under the specified file name.
• get_numeca_dir_() returns the path of the installation.
• switch_HEXPRESS_to_FM(mode) switches HEXPRESS™ interface to FINE™/Marine with
the mode specified.
mode = 5, save the mesh (1) + link the new mesh (4)
mode = 6, do not save the mesh (2) + link the new mesh (4)
mode = 9, save the mesh (1) + do not link the new mesh (8)
mode = 10, do not save the mesh (2) + do not link the new mesh (8)
HEXPRESS™ 7-3
Python Scripts and Plugins Viewing 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
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
7-10 HEXPRESS™
Geometry Commands Python Scripts and Plugins
HEXPRESS™ 7-11
Python Scripts and Plugins Geometry Commands
Example :
if (face.get_type() == "MIR"):
domain.add_patch_to_BC_group("MIR_GROUP",face._id)
If the face is a mirror patch, it will be added to the BC group called "MIR_GROUP". The faceID is
identified by face._id.
• set_BC_group_name(bc_group_name, new_name) changes the name of the boundary condi-
tion group given by bc_group_name to new_name.
• set_BC_group_type(bc_group_name, bc_type) changes the type of the boundary condition
group given by bc_group_name to bc_type.
bc_group_name is the name of the group (string).
bc_type is a string that can have the following values: INL, OUT, SOL, MIR, UND, EXT
• get_number_of_cells() returns the number of cell in the mesh associated with the domain.
• get_mesh_bad_cells_count() returns the number of negative, concave and twisted cells in the
mesh attached to the domain.
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.
7-12 HEXPRESS™
Mesh Generation Commands Python Scripts and Plugins
HEXPRESS™ 7-13
Python Scripts and Plugins Mesh Generation Commands
smallEdgeLength is a small value. The vertex on the edge will be used to split the edge when
the distance between the split location and the vertex is less than smallEdgeLength.
• merge_edges(vertexId) merges two edges together.
vertexId is the identifier of the vertex shared by the two edges.
• split_face(faceId, x1, y1, z1, x2, y2, z2, smallEdgeLength) splits a face in two.
• merge_faces(face1Id, face2Id) merges two faces together.
face1Id and face2Id are the two faces identifiers.
• init_cartesian_mesh(nx, ny, nz) specifies the number of cells along the X, Y and Z directions
for the generation of an initial Cartesian mesh. This function does NOT generate the initial
mesh, its simply initializes its values.
• init_cylindrical_mesh(nr, nt, nz, rotation_axis, origin, rmin, rmax, teta_min, teta_max)
initializes a cylindrical mesh with the prescribed values. This function does NOT generate the
initial mesh, it simply initializes its values.
nr, nt, nz are the number of desired points along the R, TETA and Z directions.
rotation_axis specifies the axis of rotation. It can have the values "X", "Y" or "Z" (string).
origin is the origin of rotation axis. It must be of type Point.
rmin and rmax specify the limits of the mesh along the radius
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.
7-14 HEXPRESS™
Mesh Generation Commands Python Scripts and Plugins
HEXPRESS™ 7-15
Python Scripts and Plugins Mesh Generation Commands
7-16 HEXPRESS™
Mesh Generation Commands Python Scripts and Plugins
trimmingOption 1 used for trimming and 0 not used for trimming. If the new bc_type defined
for the selected patch is MIR or EXT, the trimming option is set according to the value defined
for trimmingOption.
- Associated dialog box : confirm box that appears when modifying the boundary condition of a
selected patch that is not planar or aligned with Cartesian axis to MIR/EXT condition.
trimmingOption matters only in silent mode.
example 2:
HXP.set_silent_mode(1)
HXP.domain("my_domain").get_faces(6).set_type("MIR", 1)
• get_type() returns the boundary condition of the face.
• get_area() returns the area of the face (sum of face triangles area)
• is_adaptation_enabled() returns whether the adaptation step is enabled for the face.
• enable_adaptation(bool) enables or disables adaptation for the face.
• set_number_of_refinements(num_ref) specifies the number of refinements for the face.
num_ref is an integer.
• get_number_of_refinements() returns the number of refinements for the face.
• set_adaptation_criteria(distance, curvature, target_size) specifies which adaptation criteria
to use.
distance, curvature, target_size are boolean values determining whether the distance, curvature
or target size criteria are used for the face.
Obsolete command set_adaptation_criterias(distance, curvature, target_size) is
kept for backward compatibility.
• get_adaptation_criteria() returns which adaptation criteria is active.
Obsolete command get_adaptation_criterias() is kept for backward compatibility.
• delete_adaptation_group(name) deletes the adaptation for the group specified.
example: HXP.domain("my_domain").delete_adaptation_group("group1")
• set_target_sizes(nx, ny, nz) sets the target sizes along X, Y and Z axis. When using this func-
tion, the target size adaptation criteria is automatically enabled.
nx, ny, nz are real positive values. If 0 is specified, the face is refined the number of times spec-
ified by the global number of refinements.
• get_target_sizes() returns the target sizes along X, Y and Z axis.
• set_diffusion_depth(num_depth) specifies the number of refinement diffusion for the face.
num_depth is an integer.
HEXPRESS™ 7-17
Python Scripts and Plugins Mesh Generation Commands
7-18 HEXPRESS™
Mesh Generation Commands Python Scripts and Plugins
HEXPRESS™ 7-19
Python Scripts and Plugins Mesh Generation Commands
• get_vertices() returns the two vertices of the edge. The return values are of type DomainVer-
tex.
Example:
v0,v1 = edge.get_vertices()
print "Vertex id 0 ", v0._id
• get_min_angle_between_faces() returns the minimum angle (in degree) between the two adja-
cent faces of the edge. Typical values:
Angle between two flat surfaces: 180
Angle between two faces of a cube: 90
Angle for an accute edge: a few degrees
• operator == (inputEdge) returns if this edge is the same as the inputEdge.
Example:
e1 = face.get_edges()[0]
e2 = face.get_edges()[0]
if e1 == e2:
print "Same edges"
7-20 HEXPRESS™
Mesh Generation Commands Python Scripts and Plugins
patibility.
• get_advanced_adaptation_criteria() returns the advanced adaptation criteria for the group.
Obsolete command get_advanced_adaptation_criterias() is kept for backward com-
patibility.
• set_diffusion_depth(depth) applies the function to each patch in the group.
• get_diffusion_depth() returns the diffusion depth for the group.
• set_number_of_refinements(n) applies the function to each patch in the group.
• get_number_of_refinements() returns the number of refinements for the group.
• set_max_aspect_ratio(maxAspectRatio) applies the function to each patch in the group.
• get_max_aspect_ratio() returns the max aspect ratio parameter for the group.
• set_target_sizes(x,y,z) applies the function to each patch in the group.
• get_target_sizes() returns the target sizes for the group.
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-21
Python Scripts and Plugins Mesh Generation Commands
7-22 HEXPRESS™
Mesh Generation Commands Python Scripts and Plugins
zsize = mybox.dz()
print str(xsize) + ", " + str(ysize) + ", " + str(zsize)
HEXPRESS™ 7-23
Python Scripts and Plugins Dialogue box creation
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.
7-24 HEXPRESS™
Dialogue box creation Python Scripts and Plugins
HEXPRESS™ 7-25
Python Scripts and Plugins Dialogue box creation
command is an optional argument that can be either a function that requires no argument or an
object of type Command. Upon pressing the button, the command will be called automati-
cally.
7-26 HEXPRESS™
Dialogue box creation Python Scripts and Plugins
unit is a string that will appear next to the entry to indicate the entry units. This input is
optional. Note that if the text for the units uses [], it must be backslashed "\[m\]".
labelwidth is the width of the entry label. This input is optional.
focus forces the focus on the entry.
• enable(state) changes the state of the entry (enabled or disabled). state is a boolean value.
• getStringValue() returns the value in the entry as a string.
• getFloatValue() returns the float value in the entry. An exception is raised (ValueError) if the
input is not a float.
HEXPRESS™ 7-27
Python Scripts and Plugins Dialogue box creation
anchor specifies where to position each widget in its parent. Possible values are: n, e, w or s.
Default is center.
padx specifies how much horizontal external padding to leave on each side of the widget.
pady specifies how much horizontal external padding to leave on each side of the widget.
• unpack() hides the widget from the screen.
7-28 HEXPRESS™
Dialogue box creation Python Scripts and Plugins
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"
HEXPRESS™ 7-29
Python Scripts and Plugins Dialogue box creation
7-30 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 deleting 2-24
2D 6-4 hide 2-30
3D viewing 2-97 modifying 2-24
A convention 1-5
action 6-2 convert
active 6-22 domain --> STL 2-60
adaptation 1-3, 3-4 StarCD --> STL 2-60
box 6-28 coordinate axis 2-96
curve 6-17 corner capture 6-35
surface 6-18 correction manual 2-51
anisotropic extent 6-27 create
ANSYS 2-11 box 4-5
aspect ratio 2-47, 6-26 curve 2-78
auto button 6-8 surface 2-78
axis 2-96 create domain
axi-symmetric 2-54, 6-5 Parasolid 4-15
B curvature 6-24
background 2-94 curvature ref factor 6-26
batch mode 3-8 curve
boundary conditions 2-33, 6-7 capture 6-35
type 2-37 create 2-78
bounding box 4-1, 4-5, 6-8 delete 2-31
box adaptation 6-28 display curve 2-28
buffer insertion 6-35, 6-37 hide 2-30
C modify
CAD manipulation 1-1, 2-77 add control point 2-24
CAD model 4-4 discretization 2-25
cancel 6-4 divide 2-25
capture modify control point 2-24
corner 6-35 remove control point 2-24
curve 6-35 reverse orientation 2-25
Cartesian point 2-26, 2-30, 2-31, 2-78 orientation 2-25, 2-30
CATIA import 1-2, 2-10 select 2-26
CATIA V5 4-3 show curve orientation 2-30
CEDRE 2-18 curve adaptation 6-17
CEDRE (short names) 2-18 curve snapping 6-36
cell view 2-58 cut-away 2-99
CGNS 2-11, 2-16 cutting plane 2-98, 2-100
check 4-19 cylindrical
chunksize 2-20 sector 6-29
clear cache 2-18 D
concave cells 2-47, 2-48, 2-49, 6-42 delete 4-14
control points curve 2-31
adding new 2-24 surface 2-31
HEXPRESS™ i
Index
INDEX
delete text 2-59 fit view 2-98
diffusion 6-14 fixed first layer thickness 6-47
diffusion depth 6-28 Fluent export 2-13
discretization 2-25, 2-26, 4-17 format A-1
display full non matching 2-38, 3-8
curve 2-28 G
point 2-28 gap 6-15
surface 2-29 geometry 3-2, 5-1
distance 6-15, 6-23 getting start 1-1
domain go 6-4
convert STL 2-60 graphics area 1-6, 2-102
definition 3-2, 5-1 grid
import 2-8 boundary conditions 2-33
manipulation 2-86, 5-2 mirror 2-33
validity 2-86, 5-2, 5-11 non matching 2-38
domhydro 2-67 periodicity 2-31
driver 1-6 quality 2-45
E repetition 2-33, 2-60
edge rotation 2-52
merge 2-86, 5-2, 5-3 transformation 2-52
split 2-86, 5-2, 5-3 translation 2-32, 2-53
edit grid level 2-57
mirror 2-23 grid parameters area 2-96
rotate 2-23 H
scale 2-23 hand symbol 1-5
translate 2-22 hexahedral 1-1
export 1-2, 2-11, 4-27 HEXPRESS/Hybrid 2-11
Fluent 2-13 hide
Samcef-Bacon 2-15, 2-16 curve 2-30
StarCD 2-11 curve control points 2-30
F surface 2-30
face hints 2-36
merge 2-86, 5-2, 5-5 I
merge list 5-7 import 2-8, 4-21
select 2-35, 2-89, 5-8, 6-20 CATIA 1-2, 2-10
split 2-86, 5-2, 5-4 mesh file 6-10
face displacement 2-58 Parasolid 2-9
face viewer 2-87 STL 1-2, 2-10
faceting 4-16 information 4-25
features 1-1 information area 2-95
file management 1-4 initial mesh 1-3, 3-4, 6-7
files 1-4 insert text 2-59
filter 2-36 installation 1-5
ii HEXPRESS™
Index
INDEX
interface 2-1 O
internal surface 2-22, 2-74 open
intersect 4-13 existing project 2-4
invert 2-36, 2-90, 5-8, 6-21 new project 2-4
J OpenFOAM 2-17
Jacobian 6-42 OPENGL driver 1-6
K optimization 1-4, 3-6, 6-42
keyboard input area 2-95 orientation 4-12
L of curve 2-25, 2-30
layer 6-52 original view 2-98
license 1-7 orthogonality 2-47
light bulb 1-5 overview 2-1
M P
manual correction 2-51 pair of scissors 1-5
material 2-91 Parasolid 1-1
menu bar 2-3 Parasolid import 2-9
merge 2-86, 4-3, 5-2 patch
edge 5-3 filter 2-36
face 5-5 visualization 2-34
face list 5-7 periodicity 2-31
mesh perspective 2-59
adapt 1-3 picking 4-11, 6-20, 6-51
files 1-4 plugins 2-61
initial 1-3 marine 2-62
optimize 1-4 PNG 2-19
snap 1-4 point
viscous layers 1-4 display point 2-28
mesh generation 3-4 preferences 2-19
mesh wizard 6-2 print as PNG 2-19
meshing fundamentals 3-1 Project 2-13
message area 2-95 project
mirror 2-23, 2-33, 2-76 management 1-4
geometry 4-25 new 2-4
modify preferences 2-19
curve 2-23 print 2-19
mouse coordinates area 2-95 quit 2-3, 2-22
MSW driver 1-6 save 2-6
multi-domain 3-7 save as 2-7
multigrid Level 2-57 project menu 2-3, 2-4
N projection 6-35
NASTRAN 2-17 projection distance 2-41
negative cells 2-46 python 7-1
new project 2-4 Q
NURBS 4-3 quality 2-45, 2-75
HEXPRESS™ iii
Index
INDEX
quick access pad 2-77 step 6-3
quit 2-3 STL import 2-10
quit project 2-22 STL model 4-20
R stop 6-3
refinement 3-4, 6-12 stretching ratio 6-47
rendering 2-94 structured 1-2, 2-5
repetition 2-33, 2-60 substract 4-11
reverse triangulation 2-42 surface
rotate 2-23 create 2-78
geometry 4-25 delete 2-31
rotation 2-52 display surface 2-29
rotor/stator 3-8 hide 2-30
rotor/stator connection 2-43 modify
S discretization 2-26
Samcef-Bacon export 2-15, 2-16 select 2-27
save project 2-6 show lofting curves 2-30
save project as 2-7 surface adaptation 6-18
scale 2-23 T
script 2-18, 7-1 target cell size 6-25, 6-31
scrolling 2-97 text
sector 6-29 delete 2-59
select insert 2-59
curve 2-26 tolerance 2-44, 4-17
face 2-35, 2-89, 5-8, 6-20 toolbar 2-76
surface 2-27 topology 3-2, 5-1
selection 4-18 transform
settings 2-86, 5-2, 5-12 Parasolid 4-14
sew 4-20 transformation 2-52
shading 2-99 translate 2-22
shortcuts 2-102 geometry 4-25
shrink factor 2-58, 2-99 translation 2-32, 2-53
smoothing 6-36 transparency 2-99
snap surface 6-34 triangulation 1-2, 4-2, 4-17, 4-19
snapping 1-4, 3-6, 6-33 reverse 2-42
solid 4-19 trimming 3-5, 6-13, 6-32
split 2-86, 5-2 twisted cells 6-42
edge 5-3 U
face 5-4 undo 2-36, 2-86, 2-90, 5-2, 5-8, 5-11, 6-21
StarCD 4-27 Parasolid 4-15
convert STL 2-60 unite 4-11
StarCD export 2-11 unstructured 1-2
start 1-1, 6-3 V
start interface 1-6 validity check 5-11
iv HEXPRESS™
Index
INDEX
variable first layer thickness 6-49
vertex tolerance 2-44
view
cell 2-58
curve orientation 2-25, 2-30
original 2-98
perspective 2-59
repetition 2-60
subpanel 2-87
viewing buttons 2-96
viscous layers 1-4, 3-7, 6-45
visualization 4-18
volume 2-47
volumic 6-31
W
welcome 2-2
wireframe 4-19
X
X11 driver 1-6
X-projection 2-96
X-rotation 2-97
Y
Y-projection 2-96
Y-rotation 2-97
Z
zoom area 2-98
zoom in/out 2-97
Z-projection 2-96
Z-rotation 2-97
HEXPRESS™ v