Geometric Kernels in COMSOL Multiphysics®

April 16, 2014

The geometric kernel is the software component responsible for handling geometry in the COMSOL Multiphysics® software. You may be wondering what this means or how and why you would use it when modeling. Let’s find out.

The Geometry in the Simulation Process

Creating or importing a geometry is usually the first step in the COMSOL Multiphysics modeling process. Depending on the goal of our simulation, the geometry can be either a realistic or an idealized representation of a device.

There are various ways to build a geometry. For example, we can draw shapes on a work plane and extrude them, or we can create a solid object and combine it with other solid objects to obtain a final shape. On some occasions, the device we are drawing consists of several parts. To be able to apply different material settings, we would need to draw these parts as separate solid objects.

Imported geometry from a CAD file, for example, often needs repair or simplification by removing small, or otherwise unnecessary, details. In the COMSOL® software, we can draw new shapes to complement imported objects. Regardless of how we create the geometry, we can always go back and edit the various operations (which are collected in the geometry sequence under the Geometry node in the Model Builder).

After we create the geometry, we can proceed to define the physics, include material and boundary settings, and then mesh the geometry. If necessary, we can go back to modify the design, in which case the physics settings are retained on the domains and boundaries we have originally selected. Before solving, we create the finite element mesh, which should provide an adequate approximation of the geometry. Finally, we evaluate the results of the simulation by plotting them on the geometry.

Diagram showing the various stages of a fatigue analysis conducted on a geometry of a wheel rim
Geometry of a wheel rim during the various stages of a fatigue analysis.

The Mathematician Behind the Scenes

In COMSOL Multiphysics, the geometric kernel is the software component that ensures that all of the above functions work smoothly. The kernel keeps track of the mathematical representations of the geometrical objects we draw or import. It has functions and algorithms for constructing these objects and the interactions between them, such as joining or intersecting. Additionally, there is a part of the geometric kernel that ensures that the geometry is associative; i.e., we can modify it without needing to reapply physics settings. Furthermore, the kernel can also provide information about the geometry for other software components, such as calculating projections or the surface curvature for the mesher.

Not One but Two Geometric Kernels

Geometric kernels can be configured to do different tasks. To ensure the best possible performance, COMSOL Multiphysics provides not one but two kernels. It includes the COMSOL kernel, which works best with geometry created in the software. To handle imported CAD geometry, the CAD Import Module; Design Module; and LiveLink™ for CAD products, which you can view in the COMSOL® Software Product Suite, package a dedicated geometric kernel, the Parasolid® kernel (called the CAD kernel in the user interface).

The Parasolid® kernel provides repair functionality for imported CAD designs. It also includes functionality that enables simplification of the geometry — to delete fillets or holes, for example. There is more to it than the repair and defeaturing of imported objects, however. The Parasolid® kernel also powers the geometric modeling functionality included with the Design Module, such as creating lofted surfaces, creating fillets and chamfers on 3D objects, generating the midsurface of solid objects, and adding material to surfaces to create a solid. Last but not least, the usual geometry operations are also implemented by the Parasolid® kernel. This means that even when using this kernel, we can create and modify geometry, including imported CAD objects.

An example of defeaturing in COMSOL Multiphysics
An example of defeaturing in COMSOL Multiphysics
Removing holes and other details from a geometry during defeaturing.

Selecting the Geometric Kernel

When we install COMSOL Multiphysics® with a license that includes the CAD Import Module, Design Module, or one of the LiveLink™ products for CAD, the Parasolid® kernel is set to default when starting a new model. However, we can easily change this setting in the Preferences window.

Screenshot of the Preferences window in the COMSOL software
To check and change the geometric kernel in a model component after we have started modeling, we can click the Geometry node in the Model Builder to navigate to the Settings window for Geometry.

Screenshot of the Geometry settings window in COMSOL Multiphysics

By changing the Geometry representation in the settings, we can control which kernel handles the geometry in the current model component. Changing the kernel requires a rebuild of the geometry sequence by using the kernel we have switched to. When we switch kernels in a model that already contains solutions, we can avoid re-solving the model by clicking the Update Solution button on the Study toolbar to map the solutions to the rebuilt geometry.

The geometry sequence cannot be rebuilt using the COMSOL kernel if it includes any operations that are only available with the CAD kernel. These operations include those that appear under Defeaturing and Repair in the Geometry toolbar; the Import feature (if the imported file is of a format supported by the CAD Import Module); and the Loft, Midsurface, Thicken, Chamfer, and Fillet operations included with the Design Module. In these situations, we can convert the geometry objects to be used with the COMSOL® kernel, as discussed below.

Converting Geometry Objects

When we import geometry from a CAD file, we often prepare it for analysis by using the repair and defeaturing operations available with the CAD Import Module kernel. Even though the CAD Import Module is needed to open a model containing such a geometry sequence, there is a simple, two-step process to share the geometry in a COMSOL Multiphysics format (.mphbin or .mphtxt). First, we convert the defeatured geometry objects to the COMSOL format. You can find the Convert to COMSOL operation under Conversions in the Geometry toolbar, as shown below.

A screenshot showing the Convert to COMSOL operation.
Second, we export the converted geometry objects to the COMSOL Multiphysics format.

Further Resources

 

Parasolid is a registered trademark of Siemens Product Lifecycle Management Software Inc. or its subsidiaries in the United States and in other countries. All other trademarks are the property of their respective owners, and COMSOL AB and its subsidiaries and products are not affiliated with, endorsed by, sponsored by, or supported by those, or the above, non-COMSOL trademark owners. For a list of such trademark owners, see www.comsol.com/trademarks.

Editor’s note: This blog post was updated on 4/4/2019 to include information and images about new features available as of version 5.4 of COMSOL Multiphysics®.

Categories


Comments (2)

Leave a Comment
Log In | Registration
Loading...
Josh Thomas
Josh Thomas
April 22, 2014

Lorant,

Thanks for the informative article.

You mentioned that the “Convert to COMSOL” operation can be used to share geometries in COMSOL format. This I see is helpful for sharing with those without the CAD Import Module.

But, are there any other advantages to using the COMSOL kernel over the Parasolid kernel? For example, is one kernel faster than the other for large amounts of imports or complicated imports? I see that the Parasolid kernel is the default if you have the appropriate licenses. But, I am wondering if there may be cases where it would make sense to use the “Convert to COMSOL” functionality even if I am not planning on sharing my geometries.

Thanks,
Josh Thomas

Lorant Olasz
Lorant Olasz
April 24, 2014

Thanks for your comments Josh.
I currently can’t think of any other reasons to convert geometry to COMSOL format. If you import CAD objects it is best to keep those in the default Parasolid format.

EXPLORE COMSOL BLOG