Problem Description
There is an option to Form Union or Form Assembly at the end of the Geometry sequence. What does this mean and when should I switch between them?
Solution
The Geometry branch within the Model Builder consists of a sequence of geometry operations. This can include sketches, geometric primitives, imported CAD files, Boolean operations, etc., that are used to create the geometry that you want to model. At the end of this sequence, there is a Form Union node that can also be changed to Form Assembly. This choice has consequences in how the final geometric model used for the physics settings and for meshing, is generated. This Knowledge Base article describes the differences.
Form Union
This is the default method to generate the geometric model for the physics. It is equivalent to taking a Boolean union of all objects in the geometry sequence, and keeping interior boundaries, thus creating a single geometry object composed of many different domains. Any overlapping geometry objects will become a single object composed of different domains for each enclosed volume. This is illustrated in the image below, where three blocks of different sizes overlap in space. The result of the Form Union operation is shown with the different resulting domains in different colors.
When meshing, the mesh will be connected and hence conforming everywhere. That is, the mesh elements on either side of an interior boundary share the same nodes, edges, and faces. The interior boundaries are meshed, and you can apply different element sizes in different domains, as shown in the image below.
In the physics settings, each of these different domains can have different material properties. By default, continuity of the fields and the fluxes will be maintained across the interior boundaries and it is possible to add a variety of different discontinuity or jump conditions at interior boundaries for the various physics.
Having a mesh that is conforming is required for all of the electromagnetic interfaces that are solving for (as dependent variables) two or three components of either the magnetic vector potential, the electric field or the magnetic field. Such interfaces require the mesh elements to be conforming at all boundaries.
The physical implication of the Form Union step is that the domains in the model cannot slide or move relative to each other. This is due to the fact that the Form Union operation will form one interior boundary, between two domains, for each pair of touching boundaries, such that the resulting mesh will be connected (and conforming) across the interior boundary. This is an appropriate default assumption for most modeling within COMSOL Multiphysics, but it is not valid when movement of adjacent objects is needed. For such cases, or when you want to have a nonconforming mesh between adjacent domains, change Form Union to Form Assembly.
Form Assembly
Form Assembly differs from Form Union in that it does not compute a Boolean union of the geometry objects. Instead it collects them into an assembly object. After the Form Assembly operation, adjacent objects will become disconnected domains and movement is possible if needed. Thus you need to switch to Form Assembly for the following physics interfaces when you have adjacent, touching objects in your geometry sequence:
- Structural mechanics models, when Contact features are included
- Multibody Dynamics
- Rotating Machinery, Magnetic
- Rotating Machinery, Fluid Flow
Since Form Assembly does not compute the Boolean union of the objects, you cannot use Form Assembly to generate domains for the overlapping regions between objects. The number of domains in the geometry will not change as a consequence of the Form Assembly operation. The adjacent objects of the torus and the block in the figure below become two disconnected domains after Form Assembly.
The Form Assembly operation will identify the touching boundaries of all objects and by default will form so-called Identity pairs or Contact pairs out of them. The default behavior is to create these pairs automatically, although they can also be set up manually. Both types of pairs can also be generated with the option to create imprints, which will project the outline of the faces onto each other. These options are illustrated below for the touching torus and the block, with the faces that compose the pairs highlighted in the exploded views.
By default, a single pair defining the mating faces will be created of all touching faces between two domains, even if these faces are nonadjacent within each domain. It is possible to override this behavior by choosing to Split disconnected pairs so that one pair is created for each mating face pair, as shown above.
The choice between creating an Identity pair and a Contact pair is governed by the physics that you want to solve. Creating Contact pairs should only be done when solving a structural mechanics problem with Contact features. This means that faces can come in and out of contact and can slide relative to each other, and that forces and fluxes will be transferred between the faces only when they are in contact.
When using any of the Rotating Machinery interfaces, the option to form Identity Pairs, without imprints and without splitting of disconnected pairs, is the appropriate choice. It is also possible to choose to create no pairs at all, and this can be useful when solving a multibody dynamics problem.
Automatically generated boundary pairs can be disabled, and you can also change the type of a pair, for example if you are applying Contact features only in some locations of your geometry. Alternatively, you can use Boolean Union operations in the geometry sequence to unite some of the objects, and then you can use Form Assembly to generate Contact pairs for the mating faces between the remaining objects.
The mesh created when using Form Assembly is not connected across the two sides of a boundary pair, hence the mesh is nonconforming between disconnected domains. The mesh elements on the mating faces do not share node points, nor edges, nor faces. The mesh can be either matching or nonmatching on the mating faces, depending on how it is created. With imprints enabled the mating faces of the pairs will get the exact same shape, although the mesh of two mating faces is not connected, and can be nonmatching. When using this option you can create matching meshes on the mating faces by using the Copy Face operation. First create a mesh for one side of the pair, then use Copy Face to copy the mesh to the other side. Such a mesh is shown to the right in the figure below for the touching torus and block example.
The continuity of the fields or the fluxes across a boundary pair in the Form Assembly case is enforced by Continuity boundary conditions applied for the physics. You must explicitly apply the Continuity boundary condition for each pair and physics interface in your model. Discontinuity or jump conditions can also be applied. The Continuity boundary condition will approximately enforce continuity of the fields and fluxes across a pair. In contrast, the mesh after Form Union is conforming across interior boundaries, and thus the continuity of the fields and fluxes is naturally satisfied via the finite element method. Results obtained with a nonconforming mesh are less accurate than results obtained with a conforming mesh, and results from a nonmatching mesh are less accurate than those from a matching mesh, and become increasingly less accurate as the relative element sizes across the pair differ. Thus, the mesh after Form Union will give the most accurate results, but will require the most memory to solve, and a nonmatching mesh after Form Assembly without imprints will be the least accurate and will use relatively less memory to solve.
Switching to Form Assembly may become helpful if you want to reduce the number of elements in the mesh, and thereby the memory required for solving. It is recommended to investigate using nonconforming meshes for problems involving thermal and structural analyses. Such models can often consist of geometry objects that may have quite different feature sizes, and hence different mesh element sizes. These cases are likely to show the greatest benefit, in terms of lesser memory usage while still giving good accuracy, when using the Form Assembly method to generate the geometric model for physics and meshing.
Video Gallery Resources
Form Union and Form Assembly Geometry Finalization Methods
Creating Contact Pairs for Structural Contact Modeling with Form Assembly
COMSOL makes every reasonable effort to verify the information you view on this page. Resources and documents are provided for your information only, and COMSOL makes no explicit or implied claims to their validity. COMSOL does not assume any legal liability for the accuracy of the data disclosed. Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark details.