Skip to content

update to use wave port#533

Open
FilipeFcp wants to merge 2 commits into
developfrom
filipe/UpdateTFLN
Open

update to use wave port#533
FilipeFcp wants to merge 2 commits into
developfrom
filipe/UpdateTFLN

Conversation

@FilipeFcp

@FilipeFcp FilipeFcp commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Hi all. I just updated it to use WavePort, which simplifies the workflow. @mingzhou-flex, it would be great if you could check the RF part.


Note

Low Risk
Documentation/example-only change in a Jupyter notebook; no production code paths, though RF numerics should be validated by an RF reviewer as noted in the PR.

Overview
The TFLN electro-optic modulator example (TFLNTidy3d.ipynb) replaces the manual RF CPW mode-solver setup with tidy3d.rf.WavePort, aligning the notebook with the microwave RF API.

get_sim() now defines a cross-section WavePort with MicrowaveModeSpec and AutoImpedanceSpec, so voltage/current integration paths and characteristic impedance are inferred from conductors on the port plane instead of being configured by hand. The RF ModeSimulation is built via wave_port.to_mode_simulation(), and the function returns sim_vpi, mzm_solver, and wave_port for downstream use and visualization.

Narrative and plotting are updated to document WavePort and overlay the port plane on the CPW cross-section; parameter sweeps still key off the mode solver produced from the port.

Reviewed by Cursor Bugbot for commit 1eaf163. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Spell Check Report

TFLNTidy3d.ipynb:

Cell 3, Line 13: 'staircasing'
  > # Use permittivity staircasing for local epsilon queries
Cell 15, Line 73: 'AutoImpedanceSpec'
  > # The WavePort solves the CPW mode and, with an AutoImpedanceSpec, automatically
Cell 38, Line 1: 'voltage-dependent'
  > Next, we run the voltage-dependent mode simulations with `web.run`.

Checked 1 notebook(s). Found spelling errors in 1 file(s).
Generated by GitHub Action run: https://github.com/flexcompute/tidy3d-notebooks/actions/runs/28389259268

@alec-flexcompute alec-flexcompute left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good @FilipeFcp - however I'm not too experienced with Waveport, so I'm interested to hear @mingzhou-flex's feedback

@mingzhou-flex

Copy link
Copy Markdown
Contributor

Looks good to me. I only have one minor comment for the in-line comments above the definition of WavePort.

In general, the size of the port only needs to cover both the signal and ground electrodes plus a bit of space around them where the fields die off, and the boundary has to intersect with some conductors for AutoImpedance to work. Given that, I think it is better to explain the choise of port size, rather than directly set it to sim_vpi.size[1/2]. Setting it to sim_vpi.size[1/2] works here becasue the groun electrodes extend all the way to the boundary of the simulation.

@FilipeFcp

Copy link
Copy Markdown
Contributor Author

Thanks @mingzhou-flex.
Can you clarify if this is what you mean:

image

@mingzhou-flex

Copy link
Copy Markdown
Contributor

Yes.

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.

4 participants