Skip to content

Commit 86b4292

Browse files
committed
feat(rf): add a MicrowaveModeSpec for RF specific mode information
add a ImpedanceSpec for controlling how characteristic impedance is calculated from modes add MicrowaveModeMonitor and MicrowaveModeSolverMonitor that accepts the new MicrowaveModeSpec BREAKING CHANGE: changed path integral class names in plugins/microwave
1 parent 707496a commit 86b4292

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+14599
-7853
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Added support for `tidy3d-extras`, an optional plugin that enables more accurate local mode solving via subpixel averaging.
1313
- Added support for `symlog` and `log` scale plotting in `Scene.plot_eps()` and `Scene.plot_structures_property()` methods. The `symlog` scale provides linear behavior near zero and logarithmic behavior elsewhere, while 'log' is a base 10 logarithmic scale.
1414
- Added `LowFrequencySmoothingSpec` and `ModelerLowFrequencySmoothingSpec` for automatic smoothing of mode monitor data at low frequencies where DFT sampling is insufficient.
15+
- Added `MicrowaveModeSpec` for RF-specific mode information with customizable characteristic impedance calculations.
16+
- Added `MicrowaveModeMonitor` and `MicrowaveModeSolverMonitor` for microwave and RF mode analysis with transmission line data.
17+
- Added `MicrowaveModeData` and `MicrowaveModeSolverData` extending mode solver results with characteristic impedance, voltage coefficients, and current coefficients.
18+
- Added `AutoImpedanceSpec` for automatic transmission line impedance calculation based on simulation geometry.
19+
- Added `CustomImpedanceSpec` for user-defined voltage and current path specifications in impedance calculations.
20+
- Added voltage integral specification classes: `AxisAlignedVoltageIntegralSpec` and `Custom2DVoltageIntegralSpec`.
21+
- Added current integral specification classes: `AxisAlignedCurrentIntegralSpec`, `CompositeCurrentIntegralSpec`, and `Custom2DCurrentIntegralSpec`.
1522

1623
### Changed
1724
- Improved performance of antenna metrics calculation by utilizing cached wave amplitude calculations instead of recomputing wave amplitudes for each port excitation in the `TerminalComponentModelerData`.
1825
- Changed hashing method in `Tidy3dBaseModel` from sha256 to md5.
1926
- Allowing for more geometries in a ClipOperation geometry.
2027
- Improved the speed of computing `Box` shape derivatives when used inside a `GeometryGroup`.
28+
- All RF and microwave specific components now inherit from `MicrowaveBaseModel`.
29+
- **[BREAKING]** Renamed path integral classes in `tidy3d.plugins.microwave` for improved consistency. Please see our migration guide for details on updating your code.
30+
- `VoltageIntegralAxisAligned``AxisAlignedVoltageIntegral`
31+
- `CurrentIntegralAxisAligned``AxisAlignedCurrentIntegral`
32+
- `CustomPathIntegral2D``Custom2DPathIntegral`
33+
- `CustomVoltageIntegral2D``Custom2DVoltageIntegral`
34+
- `CustomCurrentIntegral2D``Custom2DCurrentIntegral`
35+
- Path integral and impedance calculator classes have been refactored and moved from `tidy3d.plugins.microwave` to `tidy3d.components.microwave`. They are now publicly exported via the top-level package `__init__.py`, so you can import them directly, e.g. `from tidy3d import ImpedanceCalculator, AxisAlignedVoltageIntegral, AxisAlignedCurrentIntegral, Custom2DVoltageIntegral, Custom2DCurrentIntegral, Custom2DPathIntegral`.
2136

2237
### Fixed
2338
- More robust `Sellmeier` and `Debye` material model, and prevent very large pole parameters in `PoleResidue` material model.

docs/api/microwave/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ Overview
88

99
RF simulations will be subject to new license requirements in the future.
1010

11+
.. warning::
12+
13+
Breaking changes were introduced in ``v2.10.0``, please see the migration guide for help migrating your code.
14+
15+
+ `Migration Guide <microwave_migration.html>`_
16+
1117
This page consolidates Tidy3D features related to microwave and RF simulation. While microwave/RF and optical simulations have many properties in common, there are some differences in the typical RF user workflow that deserve special consideration.
1218

1319
The following sections discuss:
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
.. _microwave_migration:
2+
3+
v2.10 Refactor Migration
4+
-------------------------
5+
6+
In version ``v2.10.0``, microwave plugin path integral classes were renamed for improved consistency and clarity. Additionally, these classes (and the impedance calculator) were refactored out of the plugin and moved into ``tidy3d.components.microwave`` and re-exported at the top-level package for convenience. This guide helps you update your scripts to use the new class names and imports.
7+
8+
Key Changes
9+
~~~~~~~~~~~
10+
11+
* **Renamed Classes**: Path integral classes have been renamed to follow a consistent naming pattern.
12+
* **New Import Path (simplified)**: The path integral classes and impedance calculator are now exported at the top level. Prefer importing directly from ``tidy3d`` (e.g., ``from tidy3d import AxisAlignedVoltageIntegral, ImpedanceCalculator``). Existing plugin imports continue to work for backwards compatibility where applicable.
13+
14+
Class Name Changes
15+
~~~~~~~~~~~~~~~~~~
16+
17+
The following classes have been renamed for consistency:
18+
19+
**Voltage Integrals:**
20+
21+
* ``VoltageIntegralAxisAligned`` → ``AxisAlignedVoltageIntegral``
22+
* ``CustomVoltageIntegral2D`` → ``Custom2DVoltageIntegral``
23+
24+
**Current Integrals:**
25+
26+
* ``CurrentIntegralAxisAligned`` → ``AxisAlignedCurrentIntegral``
27+
* ``CustomCurrentIntegral2D`` → ``Custom2DCurrentIntegral``
28+
29+
**Path Integrals:**
30+
31+
* ``CustomPathIntegral2D`` → ``Custom2DPathIntegral``
32+
33+
Migration Examples
34+
~~~~~~~~~~~~~~~~~~
35+
36+
**Before (v2.9.x):**
37+
38+
.. code-block:: python
39+
40+
from tidy3d.plugins.microwave import (
41+
VoltageIntegralAxisAligned,
42+
CurrentIntegralAxisAligned,
43+
)
44+
45+
voltage_path = VoltageIntegralAxisAligned(
46+
center=(0, 0, 0),
47+
size=(0, 0, 1),
48+
sign="+",
49+
)
50+
51+
current_path = CurrentIntegralAxisAligned(
52+
center=(0, 0, 0),
53+
size=(2, 1, 0),
54+
sign="+",
55+
)
56+
57+
**After (v2.10+):**
58+
59+
.. code-block:: python
60+
61+
from tidy3d import (
62+
AxisAlignedVoltageIntegral,
63+
AxisAlignedCurrentIntegral,
64+
)
65+
66+
voltage_path = AxisAlignedVoltageIntegral(
67+
center=(0, 0, 0),
68+
size=(0, 0, 1),
69+
sign="+",
70+
)
71+
72+
current_path = AxisAlignedCurrentIntegral(
73+
center=(0, 0, 0),
74+
size=(2, 1, 0),
75+
sign="+",
76+
)
77+
78+
Custom 2D Path Integrals
79+
~~~~~~~~~~~~~~~~~~~~~~~~~
80+
81+
**Before:**
82+
83+
.. code-block:: python
84+
85+
from tidy3d.plugins.microwave import (
86+
CustomVoltageIntegral2D,
87+
CustomCurrentIntegral2D,
88+
)
89+
90+
vertices = [[0, 0], [1, 0], [1, 1], [0, 1]]
91+
92+
voltage_path = CustomVoltageIntegral2D(
93+
axis=2,
94+
position=0.0,
95+
vertices=vertices,
96+
)
97+
98+
current_path = CustomCurrentIntegral2D(
99+
axis=2,
100+
position=0.0,
101+
vertices=vertices,
102+
)
103+
104+
**After:**
105+
106+
.. code-block:: python
107+
108+
from tidy3d import (
109+
Custom2DVoltageIntegral,
110+
Custom2DCurrentIntegral,
111+
)
112+
113+
vertices = [[0, 0], [1, 0], [1, 1], [0, 1]]
114+
115+
voltage_path = Custom2DVoltageIntegral(
116+
axis=2,
117+
position=0.0,
118+
vertices=vertices,
119+
)
120+
121+
current_path = Custom2DCurrentIntegral(
122+
axis=2,
123+
position=0.0,
124+
vertices=vertices,
125+
)
126+
127+
Summary
128+
~~~~~~~
129+
130+
All functionality remains the same—only class names and preferred import paths have changed. Update your imports to the top level (``from tidy3d import ...``) and class names according to the table above, and your code will work with v2.10. For impedance calculations, import ``ImpedanceCalculator`` directly via ``from tidy3d import ImpedanceCalculator``.

docs/api/microwave/ports/wave.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,27 +46,27 @@ If it is desired to only solve for the 2D port mode, one can use the ``to_mode_s
4646
:toctree: ../_autosummary/
4747
:template: module.rst
4848

49-
tidy3d.plugins.microwave.VoltageIntegralAxisAligned
50-
tidy3d.plugins.microwave.CurrentIntegralAxisAligned
51-
tidy3d.plugins.microwave.CustomVoltageIntegral2D
52-
tidy3d.plugins.microwave.CustomCurrentIntegral2D
49+
tidy3d.plugins.microwave.AxisAlignedVoltageIntegral
50+
tidy3d.plugins.microwave.AxisAlignedCurrentIntegral
51+
tidy3d.plugins.microwave.Custom2DVoltageIntegral
52+
tidy3d.plugins.microwave.Custom2DCurrentIntegral
5353
tidy3d.plugins.microwave.AxisAlignedPathIntegral
54-
tidy3d.plugins.microwave.CustomPathIntegral2D
54+
tidy3d.plugins.microwave.Custom2DPathIntegral
5555
tidy3d.plugins.microwave.ImpedanceCalculator
5656

5757
The classes above are used to define the voltage/current integration paths for impedance calculation.
5858

5959
.. code-block:: python
6060
6161
# Define voltage integration line
62-
my_voltage_integral = VoltageIntegralAxisAligned(
62+
my_voltage_integral = AxisAlignedVoltageIntegral(
6363
center=(0,0,0), # center of integration line
6464
size=(5, 0, 0), # length of integration line
6565
sign='+', # sign of integral
6666
)
6767
6868
# Define current integration loop
69-
my_current_integral = CurrentIntegralAxisAligned(
69+
my_current_integral = AxisAlignedCurrentIntegral(
7070
center=(0,0,0), # center of integration loop
7171
size=(20, 20, 0), # size of integration loop
7272
sign='+', # sign of integral (should match wave port direction)

docs/api/plugins/microwave.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ Microwave
1313
:template: module.rst
1414

1515
tidy3d.plugins.microwave.AxisAlignedPathIntegral
16-
tidy3d.plugins.microwave.VoltageIntegralAxisAligned
17-
tidy3d.plugins.microwave.CurrentIntegralAxisAligned
18-
tidy3d.plugins.microwave.CustomPathIntegral2D
19-
tidy3d.plugins.microwave.CustomVoltageIntegral2D
20-
tidy3d.plugins.microwave.CustomCurrentIntegral2D
16+
tidy3d.plugins.microwave.AxisAlignedVoltageIntegral
17+
tidy3d.plugins.microwave.AxisAlignedCurrentIntegral
18+
tidy3d.plugins.microwave.Custom2DPathIntegral
19+
tidy3d.plugins.microwave.Custom2DVoltageIntegral
20+
tidy3d.plugins.microwave.Custom2DCurrentIntegral
2121
tidy3d.plugins.microwave.ImpedanceCalculator
2222
tidy3d.plugins.microwave.RectangularAntennaArrayCalculator
2323
tidy3d.plugins.microwave.LobeMeasurer

0 commit comments

Comments
 (0)