Skip to content

[WIP] 2D TW-MZM cross-section with PN junction and CPW electrodes - #193

Open
mdmaas wants to merge 5 commits into
gdsfactory:mainfrom
EpsilonForge:2d_twmzm
Open

[WIP] 2D TW-MZM cross-section with PN junction and CPW electrodes#193
mdmaas wants to merge 5 commits into
gdsfactory:mainfrom
EpsilonForge:2d_twmzm

Conversation

@mdmaas

@mdmaas mdmaas commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

2D travelling-wave Mach-Zehnder modulator (TW-MZM) cross-section for Palace BoundaryMode analysis (RF + optical), with a PN junction modelled as doped semiconductors (finite Drude conductivity) and CPW electrodes.

Commits (history rebased from 23 to 4)

  1. feat: TW-MZM cross-section with PN junction, CPW electrodes, and graded doping
    Initial cross-section build, doping gradient/vias, native 2D BoundaryMode mesh fixes.
  2. feat: rewrite plot_fields_2d on PyVista with zoom, physical-group filtering, and per-face colors
    Self-contained visualization rework of the 2D field renderer.
  3. feat: generic cross-section assembly, impedance boundary API, and lumped PN capacitance
    build_doped_cross_section(), make_doping_profile(), plot_plane_section(), ImpedanceBoundaryConfig, PN junction lumped capacitance, palace-cpu bump.
  4. fix: align tests and CI with changed APIs and defaults
    Apptainer default, plot_fields_2d return type, Palace parallel defaults, ty/ruff cleanups.

Scope

  • 29 files changed: ~17 source, 8 tests, notebook + jupytext pair, pyproject.toml.
  • New notebook nbs/palace_2d_twmzm.ipynb: simplified TW-MZM cross-section (SOI rib, 400 nm / 90 nm slab, CPW signal 20 um / gap 20 um / ground 40 um), 50 GHz RF + 1550 nm optical BoundaryModeSim runs.
  • Doping regions modelled as semiconductors with finite Drude conductivity; graded N+/P+ contact profiles via make_doping_profile().
  • Fix: emit Conductivity entry for shaped dielectrics with finite sigma.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 64.65863% with 264 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.61%. Comparing base (d7a2ef6) to head (9e1c9e4).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/gsim/palace/base.py 49.55% 50 Missing and 7 partials ⚠️
src/gsim/palace/field_viz.py 35.06% 45 Missing and 5 partials ⚠️
src/gsim/palace/mesh/config_generator.py 18.18% 42 Missing and 3 partials ⚠️
src/gsim/palace/mesh/generator.py 58.49% 34 Missing and 10 partials ⚠️
src/gsim/viz.py 85.41% 23 Missing and 5 partials ⚠️
src/gsim/common/cross_section.py 58.13% 15 Missing and 3 partials ⚠️
src/gsim/palace/models/ports.py 55.00% 9 Missing ⚠️
src/gsim/palace/runtime.py 10.00% 9 Missing ⚠️
src/gsim/palace/plane_section.py 93.93% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #193      +/-   ##
==========================================
+ Coverage   57.19%   57.61%   +0.41%     
==========================================
  Files          69       71       +2     
  Lines       11506    12180     +674     
  Branches     2395     2531     +136     
==========================================
+ Hits         6581     7017     +436     
- Misses       4194     4405     +211     
- Partials      731      758      +27     

☔ View full report in Codecov by Harness.
📢 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.

@mdmaas

mdmaas commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

I think the geometry is looking reasonable. This is the overall structure for the RF simulation:

twmzm_mesh

and zooming in to the region below the electrodes is the optical rib waveguide:

twmzm_zoom

…l override

- interactive param is tri-state (None/True/False): explicit True forces a live
  view, False forces static, None follows set_interactive_mode (off by default)
- notebook live views render as one widget per plot on the single shared trame
  server (server-side by default; GSIM_TRAME_BACKEND / set_trame_backend to
  switch to client-side vtk.js)
- keep live plotters in a registry (interactive_views/close_interactive_views/
  close_interactive_view) so multiple views coexist without concurrent servers
- front-facing camera for plot_mesh on planar meshes; plot_fields_2d camera
  preserved through the interactive path
- fall back to a static image if a trame widget cannot be created
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.

1 participant