How to create a mesh in COMSOL

In COMSOL, the mesh node (denoted by the symbol : ) allows you to split the geometry into discrete mesh elements. This helps to simplify complex geometries for solving.

Finer meshes have a greater number of elements and therefore result in solutions with a greater resolution. Coarser meshes can be used to speed up solving times. Note that it is important to weigh up the trade off between high accuracy and time taken to compute the solution when applying a very fine mesh to a geometry.

To create a mesh, click : There are two options, physics-controlled mesh and user-controlled mesh, for defining the size of the mesh elements.

 

Physics-controlled mesh:

This option allows you to pick from nine different pre-defined mesh sizes, from extremely fine up to extremely course.

 

User-controlled mesh:

Under the size node in a user-controlled mesh, you can adapt the mesh further by specifying the exact parameters used to generate your mesh, e.g. maximum and minimum element sizes.

 

Refining a measure in specific regions

If a geometry possesses a high aspect ratio, due to elements (edges or surfaces) with very different sizes, it may be necessary to apply a finer mesh to small features in order to properly analyse behaviour in those regions.

You can achieve this via the following steps:

  • Select a User-controlled mesh
  • Add a Size node to the mesh branch and ensure it is positioned above the Free Triangular node
  • Under the Geometric entity level drop-down in the new Size node, select Domain
  • Choose the domain in your geometry for which you desire to define a mesh and define the mesh characteristics, via either the Predefined or Custom methods.
  • Click Build All to view your entire mesh!

You can repeat these steps for different domains, boundaries and points of your geometry.

Note that node order makes a difference- change the order in which operations are completed by changing the order of the subnodes in the model branches.