Installation Usage Use with Gmsh
Fad is a programme for manipulating 3-D finite-element models.
.sap plain-text model-definition files as input.
Fad is implemented in Fortran. It was originally developed under VMS, and is currently being developed under Compaq (Digital) Unix for Alpha; GNU/Linux for Alpha and Intel; and (alas) Microsoft Windows. The binary is available for Unix and GNU/Linux by request; the binary for Windows is offered here. It can be used for any purpose as long as I am informed of its use. So far there is no documentation beyond the very incomplete beginning that you're looking at.
In this documentation, square brackets
are used to indicate
optional command arguments and should not be included in the commands
themselves. The visible-space character
is sometimes used to emphasize
where space characters should be used in commands.
In prompts within Fad, square brackets are sometimes used to indicate default values, that is, values that will be used if you just type Enter.
Either download the Fad executable for 32-bit Windows (about 4.0 Mbytes) or (if your computer is part of the McGill BME network) create a shortcut to the executable on probeShare. Follow the general instructions for installation of Dip software.
Issue with ClearType: If ClearType is turned on, faint ghosts will be left behind on the screen after Fad displays and then erases text. ClearType is off by default under Windows XP but on by default under Vista.
Missing points: It has been observed under Vista that
sometimes after a Fad
P␣0 command some nodes are not
displayed at first but then appear after the window is minimized and then
restored. The cause is unknown.
If your computer is part of the McGill BME network, create a
symbolic link (
ln -s) to the executable on
probeShare. Otherwise download the Fad executable from here and do
chmod u+x fad to make it executable.
Make sure that the
has been installed (e.g., by doing
sudo apt-get install xdg-utils).
(It is used to open Fad's documentation
with the default Web browser.)
Follow the general instructions
for installation of Dip software.
You can run Fad by opening a terminal window,
cd’ing into the directory where you saved it
and giving the command
or by giving the command
./Downloads/fad (assuming that you saved Fad in
Downloads subdirectory of your home directory.
Do not include
& at the end of the
Fad requires at least about 1500 to 2000 MB of memory to run. If Fad fails to run, check that you have enough free memory. (If running under VirtualBox, try increasing the amount of memory allocated to your virtual machine.)
|R␣fname[/SEC=fname]||Read model from .sap file(s)|
|W fname||Write model to .sap file|
|I fname.type||Import model from file|
|E||Export model to file|
|G||Generate new model|
|C||Change positions of nodes|
|B||Bisect edges of shell elements|
|A||Align primary model to secondary|
|2||convert to 2nd order|
|F||Fix current coördinates|
|J||Join secondary model to primary|
|K||Quality checK (shell intersections)|
|N||couNt unconnected structures|
|V||Vacuum unused things|
|L [/MEASURE]||Locate using cursor|
|?||Help (display this Web page)|
When Fad is run, it should display a
Plotting to? question. Normally you should just type
Enter (or Return) here.
You should then see a
Do (? for help) ? prompt.
After every action you should be returned to this prompt. If not, it means
that Fad has crashed and you should look for an error message.
Typing ? and Enter will invoke your default Web browser to display this page of documentation. Typing ? as a second character for any command, and in some other places in Fad, will cause the same documentation page to be displayed, sometimes positioned at the relevant topic. Displaying this on-line help requires that you have an Internet connection open.
The first command that you give
would normally be
R to read in a .sap file, or perhaps
I to import a file that is in some other format, or
G to generate a new model.
The commands are not case-sensitive, so you could
equally well use
Fad attempts to create a log file
in your home directory. If that is successful, then various parts of
Fad may record things there.
When you give the
R command you will be presented with
a list of recently opened files. Select one of them by clicking,
or click on
to browse and find another file. See also
further information about using Dip
After a model has been read in, Fad automatically displays it and also displays some numbers at the bottom of the window:
Sometimes it’s desirable to read in two models
at the same time.
To read in both a primary model and a
use the command
R␣/sec. When presented with the
file-selection menu, open the secondary file first and then the
primary file. The Align and Join commands are based on the use of
the Plot command includes
various ways of controlling how they're displayed together with
the primary model; and the Modify
and Import commands make use of them.
This command writes out the current primary model in
The secondary model, if any, is not included; if you want it to be included,
use the Join command before the
Any current rotations
are not applied; if you want them to be applied, use the
The simplest plot command
which will plot every edge of every element.
Many options are available
For example, the command
␣indicates a space character.)
Once you have used the
P command to display (plot) a
model (and the secondary model if there is one),
an interactive rotation, translation and clipping tool
will appear in the
bottom left corner.
Rotations and translations are reflected immediately when the model is plotted,
but are not applied to the actual model co÷rdinates until and unless
the Fix command is given.
The x, y and z axes are displayed in red, green and blue, respectively. Below the axes is a concise indication of the current status of the tool. In the examples shown on the right, for example:
Rindicates that the tools are in rotation mode, which is the initial mode. The other two modes are translation and clipping. To the left of the model(s) are displayed the current orientation(s), the current translation(s) if non-zero, and the current clipping value if active.
Yindicate the currently active axis, which can be either
Windicates that the tools are in the world-coördinates mode, as opposed to the object-coördinates mode.
5indicate the current incremental values for changing the rotation, translation or clipping plane. The initial setting is 10°.
(i)indicates that the tools are in the Immediate mode.
Bindicates that interactive changes will be applied to both the primary and secondary models, rather than just one or the other. The x, y and z axes for the secondary model are displayed in lighter shades of red, blue and green.
Typing just Enter causes the currently specified action to be taken, either rotating or translating the model or changing the position of the clipping plane. Typing a number followed by Enter will change the rotation, translation or clipping step size. Typing a letter followed by Enter changes other settings of the tool. The following commands are available:
A) will reset the model to its initial position.
/clipoption was used with the plot command.
There is no zoom function as part of the plot command. By default the model is automatically zoomed to almost fill the display area. This automatic scaling is based on which elements are selected in the primary model; if all elements are selected then the scaling is based on all of the nodes in the model, which may yield a different result from scaling based on all of the elements if there are some nodes that are not used in any element. If a secondary model is also displayed, then the scaling will also take into account all of its nodes (since element selection is not yet implemented for the secondary model). Something equivalent to zooming can be obtained using the Modify window command.
The first parameter of a plot command is a plotting level from 0 to 9. If no plotting level is specified, it is taken to be 1.
A plotting-level value of 0 (zero) for the plot command causes only the nodes to be plotted, without elements.
If the plotting-level value is greater than 0, it specifies the minimum desired plotting level for which element edges will be plotted, with higher numbers corresponding to more important edges:
An important use of plotting levels is to confirm that a 3-D surface
is simple and closed and has all of its triangles oriented in the
correct direction, in which case a
should display nothing at all. This condition must be satisfied before
using Fad with Gmsh to create a tetrahedral mesh.
A quadrilateral element face is plotted as two triangles, which are formed by using an arbitrarily selected diagonal. That diagonal effectively has a plotting level less than 1 and is never plotted.
If elements are being plotted (plotting level ≥ 1),
the plotting level may be followed by
S, which means
that elements will be plotted for the
secondary model, and then by
the element type
If no element type is specified, all elements are considered.
After the plotting level
(or the element type if applicable)
three optional values can
If none of them is specified, all of the nodes (or elements) will be plotted.
istart is specified but
istop is not,
istop will be set =
istart and a single node (or element) will be plotted.
istep is not specified, it is taken to be 1.
will plot just type-6 (shell) element number 20
p␣0␣50␣100 will plot every node
from 50 to 100
p␣5␣6␣1␣100␣2 will plot
level-5 edges for every
second type-6 element from 1 to 100.
The elements to be plotted can also be controlled using the Select command.
|P 0 [ istart [ istop [ istep ]]][switches]|
|/BCLAMPED to display clamped boundary conditions|
|/BFREE to display free boundary conditions|
|/SLAVE to tie slaves to masters (implies /BCLAMPED)|
|/-BROT to not display rotational boundary conditions|
|/NODE_LABEL to label nodes|
|/COORD to display node coördinates|
|/USAGE to display which elements the nodes are used in|
|/NEAR to flag nodes with very near neighbours|
|/SIZE=size to specify symbol size for displaying nodes|
|P p [[S] e [ istart [ istop [ istep ]]]][switches]|
|p = plotting level for elements (1-9)|
|e = element type (5,6,7,8,13)|
|S refers to secondary model|
|/GREY to also plot edges with plotting levels <p and ≥p−2|
|/FILL to plot filled triangles|
|/-HIDE to suppress hidden-surface removal|
|/-ZBUFFER to use slow sorting instead of z buffer|
|/ELLOAD to indicate element loads (for shells & tetrahedra)|
|/THICK to indicate element thicknesses (for shells)|
|/ASPECTRATIO to indicate element aspect ratios|
|/VOLUME to display min & max tetrahedron volumes|
|/MATERIAL to indicate material types|
|/STIPPLE to use stippling for back faces|
|/-BACK to suppress different back-face colours|
|/NODES to display nodes as well as elements|
|/LABEL to label elements|
|/SURFACE to display clipped surfaces of tetrahedra|
|/HATCH for hatching (useful for anistropy)|
|/-CULL to suppress back-face culling|
|/UNSELECTED to plot unselected elements (in grey)|
|/WAIT to wait after displaying each triangle|
|For both nodes and elements|
|istart = starting node or triangle number|
|istop = stopping node or triangle number|
|istep = step size (e.g., 2 = every 2nd triangle)|
|/-ERASE to suppress screen erasure|
|/-ROT2 to not rotate secondary model|
|/-CONC to suppress concentrated loads|
|/CLIP to apply z clipping|
|/AXIS to display coördinate axes|
|/VRML to output things to a VRML file|
|/ANIMATE to record animation|
|/OUT to output plot to a file|
The table on the right summarizes the available options for the plot command. The sections below give further information about some of the options.
This option displays the x, y and z coördinates for the last node plotted. (Although this information is actually displayed for every node, it is subsequently overwritten for all but the last node.)
This option analyzes which elements each node is used in. Each node is displayed with a green symbol whose size is proportional (up to a maximum) to how many elements the node is used in. If a node is unused (i.e., not used in any elements, or ‘orphan’) then it is displayed with a red symbol. For the last node displayed, a list is displayed of which elements the node is used in. (Although this information is actually displayed for every node, it is subsequently overwritten for all but the last node.) A message is also displayed that specifies which node has the greatest usage, and what that usage is.
This option provides an analysis of how close together nodes are, including both primary and secondary models. It is good for identifying duplicate nodes, and nodes that are so close together that they probably should be considered as duplicates.
For each node the distance to its nearest neighbour is calculated. If there are any duplicate (i.e., exactly superimposed nodes, with identical coördinates) a message will be displayed saying how many there are. Then a message will be displayed giving the ratio of the smallest to the largest nearest-neighbour distances. If this ratio is greater than, say, 100, it means that some nodes are much more closely spaced than others.
Duplicate nodes are displayed as red diamonds (or orange for the secondary model). Nodes that have almost the maximum nearest-neighbour distance are displayed as large black triangles (or blue for the secondary model). The remaining nodes are displayed as squares, with the symbol sizes larger for smaller nearest-neighbour distances, and with colours ranging from black to red (or from blue to orange for the secondary model).
By default each node is plotted as a single dot. If this size parameter is used then each node is plotted as a square. (The size of the square for a given size parameter depends on the screen resolution.) If this option is used when displaying elements then the nodes will also be plotted. (This currently doesn't work when z buffering is used.)
By default the model is plotted as a wireframe.
/fill causes each triangle to be filled with a colour
specified in the model-definition file, either explicitly or
implicitly (e.g., based on material type). Triangles whose nodes are
numbered counterclockwise as seen by the user are considered to be
facing the user, and triangles that face away from the user are displayed
If a surface is closed and all of its triangles are correctly oriented
then no orange triangles should appear.
By default, Fad plots filled triangles
using a relatively fast z-buffer algorithm.
causes Fad to use a slower method:
Fad sorts the triangles and then displays them from back to front.
Normally a small green circle
should appear above the Plot interaction
tool. A red cross appears if the sorting algorithm fails, usually
because of intersecting triangles. In this case some triangles will be
dropped, creating a hole,
and therefore orange triangles may appear
even though they are correctly oriented.
The fact that a green circle appears does not
guarantee that there are no intersecting triangles.
Elements that have been unselected are plotted anyways, but with grey instead of their usual colour.
The volumes of tetrahedral elements are calculated and the range is
displayed. If used with
/fill, the colour of any tetrahedron
with a negative or zero volume is changed to deep pink.
By default, rotations and translations are applied to both the primary model
and the secondary model if there is one.
/-rot2 qualifier on the plot command to cause the
rotations and translations not to be applied to the secondary model.
Fad can import (with restrictions in some cases) the following formats:
.vmesh) and an old Fad variant (
.msh); Fad can distinguish between GiD and Gmsh
.mshfiles, and can distinguish between Gmsh version 1 and version 2
.wrl); very restricted
.vtk); ASCII file as produced by ParaView
.stl); Fad can import plain-text STL files but not binary ones; the STL format is extremely stupid, not knowing about connections among triangles and defining new vertices for every triangle; after importing, Fad will ask if you want it to unduplicate the vertices, and normally you should say yes
Unlike the Write command, the Export command outputs node coördinates with any current rotations applied. If you have rotated the model but want to export it with its initial orientation, first give the A command in the interactive plot control.
Fad can export (primitively in some cases) the following formats:
.smf); an old local format, of no current interest
The formats for which Fad exports actual tetrahedra are
.msh version 2 (Gmsh),
Nastran, Abaqus (CalculiX/FEBio),
For some export formats, Fad offers the possibility of specifying
rigid materials. In such a case,
you should see this question:
Rigid elements (el.type, mat.type) [none]
You can respond by specifying the element type and material type which you want to be considered as rigid. The element type can be 6 for shell elements, 13 for tetrahedral elements, and possiby 5 for brick8 elements. The material type is the material number assigned in Fie.
Align command rotates and translates the primary
model to match the secondary model. Before giving the
Align command, use the
Plot command to
display the primary and secondary models; the rotation and translation
should be set to zero. You will be asked to select three nodes on the
primary model and then three corresponding nodes on the secondary
model. Fad will then rotate and translate the primary model to best
align the three primary nodes to the three secondary ones. Re-use the
Plot command to see the results.
This command causes 1st-order elements to be converted to 2nd order by having mid-edge nodes added. This applies only to brick8, shell and tetrahedral elements (types 5, 6 and 13), and applies only to selected elements in the primary model.
The effect of this command is lost if the model is saved in Sap format, since brick8, shell and tetrahedral elements are necessarily first order for Sap. This command is usually followed by an export.
Code_Aster’s shell elements (
document U3.12.03) have central nodes, so the triangular shell element
has 7 nodes, not the 6 that Fad produces. To add the 7th node in
CREA_MAILLAGE (document u4.23.02).
This command causes the current values for model scaling, offset and rotation to be fixed as the base values. The user is asked for confirmation for the primary model and, in there is a secondary model, is asked for confirmation for it.
The scaling, offset and rotation can be set using the Modify command, or interactively using the Plot command.
This command causes the secondary model to be joined to the primary model by moving nodes of the secondary model to merge with nodes of the primary model. The user controls the process by specifying which element and material types are eligible, and by specifying a threshold distance. An eligible node on the secondary model will be merged with the closest eligible node on the primary model if the distance between them is less than the threshold.
Visual feedback is given. All nodes on the primary model are first displayed with right-pointing black triangles, and nodes on the secondary model are displayed with left-pointing blue triangles. When two nodes are merged, the one on the secondary model is indicated with a large red circle, the one on the primary model is indicated with a smaller green circle, and a line is drawn between them.
The number of nodes merged is displayed along with the maximum distance between merged nodes. One can try different threshold values until the desired effect is obtained. There is no guarantee, and maybe not much likelihood, that the resulting mesh will be of good quality or even be topologically correct.
without specifying a new threshold causes the Join to be finalized.
causes it to be cancelled.)
After the join operation has finished, give a
command to make the model reappear.
A special case of this process is that of joining two models which have a shared surface, that is, a surface which appears in both models with identical node coördinates and element definitions. For this purpose, specify a threshold value of zero. Check that the ‘No. nodes to be merged’ is greater than zero and matches what you expect, and that the ‘max. merged distance’ equals zero. It may be a good idea to try one or two other small threshold values to make sure that the number of merged nodes remains the same and that the maximum distance remains zero. Note that Fad only considers the nodal coördinates and does not verify that the triangulations of the two instances of the shared surface are the same.
This function checks for intersections between shell elements and display the number of intersections. If intersections are found, the elements involved are recorded in the Fad log file.
Fake boundary elements are created so the lines of intersection
can be visualized with the plot command.
p command alone (i.e., a wireframe display)
will show the intersections as thick lines.
p /fill command followed by
may be useful.
This function counts the number of unconnected structures in the model. It is intended to be used in conjunction with thefunction in Fie. Import the VRML file produced there and then invoke this function. It can take a long time if some structures contain large numbers of triangles.
Currently this function just counts and reports the numbers of unused (orphan) nodes and material types. The intention is that it will actually remove them from the model.
|S ALL||to select all elements|
|S NONE||to deselect all elements|
|S CURSOR||to deselect elements with cursor|
|S PRESSURE||to select all elements with applied pressure|
|S s t [M] n1[,n2]||to select/deselect type-t elements|
|S s ax op coord||to select/deselect elements based on unrotated coördinates|
The various forms of the Select command are shown in the table on the right, where
When you click with the mouse on the model, a green dot will
be displayed where you clicked and its x and y
coördinates will be displayed in green. A red dot will
be displayed at the node closest to where you clicked, and its
x, y and z coördinates will be
displayed in red. Then a list will be displayed of both
front-facing and back-facing triangles
corresponding to the
position of the green dot.
For each triangle, Fad will show
the triangle number;
in parentheses, the element type, the material type,
and the element number;
B, for front-facing
and back-facing triangles, respectively;
and the triangle’s 3 node numbers.
On a second line it will show the rotated z
coördinates of the triangle’s 3 nodes and also,
if the triangle corresponds to a type-6 (shell) element,
the thickness of the element.
If exactly two type-6 elements correspond to where you clicked,
DeltaZ value will be displayed on a separate line.
This corresponds to the z distance between the two elements,
measured at the (x,y) coordinates where you clicked
and along a line perpendicular to the screen.
If you first orient your model so that its surface is
parallel to the screen at that (x,y) location,
DeltaZ value will be the thickness
of the model at that point.
/measure option can be used to make 2-D and 3-D
Normally, once 3 nodes have been selected, each new selection will cause the previously selected ones to be scrolled, removing the oldest one. If the user requests that previous nodes be ‘locked’ by typing L at the prompt, then the oldest and next oldest selections will remain unchanged, so the user can repeatedly take measurements with respect to them.
If you type K at the prompt, then you are prompted to enter x, y and z coördinates from the keyboard, instead of using the mouse.
Type Q to quit the Locate mode.
|ALIGNMENT w.r.t. x axis||model|
|MATTYPE (material type)|
|TIME-VARYING load functions|
|KEQB: no. eqn's/block|
This command allows you to modify a number of model parameters.
You can specify which parameter to modify as part of the command;
the parameter name can be abbreviated as long as the abbreviation
For example, these two commands are equivalent:
Do (? for help) ? modify pressure
Do (? for help) ? m pres
If you give the
Modify command with no parameter, you will be
The table on the right lists the modifiable parameters. The following sections provide further details about some of them.
Scaling, translations and rotations are reflected immediately when the model is plotted, but are not applied to the actual model coördinates until and unless the Fix command is given.
For scaling, the user is asked for an x scale factor, and then for yand z scale factors that by default are equal to the x scale factor.
For translation there are 3 methods for specifying the final offset,
which the user specifies by responding to the following question:
Use Secondary model, Abs. xyz or Rel. xyz (S,A,R) [R] ?
For rotation, the user is asked for x, y and z rotation angles, specified in degrees.
The alignment command asks the user to specify the node numbers of 2 nodes, and then determines a rotation such that the line between those 2 nodes will be parallel to the x axis. (The node numbers can be obtained using the locate command.)
Reverse the orientation (node numbering) of all selected shell elements.
For a specified element type, change material type mold (or all material types) to material type mnew.
This command allows you to modify the type of simulation.
The default type, as set up when Tr3 creates a
static. The other two supported types are
direct time-domain integration.
If you request
direct you will be asked the following
Yesif you want to restart an incomplete simulation. The usual (and default) answer is
What alpha,beta?: Specify the values of α and β to use for Rayleigh damping, or accept the default values.
What Ttot,Dt?: Specify the desired total simulation time and the time step size, or accept the default values.
Torque, Force or Pressure load: The default type of load is pressure, and is what we usually use. A step function at t=0 is used to apply the load unless some other time function has already been defined.
If you specify
force, you will be asked to
specify which dof’s of which nodes will have forces applied
to them. Type
? to see a description of the syntax
to use. For example, to apply a concentrated load to the
default dof’s (
z) of node 122, type
Type just Enter when finished.
Output requests: Use the same syntax to specify which dof’s of which nodes should have their results output. For example, to output results for the default dof’s of all nodes, type
This command allows you to modify the x and y ranges of the display window, which normally is automatically scaled. The command prompt displays the current xmin, xmax, ymin and ymax, and offers several alternative commands, each of which can be invoked by typing a single character:
A: Return the scaling to automatic.
I: Zoom in by a factor of 2.
O: Zoom out by a factor of 2.
U: Move the model up in the window.
D: Move the model down in the window.
L: Move the model to the left in the window.
R: Move the model to the right in the window.
W: You are prompted to click with the cursor in two places, which are then interpreted as diagonally opposite corners of a rectangle that defines the new display window.
C: You are prompted to click with the cursor at a location which will become the centre of the new display window, with the original scaling.
You can immediately specify one of these commands when giving the
Modify command itself (e.g.,
m w w).
After specifying any command but
A, you are asked
whether you want the window to be ‘floated’. Normally
you will want to accept the default
N (no) response.
The model is not immediately redisplayed with the new settings. You need to give whatever plot command you want.
On each pass of this iterative algorithm, the position of each node is moved to the average of the positions of the nodes to which it is connected. The iteration stops when no node is moved by greater than some specified tolerance; in this implementation, the tolerance is the longest dimension of the model's bounding box divided by 10 000.
A node is not moved if it is clamped or if it belongs to an element which is not currently selected. The user can also choose to have nodes not be moved if they are on a boundary between different materials or on an external boundary.
The algorithm of Taubin (1995) smooths a surface while attempting to avoid the shrinkage that usually occurs. In each iteration, a smoothing step is followed by an inflation step.
A node is not moved if it is on a boundary. Node clamping and element selection are not taken into account.
Reference – Taubin G (1995): Curve and surface smoothing without shrinkage. Pp. 852-857 in Proceedings of the Fifth International Conference on Computer Vision, IEEE Computer Society.
This function works only on triangular shell elements that have been selected.
A histogram of edge lengths is displayed, with triangles indicating the 50th, 95th and 99th percentiles. A percent cutoff is requested. Edges with lengths less than that cutoff will not be bisected.
The current bisection algorithm produces duplicate nodes,
Unduplicate command is run automatically
at the end.
We use Gmsh to create tetrahedral volume meshes from triangulated surface meshes. Gmsh is available as binaries for Linux, MS Windows and Mac OS X, and also as source code. It is also available through the Debian package manager.
The sequence of operations for use with Fad is:
Create a triangulated surface mesh using Tr3, or perhaps some other software that can produce files that Fad can read. The mesh should form a simple closed surface enclosing a volume, with the triangles oriented consistently and with neither holes nor overlapping triangles.
rcommand to read the
.sapfile created by Tr3, or use the
icommand to import the
.wrlfile created by Tr3. (If you're going to be doing finite-element modelling, you'll need material properties so you'll need to read the
.sapfile, not import the
Fad will initially display a wire-frame plot of
your model using
plotting level 3.
If you don't see parts of the model, it may be because you haven't
set material types and thicknesses for some lines in Fie.
At the bottom of the screen Fad will display a set of numbers. If the number of ‘reversed’ edges is non-zero, it means that not all of the triangles are numbered consistently. If the number of ‘surface’ or ‘boundary’ edges is non-zero, it means that there is a hole or some other defect in the surface.
p␣9/grey) to see where the problem is. Note that there must be a space between the
9. The parameter
9specifies that shared triangle edges should be displayed if they are both oriented in the same direction. The edge shared between two neighbouring triangles should be oriented in opposite directions if the two triangles are both oriented in the same direction, so if any edges are displayed by the
p 9command it means that some triangles are oriented incorrectly. The
/greyoption causes all edges with lower plotting levels to be plotted in grey, so you can see where the plotting-level-9 edges are located. You can rotate the model using the interactive control.
p␣7/greycommand. If your surface is simple and closed, then nothing will be displayed. If any edges are displayed, it means that something is wrong with your surface; for example, a cap may be missing. Again, the
/greyoption causes edges with plotting levels less than 7 to be displayed in grey, so you can see where in the model any black edges are. Any reversed edges will also be displayed when the plotting level is 7.
p␣5/greycommand. The parameter
5specifies material boundaries, so if your surface is simple, closed and consists of a single material, then nothing will be displayed. If your surface is supposed to be simple and closed, and it’s supposed to consist of a single material, and some edges are displayed by
p␣5, then it means that one of those suppositions is wrong.
If part of your structure’s surface is shared with some other structure, perhaps its material type is the one for that other structure? The material type can be overridden in the subset definition (see Fie tutorial).
/grey option causes edges with plotting
levels less than 5 to be displayed in grey, so you can see where in
the model any black edges are. Any reversed
or surface edges will also be
displayed when the plotting level is 5.
k) to check whether there are any intersections between triangles.
p␣3/fi), then use the interactive control to rotate the plot and view it from many directions, to confirm that no orange triangles are seen.
fill option makes the display very slow if there
are a lot of elements. An alternative is to export the model
obj format and view it with
With the default settings, faces that are backward will be dark
regardless of the orientation of the model. This can be checked
by turning on and observing whether the faces become
less dark; or by turning on and observing whether
the faces disappear. The function
is also useful.
p␣0/nearto check for nodes that are very close together, which can produce bad element shapes; and use
p␣3/asp) to directly check for badly shaped elements (i.e., elements that are long and thin).
Modify windowcommand may be useful as a crude zoom capability to identify small features.
You can also use the
Locate command to determine
the x, y
and z coördinates of the problem. The z
coördinate will correpond to a slice in Fie, and the
x and y coördinates can be related to
the positions of points in Fie.
In Fie you can use the
command to jump to the slice and coördinates corresponding to the most
Once you have diagnosed the problem, make the required corrections in Fie, rerun Tr3 to generate a new model, then reload it in Fad and check things again.
p␣3/elloadto see which triangular elements have pressure loads applied to them.
p␣0/bc/-eraseto see what boundary conditions are applied to your model. The
/-eraseoption allows you to see the boundary conditions and loads at the same time.
ain the interactive control. If the model does not have its original orientation when exported, Fad won't later be able to combine the boundary conditions and loads from the surface model with the volume model generated by Gmsh.
ecommand) as a Gmsh
.geofile. If the input file name contains
_dbg, as put there by Tr3, it might as well be removed from the output file name here, since it's irrelevant to the
.geofile and makes the file name unnecessarily long.
.geo file contains
specifications of the meshing algorithm to be used (Netgen)
and the number of optimization passes to be performed (3),
and contains computed characteristic lengths.
Triplicate line error message occurs
it means that three (or more) triangles are sharing an edge
rather than just two, so the model doesn't form a simple
closed surface. The error message includes the element numbers
of the first two triangles involved. You can localize
the problem by using the Plot command to display just those
For example, if the error message mentions elements 123 and 456,
the following sequence of plot commands will display the two
elements in relation to the rest of the model:
p 5/grey(to display the whole model)
p 1 6 123/-erase(to display a single type-6 shell element without erasing the previous plot)
p 1 6 456/-erase(to display the second element)
Do?prompt before giving each of the
The Locate command can also then be used to determine the z coördinates and the approximate x and y coördinates of the nodes involved in the triangles, to help in locating the problem in Fie.
If you want to see the messages that are produced during processing, do(or Ctrl-L). The contents of the message console can be saved by right-clicking within it and selecting .
If your mesh resolution is very high, Gmsh may take a long time
and if there's something wrong with your model
then Gmsh may not completely finish the job at all.
If you then save the
you can then import it into Fad, but Fad
may not find any of the tetrahedral elements that it is looking
for, or they may not be optimized.
Gmsh may also crash
(perhaps with a
if your mesh is badly malformed.
make your mesh resolution reasonable
and correct any problems with your mesh,
and then patiently wait for Gmsh to say
that it has
Done optimizing mesh
before you try saving the results.
If it says
Done meshing 3D but never says
Done optimizing mesh, there is probably something
wrong with your model that is preventing Gmsh from generating
a good mesh. Look at the message console as described above
to see if there are warning or error messages.
If there are error messages saying
WARNING: Intersecting elements, then you
need to figure out which elements are intersecting one another.
The element numbers that it displays
correspond to the element numbers in Fad. To find out where
in your model the problem is, you can use
Fad’s Select command
followed by a Plot
command to display a few elements around the offending elements.
For example, if elements 55 and 85 are shown as intersecting,
you might use this sequence of commands to display a few
elements before and after each of those elements:
s + 6 50,60
s + 6 80,90
This works best if you don’t have too many elements.
Gmsh will display a list of how many elements have
quality values in the ranges
0.0 to 0.1, 0.1 to 0.2, …, 0.9 to 1.0.
If that list is preceded by a warning message saying that some
ill-shaped tets are still in the mesh,
it means that those tetrahedra have
values less than an arbitrary
sliverLimit of 0.001.
as of version 4.9.3, 2022 Jan 27.)
That is indeed pretty bad if you want to use the mesh for
You can use Fad’s
to find the bad elements, as described above.
Tto the file name to make it clear that the file contains a tetrahedral volume mesh rather than a surface mesh. Either explicitly include
.mshat the end of the name, or select as the desired file type. Click on . In the dialogue that pops up, select as the format. Do not check the boxes (although it doesn’t really matter) or (it does matter). Click on .
Alternatively, run Gmsh from the command line:
gmsh filename.geo -3 -o filenameT.msh
The vast amount of progress output can be suppressed by using
> /dev/null or
The results are actually somewhat different when using the command line than when using the GUI, and I haven't yet figured out why.
icommand) the resulting
.mshfile into Fad. In the process, Fad will offer to retrieve boundary conditions, etc. from the
.sapsurface-model file that led to the
.geofile that led in turn to the
.mshfile. The ability to retrieve boundary conditions and material properties from the original
.sapsurface file depends on the fact that Gmsh does not modify the original surface nodes or create new surface nodes, so Fad can establish a one-to-one correspondence between the original surface shell elements and the surface facets of the tetrahedral mesh produce by Gmsh.
p␣3). A line should be displayed saying
Nel13 =and a reasonable number of tetrahedral elements.
p␣3/aspectratioto check for poor mesh quality.