The Meshing Sequence: Meshing With Default Settings

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

The Meshing Sequence

COMSOL Multiphysics provides an interactive meshing environment where, with a


few mouse clicks, you can easily mesh individual faces or domains. Each meshing
operation is added to the meshing sequence. The final mesh is the result of building
all the operations in the meshing sequence.

This example demonstrates how to use the meshing sequence. On a realistic geometry
you create a mesh consisting of different element types. You learn how to mesh certain
parts of a geometry, modify this mesh, change the parameters to your liking, and
rebuild the mesh.

Meshing with Default Settings


To start, import a 3D CAD geometry and mesh it with the default settings using the
free mesher to generate a mesh with tetrahedral elements.

1 Click the New ( ) button on the main toolbar.


2 In the Model Wizard make sure that the space dimension is 3D, then click the Finish
button.
3 To add an import feature to the geometry sequence right-click Geometry 1 and select
Import.
4 In the Settings window click the Browse button.
5 Locate the course CD on the hard disk and select the file solder_joints.x_b,
then click Open.
6 Click Import in the Settings window.
Note that for many of the imported objects a warning is displayed that the default
import tolerance, 10-5 m, might be too large for the geometry, which includes parts
on the order of a tenth of a millimeter in size. Features smaller than the import
tolerance are automatically removed during import. Therefore, if you know that
your geometry contains small features you can change the import tolerance in the

32 | C H A P T E R 3 : M E S H I N G TE C H N I Q U E S
Settings window of the Import feature. There you also have the option of turning off
the repair feature during import. In this particular case, this is not necessary.
The geometry represents a small part of a circuit board with an electronic
component mounted by means of several solder ball joints.

Electronic component

Solder joints
Circuit board

Continue by creating a simple unstructured tetrahedral mesh.


7 Click the Mesh 1 node.
As you click the Mesh 1 node the Finalize feature is automatically built, which means
that the various objects are combined into the one object with inner boundaries and
subdomains.
8 Click the small plus sign (or triangle) in front of the Mesh 1 node to expand the
meshing sequence.
Initially the meshing sequence contains only the Size feature node. This feature is
called a global attribute feature, since it influences all subsequent operation
features in the meshing sequence. This first Size feature node cannot be deleted
from the meshing sequence. You can also add attribute features under an operation
feature node, in which case it is called a local attribute feature.
9 Right-click the Mesh 1 node and select Free tetrahedral.
The Free Tetrahedral 1 feature node is added after the Size feature node. COMSOL
Multiphysics always inserts new nodes in the meshing sequence after the current
feature node. To indicate the current feature node, it appears with a quadratic frame
around its icon. As soon as it is inserted, the Free Tetrahedral 1 node becomes the
current feature.

THE MESHING SEQUENCE | 33


10 To build the mesh click the Build All button.

According to information displayed in the Messages window this mesh consists of


approximately 35,000 elements. While the geometry is resolved quite well by this
mesh, you may want to reduce the number of elements to reduce the memory required
for solving the problem.

Adding Local Attribute Features


Assume that you are investigating the solder joints and would therefore like to keep
the detailed mesh in the spherical subdomains, but create a mesh with fewer elements
in the remaining objects.

1 Right-click the Free Tetrahedral 1 feature node and select Size.


2 From the Geometric entity level list select Domain.

34 | C H A P T E R 3 : M E S H I N G TE C H N I Q U E S
3 Use the Graphics window to select the domains 1-3, which represent the circuit
board and the electronic component.

4 From the Predefined list select Coarser.


5 Click the Build All button to build the new mesh.

According to the Messages window the mesh now consists of approximately 24,000
elements.

The Swept Mesher


For even fewer elements in the circuit board and electronic component, you can create
a swept mesh. This technique sweeps a boundary mesh through the domains to create
a structured mesh in the sweep direction.

The swept mesher operates on a 3D subdomain by first meshing a source face, and then
sweeping the resulting face mesh through the subdomain to an opposite target face.
For straight and circular sweep paths, you can use several connected faces as source

THE MESHING SEQUENCE | 35


faces. All faces that encompass a domain are classified as either source faces, a target
face, or boundary faces. The boundary faces are the faces connecting the source and
target faces.

MESHING A SET OF BOUNDARIES


First you can modify the free tetrahedral mesh operation to operate only on the solder
joints.

1 Click the Free Tetrahedral 1 feature node.


2 From the Geometric entity level list select Domain.
3 From the Selection list select domains 1,2, and 3, then click the Remove from
Selection ( ) button.
You can also remove the Size 1 feature node.
4 Right-click the Size 1 node, then select Delete.
You can now create a coarse mesh on the source boundaries for the sweep mesh
operation. Build the mesh before continuing.
5 Click the Build All ( ) button.
6 Right-click the Mesh 1 node then select More Operations then Free Triangular.
7 From the Graphics window select the two faces (boundaries 2 and 14) highlighted
in the figure below.

To make selection easier click the Wireframe Rendering ( ) button. Click it again
to turn of wireframe rendering.
8 Right-click the Free Triangular 1 node and select Size.
9 From the Predefined list select Coarser.

36 | C H A P T E R 3 : M E S H I N G TE C H N I Q U E S
10 Click the Build All ( ) button to build the mesh.

The mesh is built, but a Problems node appears under the Free Triangular 1 feature
node.
11 Expand the Problems 1 node, then click the Warning 1 node to read the message.
COMSOL Multiphysics generates the warning because the Coarser predefined mesh
size you have applied to the two surfaces has been overridden by the relatively finer
Normal mesh settings specified in the first Size feature node of the meshing sequence.
The reason is to avoid bad quality meshes, that may result if the boundary of a
domain is meshed with a coarser mesh size then the volume.
To avoid this situation a good practice is to set the first global Size setting to the
coarsest mesh that you plan to have in the geometry, then specify local size feature
nodes for the mesh operations that need finer mesh.
12 Click the Size node, then select Coarser from the Predefined list.
13 Right-click the Free Tetrahedral 1 node, and select Size.
14 From the Predefined list select Normal.
Since the global setting is Coarser, the size attribute to the Free Triangular 1 node is
no longer necessary.
15 Right-click the Size 1 node under the Free Triangular 1 node, then select Delete.

THE MESHING SEQUENCE | 37


16 Right-click the Mesh 1 node then select Build All ( ) to build the mesh.

Notice that the triangular mesh is coarser this time.

CREATING A SWEPT MESH


Now that the source faces are meshed, you can sweep this mesh through the
subdomains.

1 Right-click the Mesh 1 node and select Swept.


The Geometric entity level list is set to Remaining by default for new mesh operations.
In this case the remaining domains correspond to the domains we would like to
sweep mesh.

38 | C H A P T E R 3 : M E S H I N G TE C H N I Q U E S
2 Click the Build All ( ) button to build the mesh.

The mesh now consists of approximately 15,000 elements. The swept mesher used
the Coarser predefined mesh size to determine the number of elements along the
sweep direction. By specifying a distribution for the swept mesher you have the
possibility to manually control the number and distribution of elements along the
sweep direction.
3 Right-click the Swept 1 feature node and select Distribution.
4 In the Number of elements edit field enter 2.
5 Click the Build All button to build the mesh.

THE MESHING SEQUENCE | 39


This latest mesh consists of approximately 18,000 elements, keeping the higher
resolution for the subdomains which are important for the analysis, while providing a
less dense structured mesh for the remaining subdomains.

40 | C H A P T E R 3 : M E S H I N G TE C H N I Q U E S

You might also like