Mallado Hexaédrico en Geometrías Complejas: Cómo Usar Grupos de Mallado para Evitar Refinamientos Innecesarios
Hexahedral Meshing in Complex Geometries: How to Use Mesh Groups to Avoid Unnecessary Refinements
Mallado Hexaédrico en Geometrías Complejas: Cómo Usar Grupos de Mallado para Evitar Refinamientos Innecesarios
Hexahedral Meshing in Complex Geometries: How to Use Mesh Groups to Avoid Unnecessary Refinements
24/06/2025 Gabriel 0 Simulación Electromagnética
Cuando trabajamos con estructuras sencillas que hemos diseñado directamente dentro de CST Studio, lo más habitual es confiar en los templates por defecto que ofrece el software. Estos templates vienen con configuraciones automáticas que, en la mayoría de los casos, permiten generar un mallado adecuado sin necesidad de intervención manual. Para muchos proyectos, esta aproximación es suficiente para obtener resultados rápidos y consistentes.
Sin embargo, la situación cambia cuando empezamos a trabajar con modelos más complejos, especialmente aquellos que han sido importados desde otros entornos CAD. Elementos como tornillos, carcasas, disipadores o cualquier componente mecánico con cierto nivel de detalle pueden introducir una serie de complicaciones que afectan directamente al proceso de mallado. Este tipo de geometrías puede provocar un refinamiento excesivo e innecesario si no se gestiona adecuadamente.
El primero de estos problemas tiene que ver con la calidad de las importaciones. Aunque CST Studio es compatible con formatos estándar como STEP, STP o IGES, la conversión de estos archivos a geometría nativa de CST no siempre es perfecta. Es relativamente común que, durante la importación, se generen pequeñas imperfecciones numéricas: por ejemplo, coordenadas que deberían ser exactamente cero pueden convertirse en valores extremadamente pequeños, del orden de 10^-16. Estas pequeñas desviaciones pueden tener un impacto significativo en el mallado, generando discontinuidades o refinamientos innecesarios.
Para resolver este tipo de situaciones, CST ofrece herramientas de “curado” de geometría que permiten limpiar y reparar estos errores. Otra alternativa más robusta, aunque más laboriosa, es redibujar las piezas directamente en el modelador de CST, simplificando la geometría y asegurando una interpretación limpia y precisa. Ambas opciones permiten mejorar la calidad del modelo antes de aplicar cualquier estrategia de mallado.
El segundo problema, que sí abordaremos en profundidad, tiene que ver con el nivel de detalle de las geometrías importadas. Muchas veces, los modelos CAD incluyen características que son completamente irrelevantes desde el punto de vista electromagnético, pero que complican enormemente el proceso de mallado. Detalles como roscas o formas complejas en cabezas de tornillos pueden disparar el número de celdas sin aportar valor a la simulación.
Aunque estos detalles pueden ser importantes para el diseño mecánico, no aportan información útil en una simulación RF. Aun así, el mallado automático de CST tiende a centrarse en estas zonas, generando celdas muy pequeñas y refinamientos locales que aumentan significativamente el número total de celdas. Esto incrementa el tiempo de simulación y el uso de recursos computacionales sin mejorar la precisión en las zonas críticas.
Este tipo de refinamiento excesivo en regiones de baja relevancia es precisamente lo que queremos evitar, y para ello exploraremos cómo utilizar grupos de mallado con propiedades locales para recuperar el control sobre el proceso de discretización. Esta técnica nos permite optimizar el mallado sin comprometer la calidad de los resultados.
Para ilustrar este problema de forma clara y práctica, vamos a trabajar con un ejemplo realista: una simulación electromagnética de una PCB que incorpora una antena de alambre. Es importante destacar que ni los resultados RF de esta antena ni la aplicación concreta del sistema son el objeto de estudio de este artículo. Nuestro foco estará exclusivamente en cómo el mallado automático responde ante la presencia de geometrías mecánicas complejas.
En este modelo, la PCB incluye varios tornillos que han sido importados desde un archivo CAD. Estos tornillos representan los elementos mecánicos que, en un montaje real, se utilizarían para fijar la placa a una carcasa o a otros componentes estructurales. Algunos de ellos están modelados de forma simplificada, como cilindros con una cabeza tipo Torx, mientras que otros incluyen la rosca completa, lo que añade un nivel de detalle considerable a la geometría. Este contraste entre modelos simples y detallados nos permitirá evaluar el impacto del mallado en cada caso.
El primer paso en la configuración de la simulación fue establecer un puerto discreto y un plano de masa sobre la PCB, lo que permite excitar correctamente la antena y definir las condiciones de contorno necesarias para una simulación electromagnética coherente. Aunque esta parte es esencial para el funcionamiento del modelo, no entraremos en detalle aquí, ya que no es el foco de este análisis.
Una vez definido el entorno de excitación, se seleccionó el solver en el dominio temporal (Transient Solver), y se configuró el mallado hexaédrico en modo adaptativo. Esta configuración permite que CST ajuste automáticamente el tamaño de las celdas en función de la geometría y de los criterios internos de refinamiento. El objetivo era observar cómo se comporta el mallado en presencia de los tornillos importados y evaluar si el refinamiento automático se concentra en las zonas adecuadas.
El resultado fue revelador: el modelo alcanzó un total de aproximadamente 8 millones de celdas. Este número, aunque no excesivo en términos absolutos, es elevado si consideramos que gran parte de esas celdas se concentran en torno a los tornillos, que no son zonas críticas desde el punto de vista electromagnético.
Al visualizar el mallado generado automáticamente mediante la herramienta Mesh View de CST, se hizo evidente que el refinamiento no estaba distribuyéndose de forma óptima. En torno a los tornillos, especialmente aquellos con geometría más detallada, aparecían múltiples líneas verdes brillantes recorriendo los bordes de las cabezas y los cuerpos. Estas líneas indican que el software ha aplicado un proceso de snapping, forzando el mallado a ajustarse con mayor precisión a la geometría local. Este comportamiento es automático y suele activarse cuando CST detecta bordes afilados, transiciones curvas o discontinuidades geométricas.
Además de las líneas verdes, también se observaron celdas de color púrpura o rosa en torno a las roscas de los tornillos. Estas celdas representan zonas donde el mallado adaptativo ha decidido refinar aún más la malla, subdividiendo las celdas originales para capturar con mayor fidelidad los detalles geométricos.
Aunque este tipo de refinamiento puede ser útil en regiones donde se espera una alta concentración de campos electromagnéticos, en este caso se está aplicando en zonas puramente mecánicas, sin relevancia directa para el análisis RF.
Este comportamiento tiene un impacto directo sobre el rendimiento de la simulación. Al concentrar el esfuerzo de mallado en los tornillos, el software está dedicando recursos computacionales a representar con gran precisión elementos que no influyen significativamente en los resultados electromagnéticos. Como consecuencia, se incrementa el número total de celdas, se alarga el tiempo de simulación y se consume más memoria, todo ello sin aportar mejoras reales en la calidad del análisis.
Este tipo de situaciones pone de manifiesto la necesidad de intervenir manualmente en el proceso de mallado, especialmente cuando se trabaja con geometrías importadas o con modelos que incluyen detalles mecánicos innecesarios para el estudio electromagnético. En la siguiente sección, exploraremos cómo utilizar grupos de mallado con propiedades locales para corregir este comportamiento y optimizar la eficiencia de nuestras simulaciones.
Grupo de mallado local
Llegados a este punto, y tras comprobar que el mallado automático está dedicando un esfuerzo excesivo a zonas mecánicas como los tornillos, es evidente que necesitamos intervenir manualmente para optimizar el proceso. La forma más eficaz de hacerlo en CST Studio Suite es mediante el uso de grupos de mallado local, una herramienta que nos permite definir condiciones específicas de mallado para determinadas partes del modelo, sin afectar al resto de la geometría.
Para aplicar esta técnica, lo primero que debemos hacer es seleccionar los objetos que queremos controlar —en este caso, los tornillos— y acceder a sus propiedades de mallado. Esto se hace fácilmente desde el árbol de componentes: basta con hacer clic derecho sobre el objeto deseado y seleccionar la opción “Local Mesh Properties…”. Al hacerlo, se abre una ventana con varias secciones que nos permiten configurar el refinamiento del mallado de forma precisa.
La primera sección que encontramos es Refinamiento de Volumen (Volume Refinement Settings). Aquí podemos definir cómo se comportará el mallado dentro del volumen del objeto seleccionado. Las opciones disponibles son:
- None: no se aplica ningún refinamiento local. CST utilizará los parámetros globales de mallado para esta región.
- Absolute Value: permite definir un tamaño de celda fijo (en milímetros, por ejemplo). Es útil cuando se desea un control directo sobre la resolución en una zona concreta.
- Fraction of Maximum Cell near to model: esta opción define el tamaño de celda como una fracción del tamaño máximo permitido por el mallado global. Por ejemplo, un valor de 0.5 indicará que las celdas en esta región serán la mitad de grandes que las celdas máximas del modelo.
- Number of Cells Across Object: CST calculará automáticamente el tamaño de celda necesario para que haya un número determinado de celdas a lo largo del objeto. Esta opción es especialmente útil cuando se conoce la dimensión del objeto y se quiere asegurar una resolución mínima sin tener que calcular manualmente el tamaño de celda.
Justo debajo, encontramos una sección similar para el Refinamiento de Bordes (Edge Refinement), que ofrece las mismas opciones. Esta parte controla el mallado a lo largo de los bordes del objeto, lo cual puede ser útil si se desea capturar con más precisión los contornos o aristas. Sin embargo, en nuestro caso, como los tornillos no presentan detalles electromagnéticamente relevantes en sus bordes, esta opción puede dejarse en “None” para evitar un refinamiento innecesario.
La siguiente sección importante es la pestaña de Snapping, que controla cómo se ajusta el mallado a la geometría del objeto. Aquí encontramos dos grupos de opciones:
Snapping Planes: permite activar el ajuste del mallado a planos ortogonales en las direcciones principales del espacio:
- X-dir, Y-dir, Z-dir: al activar una de estas opciones, CST intentará alinear las celdas del mallado con planos paralelos a ese eje. En nuestro caso, como los tornillos están alineados en la dirección Z, solo es necesario activar Z-dir para que el mallado se adapte correctamente a su orientación.
Snap to: este grupo de opciones permite que el mallado se ajuste a formas geométricas específicas detectadas en el modelo. Las opciones disponibles son:
- Axial edges: ajusta el mallado a bordes rectos alineados con los ejes.
- Planes: ajusta el mallado a superficies planas.
- Elliptic edges: ajusta el mallado a bordes curvos con forma elíptica.
- Spheres: ajusta el mallado a superficies esféricas.
- Cylinders: ajusta el mallado a superficies cilíndricas, ideal para cuerpos como tornillos.
- Cylindrical centers: ajusta el mallado al eje central de cilindros, lo que ayuda a mantener una alineación coherente en objetos alargados.
- Tor.: ajusta el mallado a formas toroidales, como anillos o estructuras circulares cerradas.
En nuestro caso, para simplificar el mallado en los tornillos sin perder su forma general, es recomendable activar únicamente las opciones Cylinders y Cylindrical centers, y desactivar el resto. Esto evita que el mallado se refine innecesariamente en detalles como bordes planos, esferas o transiciones curvas que no aportan valor a la simulación.
Con estas herramientas, podemos recuperar el control sobre el mallado en zonas no críticas y asegurarnos de que los recursos computacionales se concentren en las partes del modelo que realmente lo requieren. En la siguiente sección, aplicaremos estas configuraciones a nuestro caso práctico y analizaremos el impacto que tienen sobre el número total de celdas y la eficiencia de la simulación.
Una vez entendidas las opciones disponibles dentro de las propiedades locales de mallado, el siguiente paso es decidir qué configuración de refinamiento aplicar a los tornillos en nuestro modelo. Para ello, es fundamental tener en cuenta la frecuencia de trabajo de la simulación y el nivel de detalle que realmente necesitamos en esas zonas.
CST Studio Suite recomienda, como regla general, utilizar entre 10 y 20 celdas por longitud de onda en las zonas de interés electromagnético. Esta densidad de mallado garantiza una representación adecuada de los campos y una buena precisión en los resultados. Sin embargo, en nuestro caso, los tornillos no forman parte de las regiones críticas del circuito. No son elementos activos, no transportan señal, ni están directamente involucrados en la radiación o acoplamiento electromagnético. Por tanto, podemos permitirnos utilizar un mallado más relajado en esas zonas.
Para definir el tamaño de celda adecuado, partimos de la frecuencia máxima que queremos analizar. Aunque el sistema opera principalmente a 1 GHz, nos interesa evaluar posibles emisiones espurias o radiadas hasta los 10 GHz. Esto implica que debemos calcular el tamaño de celda en función de la longitud de onda más corta, es decir, la correspondiente a 10 GHz:
Si aplicamos el criterio de 10 celdas por longitud de onda, el tamaño máximo de celda recomendado en zonas críticas sería:
Pero como los tornillos no son zonas críticas, podemos incluso permitir un mallado algo más grueso, por ejemplo, con 6 a 8 celdas por longitud de onda, lo que nos llevaría a tamaños de celda de entre 3.75 mm y 5 mm. Aun así, para mantener un equilibrio entre eficiencia y representación geométrica, hemos optado por utilizar la opción “Number of Cells Across Object” dentro del refinamiento de volumen, con un valor de 4 a 6 celdas a lo largo del tornillo, que tiene una longitud de 11 mm. Esto nos da un tamaño de celda local aproximado de:
Este valor está por debajo del límite de 3 mm calculado anteriormente, lo que nos asegura que, aunque estemos relajando el mallado en los tornillos, seguimos manteniendo una resolución suficiente para evitar errores numéricos o discontinuidades en el modelo.
Con esta configuración, conseguimos reducir significativamente el número de celdas en torno a los tornillos, sin comprometer la calidad de la simulación en las zonas realmente importantes. En este punto, el siguiente paso lógico es comprobar cómo se comporta el modelo con esta nueva configuración de mallado local aplicada.
Sin embargo, es importante tener en cuenta cómo gestiona CST Studio Suite la generación del mallado. El software tiende a almacenar en caché la configuración de mallado y, salvo que se detecten cambios estructurales significativos o se modifiquen parámetros clave del solver, no recalcula automáticamente la malla. Esto significa que, aunque hayamos ajustado las propiedades locales de mallado en los tornillos, es posible que el mallado anterior siga siendo utilizado si no forzamos una nueva simulación.
El objetivo no es obtener resultados electromagnéticos precisos, sino simplemente permitir que el solver genere un nuevo mallado que refleje las condiciones locales que hemos definido. Como en nuestro caso no se ha producido un cambio estructural drástico, y para asegurarnos de que CST tenga en cuenta las nuevas condiciones de mallado local, decidimos volver a lanzar una simulación adaptativa, esta vez con parámetros de mallado global menos restrictivos.
Tras aplicar las configuraciones de mallado local a los tornillos y lanzar una nueva simulación adaptativa, los resultados fueron contundentes. El número total de celdas se redujo a 4.371.000, prácticamente la mitad de las que se generaban en la configuración inicial. Esta disminución refleja de forma clara la eficacia del enfoque basado en grupos de mallado local. Al inspeccionar el mallado resultante mediante la herramienta Mesh View, se comprobó que ya no se generaban refinamientos innecesarios en torno a los tornillos: desaparecieron tanto las líneas verdes asociadas al snapping como las celdas rosas que indicaban subdivisiones locales. En la vista general del mallado, la densidad de celdas se redistribuyó de forma más lógica, concentrándose en zonas del diseño con mayor relevancia electromagnética, mientras que los tornillos pasaron a ocupar un lugar secundario, tal como corresponde a su papel en la simulación.
NOTAS
A la hora de decidir si una estructura debe modelarse con precisión o puede simplificarse, es fundamental tener en cuenta su relevancia electromagnética. Esta relevancia puede evaluarse, principalmente, en función de tres factores:
Relación entre el tamaño de la estructura y la longitud de onda:
Como regla general, una estructura empieza a tener un impacto electromagnético significativo cuando su tamaño es del orden de λ/10 o mayor. Por ejemplo, si estamos evaluando emisiones hasta 10 GHz (longitud de onda de 30 mm), cualquier detalle geométrico mayor de 3 mm podría empezar a influir en el comportamiento del campo.
Distancia a la fuente o a zonas activas del circuito:
Elementos pasivos o mecánicos que están muy alejados de la antena, de los pads de excitación o de las líneas de transmisión suelen tener un impacto mucho menor. En cambio, si están cerca de zonas de alta densidad de campo, incluso estructuras pequeñas pueden alterar el resultado.
Naturaleza del material:
No es lo mismo una pieza metálica (conductor perfecto o buen conductor) que una estructura dieléctrica o un material tipo foam. Los conductores tienden a reflejar o perturbar los campos, mientras que materiales con baja permitividad y baja pérdida (como espumas dieléctricas) pueden tener un efecto despreciable.
Finalidad de la simulación
El nivel de detalle necesario en el modelo depende directamente del objetivo del análisis. Si, por ejemplo, el interés está en estudiar el comportamiento de una antena, probablemente no sea necesario modelar todas las líneas internas de la PCB, ni todas sus capas. En muchos casos, objetos complejos pueden representarse como estructuras metálicas equivalentes, siempre que se mantenga la coherencia con el fenómeno que se desea estudiar. Esta simplificación puede reducir drásticamente el número de celdas y facilitar la interpretación de los resultados.
CONLCUSION
Este ejemplo nos ha permitido comprobar cómo el mallado automático, aunque útil en muchos casos, puede generar refinamientos innecesarios en zonas que no aportan valor a la simulación. A través del uso de grupos de mallado con propiedades locales, hemos podido recuperar el control sobre el proceso de discretización, optimizando el número de celdas y mejorando la eficiencia sin comprometer la calidad de los resultados.
Este enfoque no se limita a los tornillos. Podemos aplicar un proceso de evaluación similar al resto del modelo, prestando atención a dónde se están generando celdas pequeñas y si realmente necesitamos esa precisión en esas zonas. Por ejemplo, en mallados volumétricos, es común encontrar refinamientos automáticos en torno a agujeros de fijación en la PCB, bordes curvos o detalles mecánicos que no afectan al comportamiento electromagnético. En estos casos, puede ser más eficiente simplificar la geometría o relajar el mallado localmente.
En definitiva, una simulación eficiente no solo depende del solver o del hardware, sino también de nuestra capacidad para entender qué partes del modelo son críticas y cuáles pueden ser tratadas con menor detalle. El mallado, como herramienta de discretización, debe adaptarse a esa lógica, y no al revés.
When working with simple structures designed directly within CST Studio, it's common to rely on the default templates provided by the software. These templates come with automatic settings that, in most cases, allow for the generation of a suitable mesh without the need for manual intervention. For many projects, this approach is sufficient to obtain quick and consistent results.
However, the situation changes when we begin working with more complex models, especially those imported from other CAD environments. Elements such as screws, housings, heat sinks, or any mechanical component with a certain level of detail can introduce a series of complications that directly affect the meshing process. These types of geometries can lead to excessive and unnecessary refinement if not properly managed.
The first of these issues relates to the quality of the imports. Although CST Studio supports standard formats such as STEP, STP, or IGES, the conversion of these files into CST’s native geometry is not always perfect. It’s relatively common for small numerical imperfections to arise during import—for example, coordinates that should be exactly zero may become extremely small values, on the order of 10^-16. These small deviations can significantly impact the mesh, causing discontinuities or unnecessary refinements.
To address these situations, CST offers geometry “healing” tools that help clean and repair such errors. A more robust, albeit more labor-intensive, alternative is to redraw the parts directly within CST’s modeler, simplifying the geometry and ensuring a clean and accurate interpretation. Both options help improve the model quality before applying any meshing strategy.
The second issue, which we will explore in depth, concerns the level of detail in imported geometries. CAD models often include features that are completely irrelevant from an electromagnetic perspective, but greatly complicate the meshing process. Details such as threads or complex shapes on screw heads can drastically increase the number of mesh cells without adding value to the simulation.
While these details may be important for mechanical design, they do not provide useful information in an RF simulation. Nevertheless, CST’s automatic meshing tends to focus on these areas, generating very small cells and local refinements that significantly increase the total number of cells. This, in turn, increases simulation time and computational resource usage without improving accuracy in critical regions.
This type of excessive refinement in low-relevance regions is precisely what we want to avoid, and to achieve that, we’ll explore how to use mesh groups with local properties to regain control over the discretization process. This technique allows us to optimize the mesh without compromising the quality of the results.
To clearly and practically illustrate this issue, we’ll work with a realistic example: an electromagnetic simulation of a PCB that incorporates a wire antenna. It’s important to note that neither the RF results of this antenna nor the specific application of the system are the focus of this article. Our focus will be exclusively on how the automatic meshing responds to the presence of complex mechanical geometries.
In this model, the PCB includes several screws that have been imported from a CAD file. These screws represent the mechanical elements that, in a real assembly, would be used to secure the board to a housing or other structural components. Some of them are modeled in a simplified way, as cylinders with a Torx-style head, while others include the full thread, adding a considerable level of detail to the geometry. This contrast between simple and detailed models will allow us to evaluate the impact of meshing in each case.
The first step in setting up the simulation was to define a discrete port and a ground plane on the PCB, which allows for proper excitation of the antenna and the definition of the necessary boundary conditions for a coherent electromagnetic simulation. While this part is essential for the model’s operation, we won’t go into detail here, as it is not the focus of this analysis.
Once the excitation environment was defined, the Transient Solver was selected, and the hexahedral mesh was configured in adaptive mode. This setup allows CST to automatically adjust the cell size based on the geometry and its internal refinement criteria. The goal was to observe how the mesh behaves in the presence of the imported screws and to evaluate whether the automatic refinement focuses on the appropriate regions.
The result was revealing: the model reached a total of approximately 8 million cells. While this number is not excessive in absolute terms, it is high considering that a large portion of these cells are concentrated around the screws, which are not critical areas from an electromagnetic perspective.
When visualizing the automatically generated mesh using CST’s Mesh View tool, it became evident that the refinement was not optimally distributed. Around the screws—especially those with more detailed geometry—multiple bright green lines appeared along the edges of the heads and bodies. These lines indicate that the software has applied a snapping process, forcing the mesh to conform more precisely to the local geometry. This behavior is automatic and is typically triggered when CST detects sharp edges, curved transitions, or geometric discontinuities.
In addition to the green lines, purple or pink cells were also observed around the screw threads. These cells represent areas where the adaptive meshing has decided to further refine the mesh, subdividing the original cells to more accurately capture the geometric details.
While this type of refinement can be useful in regions where a high concentration of electromagnetic fields is expected, in this case it is being applied to purely mechanical areas, with no direct relevance to the RF analysis.
This behavior has a direct impact on simulation performance. By concentrating meshing effort on the screws, the software is allocating computational resources to accurately represent elements that do not significantly influence the electromagnetic results. As a consequence, the total number of cells increases, simulation time is extended, and more memory is consumed, all without delivering any real improvement in the quality of the analysis.
These kinds of situations highlight the need to manually intervene in the meshing process, especially when working with imported geometries or models that include mechanical details irrelevant to the electromagnetic study. In the next section, we’ll explore how to use mesh groups with local properties to correct this behavior and optimize the efficiency of our simulations.
Local Mesh Group
At this point, after confirming that the automatic meshing is dedicating excessive effort to mechanical areas such as the screws, it’s clear that we need to intervene manually to optimize the process. The most effective way to do this in CST Studio Suite is by using local mesh groups, a tool that allows us to define specific meshing conditions for certain parts of the model without affecting the rest of the geometry.
To apply this technique, the first step is to select the objects we want to control—in this case, the screws—and access their mesh properties. This is easily done from the component tree: simply right-click on the desired object and select the option “Local Mesh Properties…”. Doing so opens a window with several sections that allow us to precisely configure the mesh refinement.
The first section we encounter is Volume Refinement Settings. Here, we can define how the mesh will behave within the volume of the selected object. The available options are:
The first section we find is Volume Refinement Settings. Here, we can define how the mesh behaves within the volume of the selected object. The available options are:
- None: No local refinement is applied. CST will use the global mesh parameters for this region.
- Absolute Value: Allows you to define a fixed cell size (in millimeters, for example). This is useful when you want direct control over the resolution in a specific area.
- Fraction of Maximum Cell near to model: This option defines the cell size as a fraction of the maximum cell size allowed by the global mesh. For example, a value of 0.5 means the cells in this region will be half the size of the model’s maximum cells.
- Number of Cells Across Object: CST will automatically calculate the required cell size so that a specific number of cells span the object. This is especially useful when you know the object’s dimensions and want to ensure a minimum resolution without manually calculating the cell size.
Just below, we find a similar section for Edge Refinement, which offers the same options. This part controls the meshing along the edges of the object, which can be useful if you want to capture contours or edges more accurately. However, in our case, since the screws do not present electromagnetically relevant details along their edges, this option can be left at “None” to avoid unnecessary refinement.
The next important section is the Snapping tab, which controls how the mesh aligns to the object’s geometry. Here we find two groups of options:
Snapping Planes: Enables mesh alignment to orthogonal planes along the main spatial directions:
- X-dir, Y-dir, Z-dir: When one of these is enabled, CST will attempt to align the mesh cells with planes parallel to that axis. In our case, since the screws are aligned along the Z direction, it is only necessary to enable Z-dir so that the mesh adapts properly to their orientation.
Snap to: This group of options allows the mesh to snap to specific geometric features detected in the model. The available options are:
- Axial edges: Aligns the mesh to straight edges along the axes.
- Planes: Aligns the mesh to flat surfaces.
- Elliptic edges: Aligns the mesh to curved, elliptical edges.
- Spheres: Aligns the mesh to spherical surfaces.
- Cylinders: Aligns the mesh to cylindrical surfaces—ideal for objects like screws.
- Cylindrical centers: Aligns the mesh to the central axis of cylinders, helping maintain consistent alignment in elongated objects.
- Tor.: Aligns the mesh to toroidal shapes, such as rings or closed circular structures.
In our case, to simplify the meshing of the screws without losing their general shape, it is recommended to enable only the Cylinders and Cylindrical centers options, and disable the rest. This prevents the mesh from being unnecessarily refined around features like flat edges, spheres, or curved transitions that do not add value to the simulation.
With these tools, we can regain control over the mesh in non-critical areas and ensure that computational resources are focused on the parts of the model that truly require them.
In the next section, we’ll apply these settings to our practical case and analyze their impact on the total number of cells and the efficiency of the simulation.
Once we understand the available options within the local mesh properties, the next step is to decide which refinement settings to apply to the screws in our model. To do this, it’s essential to consider the operating frequency of the simulation and the level of detail truly needed in those areas.
CST Studio Suite generally recommends using between 10 and 20 cells per wavelength in regions of electromagnetic interest. This mesh density ensures an adequate representation of the fields and good accuracy in the results. However, in our case, the screws are not part of the circuit’s critical regions. They are not active elements, do not carry signals, and are not directly involved in radiation or electromagnetic coupling. Therefore, we can afford to use a more relaxed mesh in those areas.
To define the appropriate cell size, we start from the maximum frequency we want to analyze. Although the system mainly operates at 1 GHz, we are also interested in evaluating potential spurious or radiated emissions up to 10 GHz. This means we must calculate the cell size based on the shortest wavelength, which corresponds to 10 GHz:
If we apply the criterion of 10 cells per wavelength, the maximum recommended cell size in critical regions would be:
But since the screws are not critical regions, we can even allow for a slightly coarser mesh, for example, with 6 to 8 cells per wavelength, which would result in cell sizes between 3.75 mm and 5 mm.
Still, to maintain a balance between efficiency and geometric representation, we chose to use the “Number of Cells Across Object” option within volume refinement, with a value of 4 to 6 cells along the screw, which has a length of 11 mm.
This gives us an approximate local cell size of between 1.83 mm and 2.75 mm
This value is below the previously calculated 3 mm limit, which ensures that even though we are relaxing the mesh in the screws, we still maintain sufficient resolution to avoid numerical errors or discontinuities in the model.
With this configuration, we significantly reduced the number of cells around the screws without compromising simulation quality in the truly important areas. At this point, the next logical step is to check how the model behaves with this new local meshing configuration applied.
However, it is important to understand how CST Studio Suite handles mesh generation. The software tends to cache the meshing configuration, and unless significant structural changes are detected or key solver parameters are modified, it does not automatically recalculate the mesh. This means that even if we have adjusted the local mesh properties for the screws, the previous mesh may still be used unless we force a new simulation.
The goal is not to obtain accurate electromagnetic results, but simply to allow the solver to generate a new mesh that reflects the local conditions we have defined. Since no drastic structural change occurred in our case, and to ensure CST considers the new local mesh settings, we decided to rerun an adaptive simulation, this time with less restrictive global meshing parameters.
After applying the local mesh settings to the screws and launching a new adaptive simulation, the results were striking. The total number of cells dropped to 4,371,000—nearly half of what was generated in the initial configuration. This reduction clearly demonstrates the effectiveness of the local mesh group approach. When inspecting the resulting mesh using the Mesh View tool, it was confirmed that unnecessary refinements around the screws were no longer present: both the green lines associated with snapping and the pink cells indicating local subdivisions had disappeared. In the overall mesh view, the cell density was redistributed more logically, concentrating in areas of the design with greater electromagnetic relevance, while the screws took on a secondary role, as appropriate for their function in the simulation.
NOTES
When deciding whether a structure should be modeled accurately or can be simplified, it is essential to consider its electromagnetic relevance. This relevance can be evaluated primarily based on three factors:
Relationship between the size of the structure and the wavelength: As a general rule, a structure begins to have a significant electromagnetic impact when its size is on the order of λ/10 or greater. For example, if we are evaluating emissions up to 10 GHz (wavelength of 30 mm), any geometric detail larger than 3 mm could start to influence field behavior.
Distance to the source or active areas of the circuit: Passive or mechanical elements that are far from the antenna, excitation pads, or transmission lines usually have much less impact. On the other hand, if they are close to high field density areas, even small structures can alter the result.
Nature of the material: A metallic part (perfect or good conductor) is not the same as a dielectric structure or foam-type material. Conductors tend to reflect or disturb fields, while materials with low permittivity and low loss (such as dielectric foams) may have a negligible effect.
Purpose of the simulation The level of detail required in the model depends directly on the objective of the analysis. For example, if the goal is to study the behavior of an antenna, it is probably unnecessary to model all the internal lines of the PCB or all its layers. In many cases, complex objects can be represented as equivalent metallic structures, as long as consistency with the phenomenon being studied is maintained. This simplification can drastically reduce the number of cells and make result interpretation easier.
CONCLUSION
This example has shown us how automatic meshing, although useful in many cases, can generate unnecessary refinements in areas that do not add value to the simulation. Through the use of mesh groups with local properties, we were able to regain control over the discretization process, optimizing the number of cells and improving efficiency without compromising result quality.
This approach is not limited to screws. We can apply a similar evaluation process to the rest of the model, paying attention to where small cells are being generated and whether that level of precision is truly needed in those areas. For example, in volumetric meshes, it is common to find automatic refinements around mounting holes in the PCB, curved edges, or mechanical details that do not affect electromagnetic behavior. In such cases, it may be more efficient to simplify the geometry or relax the mesh locally.
Ultimately, an efficient simulation depends not only on the solver or hardware, but also on our ability to understand which parts of the model are critical and which can be treated with less detail. Meshing, as a discretization tool, should adapt to that logic—not the other way around.
Comentarios