Skip to content

Commit 3594cef

Browse files
more docstrings and changelog
1 parent 935ddd4 commit 3594cef

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Added KLayout plugin, with DRC functionality for running design rule checks in `plugins.klayout.drc`. Supports running DRC on GDS files as well as `Geometry`, `Structure`, and `Simulation` objects.
1313
- Added "mil" and "in" (inch) units to `plot_length_units`.
1414
- Objective functions that involve running `tidy3d.plugins.smatrix.ComponentModeler` can be differentiated with autograd.
15+
- Access field decay values in `SimulationData` via `sim_data.field_decay` as `TimeDataArray`.
16+
- Added ability to set first-order absorbing boundary conditions on simulation domain boundaries using either `ABCBoundary` or `ModeABCBoundary` classes.
17+
- Added `frame` field to `ModeSource` (default: `None`) and `WavePort` (default: `PECFrame()`). Setting this to `PECFrame(length=...)` automatically places a thin PEC frame of specified length around the source/port. The automatically created frames can be inspected using `Simulation._finalized` property.
18+
- Added `InternalAbsorber` class for placing first-order absorbing boundary conditions on planes inside the simulation domain. Internal absorbers are automatically wrapped in a PEC frame with a backing PEC plate on the non-absorbing side.
19+
- Added `absorber` field (default: `True`) to `WavePort` for automatically placing an absorber behind the port.
20+
- Added `conjugated_dot_product` field in `ModeMonitor` (default: `True`) and `WavePort` (default: `False`) to allow selecting the conjugated or non-conjugated dot product for mode decomposition.
1521

1622
### Changed
1723
- Validate mode solver object for large number of grid points on the modal plane.

tidy3d/components/boundary.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@ def from_monitor(
233233

234234

235235
class InternalAbsorber(Box):
236-
"""Internally placed plane with one-way wave equation boundary conditions for absorption of electromagnetic waves."""
236+
"""Internally placed plane with one-way wave equation boundary conditions for absorption of electromagnetic waves.
237+
Note that internal absorbers are automatically wrapped in a PEC frame with a backing PEC plate on the non-absorbing side.
238+
"""
237239

238240
direction: Direction = pd.Field(
239241
...,

tidy3d/components/simulation.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,8 @@ class AbstractYeeGridSimulation(AbstractSimulation, ABC):
368368
internal_absorbers: tuple[InternalAbsorber, ...] = pydantic.Field(
369369
(),
370370
title="Internal Absorbers",
371-
description="Planes with the first order absorbing boundary conditions placed inside the computational domain.",
371+
description="Planes with the first order absorbing boundary conditions placed inside the computational domain. "
372+
"Note that internal absorbers are automatically wrapped in a PEC frame with a backing PEC plate on the non-absorbing side.",
372373
)
373374

374375
@pydantic.validator("simulation_type", always=True)
@@ -5633,7 +5634,10 @@ def from_scene(cls, scene: Scene, **kwargs) -> Simulation:
56335634
_boundaries_for_zero_dims = validate_boundaries_for_zero_dims()
56345635

56355636
def _make_pec_frame(self, obj: Union[ModeSource, InternalAbsorber]) -> Structure:
5636-
"""Make a pec frame around a mode source."""
5637+
"""Make a pec frame around a mode source or an internal absorber. For mode sources,
5638+
the frame is added around the injection plane. For internal absorbers, a backing pec
5639+
plate is also added on the non-absorbing side.
5640+
"""
56375641
span_inds = np.array(self.grid.discretize_inds(obj))
56385642

56395643
coords = self.grid.boundaries.to_list

0 commit comments

Comments
 (0)