In last month’s Tips and Tricks article AltaSim introduced the topic of model parametrization, describing the process and a few of the benefits. Effective parametrization of a model file takes time and thought to implement correctly. This article will extend the approach discussed in Part 1 to include one important recommendation for robust geometric parametrization. If you would like to review Part 1, click here.
Selection of definitions are typically needed when parametrizing geometric changes like sizes, offsets, and numbers of entities (e.g. number of heat fins in a thermal analysis). For a single analysis, explicit selections are sufficient and are often the simplest and quickest way of defining your selections; but we do not recommend using them for robust parametrization.
When a geometric parameter is changed that affects explicit selection, COMSOL updates the selections. These automatic updates are often not correct. These errors happen most frequently when the change involves typology numbering (i.e. number of boundaries or edges). For this reason, AltaSim recommends double-checking any explicit selections after making a change to a geometric parameter. Manual adjustments may be needed. If the analyst skips this step, it can result in incorrect physics or mesh definitions that can easily go unnoticed. The need for manual adjustments is exactly what we are trying to avoid by employing model parametrization. So, as an alternative to the explicit selections, AltaSim recommends using the Ball, Box and Cylinder selections with the accompanying set of Boolean features for selection definitions.
These selections enable you to define balls, boxes and cylinders within which geometric entities must exist to be considered ‘selected’. The dimensions and positions of these balls, boxes and cylinders can be parametrized with global parameters. This approach provides distinct advantages over the explicit selection technique. This methodology enables the analyst to control COMSOL Multiphysics to update the selections when the geometric parameters are changed.
The Ball, Box and Cylinder selection technique take longer to program correctly as the COMSOL Multiphysics user must think of how to make the selection definitions of the global parameter. However, in AltaSim’s experience it is the most robust technique. For this reason, AltaSim recommends this approach as a powerful and often necessary tool to add to your skills.