Manual meshing tips & tricks
When you reach the meshing stage in Cenos for the first time, you will encounter a window that looks like this:
- You can either generate the mesh automatically, review it to determine if it meets your requirements, and then make manual adjustments as needed.
- Alternatively, you can enable Mesh Refinements beforehand to customize the mesh parameters prior to generation. However, we recommend starting with an automatically generated mesh and then refining it as needed.
Manual refinements overview
For the purpose of example on how to adjust the mesh manually we will start with automatic mesh generation. When it is done, you will see the total element count and element count in each domain.
Manual meshing for a specific domain
To refine the mesh for a specific domain, click on the domain to open a dedicated window for mesh adjustments. For instance, selecting the workpiece will open the Workpiece meshing window, where you can tailor the mesh settings for that region.
When refining the mesh of a specific domain, you have access to several tools and customization options to optimize the mesh for your requirements.
Element edge length adjustment:
Allows you to set a constraint on the element edge lengths within the selected domain.
- This ensures uniformity or precision in specific regions by defining a maximum or desired edge length for the elements
Skin-layer adjustments:
- Total thickness of skin depth: Modify the thickness of the layer near surfaces to better capture gradients.
- Number of skin layers: Control the number of layers within the skin region.
- Stretch factor: Adjust the growth rate of elements within the skin-layer.
- Generate skin-layers (option to disable): While possible, turning off skin-layers may lead to incorrect or less accurate results.
Face or Edge Refinements:
Fine-tune the mesh on specific faces or edges within the domain for increased resolution.
- Useful for areas of high gradient or regions requiring greater precision.
Global mesh parameters
You can also modify global mesh parameters, which will apply to all domains. These settings are located under the “More properties here” section at the bottom of the meshing window.
Volume and Surface gradients
Volume and surface gradients control the rate of transition from smaller to larger elements in the mesh.
- Lower Gradient Values: Result in a more uniform mesh with less variation in element size but generally lead to a denser mesh. This is useful for improving accuracy in regions where high precision is required.
- Higher Gradient Values: Allow for a coarser mesh with fewer elements by permitting greater variation in element size. This can optimize computational resources and reduce simulation time.
Curvature safety
For geometries with curved features (e.g., round-profile inductors, workpieces), adjusting the curvature safety parameter can be helpful:
- Increase Curvature Safety: Improves mesh resolution for domains with rounded shapes, ensuring better accuracy in capturing curvature details. This is useful if the current mesh appears insufficiently refined in curved areas.
- Decrease Curvature Safety: Reduces mesh density in curved regions, optimizing element count and computational efficiency if the mesh is unnecessarily dense.
This adjustment ensures the mesh is appropriately refined to balance accuracy and resource use in curved geometries.
Tips and tricks
In some cases, an automatically generated mesh may be excessively dense, making it impractical due to high computational resource demands. Here are steps you can take to reduce the mesh element count effectively:
- Adjust the Volume Gradient:
- Start by increasing the volume gradient from the default value of 0.4 to 0.8. Find how to do it here.
- This reduces overall mesh density while maintaining reasonable accuracy.
- Refine the Curvature Safety:
- Lower the curvature safety from 2.0 to 1.5, or try even smaller values like 1.1. Find how to do it here.
- This reduces the mesh resolution around curved geometries and helps minimize the element count further.
- Regenerate the Mesh:
- After making these adjustments, regenerate the mesh to evaluate the impact of the changes.
- Review Domains with Skin Layers:
- Domains with skin layers often contribute significantly to the total element count.
- If your simulation uses materials with an enabled B-H curve, Cenos typically generates 10 skin layers by default. However, this can often be reduced.
- Recalculate the Minimal Skin Layer Depth:
Use an online skin depth calculator to determine the required depth for resolving the layer. Input the material’s highest conductivity (typically at 20°C) and the highest frequency in your simulation.- Adjust the skin depth to this calculated value.
- Reduce the number of skin layers to 4-7 instead of the default 10. Find how to do it here.
- Iterate: You may need to regenerate the mesh multiple times to find the optimal balance of skin layer parameters.
- Increase the Element Edge Length in Select Domains:
- For domains where high precision is less critical (e.g., inductors), increase the element edge length. Find how to do it here.
- Inductor domains typically only require fine resolution at the surface, where the highest current densities occur. Larger elements can be used in the volumetric regions to reduce the mesh size further.