Description
While generating meshes and running simulations to obtain S-parameters for different IHP components from gdsfactory/IHP (specifically IHP/ihp/cells), we encountered several bugs.
Reproducible notebooks containing the meshes, errors, and preliminary S-parameter calculations can be found in the s_parameters branch of EpsilonForge/gsim under nbs/IHP_components/.
Bug 1: Mesh fails for cmim and rfcmim with planar_conductors=False
Calling:
sim.mesh(preset="graded", margin=1.0, refined_mesh_size=0.2, planar_conductors=False)
fails for the cmim and rfcmim components. The workaround was to use planar_conductors=True, which allows the mesh to complete, but at the cost of losing information about the real complex layered structure of these components.
References:
Bug 2: Unexpected dimensions in mesh output (Z or XY axes)
In some components, the reported mesh dimensions are larger than expected — either along the Z axis or in XY. Examples:
The margin=1.0 workaround does not fully resolve the root cause for all components.
Bug 3: Simulation fails without margin=1.0 on inductor2 and inductor3
For inductor2 and inductor3, the simulation fails to run unless margin=1.0 is set. We suspect this is related to port positioning — without enough margin, the ports may not have sufficient space to be correctly placed.
A potential fix could be adding an offset parameter to add_port, similar to the existing behavior in add_cpw_ports.
Bug 4: Disconnected mesh on inductor3
The mesh generated for inductor3 appears visually disconnected — the conductor segments look separated rather than forming a continuous structure, as seen in the image below. This suggests the meshing is not correctly joining the geometry across the component.
For the placement — I'd edit the original issue and add it as Bug 5 there, since it's a new bug report rather than an update on an existing one. New bugs belong in the issue body alongside the others for visibility, while comments are better for progress updates on existing bugs.
Here's the text to add as Bug 5:
Bug 5: Mesh fails for rhigh, rppd, and rsil
Same class of issue as Bug 1 — marker and process layers being extruded as 3D volumes cause Gmsh to fail during boolean fragmentation.
rhigh
Removing HeatResdrawing, GatPolydrawing, and Contdrawing is necessary, otherwise mesh generation produces:
Conductor volume 1 on poly invalidated by dedup
Conductor volume 2 on poly invalidated by dedup
Conductor volume 4 on heatres invalidated by dedup
Error : Invalid boundary mesh (overlapping facets) on surface 29 surface 93
rsil
Same error with different surface indices:
Conductor volume 1 on poly invalidated by dedup
Conductor volume 2 on poly invalidated by dedup
Conductor volume 4 on heatres invalidated by dedup
Error : Invalid boundary mesh (overlapping facets) on surface 36 surface 93
As with Bug 1, the manual layer filtering workaround allows the mesh to complete, but produces lacking meshes with inflated XY dimensions (related to Bug 2), for example for rhigh:
References:
Description
While generating meshes and running simulations to obtain S-parameters for different IHP components from
gdsfactory/IHP(specificallyIHP/ihp/cells), we encountered several bugs.Reproducible notebooks containing the meshes, errors, and preliminary S-parameter calculations can be found in the
s_parametersbranch ofEpsilonForge/gsimundernbs/IHP_components/.Bug 1: Mesh fails for
cmimandrfcmimwithplanar_conductors=FalseCalling:
fails for the
cmimandrfcmimcomponents. The workaround was to useplanar_conductors=True, which allows the mesh to complete, but at the cost of losing information about the real complex layered structure of these components.References:
nbs/IHP_components/mesh_cmim.ipynbnbs/IHP_components/mesh_rfcmim.ipynbBug 2: Unexpected dimensions in mesh output (Z or XY axes)
In some components, the reported mesh dimensions are larger than expected — either along the Z axis or in XY. Examples:
cmim:Dimensions: 9.9 x 9.9 x 23.3 µm— seemesh_cmim.ipynbcmom:Dimensions: 2.7 x 8.1 x 17.8 µm— seemesh_cmom.ipynbinductor2andinductor3: XY dimension issue, partially mitigated by settingmargin=1.0— seemesh_inductor2.ipynbandmesh_inductor3.ipynbThe
margin=1.0workaround does not fully resolve the root cause for all components.Bug 3: Simulation fails without
margin=1.0oninductor2andinductor3For
inductor2andinductor3, the simulation fails to run unlessmargin=1.0is set. We suspect this is related to port positioning — without enough margin, the ports may not have sufficient space to be correctly placed.A potential fix could be adding an
offsetparameter toadd_port, similar to the existing behavior inadd_cpw_ports.Bug 4: Disconnected mesh on
inductor3The mesh generated for
inductor3appears visually disconnected — the conductor segments look separated rather than forming a continuous structure, as seen in the image below. This suggests the meshing is not correctly joining the geometry across the component.For the placement — I'd edit the original issue and add it as Bug 5 there, since it's a new bug report rather than an update on an existing one. New bugs belong in the issue body alongside the others for visibility, while comments are better for progress updates on existing bugs.
Here's the text to add as Bug 5:
Bug 5: Mesh fails for
rhigh,rppd, andrsilSame class of issue as Bug 1 — marker and process layers being extruded as 3D volumes cause Gmsh to fail during boolean fragmentation.
rhighRemoving
HeatResdrawing,GatPolydrawing, andContdrawingis necessary, otherwise mesh generation produces:rsilSame error with different surface indices:
As with Bug 1, the manual layer filtering workaround allows the mesh to complete, but produces lacking meshes with inflated XY dimensions (related to Bug 2), for example for
rhigh:References:
nbs/IHP_components/mesh_rhigh.ipynbnbs/IHP_components/mesh_rppd.ipynbnbs/IHP_components/mesh_rsil.ipynb