Skip to content

improve support for lossy transmission lines and complex reference impedances #2650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: dmarek/rf-dev
Choose a base branch
from

Conversation

dmarek-flex
Copy link
Contributor

@dmarek-flex dmarek-flex commented Jul 10, 2025

$Z_{ref}$ is now $Z_{L}^{*}$ where $Z_{L}^{*}$ would be the lumped port load impedance or the characteristic impedance of a transmission line mode in a WavePort.

We stick with using the unconjugated value for reference impedance, but now we switch our default approach for extracting S parameters to the pseudo-wave formulation.

Also includes a fix for calculating voltage from current + flux as well as calculating current from voltage + flux, when modes are lossy.

We are still missing proper calculation of mode amps using the non conjugated version of the dot product for lossy modes.
Completed

backend: https://github.com/flexcompute/compute/pull/2171

Greptile Summary

Improved handling of lossy modes in WavePort by updating reference impedance calculations and fixing voltage/current computations for transmission line modes.

  • Changed reference impedance in tidy3d/plugins/smatrix/component_modelers/terminal.py to use complex conjugate of load impedance (Z_L*) for power wave calculations
  • Fixed voltage/current calculations in tidy3d/plugins/smatrix/ports/wave.py to properly handle directionality and complex flux values for lossy modes
  • Updated port_reference_impedances method in TerminalComponentModeler to align with Pozar's Microwave Engineering theoretical framework

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

LGTM

3 files reviewed, no comments
Edit PR Review Bot Settings | Greptile

@dmarek-flex dmarek-flex self-assigned this Jul 10, 2025
@dmarek-flex dmarek-flex force-pushed the dmarek/fix-waveports-with-lossy-modes branch from 94e2936 to 5caee13 Compare July 28, 2025 15:39
@dmarek-flex dmarek-flex added the RF label Jul 28, 2025
Copy link
Contributor

github-actions bot commented Jul 28, 2025

Diff Coverage

Diff: origin/develop...HEAD, staged and unstaged changes

  • tidy3d/components/monitor.py (100%)
  • tidy3d/components/simulation.py (100%)
  • tidy3d/plugins/smatrix/component_modelers/base.py (100%)
  • tidy3d/plugins/smatrix/component_modelers/modal.py (100%)
  • tidy3d/plugins/smatrix/component_modelers/terminal.py (100%)
  • tidy3d/plugins/smatrix/ports/wave.py (100%)

Summary

  • Total: 180 lines
  • Missing: 0 lines
  • Coverage: 100%

@dmarek-flex dmarek-flex changed the title fixed handling of lossy modes in WavePort improve support for lossy transmission lines and complex reference impedances Jul 30, 2025
@dmarek-flex dmarek-flex force-pushed the dmarek/fix-waveports-with-lossy-modes branch from 1566a98 to 5825d9c Compare August 1, 2025 13:19
support both pseudo and power wave formulations, while defaulting to pseudo wave definition

support non-conjugated dot product
@dmarek-flex dmarek-flex force-pushed the dmarek/fix-waveports-with-lossy-modes branch from 5825d9c to 86b866d Compare August 1, 2025 14:24
@dmarek-flex dmarek-flex changed the base branch from develop to dmarek/rf-dev August 1, 2025 14:24
"reflections from simulation boundaries. ",
)

S_def: SDef = pd.Field(
Copy link
Collaborator

Choose a reason for hiding this comment

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

trying to compare the following terminologies for the field name: wave_choice, basis_choice, s_param_def, and the current one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants