Skip to content

Palace driven simulation for spiral inductor with guard ring#132

Merged
vvahidd merged 1 commit into
gdsfactory:mainfrom
EpsilonForge:inductor
May 18, 2026
Merged

Palace driven simulation for spiral inductor with guard ring#132
vvahidd merged 1 commit into
gdsfactory:mainfrom
EpsilonForge:inductor

Conversation

@delficomerso
Copy link
Copy Markdown
Contributor

Overview

This notebook demonstrates a driven EM simulation of a spiral inductor
using gsim.palace with the IHP PDK. The inductor includes
a Metal1 guard ring. It follows the same conventions as the existing
example notebooks in the repository.

What this adds

  • Driven simulation setup for a spiral inductor with guard ring
  • S-parameter extraction

Work in progress

This is an initial contribution. Planned next steps:

  • Fit equivalent RLC circuit models to simulation results
  • Optimize inductor geometry for high Q factor

Notes

Feedback welcome, especially on simulation setup and port configuration.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a Jupyter notebook demonstrating 3D electromagnetic simulations of a spiral inductor with a guard ring using the Palace backend. The review identifies several technical issues: the port configuration likely lacks the necessary ground reference layer at the terminal coordinates, the guard ring dimensions result in an unintended overlap with the inductor spiral, and the mesh resolution is insufficient for the inductor's feature size, potentially compromising simulation accuracy.

Comment thread nbs/palace_inductor.ipynb
Comment on lines +147 to +152
"sim.add_port(\n",
" \"P1\", from_layer=\"metal1\", to_layer=\"topmetal2\", geometry=\"via\", excited=True\n",
")\n",
"sim.add_port(\n",
" \"P2\", from_layer=\"metal1\", to_layer=\"topmetal2\", geometry=\"via\", excited=True\n",
")\n",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The geometry="via" port configuration requires the from_layer (metal1) to be present directly beneath the to_layer (topmetal2) at the port's (x, y) coordinates to define the terminals. However, the guard ring is constructed as a peripheral frame (margin_inner = -15.0), meaning metal1 is likely missing under the inductor's ports (which are typically located towards the center of the spiral). This will prevent the port terminals from being correctly defined, likely leading to incorrect simulation results (e.g., an open circuit or missing ground reference). Consider using a solid metal1 ground plane or extending the guard ring to cover the port areas.

Comment thread nbs/palace_inductor.ipynb
Comment on lines +66 to +67
"margin_outer = 0.0\n",
"margin_inner = -15.0\n",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Setting margin_inner = -15.0 while margin_outer = 0.0 creates a guard ring that extends 15µm inside the inductor's bounding box. This causes the Metal1 ring to overlap with the TopMetal2 inductor spiral. Typically, a guard ring should be placed outside the component by using a positive margin_outer and a margin_inner that maintains a safe clearance from the inductor's edge.

Comment thread nbs/palace_inductor.ipynb
],
"source": [
"# Generate mesh (presets: \"coarse\", \"default\", \"fine\")\n",
"sim.mesh(preset=\"default\", margin=50, refined_mesh_size=1.5)"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The inductor has a width of 2µm and spacing of 2.1µm. A refined_mesh_size of 1.5µm is too coarse for these features (less than 2 elements across the width), which can lead to inaccurate EM results. As noted in the simulation output warning in the notebook, a smaller mesh size is recommended. Aim for at least 4-5 elements across the conductor width to ensure convergence.

Suggested change
"sim.mesh(preset=\"default\", margin=50, refined_mesh_size=1.5)"
sim.mesh(preset="default", margin=50, refined_mesh_size=0.4)

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.22%. Comparing base (e9e4e48) to head (36c1162).
⚠️ Report is 87 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #132      +/-   ##
==========================================
+ Coverage   46.74%   54.22%   +7.47%     
==========================================
  Files          57       58       +1     
  Lines        6197     6547     +350     
  Branches     1079     1184     +105     
==========================================
+ Hits         2897     3550     +653     
+ Misses       3003     2643     -360     
- Partials      297      354      +57     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@delficomerso delficomerso changed the title [WIP] Palace driven simulation for spiral inductor with guard ring Palace driven simulation for spiral inductor with guard ring May 14, 2026
Copy link
Copy Markdown
Contributor

@joamatab joamatab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Palace simulation for spiral inductor with guard ring

@vvahidd vvahidd merged commit f5409d5 into gdsfactory:main May 18, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants