Upload
chethugowda7
View
58
Download
0
Embed Size (px)
DESCRIPTION
meshing in FEM
Citation preview
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
Meshing
This chapter describes meshing capabilities, meshing techniques, and meshing operations available for meshing the geometry.
Creating Meshes
The Mesh ( ) nodes enable the discretization of the geometry model into small units of simple shapes, referred to as mesh elements.
About Mesh Elements for 1D, 2D, and 3D Geometries
ELEMENTS FOR 1D GEOMETRIES
The mesh generator discretizes the domains (intervals) into smaller intervals (or mesh elements). The endpoints of the mesh elements are called mesh vertices.
The boundaries (or vertices) defined in the geometry are represented in the mesh by boundary elements (or vertex elements).
ELEMENTS FOR 2D GEOMETRIES
The mesh generator discretizes the domains into triangular or quadrilateral mesh elements. If the boundary is curved, these elements represent an approximation of the original geometry. The sides of the triangles and quadrilaterals are called mesh edges, and their corners are mesh vertices. A mesh edge must not contain mesh vertices in its interior.
The boundaries defined in the geometry are discretized (approximately) into mesh edges, referred to as boundary elements (or edge elements), which must conform with the mesh elements of the adjacent domains.
The geometry vertices are represented by vertex elements.
ELEMENTS FOR 3D GEOMETRIES
The mesh generator discretizes the domains into tetrahedral, hexahedral, prism, or pyramid mesh elements whose faces, edges, and corners are called mesh faces, mesh edges, and mesh vertices, respectively.
The boundaries in the geometry are discretized into triangular or quadrilateral boundary elements. The geometry edges are discretized into edge elements.
Similar to 2D, the geometry vertices are represented by vertex elements.
CTRTC, BANGALORE. Page 1
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
Pyramid Elements
Pyramid elements appear in the mesh in these situations. If you:
•Import a NASTRAN file containing pyramid elements.
•Create a swept mesh where the source and destination faces share an edge and the source face contains a triangular mesh.
•Convert a quad mesh to a triangular mesh for a face adjacent to a domain that contains a mesh.
•Create a boundary layer mesh in 3D for a geometry with sharp edges.
Adding Meshing Sequences
When you add a new model to the Model Tree, a meshing sequence is added by default in the node Mesh 1. You can add more meshing sequences to the model by right-clicking the model node and selecting Mesh. When a model has more than one meshing sequence, they are collected under a Meshes node. To add new meshing sequences to such a model, you can alternatively right-click Meshes.
You create a mesh by building a meshing sequence, which contains a number of meshing operations as nodes in the sequence. For the default physics-controlled meshes, the software sets up the meshing sequences automatically.
Adding and Building Meshing Operations
A mesh is the result of building a meshing sequence. A meshing sequence corresponding to a geometry consists of Meshing Operations and Mesh Attributes. The attribute nodes store properties that are used by the operation nodes when creating the mesh.
Building an operation node creates or modifies the mesh on the part of the geometry defined by the selection of the operation node. Some of the operation node use properties defined by attribute nodes; for example, the Free Tetrahedral node reads properties from the Distribution and Size attribute nodes. For some operation nodes it is possible to add local attribute nodes as subnodes. You can add a local attribute node from the context menu of an operation node. Properties defined in local attribute nodes of an operation node override the corresponding properties defined in global attribute nodes (on the same selection).
An attribute node contains properties defined on a selection. You can add an attribute as a node in the meshing sequence (this is referred to as a global attribute node) or add it as a node under an operation node (a local attribute node). Global attribute nodes are used by subsequent operation nodes when
CTRTC, BANGALORE. Page 2
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
building the meshing sequence. Local attribute nodes are only used by the owning operation node.
If you choose to import a mesh you have access to a different set of operations (see Operations on Imported Meshes).
You can add and build meshing nodes in two ways:
•
By right-clicking a mesh node in the Model Tree and then selecting one of the available options from the context menu. Enter the node’s properties in the settings window that appears. In numerical fields you can enter expressions that contain global parameters. Click the Build Selected
button ( ) in the settings window to see the mesh that results. All meshing nodes can be added and built in this way.•By using the buttons in the Meshing toolbar. Most nodes can be added and built in this way.
Editing Meshing Nodes
To edit a meshing node, select it in the tree, and make changes in the settings window that appears. Nodes that you have edited display with an asterisk (*) at the upper-right corner of their icons in the Model Builder window. Following nodes are marked with a yellow triangle at the lower-right corner of the node’s icon to indicate that they need to be rebuilt. To see the result of your edits in the graphics, you need to build the node. You can do this in two ways:
•
Click the Build Selected button ( ) in the settings window, or right-click the node in the tree and select Build Selected (or press F7). This builds all nodes (if needed) from the first up to the selected node.
•
Click the Build All button ( ) in the settings window, or right-click the
main Mesh node ( ) in the tree and select Build All (or press F8). This builds all nodes in the meshing sequence (if needed).
The Graphics window shows the resulting mesh from the nodes that have been built. The result of subse
quent nodes is not visible. The last built node becomes the current node and appears with a quadratic frame around the node’s icon. The frame is green if the node and all preceding nodes are built; that is, the mesh in the Graphics window is up to date. The frame is yellow if the node or some preceding node has been edited since the node was built and needs to be rebuilt.
CTRTC, BANGALORE. Page 3
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
Errors and Warnings in Meshing Sequences
If a problem occurs when you build a node, the build continues if it is possible to avoid the problem in the corresponding meshing operation, otherwise the build stops.
CONTINUING THE BUILD
When you build a Free Triangular, Free Quad, or Free Tetrahedral node where problems are encountered, you can avoid the problems related to meshing of faces and domains by leaving the corresponding faces and domains unmeshed. The operation corresponding to the node continues meshing the remaining entities and stores information on the encountered problems in subnodes of the node. A node that encountered this type of problems during the build gets a Warning status. The node’s icon is decorated with a yellow triangle in the lower-right corner. If you build several nodes in a sequence the build does not stop by a node that gets a Warning status.
STOPPING THE BUILD
When you build other nodes than Free Triangular, Free Quad, or Free Tetrahedral the build stops if a problem is encountered. This means that no changes are made to the mesh. The node gets an Error status, which the program indicates by adding a red cross in the lower-right corner of the node’s icon. You find information about the error in a subnode of the node where the error occurred. If the node is part of a sequence build, the build stops and the preceding node becomes the current node.
Deleting, Clearing, Disabling, and Enabling Meshes
Use a Clear function to keep the nodes and be able to recreate the mesh by building the sequence again. Use a Delete function to completely remove a mesh.
Undo is not possible for nodes that are built directly, such as geometry objects, meshes, solutions, and plots.
CLEARING ALL MESHES FOR ALL GEOMETRIES
If you have a model geometry with several meshes you can clear all meshes at the same time. From the main menu, select Edit>Clear All Meshes
CLEARING A MESH FOR A SPECIFIC GEOMETRY
Under the Geometry node where you want to clear the mesh, right-click the
CTRTC, BANGALORE. Page 4
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
Mesh node and select Clear Mesh ( ) from the context menu.
DELETING A MESHING SEQUENCE
To delete a meshing sequence completely, right-click the Mesh node in the
Model Builder and select Delete Sequence ( ). Click Yes or No to confirm the deletion.
DELETING, DISABLING, AND ENABLING NODES
•To delete a node, right-click it and select Delete ( ).
•
To disable a node, right-click it and select Disable ( ). The disabled node does not affect the mesh. This is indicated with a gray icon around the node name in the model tree.
•To enable the node, right-click it and select Enable ( ).
Using Several Meshing Sequences of Imported Mesh Type
You can define several meshing sequences for the same geometry (see Adding Meshing Sequences). If the geometry sequence is empty (a necessary condition for the Imported mesh sequence type), the first Mesh node under the Meshes node is referred to as the master sequence. All the other Mesh nodes should define a geometry similar to the one defined by the master sequence. Two geometries are considered to be similar if they have the same number of geometric entities and their points have the same coordinates.
When you build a non-master sequence, COMSOL Multiphysics first builds the master sequence. If the build of the master sequence fails or if the geometries defined by these two sequences are not similar, an error occurs.
The Meshing Toolbar
This section describes the meshing tools accessible from the Meshing toolbar, which is a part of the main toolbar.
Instead of creating and modifying a mesh by adding and building nodes from the right-click menu of a mesh node you can use the tools available in the Meshing toolbar. Using the buttons in the toolbar it is possible to add and build meshing nodes in a one-click fashion.
The Meshing toolbar is available when you have selected a meshing sequence node in the Model Builder. This means that the Meshing toolbar disappears if you, for example, select a meshing node in the Model
Builder. You can use the Toolbar button ( ) in the main toolbar to make
CTRTC, BANGALORE. Page 5
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
the Meshing toolbar for a specific mesh node available; click the associated menu arrow and choose the menu item corresponding to the mesh node. If you click the button associated with this menu button COMSOL Multiphysics selects the node in the Model Builder corresponding to the last selected item in the menu associated with the menu button.
The Meshing toolbar for a 3D meshing sequence contains the following buttons:
GEOMETRIC SCOPE
Choose the menu items—Select Domains, Select Boundaries, Select Edges, and Select Points—to switch between domain, boundary, edge, and point selection mode. The selection mode determines which tools in the Meshing toolbar that are enabled.
DOMAIN MESHING TOOLS
•
Use the Free Tetrahedral button ( ) in domain selection mode to create an unstructured tetrahedral mesh. To create an unstructured tetrahedral mesh for a domain selection, select the domains in the Graphics window, click the menu arrow associated with the menu button, and select the menu item corresponding to the desired predefined element size, for example, Normal. The software creates the resulting tetrahedral mesh by adding and building a Free Tetrahedral node, using the selected domains, with a Size node, using the selected predefined element size, added as a subnode. Alternatively, you can click the button associated with the menu button. Then COMSOL uses the last selected menu item (or Free Tetrahedral (Normal)), as indicated by the tooltip. If you use this menu button with an empty selection the software meshes the remaining, unmeshed geometry.
•
Use the Swept button ( ) to create a swept mesh. In domain selection mode this button works in the same way as the Free Tetrahedral button. In boundary selection mode the software creates a swept mesh on the remaining domains using the selected boundaries as source faces.
BOUNDARY MESHING TOOLS
•
Use the Free Triangular button ( ) in boundary selection mode to create an unstructured triangular mesh. This menu button works in the same way as the Free Tetrahedral button.
•
Use the Free Quad button ( ) in boundary selection mode to create an unstructured quadrilateral mesh. This menu button works in the same way as the Free Tetrahedral button.
•
Use the Mapped button ( ) in boundary selection mode to create a structured quadrilateral mesh. This menu button works in the same way as the Free Tetrahedral menu button.
CTRTC, BANGALORE. Page 6
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
•
Use the Copy Face button ( ) in boundary selection mode to copy a mesh between boundaries. If you select both the boundaries to copy the mesh from and the boundaries to copy the mesh to in the Graphics window and click this button the software copies the mesh by adding and building a Copy Face node with the source boundaries set to the selected boundaries with a mesh and the destination boundaries set to the selected boundaries without a mesh.
EDGE MESHING TOOLS
Use the Edge button ( ) in edge selection mode to create an edge mesh. This menu button works in the same way as the Free Tetrahedral button.
OTHER TOOLS
•
Use the Boundary Layers button ( ) in boundary selection mode to create a boundary layer mesh. If you select the boundaries where you want to insert boundary layer elements in the Graphics window and click this button the software inserts boundary layer elements for the selected boundaries by adding and building a Boundary Layers node, with the meshed domains adjacent to the selected boundaries as domain selection, with an added Boundary Layer Properties node, using the selected boundaries, as a subnode.
•
Use the Convert button ( ) in domain or boundary selection mode to convert a mesh. If you select the domains or boundaries in the Graphics window for which you want to convert the elements and click this button the software converts the mesh on the selected entities by adding and building a Convert node using the selection.
PREDEFINED MESH ELEMENT SIZES
CTRTC, BANGALORE. Page 7
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
The following table shows the icons on the drop-down menus for selecting predefined mesh element sizes:
TABLE 7-1: PREDEFINED ELEMENT SIZE ICONS
ICON NAME ICON NAME
Extremely Fine Normal
Extra Fine Coarse
Finer Coarser
Fine Extra Coarse
Extremely Coarse
GEOMETRIC MEASUREMENTS
To measure the volume, area, or length of a selected domain, face, or edge,
respectively, click the Measure button ( ). The result appears in the Messages window. Using this button it is also possible to view the coordinates of a vertex, the distance between two vertices, or the number of entities and the geometry representation (only if you have license for the CAD Import Module) of a geometry object.
The Meshing toolbar in 1D and 2D contains a subset of the tools in the 3D toolbar.
You do not need to confirm the entity selections in the Graphics window when working with the Meshing toolbar; it is sufficient to highlight them, a state that is indicated by the color red.
CTRTC, BANGALORE. Page 8
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
Meshing Techniques
Physics-Controlled Meshing
If you select Physics-controlled mesh in the Sequence type list in the settings window of a mesh node and build the meshing sequence, COMSOL Multiphysics creates a mesh that is adapted to the current physics settings in the model. The default is to use physics-controlled mesh. For example, for a fluid-flow model you get a somewhat finer mesh than the default with a boundary layer mesh along the no-slip boundaries. If you want to modify the overall element size of the physics-induced mesh you select another element size from the Element size list in the settings window of the main mesh node and rebuild the mesh. If you change the physics settings in the model and rebuild the meshing sequence, COMSOL creates a new mesh adapted to the new physics settings.
A physics-induced mesh is not adapted by numerical error estimates—that type of adaptive meshing is provided by mesh adaptation in the solver sequence.
To edit a physics-induced meshing sequence, or to see the errors and warnings of a failing mesh build, select User-controlled mesh in the Sequence type list or right-click the Mesh node and select Edit Physics-
Induced Sequence ( ). The program then adds the nodes under the main Mesh node that together form the physics-controlled mesh.
By doing this the sequence is no longer updated according to changes that applied to the physics settings in the model.
If you right-click the Mesh node and select Reset to the Physics-Induced
Sequence ( ), the sequence is reset to the physics-induced sequence. However, the type of the sequence is still User-controlled mesh. To switch back to physics-controlled meshing, select Physics-controlled mesh in the Sequence type list in the settings window of the mesh node. If you add a node to the sequence the type of the sequence automatically switches to User-controlled mesh.
User-Controlled Meshing
Alternatively, you can use a user-controlled mesh. It is then possible to manually build and edit the meshing sequence using the meshing techniques described below for creating a 2D and 3D meshes.
If you select User-controlled mesh from the Sequence type list in the main Mesh node’s settings window, the program adds a Size node and a node for the default mesher (Free Triangular in 2D, for example). If the
CTRTC, BANGALORE. Page 9
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
Sequence type list is set to Physics-controlled mesh and you add a Size node, for example, the mesh sequence switches to a user-controlled mesh, but no default mesher is added.
2D Meshing Options
UNSTRUCTURED MESHES (FREE MESHING)
Free meshing generates an unstructured mesh with triangular or quadrilateral elements.
STRUCTURED MESHES
•Create a structured triangular mesh by using the convert operation to introduce a diagonal edge to quadrilateral elements.
•Mapped meshing generates a structured mesh with quadrilateral elements.
Compared to an unstructured mesh the interior mesh vertices in a structured mesh are adjacent to the same number of elements. If you want to use mapped meshing on a geometry, you must build the geometry so that the domains are reasonably “regular” in shape and do not contain holes.
3D Meshing Options
Platforms handle floating-point operations differently, which sometimes results in slight differences between identical model files that are generated on two different computers.
UNSTRUCTURED MESHES (FREE MESHING)
Free meshing generates an unstructured mesh with tetrahedral elements.
STRUCTURED MESHES
•Swept meshing generates a structured mesh (at least in the direction of the sweep) with prism or hexahedral elements.
•
Boundary layer meshing generates structured layers of elements along specific boundaries integrating into an existing structured or unstructured mesh.
Free Meshing
About Free Meshing
The free mesher is available in all space dimensions, and you can use it for all types of geometries regardless of their topology or shape. If you have not defined or generated a mesh, the free mesher automatically creates an unstructured mesh and adds a corresponding node to the Model Builder when you compute a study.
CTRTC, BANGALORE. Page 10
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
When you use the free mesher:
•The number of mesh elements is determined by the shape of the geometry and various mesh parameters.
•You control mesh parameters for the free mesher by Size and Distribution nodes in the meshing sequences.
You can also control the size of the mesh generated by a specific Free
Triangular, Free Quadrilateral, or Free Tetrahedral node by adding Size (
) or Distribution ( ) subnodes.
Figure 7-1: An example of custom element mesh sizes. You can also select Predefined element sizes.
Generating a 2D Free Mesh
Use the free mesher in 2D to create an unstructured mesh with triangular elements or quadrilateral elements. You can combine triangular and quadrilateral meshes by adding domains to the Domain list in the corresponding mesh operation’s settings. From here, you can define specific meshing operations to each domain in your model.
Generating a 3D Free Tetrahedral Mesh
Use the free mesher in 3D to create an unstructured mesh with tetrahedral
CTRTC, BANGALORE. Page 11
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
elements.
For a 3D free tetrahedral mesh example see the Busbar model: Model Library path COMSOL_Multiphysics/Multiphysics/busbar.
SPECIFYING THE MESH SIZE
To adapt the mesh for the selected domains, add a Size node to the Free Tetrahedral node. Otherwise the Size node directly following the main Mesh node governs the mesh-element size for all Free Tetrahedral nodes
Figure 7-2 shows a meshing sequence consisting of two Free Tetrahedral mesh operations, one for each meshed domain that correspond to pillars in a heat sink geometry. The mesh sizes are assigned as follows:
•
The first Size node (under Mesh1) is defined as Extra Coarse, which is selected from the Predefined Element Size list or from the meshing toolbar. In this example, the left pillar is selected to have the extra coarse mesh size and this is generated by the first Free Tetrahedral 1 operation.
•
The mesh size of the second pillar is defined under the Free Tetrahedral 2 operation, it has its own Size 1 attribute (Coarser), a finer mesh that is also selected from the Predefined Element Size list or the Meshing toolbar.
Figure 7-2: An example of two free tetrahedral meshing sizes.
The difference between the two meshes is based on the following. The following figure, Figure 7-3 , shows how you can control the mesh
CTRTC, BANGALORE. Page 12
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
distribution using thee element growth rate: A higher growth rate means that elements quickly become larger outside of small regions.
Figure 7-3: A comparison of mesh element growth rates in a heat sink.
SPECIFYING MESH DISTRIBUTION
In addition to customizing the mesh size, you can also add a Distribution attribute node to a Free Tetrahedral node. In the settings for this Distribution, constrain the number of elements for the selected edges. Figure 7-4 shows three heat sink pillars with different mesh sizes and distribution.
The settings in the Distribution attribute overrule the settings in the Size node. See Distribution
.
Figure 7-4: Specifying element distribution in heat sink pillars.
CTRTC, BANGALORE. Page 13
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
Troubleshooting Free Tetrahedral Mesh Generation
This section gives you some suggestions about how to solve problems that you might encounter when creating tetrahedral meshes.
BUILD A FINER MESH
As a general rule, it is easier to construct a mesh with smaller elements than a mesh with larger elements. If you get errors or low-quality elements when you try to mesh certain domains, try to decrease the element size
using appropriate Size ( ) attributes on these domains.
USE AN APPROPRIATE MINIMAL ELEMENT SIZE
If your geometry contains details that are very small compared to the total volume of the mesh, you must ensure that the Minimum element size
parameter in the corresponding Size ( ) attribute is at least as small as the smallest detail you wish to resolve. If this parameter is too large, you get warnings when building the node. For example, the warning “Edge is much shorter than the specified minimum element size” indicates that there are edges significantly shorter than the specified minimum element size. The resulting mesh gets badly shaped elements.
To locate small details, such as short edges and sliver faces, you can add and build a Free Tetrahedral node with normal size settings. Then you get warnings with selections that points you to the corresponding small entities. You can also inspect the mesh visually to locate unexpected small elements.
REMOVE UNWANTED GEOMETRY DETAILS
Sometimes, the geometry contains small features, like sliver faces and short edges, which you do not wish to resolve at all. Then you can use Virtual Operations in the Geometry sequence to ignore disturbing details of the geometry (see Virtual Geometry Operations). If you have a license for the CAD Import Module, you can also use CAD defeaturing operations to simplify the geometry.
PARTITION THE GEOMETRY INTO SIMPLE DOMAINS
If the geometry has very complex domains or very complex faces that you have trouble meshing, you can try to partition you geometry into less complex entities. On a philosophical level, this method could be classified as a “divide and conquer” strategy. It is often possible to use a work plane in the geometry to partition a complex domain into two domains. You can use a Mesh Control Faces node to make this partitioning only when building the mesh (see Mesh Control Entities).
To split a solid geometry object into parts using a Work Plane, place the work
CTRTC, BANGALORE. Page 14
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
plane where you want to cut the domain. Then add a Partition node from the Boolean Operations submenu, and select Work plane from the Partition with list in the Partition node’s settings window.
Structured Meshes
About 2D Mapped Meshing
GEOMETRY REQUIREMENTS
For the 2D mapped meshing technique to work properly, the geometry must be reasonably regular. The following conditions must be satisfied:
•Each domain must be bounded by at least four boundary segments.
•Each domain must be bounded by only one connected boundary component (that is, no holes are allowed).
•The domains must not contain isolated or embedded vertices or boundary segments.
•The shape of each domain must not differ significantly from a rectangle.For a geometry model that does not initially meet these criteria, it is usually possible to modify it so that a mapped mesh is generated, for example, by splitting it into simpler domains.
About 2D and 3D Boundary Layer Meshes
A boundary layer mesh is a mesh with dense element distribution in the normal direction along specific boundaries. This type of mesh is typically used for fluid flow problems in order to resolve the thin boundary layers along the no-slip boundaries.
•In 2D, a layered quadrilateral mesh is used along the specified no-slip boundaries.
•
In 3D, the boundary layer mesh is a layered prism mesh or a hexahedral mesh, depending on whether the corresponding boundary-layer boundaries contain a triangular or quadrilateral mesh.
Boundary layer meshes can also be used to resolve large temperature gradients close to heated surfaces subjected to sudden changes over time. In the heat sink model, you can see the introduction of a boundary layer mesh at the surfaces of the inner half-circle arc.
BOUNDARY LAYER MESHING FAILURES
The boundary layer meshing algorithm is sensitive to the topology of the model geometry. If you get an error when trying to build a Boundary Layers node, try the following:
•Remove unnecessary interior boundaries such as boundaries (resulting from Boolean operations of geometry objects) that do not separate materials or physics. An efficient way to do this is to mark these
CTRTC, BANGALORE. Page 15
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
boundaries as Mesh Control Entities in the Geometry Sequence. Then you mesh the domains, using Free Tetrahedral or Swept Mesh. When the domains are meshed, the control boundaries are automatically removed, and you can insert boundary layers, ignoring the interfering boundaries.
•
Use boundary layer mesh trimming instead of splitting. By default, the boundary layer mesher creates a boundary layer split at each sharp corner in 2D and along each sharp edge in 3D.
To turn off boundary layer splits, see Boundary Layers.
If you have the Batteries & Fuel Cells Module, see Soluble Lead-Acid Redox Flow Battery (2D): Model Library path Batteries_and_Fuel_Cells_Module/Batteries/pb_flow_battery.
If you have the CFD Module, see Turbulent Flow Over a Backward Facing Step (2D): Model Library path CFD_Module/Single-Phase_Benchmarks/turbulent_backstep.
•
If you have the Heat Transfer Module, see Turbulent Flow Over a Backward Facing Step: Model Library path Heat_Transfer_Module/Verification_Models/turbulent_backstep.
About 3D Swept Meshes
The swept mesher operates on a 3D domain by meshing a source face and then sweeping the resulting face mesh along the domain to an opposite destination face. A swept mesh is structured in the sweep direction and can be either structured or unstructured orthogonally to the sweep direction.
You can use several connected faces as source faces. Also the destination may consist of several faces, as long as each destination face corresponds exactly to one or more source faces; the partitioning of the source side into faces must be a refinement of the partitioning on the destination side. Each face about a domain that is to be operated on by the swept mesher is classified as either a source face, a destination face, or a linking face. The linking faces are the faces linking the source and destination faces (see Figure 7-5 ). The swept mesher can handle domains with multiple linking faces in the sweep direction.
The linking edges are the edges, or the chains of edges, connecting the
CTRTC, BANGALORE. Page 16
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
source and destination faces. For a domain to be possible to sweep, there must be at least one linking edge or chain of edges.
Thin-Layer Diffusion: Model Library path COMSOL_Multiphysics/Diffusion/thin_layer_diffusion
•
See Deformation of a Feeder Clamp: Model Library path COMSOL_Multiphysics/Structural_Mechanics/feeder_clamp
•Joule Heating of a Microactuator: Model Library path COMSOL_Multiphysics/Multiphysics/thermal_actuator_jh
Figure 7-5: Classification of the boundaries about a domain used for swept meshing
Generating a 3D Swept Mesh
Figure 7-6 shows the 3D swept mesh for a simple geometry but with a layered structure typical for printed circuit boards or MEMS geometries. In such cases, the swept mesh generation presents an alternative to using a free tetrahedral meshing.
CTRTC, BANGALORE. Page 17
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
Figure 7-6: An example of the layered geometry used for creating a swept mesh.
1
Right- click Mesh ( ) and select More Operations>Free Triangular (
). 2 Add the first level boundary to the selection list (see Figure 7-6 for an example of a suitable geometry).
3
Click Build Selected ( ). The mesh below displays.
4 Right-click Mesh ( ) and select Swept ( ).5 Select the domain in the first level.6 Right-click Swept 1 and select Distribution ( ).7 Enter the Number of elements in the field (for example, 2).
8
Click Build Selected ( ).
9
Right-click Mesh ( ) and select More
Operations>Free Triangular ( ).10 Select the boundaries at the second level and click the Build
Selected button( ).
CTRTC, BANGALORE. Page 18
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
11
Repeat the same swept operations for the first level domains but now for the second level.
12
Mesh the third level boundaries using the Free Triangular mesh
operation.13 Mesh the third level domain. Use the Swept mesh operation and enter 4
for the Number of elements in the corresponding Distribution
CTRTC, BANGALORE. Page 19
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
attribute.The meshing sequence displayed in the Model Builder makes it possible to return to your attribute settings and change mesh sizes and distributions.
After making any changes, click the Build All button ( ) or press F8 to rebuild the entire meshing sequence.
If you have the:
•
Acoustics Module, see Vibrations of a Disk Backed by an Air-Filled Cylinder: Model Library path Acoustics_Module/Verification_Models/coupled_vibrations_acsh.
•
Batteries & Fuel Cells Module, see Ohmic Losses and Temperature Distribution in a Passive PEM Fuel Cell: Model Library path Batteries_and_Fuel_Cells_Module/PEMFC/passive_pem.
•Electrodeposition Module, see Electrodeposition of an Inductor Coil: Model Library path Electrodeposition_Module/Tutorial_Models/inductor_coil.
•
Chemical Reaction Engineering Module, see Steam Reformer: Model Library path Chemical_Reaction_Engineering_Module/Heterogeneous_Catalysis/steam_reformer
Mesh Control Entities
About Mesh Control Entities
Sometimes it is desirable to use certain geometric entities only to control the mesh. For example, you can add a curve inside a domain to control mesh element size there. If you mark this curve as a mesh control entity, it is not included in the geometry used when defining the physics and materials. An advantage is that the final mesh need not respect this curve exactly; it is used only to control element size.
Another situation where mesh control entities are useful is when you need precise control of mesh in certain regions of the geometry. In these regions
CTRTC, BANGALORE. Page 20
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
you typically use a structured mesh with distribution nodes to control the mesh. In other regions of the geometry you may have to use free (unstructured) mesh.
Suppose that you also want to insert boundary layers. If the boundaries separating the domains with structured and free mesh are ordinary geometry boundaries, the boundary layers have to respect them. This can lead to various problems, including low-quality elements or even meshing failures. If you instead mark such boundaries as mesh control entities, the boundary layer mesh algorithm has more freedom to move mesh nodes and to construct a better mesh.
Using Mesh Control Entities to Control Element Size
Figure 7-7 shows a 2D geometry with two holes and a Bézier Polygon that is intended not to be a part of the model but is included only to control mesh size inside the domain.
1
Right-click Geometry ( ) and select Virtual Operations>Mesh Control
Edges ( ). Select the edges of the Bézier Polygon in the Edges to include selection.
Figure 7-7: A geometry with a Bézier Polygon used to define mesh size inside the domain.
2 Click Build Selected ( ). Note that the selected edges are removed.
3 Right-click Mesh ( ) and select Free Triangular ( ). Note that the edges removed in the previous step are now visible again.
4 Right-click Free Triangular 1 and select Size ( ).5 Select Boundary as Geometric entity level, and select the edges of the Bézier Polygon.
6Select the Extra fine as Predefined element size.
CTRTC, BANGALORE. Page 21
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
7
Click the Build All button ( ) or press F8 to build the entire mesh. Note that the edges of the Bézier Polygon are now removed (Figure 7-8 ) and that the only trace of them is the fine mesh size inside the domain.
Figure 7-8: Fine mesh inside the domain.
Using Structured and Unstructured Mesh with Boundary Layers
This example demonstrates a geometry where free tetrahedral mesh is used in one domain, swept mesh is used in an other domain. The domains are separated by a mesh control face, which is automatically removed once the domains on both sides are meshed. Finally boundary layers are added, without the need to respect the (now removed) mesh control face.
1 Right-click Geometry ( ) and select Virtual Operations>Mesh Control
Faces ( ). Select the face separating the domains in the Faces to include selection.
CTRTC, BANGALORE. Page 22
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
2 Click Build Selected ( ). Note that the face is removed. There is now only one domain.
3 Right-click Mesh ( ) and select Free Tetrahedral ( ). Note that the face has reappeared, and that there are two domains.
4 Add the cylinder shaped domain with a hole to the selection list.
5
Click on the Size ( ) node, and select the Finer as Predefined element
size. Build the mesh ( ).6 Right-click Mesh ( ) and select Swept ( ).7 Right-click Swept 1 and select Distribution ( ).8 Select Predefined distribution type and enter 10 in the Number of
elements field and 3 in the Element ratio field. Build the mesh ( ).
CTRTC, BANGALORE. Page 23
COMSOL 4.3b MESHING TUTORIALS CHETHAN, SIEMENS, 9663867497
9 Right-click Mesh ( ) and select Boundary Layers ( ).
10
Click the Boundary Layer Properties (
) node under Boundary Layers 1.
11
Add (for example) the sides of the geometry to the selection list.
12
Click the Build All button ( ) or press F8 to build the entire mesh. Note that the mesh control face is now removed, and that the boundary layer mesh nodes are not located where the boundary was.
CTRTC, BANGALORE. Page 24