Skip to content
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

2.8 #1777

Open
wants to merge 59 commits into
base: develop
Choose a base branch
from
Open

2.8 #1777

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
69ac517
pre 2.8
tylerflex Jun 19, 2024
e625d65
update submodule
tylerflex Jun 20, 2024
6294152
added RF material library
QimingFlex Jun 10, 2024
8d6c14c
Merge pull request #1756 from flexcompute/qiming/RFmaterial
QimingFlex Jun 27, 2024
7fa15b9
autograd geometry group
tylerflex Jun 17, 2024
026e8da
complex polyslab autograd
tylerflex Jun 27, 2024
3087e52
user can specify background permittivity of structure
tylerflex Jun 27, 2024
d5e8613
Bumping version to 2.8.0rc1
momchil-flex Jul 2, 2024
03ca482
Introduce DirectivityMonitor and DirectivityData classes
QimingFlex Jun 7, 2024
8869458
ELECTROSTATIC: HeatSimulation included in HeatChargeSimulation
marc-flex Mar 19, 2024
bd3bd5e
update CHANGELOG.md
dmarek-flex Jul 2, 2024
3ad1b75
docstring fix
QimingFlex Jul 3, 2024
8c092de
Error in docstring
marc-flex Jul 4, 2024
90f4a59
fix finite precision bug when placing current path integral for coaxi…
dmarek-flex Jun 20, 2024
93b4d68
fixed bug when coaxial ports are snapped to grid cell boundaries. add…
dmarek-flex Jun 24, 2024
4618626
added plot_length_units to simulation and scene classes
dmarek-flex Jul 9, 2024
65c9722
exposed some helper functions in the TerminalComponentModeler to aid …
dmarek-flex Jul 9, 2024
87f1b43
Fixed bug in HeatChargeSimulation.plot() when we have global sources
marc-flex Jul 17, 2024
93aec55
Merge branch develop into pre/2.8
yaugenst-flex Jul 22, 2024
6110fa2
:wrench: Weird commit checkout issue on sync
daquinteroflex Jul 23, 2024
d8e3981
feature: Check credit balance and daily free balance
Jul 19, 2024
f66a239
tmp
momchilmm Jul 24, 2024
68407d2
prioritize snapping points in AutoGrid
dmarek-flex Jul 12, 2024
8e965aa
HeatChargeSimulation::boundary_spec - created union for backward comp…
marc-flex Jul 18, 2024
f321980
add wave ports
dmarek-flex May 30, 2024
6980943
fix: break_statuses add aborted
Jul 29, 2024
b08633c
Validate the use of dielectrics only in RectangularDielectric (#1859)
lucas-flexcompute Jul 29, 2024
8d7b5bb
Introduced axial_ratio to DirectivityMonitor
QimingFlex Jul 23, 2024
04fdff6
Move dispersion fitter implementation to components
caseyflex Aug 6, 2024
89e8491
Raise error early when port source is snapped into PML
weiliangjin2021 Aug 8, 2024
d3cc9ac
Merge branch 'develop' into pre/2.8
momchil-flex Aug 16, 2024
bd84833
Merge pull request #1905 from flexcompute/merge/develop_2_8
momchil-flex Aug 26, 2024
3b3aa92
make ComponentModeler.batch_data property, simplify internals, deprec…
tylerflex Aug 30, 2024
865889d
fixed bug that replaced all lumped elements in simulations when using…
dmarek-flex Sep 9, 2024
d12ace8
Make `BatchData` a mapping
yaugenst-flex Sep 16, 2024
b280a6d
Design optimization plugin update
m-bone Jun 12, 2024
931a403
Merge pull request #1762 from flexcompute/matt/bay_opt
m-bone Sep 17, 2024
0ea2e3f
Add waveport current validator and Z sign sanity check; flip Z sign f…
QimingFlex Aug 15, 2024
0ec17a9
Add validation and repair for TriangleMesh with inward-facing normals
caseyflex Sep 24, 2024
a66102b
mode solver preconditioner improvement and turning off incidence matrix
weiliangjin2021 Aug 29, 2024
8a20136
Apply matrix trimming after preconditioning
weiliangjin2021 Aug 30, 2024
87a0c58
construct medium from a transfer function describing the differential…
dmarek-flex Sep 23, 2024
a9defb5
fix bug when setting 'path_dir' in ComponentModeler
dmarek-flex Oct 1, 2024
9f02a97
fixed bug where lumped elements were not being removed in Simulation.…
dmarek-flex Oct 3, 2024
17c7e7e
fix bug in 2D material subdivision where invalid shapely geometry was…
dmarek-flex Oct 2, 2024
b9eb3a6
fix discrepancy in field projection results when the integration surf…
dmarek-flex Oct 7, 2024
2add23f
Add LossyMetalMedium and SIBC subpixel options for lossy_metal
weiliangjin2021 Aug 6, 2024
8bb5f5b
Convert several mode solver methods to staticmethods
weiliangjin2021 Oct 7, 2024
b5aeef1
Skip geometry validation in simulation subsection and mode solver red…
weiliangjin2021 Oct 16, 2024
8824b1f
rename autograd_background_permittivity to background_permittivity
tylerflex Oct 22, 2024
184673f
New Monitor._to_solver_monitor property used internally in the backend
momchil-flex Oct 17, 2024
4407df4
Mode solver improvement for simulations at low-frequency containing m…
weiliangjin2021 Oct 16, 2024
ff9bc1d
added internal version of _construct_smatrix to modelers to aid in de…
dmarek-flex Oct 24, 2024
228ef5e
mode_spec.precision default to `auto`
weiliangjin2021 Oct 18, 2024
88fd3a7
fix for issue where subdivide was creating very small polygons. Also …
dmarek-flex Oct 22, 2024
1d1eb3b
adding lumped elements that can model an arbitrary network
dmarek-flex Sep 12, 2024
d18c2df
Fix mode simulations with a bend when the grid is not symmetric
momchil-flex Oct 21, 2024
a764a75
Silence graphene warning from checking fit at high freq
caseyflex Sep 3, 2024
969a823
fixed mistake from previous PR that added internal construct smatrix
dmarek-flex Nov 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/sync-to-readthedocs-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ jobs:
ref: ${{ needs.extract_branch_or_tag.outputs.ref_name }}
fetch-tags: true


- name: Push corresponding reference to mirror repo if a tag
if: contains(github.ref, 'refs/tags/')
run: |
git remote add mirror https://github.com/flexcompute-readthedocs/tidy3d-docs.git
git push mirror ${{ needs.extract_branch_or_tag.outputs.ref_name }} --force # overwrites always
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49 changes: 43 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,50 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [2.8.0rc1]

### Added
- Added value_and_grad function to the autograd plugin, importable via `from tidy3d.plugins.autograd import value_and_grad`. Supports differentiating functions with auxiliary data (`value_and_grad(f, has_aux=True)`).
- Support for differentiation with respect to `ComplexPolySlab.vertices`.
- Introduce RF material library. Users can now import `rf_material_library` from `tidy3d.plugins.microwave`.
- Users can specify the background medium for a structure in automatic differentiation by supplying `Structure.background_permittivity`.
- `DirectivityMonitor` to compute antenna directivity.
- Added `plot_length_units` to `Simulation` and `Scene` to allow for specifying units, which improves axis labels and scaling when plotting.
- Added the helper function `compute_power_delivered_by_port` to `TerminalComponentModeler` which computes power delivered to a microwave network from a port.
- Added the account function `account` to check credit balance and daily free simulation balance.
- Added `WavePort` to the `TerminalComponentModeler` which is the suggested port type for exciting transmission lines.
- Added plotting functionality to voltage and current path integrals in the `microwave` plugin.
- Added convenience functions `from_terminal_positions` and `from_circular_path` to simplify setup of `VoltageIntegralAxisAligned` and `CustomCurrentIntegral2D`, respectively.
- Added `axial_ratio` to `DirectivityData.axial_ratio` for the `DirectivityMonitor`, defined as the ratio of the major axis to the minor axis of the polarization ellipse.
`ComponentModeler.batch_data` convenience property to access the `BatchData` corresponding to the component modeler run.
- Added optimization methods to the Design plugin. The plugin has been expanded to include Bayesian optimization, genetic algorithms and particle swarm optimization. Explanations of these methods are available in new and updated notebooks.
- Added new support functions for the Design plugin: automated batching of `Simulation` objects, and summary functions with `DesignSpace.estimate_cost` and `DesignSpace.summarize`.
- Added validation and repair methods for `TriangleMesh` with inward-facing normals.
- Added `from_admittance_coeffs` to `PoleResidue`, which allows for directly constructing a `PoleResidue` medium from an admittance function in the Laplace domain.
- Added material type `LossyMetalMedium` that has high DC-conductivity. Its boundaries can be modeled by a surface impedance boundary condition (SIBC). This is treated as a subpixel method, which can be switched by setting `SubpixelSpec(lossy_metal=method)` where `method` can be `Staircasing()`, `VolumetricAveraging()`, or `SurfaceImpedance()`.
- Added mode solver option `precision='auto'` to automatically select single or double precision for optimizing performance and accuracy.
- Added `LinearLumpedElement` as a new supported `LumpedElement` type. This enhancement allows for the modeling of two-terminal passive networks, which can include any configuration of resistors, inductors, and capacitors, within the `Simulation`. Simple RLC networks are described using `RLCNetwork`, while more complex networks can be represented by their admittance transfer function through `AdmittanceNetwork`.

### Changed
- Priority is given to `snapping_points` in `GridSpec` when close to structure boundaries, which reduces the chance of them being skipped.
- Gradients for autograd are computed server-side by default. They can be computed locally (requiring more data download) by passing `local_gradient=True` to the `web.run()` and related functions.
- Passing `path_dir` to `ComponentModeler` methods is deprecated in favor of setting `ComponentModeler.path_dir` and will result in an error if the two don't match.
- `BatchData` is now a mapping and can be accessed and iterated over like a Python dictionary (`.keys()`, `.values()`, `.items()`).
- `MethodRandom` and `MethodRandomCustom` have been removed from the Design plugin, and `DesignSpace.run_batch` has been superseded by `.run`.
- Design plugin has been significantly reworked to improve ease of use and allow for new optimization methods.
- Behavior of `FieldProjector` now matches the server-side computation, which does not truncate the integration surface when it extends into PML regions.
- Enabled the user to set the `ModeMonitor.colocate` field and changed to `True` by default (fields were actually already returned colocated even though this field was `False` previously).
- More robust mode solver at radio frequencies.
- Disallow very small polygons when subdividing 2D structures.

### Fixed
- `DataArray` interpolation failure due to incorrect ordering of coordinates when interpolating with autograd tracers.
- Error in `CustomSourceTime` when evaluating at a list of times entirely outside of the range of the envelope definition times.
- Significant speedup for field projection computations.
- Fix numerical precision issue in `FieldProjectionCartesianMonitor`.
- Bug where lumped elements in the `Simulation` were being overwritten by the `TerminalComponentModeler`.
- Bug in `Simulation.subsection` where lumped elements were not being correctly removed.
- Bug when adding 2D structures to the `Simulation` that are composed of multiple overlapping polygons.
- Fields stored in `ModeMonitor` objects were computed colocated to the grid boundaries, but the built-in `ModeMonitor.colocate=False` was resulting in wrong results in some cases, most notably if symmetries are also involved.
- Small inaccuracy when applying a mode solver `bend_radius` when the simulation grid is not symmetric w.r.t. the mode plane center. Previously, the radius was defined w.r.t. the middle grid coordinate, while now it is correctly applied w.r.t. the plane center.
- Silence warning in graphene from checking fit quality at large frequencies.

## [2.7.2] - 2024-08-07

Expand Down Expand Up @@ -57,6 +93,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [2.7.0] - 2024-06-17

### Added
- `HeatSimulation` is now under the more generic class `HeatChargeSimulation`. This new class sallows for imulations of both HEAT and electric CONDUCTION types. One-way coupling between these is possible in which the CONDUCTION simulation is used to compute Joule heating which is subsequently used as a source in the HEAT simulation.
- EME solver through `EMESimulation` class.
- 2D heat simulations are now fully supported.
- `tidy3d.plugins.adjoint.web.run_local` used in place of `run` will skip validators that restrict the size or number of `input_structures`.
Expand Down Expand Up @@ -1273,8 +1310,8 @@ which fields are to be projected is now determined automatically based on the me
- Job and Batch classes for better simulation handling (eventually to fully replace webapi functions).
- A large number of small improvements and bug fixes.

[Unreleased]: https://github.com/flexcompute/tidy3d/compare/v2.7.2...develop
[2.7.2]: https://github.com/flexcompute/tidy3d/compare/v2.7.1...v2.7.2
[Unreleased]: https://github.com/flexcompute/tidy3d/compare/v2.8.0rc1...pre/2.8
[2.8.0rc1]: https://github.com/flexcompute/tidy3d/compare/v2.7.1...v2.8.0rc1
[2.7.1]: https://github.com/flexcompute/tidy3d/compare/v2.7.0...v2.7.1
[2.7.0]: https://github.com/flexcompute/tidy3d/compare/v2.6.4...v2.7.0
[2.6.4]: https://github.com/flexcompute/tidy3d/compare/v2.6.3...v2.6.4
Expand Down
Binary file added docs/_static/img/design.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/api/abstract_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ These are some classes that are used to organize the tidy3d components, but aren
tidy3d.components.monitor.PlanarMonitor
tidy3d.components.monitor.AbstractFieldProjectionMonitor
tidy3d.components.lumped_element.LumpedElement
tidy3d.components.lumped_element.RectangularLumpedElement
tidy3d.components.grid.grid_spec.GridSpec1d
tidy3d.components.base_sim.data.sim_data.SimulationData
tidy3d.components.data.sim_data.AbstractYeeGridSimulationData
Expand Down
22 changes: 0 additions & 22 deletions docs/api/heat/index.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. currentmodule:: tidy3d

Thermal Boundary Conditions
Thermal/Charge Boundary Conditions
-----------------------------

Specifications
Expand All @@ -11,6 +11,7 @@ Specifications
:template: module.rst

tidy3d.HeatBoundarySpec
tidy3d.HeatChargeBoundarySpec


Types
Expand All @@ -23,6 +24,9 @@ Types
tidy3d.TemperatureBC
tidy3d.ConvectionBC
tidy3d.HeatFluxBC
tidy3d.VoltageBC
tidy3d.CurrentBC,
tidy3d.InsulatingBC


Placement
Expand Down
22 changes: 22 additions & 0 deletions docs/api/heat_charge/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
HEAT |:fire:|
=============

.. toctree::
:hidden:

simulation
mediums
boundary_conditions
source
discretization
monitor
output_data


.. include:: /api/heat_charge/simulation.rst
.. include:: /api/heat_charge/mediums.rst
.. include:: /api/heat_charge/boundary_conditions.rst
.. include:: /api/heat_charge/source.rst
.. include:: /api/heat_charge/discretization.rst
.. include:: /api/heat_charge/monitor.rst
.. include:: /api/heat_charge/output_data.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. currentmodule:: tidy3d

Material Thermal Specification
Material Thermal/Charge Specification
-------------------------------

.. autosummary::
Expand All @@ -9,6 +9,8 @@ Material Thermal Specification

tidy3d.FluidSpec
tidy3d.SolidSpec
tidy3d.ConductorSpec
tidy3d.InsulatorSpec


Thermal Perturbation Specification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ Monitors
:toctree: ../_autosummary/
:template: module.rst

tidy3d.TemperatureMonitor
tidy3d.TemperatureMonitor
tidy3d.VoltageMonitor
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ Output Data
-------------


Heat Simulation Data
Heat/Charge Simulation Data
^^^^^^^^^^^^^^^^^^^^

.. autosummary::
:toctree: ../_autosummary/
:template: module.rst

tidy3d.HeatSimulationData
tidy3d.HeatChargeSimulationData


Monitor Data
Expand All @@ -22,6 +23,7 @@ Monitor Data
:template: module.rst

tidy3d.TemperatureData
tidy3d.VoltageData


Unstructured Data Classes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Simulation
:template: module.rst

tidy3d.HeatSimulation
tidy3d.HeatChargeSimulation
4 changes: 3 additions & 1 deletion docs/api/heat/source.rst → docs/api/heat_charge/source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ Thermal Sources
:toctree: ../_autosummary/
:template: module.rst

tidy3d.UniformHeatSource
tidy3d.UniformHeatSource
tidy3d.HeatSource
tidy3d.HeatFromElectricSource
1 change: 1 addition & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ API |:computer:|
geometry
mediums
material_library
rf_material_library
structures
sources
monitors
Expand Down
5 changes: 4 additions & 1 deletion docs/api/lumped_elements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ Passive elements
:template: module.rst

tidy3d.LumpedResistor
tidy3d.CoaxialLumpedResistor
tidy3d.CoaxialLumpedResistor
tidy3d.RLCNetwork
tidy3d.AdmittanceNetwork
tidy3d.LinearLumpedElement
11 changes: 11 additions & 0 deletions docs/api/mediums.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Spatially uniform
:template: module.rst

tidy3d.Medium
tidy3d.LossyMetalMedium
tidy3d.PECMedium
tidy3d.FullyAnisotropicMedium

Expand All @@ -25,6 +26,15 @@ Spatially varying

tidy3d.CustomMedium

Fitting parameters
^^^^^^^^^^^^^^^^^^

.. autosummary::
:toctree: _autosummary/
:template: module.rst

tidy3d.SkinDepthFitterParam

Dispersive Mediums
------------------

Expand Down Expand Up @@ -116,3 +126,4 @@ Material Library

.. toctree::
material_library
rf_material_library
1 change: 1 addition & 0 deletions docs/api/monitors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Monitor Types
tidy3d.FieldProjectionAngleMonitor
tidy3d.FieldProjectionKSpaceMonitor
tidy3d.DiffractionMonitor
tidy3d.DirectivityMonitor

Apodization Specification
-------------------------
Expand Down
3 changes: 3 additions & 0 deletions docs/api/output_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Collections of Data from single monitor
tidy3d.FieldProjectionCartesianData
tidy3d.FieldProjectionKSpaceData
tidy3d.DiffractionData
tidy3d.DirectivityData

Individual Datasets
-------------------
Expand All @@ -51,3 +52,5 @@ Individual Datasets
tidy3d.FieldProjectionCartesianDataArray
tidy3d.FieldProjectionKSpaceDataArray
tidy3d.DiffractionDataArray
tidy3d.DirectivityDataArray
tidy3d.AxialRatioDataArray
9 changes: 4 additions & 5 deletions docs/api/plugins/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ Design Space Exploration
:toctree: ../_autosummary/
:template: module.rst

tidy3d.plugins.design.Parameter
tidy3d.plugins.design.ParameterFloat
tidy3d.plugins.design.ParameterInt
tidy3d.plugins.design.ParameterAny
tidy3d.plugins.design.Method
tidy3d.plugins.design.MethodGrid
tidy3d.plugins.design.MethodMonteCarlo
tidy3d.plugins.design.MethodRandomCustom
tidy3d.plugins.design.MethodRandom
tidy3d.plugins.design.MethodBayOpt
tidy3d.plugins.design.MethodGenAlg
tidy3d.plugins.design.MethodParticleSwarm
tidy3d.plugins.design.DesignSpace
tidy3d.plugins.design.Results
tidy3d.plugins.design.Result
5 changes: 3 additions & 2 deletions docs/api/plugins/smatrix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Scattering Matrix Calculator
tidy3d.plugins.smatrix.Port
tidy3d.plugins.smatrix.ModalPortDataArray
tidy3d.plugins.smatrix.TerminalComponentModeler
tidy3d.plugins.smatrix.TerminalPortDataArray
tidy3d.plugins.smatrix.LumpedPort
tidy3d.plugins.smatrix.LumpedPortDataArray
tidy3d.plugins.smatrix.CoaxialLumpedPort
tidy3d.plugins.smatrix.CoaxialLumpedPort
tidy3d.plugins.smatrix.WavePort
Loading
Loading