Skip to content

Commit b2458d6

Browse files
committed
refactor mode spec to inheritance
refactor impedance results into MicrowaveModeData and associated classes refactor monitors in progress finishing monitor/data refactor fix changelog improve coverage changelog and migration guide update
1 parent 74dc7ea commit b2458d6

36 files changed

+2695
-658
lines changed

CHANGELOG.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010

1111
### Added
1212
- Added support for `tidy3d-extras`, an optional plugin that enables more accurate local mode solving via subpixel averaging.
13+
- Added `MicrowaveModeSpec` for RF-specific mode information with customizable characteristic impedance calculations through `ImpedanceSpec`.
14+
- Added `MicrowaveModeMonitor` and `MicrowaveModeSolverMonitor` for microwave and RF mode analysis with transmission line data.
15+
- Added `MicrowaveModeData` and `MicrowaveModeSolverData` extending mode solver results with characteristic impedance, voltage coefficients, and current coefficients.
16+
- Added `AutoImpedanceSpec` for automatic transmission line impedance calculation based on simulation geometry.
17+
- Added `CustomImpedanceSpec` for user-defined voltage and current path specifications in impedance calculations.
18+
- Added voltage integral specification classes: `AxisAlignedVoltageIntegralSpec` and `Custom2DVoltageIntegralSpec`.
19+
- Added current integral specification classes: `AxisAlignedCurrentIntegralSpec`, `CompositeCurrentIntegralSpec`, and `Custom2DCurrentIntegralSpec`.
1320

1421
### Changed
1522
- Improved performance of antenna metrics calculation by utilizing cached wave amplitude calculations instead of recomputing wave amplitudes for each port excitation in the `TerminalComponentModelerData`.
23+
- All RF and microwave specific components now inherit from `MicrowaveBaseModel`.
24+
- **[BREAKING]** Renamed path integral classes in `tidy3d.plugins.microwave` for improved consistency. Please see our migration guide for details on updating your code.
25+
- `VoltageIntegralAxisAligned``AxisAlignedVoltageIntegral`
26+
- `CurrentIntegralAxisAligned``AxisAlignedCurrentIntegral`
27+
- `CustomPathIntegral2D``Custom2DPathIntegral`
28+
- `CustomVoltageIntegral2D``Custom2DVoltageIntegral`
29+
- `CustomCurrentIntegral2D``Custom2DCurrentIntegral`
1630

1731
### Fixed
1832
- More robust `Sellmeier` and `Debye` material model, and prevent very large pole parameters in `PoleResidue` material model.
@@ -28,14 +42,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2842
- A new type of doping box has been introduced, `CustomDoping` which accepts a `SpatialDataArray` to define doping concentration. Unlike in the case where a `SpatialDataArray`, custom doping defined with `CustomDoping` have additive behavior, i.e., one can add other doping on top. This deprecates the `SpatialDataArray` as direct input for `N_a` and `N_d`.
2943
- Non-isothermal Charge simulations are now available. One can now run this type of simulations by using the `SteadyChargeDCAnalysis` as the `analysis_spec` of a `HeatChargeSimulation`. This type of simulations couple the heat equation with the drift-diffusion equations which allow to account for self heating behavior.
3044
- Because non-isothermal Charge simulations are now supported, new models for the effective density of states and bandgap energy have been introduced. These models are the following: `ConstantEffectiveDOS`, `IsotropicEffectiveDOS`, `MultiValleyEffectiveDOS`, `DualValleyEffectiveDOS`.
31-
- Added `MicrowaveModeSpec` for RF-specific mode information with customizable characteristic impedance calculations through `ImpedanceSpec`.
3245

3346
### Changed
3447
- `LayerRefinementSpec` defaults to assuming structures made of different materials are interior-disjoint for more efficient mesh generation.
3548
- Removal of the Adjoint plugin.
3649
- Deprecation of Python 3.9 support.
37-
- Removal of the Adjoint plugin.
38-
- All RF and microwave specific components now inherit from `MicrowaveBaseModel`.
3950

4051
### Fixed
4152
- Stricter validation for `bend_radius` in mode simulations, preventing the bend center from coinciding with the simulation boundary.

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. This guide helps you update your scripts to use the new class names.
7+
8+
Key Changes
9+
~~~~~~~~~~~
10+
11+
* **Renamed Classes**: Path integral classes have been renamed to follow a consistent naming pattern.
12+
* **Exports**: All renamed classes are exported from ``tidy3d.plugins.microwave`` - no import path changes needed.
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.plugins.microwave 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.plugins.microwave 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 have changed. Simply update your imports and class names according to the table above, and your code will work with v2.10.

0 commit comments

Comments
 (0)