Changelog ⏪#
Documentation Versions#
You can find the documentation for all the supported versions of tidy3d within this website.
To switch between versions, use the version selector in the bottom left corner of the page as per the image below.
The version selector is only available on the main page of the documentation.
After version >=2.6, the documentation was restructured so old internal documentation links will not match to the
new internal documentation page links. To access the new documentation, we recommend navigating to the main page and switching versions from there before navigating to the page.
Version Release Notes#
Changelog#
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased#
Added#
Changed#
Fixed#
[v2.9.1] - 2025-08-13#
Changed#
Validate mode solver object for large number of grid points on the modal plane.
Fixed#
Fixed missing amplitude factor and handling of negative normal direction case when making adjoint sources from
DiffractionMonitor.Improved the robustness of batch jobs. The batch state, including all
task_ids, is now saved tobatch.hdf5immediately after upload. This fixes an issue where an interrupted batch (e.g., due to a kernel crash or network loss) would be unrecoverable.Fixed warning for running symmetric adjoint simulations by port to not trigger when there is a single port.
Bug in
CoaxialLumpedPortwhere source injection is off when thenormal_axisis notz.Validation of
freqsin theComponentModelerandTerminalComponentModeler.Calculation of voltage and current in the
WavePort, when one type of path integral is supplied and the transmission line mode is lossy.Polygon vertices cleanup in
ClipOperation.intersections_plane.Removed sources from
sim_inf_structuresimulation object inpostprocess_adjto avoid source and background medium validation errors.Revert overly restrictive validation of
freqsin theComponentModelerandTerminalComponentModeler.Fixed
ElectromagneticFieldData.to_zbf()to support single frequency monitors and apply the correct flattening order.
2.9.0 - 2025-08-04#
Added#
Fields
convex_resolution,concave_resolution, andmixed_resolutioninCornerFinderSpeccan be used to take into account the dimensions of autodetected convex, concave, or mixed geometric features whendl_minis automatically inferred during automatic grid generation.LayerRefinementSpecnow supports automatic thin gap meshing through fieldsgap_meshing_itersanddl_min_from_gap_width.Added
eps_limkeyword argument toSimulation.plot_eps()for manual control over the permittivity color limits.Added
thicknessparameter toLossyMetalMediumfor computing surface impedance of a thin conductor.priorityfield inStructureandMeshOverrideStructurefor setting the behavior in structure overlapping region. When its value isNone, the priority is automatically determined based on the material property and simulation’sstructure_priority_mode.Automatically apply
matplotlibstyles when importingtidy3dwhich can be reverted via thetd.restore_matplotlib_rcparams()function.Added
TriangleMesh.from_height_expressionclass method to create a mesh from an analytical height function defined on a 2D grid andTriangleMesh.from_height_gridclass method to create a mesh from height values sampled on a 2D grid.Added heat sources with custom spatial dependence. It is now possible to add a
SpatialDataArrayas theratein aHeatSource.Added Transient Heat simulations. It is now possible to run transient Heat simulations. This can be done by specifying
analysis_specofHeatChargeSimulationobject asUnsteadyHeatAnalysis.A
num_grid_cellsfield toWavePort, which ensures that there are 5 grid cells across the port. Grid refinement can be disabled by passingNonetonum_grid_cells.Implemented
FreqRangeutility class for frequency/wavelength handling with constructor methodsfrom_freq_interval(),from_wavelength(), andfrom_wvl_interval().Add support for
np.unwrapintidy3d.plugins.autograd.Add Nunley variant to germanium material library based on Nunley et al. 2016 data.
Add
PointDipole.sources_from_angles()that constructs a list ofPointDipoleobjects needed to emulate a dipole oriented at a user-provided set of polar and azimuthal angles.Added
priorityparameter toweb.run()and related functions to allow vGPU users to set task priority (1-10) in the queue.EMEFieldMonitornow supportsinterval_space.Simulation.precisionoption allows to select"double"precision for very high-accuracy results. Note that this is very rarely needed, and doubles the simulation computational weight and correspondingly FlexCredit cost.Added material type
PMCMediumfor perfect magnetic conductor.ModeSimulation.plot()method that plots the mode simulation plane by default, or the containing FDTD simulation if any ofx,y, orzis passed.Enable singularity correction at PEC and lossy metal edges.
New
VolumeMeshersimulation type and associatedVolumeMeshMonitorandVolumeMesherData, which can be used to run the unstructured meshing for aHeatChargeSimulationseparately before running the solver.The current validator for Conduction simulations has been modified so that it checks that in a Conduction simulation there is at least one structure defined with
ChargeConductorMediumin thechargefield of aMultiPhysicsMedium. This is necessary to ensure simulations are properly set up in the back-end since it relies on theconductivityfield ofChargeConductorMediumand not that ofMedium.Access field decay values in
SimulationDataviasim_data.field_decayasTimeDataArray.
Changed#
Relaxed bounds checking of path integrals during
WavePortvalidation.Internal adjoint helper methods are now prefixed with an underscore to separate them from the public API.
Drop the dependency on
gdspy, which has been unmaintained for over two years. Interfaces previously relying ongdspynow use its maintained successor,gdstk, with equivalent functionality.Small (around 1e-4) numerical precision improvements in EME solver.
Adjoint source frequency width is adjusted to decay sufficiently before zero frequency when possible to improve accuracy of simulation normalization when using custom current sources.
Change
VisualizationSpecvalidator for checking validity of user specified colors to only issue a warning if matplotlib is not installed instead of an error.Improved performance of
tidy3d.web.delete_old()for large folders.tidy3d.plugins.autograd.interpolate_spline()andtidy3d.plugins.autograd.add_at()can now be called with keyword arguments during tracing.Zero-size dimensions automatically receive periodic boundary conditions instead of raising an error.
Set
ModeSpecprecision todoubleby default for more accurate mode solver results. Does not apply toEMEModeSpec, where theautoprecision is still default for speed and cost.Switched to an analytical gradient calculation for spatially-varying pole-residue models (
CustomPoleResidue).Significantly improved performance of the
tidy3d.plugins.autograd.grey_dilationmorphological operation and its gradient calculation. The new implementation is orders of magnitude faster, especially for large arrays and kernel sizes.Warnings are now generated (instead of errors) when instantiating
PML,StablePML, orAbsorberclasses (or when invokingpml(),stable_pml(), orabsorber()functions) with fewer layers than recommended.Warnings and error messages originating from
Structure,Source, orMonitorclasses now refer to problematic objects by their user-suppliednameattribute, alongside their index.File downloads are atomic. Interruptions or failures during download will no longer result in incomplete files.
Warnings are now generated (instead of errors) when instantiating
PML,StablePML, orAbsorberclasses (or when invokingpml(),stable_pml(), orabsorber()functions) with fewer layers than recommended.Simulation.subsectioncan no longer takesymmetryas an argument - the symmetry is always taken from the original simulation.If a mode simulation is crossing a symmetry plane of the larger simulation domain, but the mode plane is not symmetric, a warning is issued that it will be expanded symmetrically. Previously this warning only happened during the solver run.
Enhanced
PolySlabandCylindergradient computation via adaptive field sampling along geometry boundaries instead of fixed-grid center sampling.Shape derivatives have been sped up significantly, especially for simulations containing many structures in a
GeometryGroup.By default, batch downloads will skip files that already exist locally. To force re-downloading and replace existing files, pass the
replace_existing=Trueargument toBatch.load(),Batch.download(), orBatchData.load().The
BatchData.load_sim_data()function now overwrites any previously downloaded simulation files (instead of skipping them).Tighter
TOL_EIGSused for mode solver, sincescipysometimes failed to find modes.
Fixed#
Fixed bug in broadband adjoint source creation when forward simulation had a pulse amplitude greater than 1 or a nonzero pulse phase.
Fixed shaping of
CustomMediumgradients when permittivity data includes a frequency dimension with multiple entries.Bug in contains check for
LumpedElement, which should allow the case of aLumpedElementtouching the simulation boundaries.Bug when generating a grid with snapping points near the simulation boundaries.
Fixed field colocation in
EMEModeSolverMonitor.Internal interpolation errors with some versions of
xarrayandnumpy.If
ModeSpec.angle_rotation=Truefor a mode object, validate that the structure rotation can be successfully done. Also, error if the medium cannot be rotated (e.g. anisotropic or custom medium), which would previously have just produced wrong results.Characteristic impedance calculations in the
ImpedanceCalculatorusing definitions that rely on flux, which were giving incorrect results for lossy transmission lines.Validation for
CustomGridBoundaries, which was previously allowing unsorted arrays and arrays with less than two entries.DiffractionMonitorresults to apply finite grid field corrections for higher precision when comparing e.g. toFluxMonitorcomputations of total power.Bug when validating the grid resolution near
CoaxialLumpedPort.Arrow lengths are now scaled consistently in the X and Y directions, and their lengths no longer exceed the height of the plot window.
Plots of objects defined by shape intersection logic will no longer display thin line artifacts.
Fixed incorrect gradient computation in PyTorch plugin (
to_torch) for functions returning multi-element arrays.MonitorData.get_amplitude()no longers multiplies by a factor of1jand now directly returns the complex value of the data.EMESimulationData.port_modes_tupleis now symmetry-expanded.Fixed
Medium2Dvalidation error message when invalid data is passed toss.The phase of the amplitudes of a
DiffractionMonitorwas correctly centered such that the origin is at the monitor center.Giving opposite boundaries different names no longer causes a symmetry validator failure.
Fixed issue with parameters in
InverseDesignResultsometimes being outside of the valid parameter range.Fixed performance regression for multi-frequency adjoint calculations.
Disallow
EMEFieldMonitorin EME simulations withEMELengthSweep.Fixed bug in adjoint postprocessing frequency batching that was causing gradients to be zero or incorrect. The error was surfacing when selecting a subset of the monitor frequencies in the objective function.
2.8.5 - 2025-07-07#
Fixed#
Bug in
PlaneWavedefined with a negativeangle_thetawhich would lead to wrong injection.GaussianBeamandAstigmaticGaussianBeamdefaultnum_freqsreset to 1 (it was set to 3 in v2.8.0) and a warning is issued for a broadband, angled beam for whichnum_freqsmay not be sufficiently large.Set the maximum
num_freqsto 20 for all broadband sources (we have been warning about the introduction of this hard limit for a while).Solver error for EME simulations with bends, introduced when support for 2D EME simulations was added.
Fixed handling of symmetry when creating adjoint field sources and added warning when broken up adjoint simulations do not have the same symmetry as the forward simulation.
2.8.4 - 2025-05-15#
Added#
The method
Geometry.reflectedcan be used to create a reflected copy of any geometry off a plane. As for other transformations, for efficiency,reflectedPolySlabdirectly returns an updatedPolySlabobject rather than aTransformedobject, except when the normal of the plane of reflection has a non-zero component along the slab axis, in which caseTransformedis still returned.Validation check for unit error in grid spacing.
Validation that when symmetry is imposed along a given axis, the boundary conditions on each side of the axis are identical.
Changed#
Supplying autograd-traced values to geometric fields (
center,size) of simulations, monitors, and sources now logs a warning and falls back to the static value instead of erroring.Attempting to differentiate server-side field projections now raises a clear error instead of silently failing.
Improved error message and handling when attempting to load a non-existent task ID.
ClipOperationnow fails validation if traced fields are detected.Warn if more than 20 frequencies are used in EME, as this may lead to slower or more expensive simulations.
EME now supports 2D simulations.
‘EMESimulation’ now supports ‘PermittivityMonitor’.
Fixed#
Fixed issue with
CustomMediumgradients where other frequencies would wrongly contribute to the gradient.Fixed bug when computing
PolySlabbounds in plotting functions.
2.8.3 - 2025-04-24#
Added#
Ability to select payment option when submitting jobs from the Python client.
Periodic repetition of EME subgrids via
num_repsorEMEPeriodicitySweep.Methods
EMEExplicitGrid.from_structuresandEMECompositeGrid.from_structure_groupsto place EME cell boundaries at structure bounds.‘ModeSimulation’ now supports ‘PermittivityMonitor’.
Classmethod
from_frequency_rangeinGaussianPulsefor generating a pulse whose amplitude in the frequency_range [fmin, fmax] is maximized, which is particularly useful for running broadband simulations.Differentiable function
td.plugins.autograd.interpolate_splinefor 1D linear, quadratic, and cubic spline interpolation, supporting differentiation with respect to the interpolated values (y_points) and optional endpoint derivative constraints.SteadyEnergyBandMonitorin the Charge solver.Pretty printing enabled with
rich.printfor the material library, materials, and their variants. In notebooks, this can be accessed usingrich.printordisplay, or by evaluating the material library, a material, or a variant in a cell.FieldDataandModeDatasupport exporting E fields to a Zemax Beam File (ZBF) with.to_zbf()(warning: experimental feature).FieldDatasetsupports reading E fields from a Zemax Beam File (ZBF) with.from_zbf()(warning: experimental feature).Unstructured grid now supports 2D/3D box-shaped refinement regions and 1D refinement lines of arbitrary direction.
Changed#
Performance enhancement for adjoint gradient calculations by optimizing field interpolation.
Auto grid in EME simulations with multiple
freqsprovided uses the largest instead of raising an error.Increased maximum number of frequencies in an EME simulation from 20 to 500
Named mediums now display by name for brevity; materials/variants print concise summaries including references.
Fixed#
Fixed
reverseproperty oftd.Scene.plot_structures_property()to also reverse the colorbar.Fixed bug in surface gradient computation where fields, instead of gradients, were being summed in frequency.
2.8.2 - 2025-04-09#
Added#
fillandfill_structuresargument intd.Simulation.plot_structures()andtd.Simulation.plot()respectively to disable fill and plot outlines of structures only.New subpixel averaging option
ContourPathAveragingapplied to dielectric material boundaries.A property
interior_angleinPolySlabthat stores angles formed inside polygon by two adjacent edges.eps_componentargument intd.Simulation.plot_eps()to optionally select a specific permittivity component to plot (eg."xx").Monitor
AuxFieldTimeMonitorfor aux fields like the free carrier density inTwoPhotonAbsorption.Broadband handling (
num_freqsargument) to the TFSF source.Ability to define a
WavePortusing only a voltage or current path integral, with the missing quantity inferred via power conservation.
Fixed#
Compatibility with
xarray>=2025.03.Inaccurate gradient when auto-grabbing permittivities for structures using
td.PolySlabwhen using dispersive material models.Fixed scaling for adjoint sources when differentiating with respect to
FieldDatato account for the mesh size of the monitor and thus the created source. This aligns adjoint gradient magnitudes with numerical finite difference gradients for field data.Warn when mode solver pml covers a significant portion of the mode plane.
TFSF server errors related to the auxiliary plane wave source that would previously happen on the server are now caught upon simulation creation.
Opposite arrow curvature for mode sources and monitors with non-zero bendind radius when plotted in the figure’s Y axis.
Changed#
num_freqsin Gaussian beam type sources limited to 20, which should besufficient for all cases.The
angle_phiparameter ofModeSpecis only limited to multiples ofnp.pi / 2ifangle_rotationis set toTrue, as other values would currently not work correctly.The
ramp_up_itersparameter of theChargeSolverwas changed back to 1 for efficiency. It can be increased in cases with e.g. high doping when convergence is more difficult.
2.8.1 - 2025-03-20#
Added#
New
LobeMeasurertool in themicrowaveplugin that locates lobes in antenna patterns and calculates lobe measures like half-power beamwidth and sidelobe level.Validation step that raises a
ValueErrorwhen no frequency-domain monitors are present, preventing invalid adjoint runs.Metal surface roughness models: modified Hammerstad, Huray Snowball, and Cannonball-Huray.
Support for Fermi-Dirac statistics in Charge solver. This option can be activated when defining the analysis type
IsothermalSteadyChargeDCAnalysiswithfermi_dirac=True. This option will provide more accurate results in simulations where very high doping may lead the pseudo-Fermi energy levels to approach either the conduction or the valence energy levels.
Changed#
Dependencies for the
designplugin can now be installed viapip install tidy3d[design].
Fixed#
Bug in
LayerRefinementSpecthat refines grids outside the layer region when one in-plane dimension is of size infinity.Querying tasks was sometimes erroring unexpectedly.
Fixed automatic creation of missing output directories.
Bug in handling of tuple-type gradients that could lead to empty tuples or failing gradient calculations when differentiating w.r.t. (for instance)
td.Box.center.Bug causing incorrect field projection results when multiple projection monitors with numerous sampling points were used.
Improved accuracy for normal E-field components in mode solver at microwave frequencies.
Deleting tasks using
web.delete(task_id)would error when deleting tasks in the tidy3d root folder and others would not get completely removed in the Web GUI.
2.8.0 - 2025-03-04#
Added#
Autograd support for polyslab transformations.
Support for differentiation with respect to
ComplexPolySlab.vertices.Introduce RF material library. Users can now import
rf_material_libraryfromtidy3d.plugins.microwave.Users can specify the background medium for a structure in automatic differentiation by supplying
Structure.background_permittivity.DirectivityMonitorto compute antenna directivity and associatedDirectivityDatadata container.Ability to directly create
DirectivityDatafrom anxarrray.Datasetcontaining electromagnetic fields, where the flux is calculated by integrating the fields over the surface of a sphere.DirectivityDataincludes parameters of interest like radiation intensity and gain. In addition, antenna parameters can be decomposed into contributions from individual polarization components according to a specified polarization basis, eitherlinearorcircular. The linear polarization basis can be optionally rotated bytilt_anglefrom the theta-axis.Added
plot_length_unitstoSimulationandSceneto allow for specifying units, which improves axis labels and scaling when plotting.Added the helper function
compute_power_delivered_by_porttoTerminalComponentModelerwhich computes power delivered to a microwave network from a port.Added the account function
accountto check credit balance and daily free simulation balance.Added
WavePortto theTerminalComponentModelerwhich is the suggested port type for exciting transmission lines.Added plotting functionality to voltage and current path integrals in the
microwaveplugin.Added convenience functions
from_terminal_positionsandfrom_circular_pathto simplify setup ofVoltageIntegralAxisAlignedandCustomCurrentIntegral2D, respectively.ComponentModeler.batch_dataconvenience property to access theBatchDatacorresponding 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
Simulationobjects, and summary functions withDesignSpace.estimate_costandDesignSpace.summarize.Added validation and repair methods for
TriangleMeshwith inward-facing normals.Added
from_admittance_coeffstoPoleResidue, which allows for directly constructing aPoleResiduemedium from an admittance function in the Laplace domain.Added material type
LossyMetalMediumthat 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 settingSubpixelSpec(lossy_metal=method)wheremethodcan beStaircasing(),VolumetricAveraging(), orSurfaceImpedance().Added mode solver option
precision='auto'to automatically select single or double precision for optimizing performance and accuracy.Added
LinearLumpedElementas a new supportedLumpedElementtype. This enhancement allows for the modeling of two-terminal passive networks, which can include any configuration of resistors, inductors, and capacitors, within theSimulation. Simple RLC networks are described usingRLCNetwork, while more complex networks can be represented by their admittance transfer function throughAdmittanceNetwork.Option for the
ModeSolverandModeSolverMonitorto store only a subset of field components.Added an option to simulate plane wave propagation at fixed angles by setting parameter
angular_spec=FixedAngleSpec()when defining aPlaneWavesource.The universal
tidy3d.webcan now also be used to handleModeSolversimulations.Support for differentiation with respect to
PolySlab.slab_bounds.VisualizationSpecthat allowsMediuminstances to specify color and transparency plotting attributes that override default ones.reduce_simulationargument added to all web functions to allow automatically reducing structures only to the simulation domain, including truncating data in custom media, thus reducing the simulation upload size. Currently only implemented for mode solver simulation types.Support for quasi-uniform grid specifications via
QuasiUniformGridthat subclasses fromGridSpec1d. The grids are almost uniform, but can adjust locally to the edge of structure bounding boxes, and snapping points.New field
min_steps_per_sim_sizeinAutoGridthat sets minimal number of grid steps per longest edge length of simulation domain.New field
shadowinMeshOverrideStructurethat sets grid size in overlapping region according to structure list or minimal grid size.New field
drop_outside_siminMeshOverrideStructureto specify whether to drop an override structure if it is outside the simulation domain, but it overlaps with the simulation domain when projected to an axis.Scientific notation for frequency range warnings.
MultiphysicsMediumallows for the modularization definition of physical properties. So in addition to the usual optical properties, one can now add heat properties or electric properties.Added :zap: Charge Solver API. It is now possible to solve the Drift-Diffusion (DD) equations for semiconductors. These simulations can be set up with the new class
HeatChargeSimulation(which supersedesHeatSimulation) in a way similar to that of Heat simulations. The solver has currently limited capabilities (which will be expanded in future releases): steady only, isothermal, Boltzmann statistics (non-degenerate semiconductors only).SemiconductorMediumhas been added. This is used in combination withMultiPhysicsMediumto define the mediums used in the Charge solver. It allows to specify mobility, bandgap narrowing, and generation/recombination models as well as doping. Doping can be defined as constant or through “doping boxes” or, more generally, viaSpatialDataArrayobjects for full flexibility.Mobility models for
SemiconductorMedium:ConstantMobilityModel,CaugheyThomasMobilityBandgap narrowing models for
SemiconductorMedium:SlotboomBandGapNarrowingGeneration-recombination models for
SemiconductorMedium:ShockleyReedHallRecombination,RadiativeRecombination,AugerRecombinationAccessors and length functions implemented for
Resultclass in design plugin.New interface for mode solver simulations via
ModeSimulationclass.Advanced option
dist_typethat allowsLinearLumpedElementto be distributed across grid cells in different ways. For example, restricting the network portion to a single cell and using PEC wires to connect to the desired location of the terminals.New
layer_refinement_specsfield inGridSpecthat takes a list ofLayerRefinementSpecfor automatic mesh refinement and snapping in layered structures. Structure corners on the cross section perpendicular to layer thickness direction can be automatically identified. Mesh is automatically snapped and refined around those corners.Function
translated_copyinElectromagneticFieldDatato facilitate computing overlaps between field data at different locations.PlaneWaveBeamProfile,GaussianBeamProfileandAstigmaticGaussianBeamProfilecomponents to compute field data associated to such beams based on their corresponding analytical expressions, and compute field overlaps with other data.num_freqsargument to thePlaneWavesource.Support for running multiple adjoint simulations from a single forward simulation in adjoint pipeline depending on monitor configuration.
Ability to the
TerminalComponentModelerthat enables the computation of antenna parameters and figures of merit, such as gain, radiation efficiency, and reflection efficiency. When there are multiple ports in theTerminalComponentModeler, these antenna parameters may be calculated with user-specified port excitation magnitudes and phases.RectangularAntennaArrayCalculatorclass to compute the array factor and far-field radiation patterns for rectangular phased antenna arrays.Added validation for the monitors frequency range to be consistent with the frequency range defined for the sources.
Simulation.grid_infoproperty to collect various properties of the grids in the simulation.angle_rotationinModeSpecto improve accuracy in some cases whenangle_thetais defined. This option is disabled by default but it can be tried when very high accuracy is required inModeSourceandModeMonitorobjects that are placed in slanted waveguides.
Changed#
Priority is given to
snapping_pointsinGridSpecwhen 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=Trueto theweb.run()and related functions.Passing
path_dirtoComponentModelermethods is deprecated in favor of settingComponentModeler.path_dirand will result in an error if the two don’t match.BatchDatais now a mapping and can be accessed and iterated over like a Python dictionary (.keys(),.values(),.items()).MethodRandomandMethodRandomCustomhave been removed from the Design plugin, andDesignSpace.run_batchhas been superseded by.run.Design plugin has been significantly reworked to improve ease of use and allow for new optimization methods.
Behavior of
FieldProjectornow 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.colocatefield and changed toTrueby default (fields were actually already returned colocated even though this field wasFalsepreviously).More robust mode solver at radio frequencies.
Disallow very small polygons when subdividing 2D structures.
For efficiency,
translated,scaled, androtatedPolySlab-s now return updatedPolySlabobjects rather than aTransformedobject, except when the rotation axis is not the same as the slab axis, in which caseTransformedis still returned.Default choice of frequency in
Simulation.plot_epsandSimulation.plot_structures_epsis now the central frequency of all sources in the simulation. If the central frequencies differ, the permittivity is evaluated at infinite frequency, and a warning is emitted.Mode solver fields are more consistently normalized with respect to grid-dependent sign inversions in high order modes.
MeshOverrideStructureacceptsBoxas geometry. Other geometry types will raise a warning and convert to bounding box.Double precision mode solver is now supported in EME.
estimate_costis now called at the end of everyweb.uploadcall.Internal refactor of adjoint shape gradients using
GradientSurfaceMesh.Enhanced progress bar display in batch operations with better formatting, colors, and status tracking.
ModeMonitorandModeSolverMonitornow use the defaulttd.ModeSpec()withnum_modes=1whenmode_specis not provided.Update sidewall angle validator to clarify angle should be specified in radians.
Reduced the complex tolerance in the mode solver below which permittivity is considered lossless, in order to correctly compute very low-loss modes. -
HeatChargeSimulationsupersedesHeatSimulation. Though both of those can be used for Heat simulation interchangeably, the latter has been deprecated and will disappear in the future.FluidSpecandSolidSpecare now deprecated in favor ofFluidMediumandSolidMedium. Both can still be used interchangeably.Exclude
FluxMonitorfrequencies from adjoint design region gradient monitors since we do not differentiate throughFluxDataCheck for empty source list in
wvl_mat_mininSimulationand raise user friendly error if no sources exist in the simulation.The coordinate of snapping points in
GridSpeccan take valueNone, so that mesh can be selectively snapped only along certain dimensions.Grid snapping for
MeshOverrideStructurewithshadow=Falseis only on if the structure refines the mesh.Renamed
SkinDepthFitterParam–>SurfaceImpedanceFitterParamused inLossyMetalMedium.plotinLossyMetalMediumnow plots complex-valued surface impedance.Changed plot_3d iframe url to tidy3d production environment.
num_freqsis now set to 3 by default for thePlaneWave,GaussianBeam, andAnalyticGaussianBeamsources, which makes the injection more accurate in broadband cases.Nonlinear models
KerrNonlinearityandTwoPhotonAbsorptionnow default to using the physical real fields instead of complex fields.Added warning when a lumped element is not completely within the simulation bounds, since now lumped elements will only have an effect on the
Simulationwhen they are completely within the simulation bounds.Allow
ModeDatato be passed to path integral computations in themicrowaveplugin.Default number of grid cells refining lumped elements is changed to 1, and some of the generated
MeshOverrideStructureare replaced by grid snapping points.Simulation tasks now print a link to the task’s folder.
Fixed#
Significant speedup for field projection computations.
Fix numerical precision issue in
FieldProjectionCartesianMonitor.Bug where lumped elements in the
Simulationwere being overwritten by theTerminalComponentModeler.Bug in
Simulation.subsectionwhere lumped elements were not being correctly removed.Bug when adding 2D structures to the
Simulationthat are composed of multiple overlapping polygons.Fields stored in
ModeMonitorobjects were computed colocated to the grid boundaries, but the built-inModeMonitor.colocate=Falsewas resulting in wrong results in some cases, most notably if symmetries are also involved.Small inaccuracy when applying a mode solver
bend_radiuswhen 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.
CustomCurrentSourcenow correctly validates its current dataset.Better plotting of grids, respecting 2D and 1D simulation edge cases.
Bug when
td.infare inattrsand files saved and loaded to .json twice.Cached property cleared in copying an object with
validate=False.Error when
JaxSimulationpassed toModeSolver.simulation: now it will be converted to a regularSimulation, with a warning.Thread-safe creation of
TIDY3D_DIR.NumPy 2.1 compatibility issue where
numpy.float64values passed to xarray interpolation would raise TypeError.Validation error in inverse design plugin when simulation has no sources by adding a source existence check before validating pixel size.
System-dependent floating-point precision issue in EMEGrid validation.
Fixed magnitude of gradient computation in
CustomMediumby accounting properly for full volume element when permittivity data is defined over less dimensions than the medium.Fixed key ordering in design plugin when returning
Resultfrom an optimization method run.Bug in
Batch, where duplicate folders might be created in the Web UI if the folder did not already exist.Make gauge selection for non-converged modes more robust.
Fixed extremely long runtime generated by
RunTimeSpecin the presence ofLossyMetalMedium.Fixed
ComponentModeler.to_filewhen its batch is empty.In web api, mode solver is patched with remote data so that certain methods like
plot_fieldshow remote data.Fixed common cross-referencing typo in docstrings.
Added
viz_specproperty toAbstractStructureto fix error when plotting structures that have nomedium.Fixed invalid adjoint source creation by disallowing sources made from non-traced fields.
2.7.9 - 2025-01-22#
Fixed#
Potential task name mismatches between forward and adjoint simulations in batch tasks.
Magnitude of gradient computation in
CustomMediumby accounting properly for full volume element when permittivity data is defined over fewer dimensions than the medium.
2.7.8 - 2024-11-27#
Changed#
BatchDatais now a mapping and can be accessed and iterated over like a Python dictionary (.keys(),.values(),.items()).
Fixed#
Gradient inaccuracy when a multi-frequency monitor is used but a single frequency is selected.
Revert single cell center approximation for custom medium gradient.
2.7.7 - 2024-11-15#
Added#
Autograd support for local field projections using
FieldProjectionKSpaceMonitor.Function
components.geometry.utils.flatten_groupsnow also flattens transformed groups when requested.Differentiable
smooth_min,smooth_max, andleast_squaresfunctions intidy3d.plugins.autograd.Differential operators
gradandvalue_and_gradintidy3d.plugins.autogradthat behave similarly to the autograd operators but support auxiliary data viaaux_data=Trueas well as differentiation w.r.t.DataArray.@scalar_objectivedecorator intidy3d.plugins.autogradthat wraps objective functions to ensure they return a scalar value and performs additional checks to ensure compatibility of objective functions with autograd. Used by default intidy3d.plugins.autograd.value_and_gradas well astidy3d.plugins.autograd.grad.Autograd support for simulations without adjoint sources in
runas well asrun_async, which will not attempt to run the simulation but instead return zero gradients. This can sometimes occur if the objective function gradient does not depend on some simulations, for example when usingminormaxin the objective.
Changed#
CustomMediumdesign regions require far less data when performing inverse design by reducing adjoint field monitor size for dims with one pixel.Calling
.valuesonDataArrayno longer raises aDeprecationWarningduring automatic differentiation.Minimum number of PML layers set to 6.
Structure.background_permittivity : floatfor specifying background medium for shape differentiation deprecated in favor ofStructure.background_medium : Mediumfor more generality.Validate mode objects so that if a bend radius is defined, it is not smaller than half the size of the modal plane along the radial direction (i.e. the bend center is not inside the mode plane).
Fixed#
Regression in local field projection leading to incorrect projection results.
Bug when differentiating with respect to
Cylinder.center.xarray2024.10.0 compatibility for autograd.Some failing examples in the expressions plugin documentation.
Inaccuracy in transforming gradients from edge to
PolySlab.vertices.Bug in
run_asyncwhere an adjoint simulation would sometimes be assigned to the wrong forward simulation.Validate against nonlinearity or modulation in
FullyAnisotropicMedium.from_diagonal.Add warning to complex-field nonlinearities, which may require more careful physical interpretation.
2.7.6 - 2024-10-30#
Added#
Users can pass the
shadingargument in theSimulationData.plot_fieldtoXarray.plotmethod. Whenshading='gouraud', the image is interpolated, producing a smoother visualization.Users can manually specify the background medium for a structure to be used for geometry gradient calculations by supplying
Structure.background_permittivity. This is useful when there are overlapping structures or structures embedded in other mediums.Autograd functions can now be called directly on
DataArray(e.g.,np.sum(data_array)) in objective functions.Automatic differentiation support for local field projections with
FieldProjectionAngleMonitorandFieldProjectionCartesianMonitorusingFieldProjector.project_fields(far_field_monitor).
Changed#
Improved autograd tracer handling in
DataArray, resulting in significant speedups for differentiation involving large monitors.Triangulation of
PolySlabpolygons now supports polygons with collinear vertices.Frequency and wavelength utilities under
tidy3d.frequenciesandtidy3d.wavelengths.
Fixed#
Minor gradient direction and normalization fixes for polyslab, field monitors, and diffraction monitors in autograd.
Resolved an issue where temporary files for adjoint simulations were not being deleted properly.
Resolve several edge cases where autograd boxes were incorrectly converted to numpy arrays.
Resolve issue where scalar frequencies in metric definitions (
ModeAmp(f=freq)instead ofModeAmp(f=[freq])) would erroneously fail validation.
2.7.5 - 2024-10-16#
Added#
TopologyDesignRegionis now invariant inzby default and supports assigning dimensions along which a design should be uniform viaTopologyDesignRegion(uniform=(bool, bool, bool)).Support for arbitrary padding sizes for all padding modes in
tidy3d.plugins.autograd.functions.pad.Expression.filter(target_type, target_field)method for extracting object instances and fields from nested expressions.Additional constraints and validation logic to ensure correct setup of optimization problems in
invdesplugin.tidy3d.plugins.pytorchto wrap autograd functions for interoperability with PyTorch via theto_torchwrapper.
Changed#
Renamed
Metric.freqs–>Metric.fand made frequency argument optional, in which case all frequencies from the relevant monitor will be extracted. Metrics can still be initialized with bothforfreqs.
Fixed#
Some validation fixes for design region.
Bug in adjoint source creation that included empty sources for extraneous
FieldMonitorobjects, triggering unnecessary errors.Correct sign in objective function history depending on
Optimizer.maximize.Fix to batch mode solver run that could create multiple copies of the same folder.
Fixed
ModeSolver.plotmethod when the simulation is not at the origin.Gradient calculation is orders of magnitude faster for large datasets and many structures by applying more efficient handling of field interpolation and passing to structures.
Bug with infinite coordinates in
ClipOperationnot working with shapely.
2.7.4 - 2024-09-25#
Added#
New
tidy3d.plugins.expressionsmodule for constructing and serializing mathematical expressions and simulation metrics likeModeAmpandModePower.Support for serializable expressions in the
invdesplugin (InverseDesign(metric=ModePower(...))).Added
InitializationSpecas the default way to initialize design region parameters in theinvdesplugin (DesignRegion(initialization_spec=RandomInitializationSpec(...))).Callback support in
invdes.Optimizerand support for running the optimizer for a fixed number of steps via thenum_stepsargument inOptimizer.continue_run().Convenience method
Structure.from_permittivity_array(geometry, eps_data), which creates structure containingCustomMediumwitheps_dataarray sampled withingeometry.bounds.
Changed#
All filter functions in
plugins/autogradnow accept either an absolute size in pixels or aradiusanddlargument.Reverted fix for TFSF close to simulation boundaries that was introduced in 2.7.3 as it could cause different results in some cases with nonuniform mesh along the propagation direction.
Fixed#
Ensure
pathargument inrun()function is respected when running under autograd or the adjoint plugin.Bug in
Simulation.subsection(used in the mode solver) when nonlinear materials rely on information about sources outside of the region.
2.7.3 - 2024-09-12#
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)).Simulation.num_computational_grid_pointsproperty to examine the number of grid cells that compose the computational domain corresponding to the simulation. This can differ fromSimulation.num_cellsbased on boundary conditions and symmetries.Support for
dilationargument inJaxPolySlab.Support for autograd differentiation with respect to
Cylinder.radiusandCylinder.center(for elements not along axis dimension).Cylinder.to_polyslab(num_pts_circumference, **kwargs)to convert a cylinder into a discretized version represented by aPolySlab.tidy3d.plugins.invdes.Optimizernow accepts an optional optimization direction via themaximizeargument (defaults tomaximize=True).
Changed#
PolySlabnow raises error when differentiating and dilation causes damage to the polygon.Validator
boundaries_for_zero_dimsto raise error when Bloch boundaries are used along 0-sized dims.FieldProjectionKSpaceMonitorsupport for 2D simulations withfar_field_approx = True.
Fixed#
DataArrayinterpolation failure due to incorrect ordering of coordinates when interpolating with autograd tracers.Error in
CustomSourceTimewhen evaluating at a list of times entirely outside of the range of the envelope definition times.Improved passivity enforcement near high-Q poles in
FastDispersionFitter. Failed passivity enforcement could lead to simulation divergences.More helpful error and suggestion if users try to differentiate w.r.t. unsupported
FluxMonitoroutput.Removed positive warnings in Simulation validators for Bloch boundary conditions.
Improve accuracy in
Boxshifting boundary gradients.Improve accuracy in
FieldDataoperations involving H fields (like.flux).Better error and warning handling in autograd pipeline.
Added the option to specify the
num_freqsargument andkwargsto the.to_sourcemethod for bothModeSolverandComponentModeler.Fixes to TFSF source in some 2D simulations, and in some cases when the injection plane is close to the simulation domain boundaries.
2.7.2 - 2024-08-07#
Added#
Mode solver plugin now supports ‘EMESimulation’.
TriangleMeshclass: automatic removal of zero-area faces, and functionsfill_holesandfix_windingto attempt mesh repair.Added progress bar for EME simulations.
Support for grid specifications from grid cell boundary coordinates via
CustomGridBoundariesthat subclasses fromGridSpec1d.More convenient mesh importing from another simulation through
grid_spec = GridSpec.from_grid(sim.grid).autogradgradient calculations can be performed on the server by passinglocal_gradient = Falseintoweb.run()orweb.run_async().Automatic differentiation with
autogradsupports multiple frequencies through single, broadband adjoint simulation when the objective function can be formulated as depending on a single dataset in the outputSimulationDatawith frequency dependence only.Convenience method
EMESimulation.subsectionto create a new EME simulation based on a subregion of an existing one.Added
fluxandpoyntingproperties toFieldProjectionCartesianData.
Changed#
Mode solver now always operates on a reduced simulation copy.
Moved
EMESimulationsize limit validators to preupload.Error if field projection monitors found in 2D simulations, except
FieldProjectionAngleMonitororFieldProjectionCartesianMonitorwithfar_field_approx = True. Support for other monitors and for exact field projection will be coming in a subsequent Tidy3D version.
Fixed#
Error when loading a previously run
BatchorComponentModelercontaining custom data.Error when plotting mode plane PML and the simulation has symmetry.
Validators using
TriangleMesh.intersections_planewill fall back on bounding box in case the method fails for a non-watertight mesh.Bug when running the same
ModeSolverfirst locally then remotely, or vice versa, in which case the cached data from the first run is always returned.Gradient monitors for
PolySlabonly store fields at the center location along axis, reducing data usage.Validate the forward simulation on the client side even when using
local_gradient=Falsefor server-side gradient processing.Gradient inaccuracies in
PolySlab.vertices,Medium.conductivity, andDiffractionDatas-polarization.Adjoint field monitors no longer store H fields, which aren’t needed for gradient calculation.
MeshOverrideStructuresin aSimulation.GridSpecare properly handled to remove any derivative tracers.
2.7.1 - 2024-07-10#
Added#
Support for differentiation with respect to
GeometryGroup.geometrieselements.Users can now export
SimulationDatato MATLAB.matfiles with theto_mat_filemethod.ModeSolvermethods to plot the mode plane simulation components, including.plot(),.plot_eps(),.plot_structures_eps(),.plot_grid(), and.plot_pml().Support for differentiation with respect to monitor attributes that require interpolation, such as flux and intensity.
Support for automatic differentiation with respect to
.eps_infand.polescontained in dispersive mediumstd.PoleResidueandtd.CustomPoleResidue.Support for
FieldProjectionAngleMonitorfor 2D simulations withfar_field_approx = True.
Fixed#
Bug where boundary layers would be plotted too small in 2D simulations.
Bug when plotting transformed geometries.
Bug when snapping
CoaxialLumpedPortto grid cell boundaries.Errors in
PolySlabwhen using autograd differentiation with non-zerosidewall_angleanddilation.Error in
EMESimulationData.smatrix_in_basiswhen using older versions of xarray.Gradients for
Boxobjects when simulation size is < 3D.
2.7.0 - 2024-06-17#
Added#
HeatSimulationis now under the more generic classHeatChargeSimulation. 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
EMESimulationclass.2D heat simulations are now fully supported.
tidy3d.plugins.adjoint.web.run_localused in place ofrunwill skip validators that restrict the size or number ofinput_structures.Introduces the
microwaveplugin which includesImpedanceCalculatorfor computing the characteristic impedance of transmission lines.Simulationnow acceptsLumpedElementType, which currently only supports theLumpedResistortype.LumpedPorttogether withLumpedResistormake up the newTerminalComponentModelerin thesmatrixplugin.Uniaxial medium Lithium Niobate to material library.
Properties
num_time_steps_adjointandtmesh_adjointtoJaxSimulationto estimate adjoint run time.Ability to add
pathtoupdated_copy()method to recursively update sub-components of a tidy3d model. For examplesim2 = sim.updated_copy(size=new_size, path="structures/0/geometry")creates a recursively updated copy ofsimwheresim.structures[0].geometryis updated withsize=new_size.Python 3.12 support. Python 3.8 deprecation. Updated dependencies.
Tidy3D objects may store arbitrary metadata in an
.attrsdictionary.JaxSimulationnow supports the following GDS export methods:to_gds(),to_gds_file(),to_gdspy(), andto_gdstk().RunTimeSpecaccepted bySimulation.run_timeto adaptively set the run time based on Q-factor, propagation length, and other factors.JaxDataArraynow supports selection by nearest value viaJaxDataArray.sel(..., method="nearest").Convenience method
constant_loss_tangent_modelinFastDispersionFitterto fit constant loss tangent material model.Classmethods in
DispersionFitterto load complex-valued permittivity or loss tangent data.Pre-upload validator to check that mode sources overlap with more than 2 grid cells.
Support
2DMediumforTransformed/GeometryGroup/ClipOperationgeometries.num_procargument totidy3d.plugins.adjoint.web.run_localto control the number of processes used on the local machine for gradient processing.Support for complex and self-intersecting polyslabs in adjoint module via
JaxComplexPolySlab.Support for
.gzfiles inSimulationversion updater.Warning if a nonuniform custom medium is intersecting
PlaneWave,GaussianBeam,AstigmaticGaussianBeam,FieldProjectionCartesianMonitor,FieldProjectionAngleMonitor,FieldProjectionKSpaceMonitor, andDiffractionMonitor.Added a
CoaxialLumpedPortandCoaxialLumpedResistorfor coaxial type transmission lines and excitations.Automatic differentiation supported natively in Tidy3D components, and through the
web.run()andweb.run_async()functions throughautograd.A batch of
ModeSolverobjects can be run concurrently usingtidy3d.plugins.mode.web.run_batch()RectangularWaveguide.plot_fieldoptionally draws geometry edges over fields.RectangularWaveguidesupports layered cladding above and below core.SubpixelSpecaccepted bySimulation.subpixelto select subpixel averaging methods separately for dielectric, metal, and PEC materials. Specifically, added support for conformal mesh methods near PEC structures that can be specified through the fieldpecin theSubpixelSpecclass. Note: previously,subpixel=Falsewas implementing staircasing for every material except PEC. Now,subpixel=Falseimplements direct staircasing for all materials. For PEC, the behavior ofsubpixel=Falsein Tidy3D < 2.7 is now achieved throughsubpixel=SubpixelSpec(pec=HeuristicPECStaircasing()), whilesubpixel=Truein Tidy3D < 2.7 is now achieved throughsubpixel=SubpixelSpec(pec=Staircasing()). The default issubpixel=SubpixelSpec(pec=PECConformal())for more accurate PEC modelling.Lossless
Green2008variant for crystalline silicon added to material library.GridSpecsupportssnapping_pointsthat enforce grid boundaries to pass through them.Support for unstructured datasets (
TriangularGridDatasetandTetrahedralGridDataset) in custom medium classes.Support for
Transformed/GeometryGroup/ClipOperationgeometries in heat solver.Parameter
relative_min_dlinUniformUnstructuredGridandDistanceUnstructuredGridto control minimal mesh size.Improved validation for
HeatSimulation.Functions to clean unstructured datasets from degenerate cells and unused points.
Changed#
IMPORTANT NOTE: differentiable fields in the
adjointplugin (JaxBox.size,JaxBox.center,JaxPolySlab.vertices) no longer store the derivative information after the object is initialized. For example, if using JaxPolySlab.vertices directly in an objective function, the vertices will have no effect on the gradient. Instead, this information is now stored in a field of the same name with_jaxsuffix, eg.JaxPolySlab.vertices_jax. For some applications, such as evaluating penalty values, please change toradius_penalty.evaluate(polyslab.vertices_jax)or use the vertices as generated by your parameterization functions (make_vertices(params)).run_timeof the adjoint simulation is set more robustly based on the adjoint sources and the forward simulationrun_timeassim_fwd.run_time + c / fwdith_adjwherec=10.FieldTimeMonitorrestriction to record at a maximum of 5000 time steps if the monitor is not zero-dimensional, to avoid creating unnecessarily large amounts of data.Bumped
trimeshversion to>=4,<4.2.Make directories in path passed to
.to_gds_file()methods, if they don’t exist.Changed sign of mode solver PML conductivity to match the
exp(-1j * omega * t)convention used everywhere else. Previously, loss due to PML was coming out as negativek_effof the mode, while now it comes out as positivek_eff, in line with material loss.Augmented the PML mode solver profile to the form
s(x) = kappa(x) + 1j * sigma(x) / (omega * EPSILON_0). Previously,kappawas not used. The parameters are currently set tokappa_min = 1,kappa_max = 3,sigma_max = 2. These are not yet exposed to the user.Also scaling
sigma_maxby the average relative impedance in the mode solver PML region.tidy3d convertfrom.lsffiles to tidy3d scripts has moved to another repository athttps://github.com/hirako22/Lumerical-to-Tidy3D-Converter.Relax validation of smallest triangle area in
TriangleMesh.Default variant for silicon dioxide in material library switched from
HoribatoPalik_Lossless.Sources and monitors which are exactly at the simulation domain boundaries will now error. They can still be placed very close to the boundaries, but need to be on the inside of the region.
Relaxed
dtstability criterion for 1D and 2D simulations.Switched order of angle and bend transformations in mode solver when both are present.
Fixed#
Bug in PolySlab intersection if slab bounds are
infon one side.Better error message when trying to transform a geometry with infinite bounds.
JaxSimulation.epsilonproperly handlesinput_structures.FieldData.fluxin adjoint plugin properly returnsJaxDataArraycontaining frequency coordinatefinstead of summing over values.Proper error message when trying to compute Poynting vector for adjoint field data.
Bug in plotting and computing tilted plane intersections of transformed 0 thickness geometries.
Simulation.to_gdspy()andSimulation.to_gdstk()now place polygons in GDS layer(0, 0)when nogds_layer_dtype_mapis provided, instead of erroring.task_idnow properly stored inJaxSimulationData.Bug in
FastDispersionFitterwhen poles move close to input frequencies.Bug in plotting polarization vector of angled sources.
Bug in
SpatialDataArray.reflect()that was causing errors for older versions ofxarray.ModeSolver.plot_fieldcorrectly returning the plot axes.Avoid error if non-positive refractive index used for integration resolution in adjoint.
Make
Batch.monitorrobust if the run status is not found.Bugs in slicing unstructured datasets along edges.
Correct behavior of temperature monitors in the presence os symmetry.
2.6.4 - 2024-04-23#
Fixed#
Set
importlib-metadata,boto3,requests, andclickversion requirements to how they were in Tidy3D v2.5.Bug in
td.FullyAnisotropicMediumwhen added toadjoint.JaxStructureStaticMedium.Bug when extra
**kwargspassed toDesign.run_batch().
2.6.3 - 2024-04-02#
Added#
Added new validators in
HeatSimulation: no structures with dimensions of zero size, no all-Neumann boundary conditions, non-empty simulation domain.web.Batchuses multi-threading for upload and download operations. The total time for many tasks is reduced by an order of magnitude.
Changed#
Revert forbidden
"in component names.
2.6.2 - 2024-03-21#
Changed#
Characters
"and/not allowed in component names.Change error when
JaxPolySlab.sidewall_angle != 0.0to a warning, enabling optimization with slanted sidewalls if a lower accuracy gradient is acceptable.Simplified output and logging in
web.Batchwithverbose=True.
Fixed#
Compute time stepping speed shown
tidy3d.logusing only the number of time steps that was run in the case of early shutoff. Previously, it was using the total number of time steps.Bug in PolySlab intersection if slab bounds are
infon one side.Divergence in the simultaneous presence of PML, absorber, and symmetry.
Fixed validator for
ModeSpec.bend_radius == 0, which was not raising an error.
2.6.1 - 2024-03-07#
Added#
tidy3d.plugins.design.Resultsstore theBatchDatafor batch runs in the.batch_datafield.Prompting user to check solver log when loading solver data if warnings were found in the log, or if the simulation diverged or errored.
Changed#
Slightly reorganized
web.runlogging whenverbose=Trueto make it clearer.
Fixed#
Fix to 3D surface integration monitors with some surfaces completely outside of the simulation domain which would sometimes still record fields.
Better error handling if remote
ModeSolvercreation gives response ofNone.Validates that certain incompatible material types do not have intersecting bounds.
Fixed handling of the
frequencyargument in PEC medium.Corrected plotting cmap if
val='re'passed toSimulationData.plot_field.Bug when converting point
FieldMonitordata to scalar amplitude for adjoint source in later jax versions.Handle special case when vertices overlap in
JaxPolySlabto give 0 grad contribution from edge.Corrected some mistakes in the estimation of the solver data size for each monitor type, which affects the restrictions on the maximum monitor size that can be submitted.
Bug in visualizing a slanted cylinder along certain axes in 2D.
Bug in
ModeSolver.reduced_simulation_copythat was causing mode profiles to be allNaN.Bug in
Simulation.subsection()that was causing zero-size dimensions not to be preserved.Bug in
CustomGridthat was causing an error when using for zero-size dimensions.When downloading gzip-ed solver data, automatically create the parent folder of the
to_filepath if it does not exist.
2.6.0 - 2024-02-21#
Added#
Automatic subdivision of 2D materials with inhomogeneous substrate/superstrate.
Mode field profiles can be stored directly from a
ModeMonitorby settingstore_fields_direction.Users can toggle https ssl version through
from tidy3d.web.core.environment import EnvandEnv.set_ssl_version(ssl_version: ssl.TLSVersion)Free-carrier absorption (FCA) and free-carrier plasma dispersion (FCPD) nonlinearities inside
TwoPhotonAbsorptionclass.log_pathargument inset_logging_file, set toFalseby default.ErosionDilationPenaltytotidy3d.plugins.adjoint.utils.penaltyto penalize parameter arrays that change under erosion and dilation. This is a simple and effective way to penalize features that violate minimum feature size or radius of curvature fabrication constraints in topology optimization.tidy3d.plugins.designtool to explore user-defined design spaces.ModeData.dispersionandModeSolverData.dispersionare calculated together with the group index.A utility function
td.medium_from_nk()that automatically constructs a non-dispersive medium when permittivity>=1, and a single-pole Lorentz medium when permittivity<1.Integration of the
documentationalongside the main codebase repository.Integration of the
tidy3d-notebooksrepository.tidy3d developCLI and development guide on the main documentation.Added a convenience method
Simulation.subsection()to a create a new simulation based on a subregion of another one.Users can toggle task caching through
from tidy3d.web.core.environment import EnvandEnv.enable_caching(True)to enable,Env.enable_caching(False)to disable, orEnv.enable_caching(None)to use global setting from web client account page.
Changed#
DataArray.to_hdf5()accepts both file handles and file paths.ModeSolverMonitoris deprecated. Mode field profiles can be retrieved directly fromModeMonitorwithstore_fields_directionset.The log file for a simulation run has been modified to include more information including warnings collected during execution.
poetrybased installation. Removal ofsetup.pyandrequirements.txt.Upgrade to sphinx 6 for the documentation build, and change of theme.
Remote mode solver web api automatically reduces the associated
Simulationobject to the mode solver plane before uploading it to server.All solver output is now compressed. However, it is automatically unpacked to the same
simulation_data.hdf5by default when loading simulation data from the server.Internal refactor of
adjointplugin to separatejax-traced fields from regulartidy3dfields.Added an optional argument
fieldin class method.from_vtu()ofTriangularGridDatasetandTetrahedralGridDatasetfor specifying the name of data field to load.
Fixed#
Add dispersion information to dataframe output when available from mode solver under the column “dispersion (ps/(nm km))”.
Skip adjoint source for diffraction amplitudes of NaN.
Helpful error message if
valsupplied toSimulationData.plot_fieldnot supported.Fixed validator that warns if angled plane wave does not match simulation boundaries, which was not warning for periodic boundaries.
Validates that no nans are present in
DataArrayvalues in custom components.Removed nans from Cartesian temperature monitors in thermal simulations by using nearest neighbor interpolation for values outside of heat simulation domain.
Removed spurious warnings realted to reloading simulation containing
PerturbationMediumwithCustomChargePerturbation/CustomHeatPerturbation.
2.5.2 - 2024-01-11#
Fixed#
Internal storage estimation for 3D surface integration monitors now correctly includes only fields on the surfaces, and not the whole volume.
2.5.1 - 2024-01-08#
Added#
ModeData.dispersionandModeSolverData.dispersionare calculated together with the group index.String matching feature
contains_strtoassert_log_leveltesting utility.Warning in automatic grid generation if a structure has a non-zero size along a given direction that is too small compared to a single mesh step.
assert_log_leveladds string matching withcontains_strand ensures no higher log level recorded than expected.AssertLogLevelcontext manager for testing log level and automatically clearing capture.More robust validation for boundary conditions and symmetry in 1D and 2D simulations.
Changed#
jaxandjaxlibversions bumped to0.4.*.Improved and unified warning message for validation failure of dependency fields in validators.
Fixed#
Error in automatic grid generation in specific cases with multiple thin structures.
2.5.0 - 2023-12-13#
Added#
Ability to mix regular mediums and geometries with differentiable analogues in
JaxStructure. Enables support for shape optimization with dispersive mediums. New classesJaxStructureStaticGeometryandJaxStructureStaticMediumaccept regularTidy3Dgeometry and medium classes, respectively.Warning if nonlinear mediums are used in an
adjointsimulation. In this case, the gradients will not be accurate, but may be approximately correct if the nonlinearity is weak.Validator for surface field projection monitors that warns if projecting backwards relative to the monitor’s normal direction.
Validator for field projection monitors when far field approximation is enabled but the projection distance is small relative to the near field domain.
Ability to manually specify a medium through which to project fields, when using field projection monitors.
Added support for two-photon absorption via
TwoPhotonAbsorptionclass. AddedKerrNonlinearitythat implements Kerr effect without third-harmonic generation.Can create
PoleResiduefrom LO-TO form viaPoleResidue.from_lo_to.Added
TriangularGridDatasetandTehrahedralGridDatasetfor storing and manipulating unstructured data.Support for an anisotropic medium containing PEC components.
SimulationData.mnt_data_from_file()method to load only a single monitor data object from a simulation data.hdf5file._hash_selfto base model, useshashlibto hash a Tidy3D component the same way every session.ComponentModeler.plot_sim_eps()method to plot the simulation permittivity and ports.Support for 2D PEC materials.
Ability to downsample recorded near fields to speed up server-side far field projections.
FieldData.apply_phase(phase)to multiply field data by a phase.Optional
phaseargument toSimulationData.plot_fieldthat applies a phase to complex-valued fields.Ability to window near fields for spatial filtering of far fields for both client- and server-side field projections.
Support for multiple frequencies in
output_monitorsinadjointplugin.GDSII export functions
to_gds_file,to_gds,to_gdspy, andto_gdstktoSimulation,Structure, andGeometry.verboseargument toestimate_costandreal_costfunctions such that the cost is logged ifverbose==True(default). Additional helpful messages may also be logged.Support for space-time modulation of permittivity and electric conductivity via
ModulationSpecclass. The modulation function must be separable in space and time. Modulations with user-supplied distributions in space and harmonic modulation in time are supported.Geometry.intersections_tilted_planecalculates intersections with any plane, not only axis-aligned ones.Transformedclass to support geometry transformations.Methods
Geometry.translated,Geometry.scaled, andGeometry.rotatedcan be used to create transformed copies of any geometry.Time zone in webAPI logging output.
Class
Sceneconsisting of a background medium and structures for easier drafting and visualization of simulation setups as well as transferring such information between different simulations.Solver for thermal simulation (see
HeatSimulationand related classes).Specification of material thermal properties in medium classes through an optional field
.heat_spec.
Changed#
Credit cost for remote mode solver has been modified to be defined in advance based on the mode solver details. Previously, the cost was based on elapsed runtime. On average, there should be little difference in the cost.
Mode solves that are part of an FDTD simulation (i.e. for mode sources and monitors) are now charged at the same flex credit cost as a corresponding standalone mode solver call.
Any
FreqMonitor.freqsorSource.source_time.freq0smaller than1e5now raise an error as this must be incorrect setup that is outside the Tidy3D intended range (note default frequency isHz).When using complex fields (e.g. with Bloch boundaries), FluxTimeMonitor and frequency-domain fields (including derived quantities like flux) now only use the real part of the time-domain electric field.
Indent for the json string of Tidy3D models has been changed to
Nonewhen used internally; kept asindent=4for writing tojsonandyamlfiles.API for specifying one or more nonlinear models via
NonlinearSpec.models.freqsanddirectionare optional inModeSolvermethods converting to monitor and source, respectively. If not supplied, uses the values from theModeSolverinstance calling the method.Removed spurious
-1factor in field amplitudes injected by field sources in some cases. The injectedE-field should now exactly match the analytic, mode, or custom fields that the source is expected to inject, both in the forward and in the backward direction.Restriction on the maximum memory that a monitor would need internally during the solver run, even if the final monitor data is smaller.
Restriction on the maximum size of mode solver data produced by a
ModeSolverserver call.Updated versions of
boto3,requests, andclick.python 3.7 no longer tested nor supported.
Removed warning that monitors now have
colocate=Trueby default.If
PMLor any absorbing boundary condition is used along a direction where theSimulationsize is zero, an error will be raised, rather than just a warning.Remove warning that monitors now have
colocate=Trueby default.Internal refactor of Web API functionality.
Geometry.from_gdsdoesn’t create unnecessary groups of single elements.
Fixed#
Fixed energy leakage in TFSF when using complex fields.
Fixed the duplication of log messages in Jupyter when
set_logging_fileis used.If input to circular filters in adjoint have size smaller than the diameter, instead of erroring, warn user and truncate the filter kernel accordingly.
When writing the json string of a model to an
hdf5file, the string is split into chunks if it has more than a set (very large) number of characters. This fixes potential error if the string size is more than 4GB.Proper equality checking between
Tidy3dBaseModelinstances, which takesDataArrayvalues and coords into account and handlesnp.ndarraytypes.Correctly set the contour length scale when exporting 2D (or 1D) structures with custom medium to GDSII.
Improved error handling if file can not be downloaded from server.
Fix for detection of file extensions for file names with dots.
Restrict to
matplotlib>= 3.5, avoiding bug in plottingCustomMedium.Fixes
ComponentModelerbatch file being different in different sessions by use of deterministic hash function for computing batch filename.Can pass
kwargstoComponentModeler.plot_sim()to use inSimulation.plot().Ensure that mode solver fields are returned in single precision if
ModeSolver.ModeSpec.precision == "single".If there are no adjoint sources for a simulation involved in an objective function, make a mock source with zero amplitude and warn user.
2.4.3 - 2023-10-16#
Added#
Geometry.zero_dimsmethod that usesGeometry.boundsand speeds up the validator for zero-sized geometries.
Changed#
Limited number of distinct sources to 1000. In cases where a complicated spatial dependence of the source is desired, a
CustomFieldSourceor aCustomCurrentSourcecan be used instead of multiple distinct sources.
Fixed#
Properly handle
.freqsinoutput_monitorsof adjoint plugin.Simulation updater for
.hdf5files with custom data.Fix to solver geometry parsing in some edge cases of slanted polyslab and STL geometries that could lead to an error or divergence.
Fix to errors in some edge cases of a TFSF source setup.
2.4.2 - 2023-9-28#
Added#
Warnings for too many frequencies in monitors; too many modes requested in a
ModeSpec; too many number of grid points in a mode monitor or mode source.
Changed#
Time domain monitors warn about data usage if all defaults used in time sampler specs.
Fixed#
Faster sorting of modes in
ModeSolverData.overlap_sortby avoiding excessive data copying.Ensure same
Gridis generated in forward and adjoint simulations by settingGridSpec.wavelengthmanually in adjoint.Properly handling of
JaxBoxderivatives both for multi-cell and single cell thickness.Properly handle
JaxSimulation.monitorswith.freqsasnp.ndarrayin adjoint plugin.Properly handle
JaxDataArray.sel()with single coordinates and symmetry expansion.Properly handle
JaxDataArray * xr.DataArraybroadcasting.Stricter validation of
JaxDataArraycoordinates and values shape.
2.4.1 - 2023-9-20#
Added#
ModeSolverData.pol_fractionandModeSolverData.pol_fraction_waveguideproperties to compute polarization fraction of modes using two different definitions.ModeSolverData.to_dataframe()andModeSolverData.modes_infofor a convenient summary of various modal properties of the computed modes.Loss upper bound estimation in
PoleResiduematerial model.Command line tool
tidy3d convertfor conversion from.lsfproject files into equivalent python scripts implementing the project in Tidy3D. Usage:tidy3d convert example.lsf tidy3d_script.py.
Changed#
Output task URL before and after simulation run and make URLs blue underline formatting.
Support to load and save compressed HDF5 files (
.hdf5.gz) directly fromTidy3dBaseModel.Line numbers no longer printed in webapi log output.
Empty list returned if the folder cannot be queried in
web.get_tasks().
Fixed#
Filtering based on
ModeSpec.filter_polnow uses the user-exposedModeSolverData.pol_fractionproperty. This also fixes the previous internal handling which was not taking the nonuniform grid, as well as and the propagation axis direction for modes in angled waveguides. In practice, the results should be similar in most cases.Bug with truly anisotropic
JaxCustomMediumin adjoint plugin.Bug in adjoint plugin when
JaxBoxis less than 1 grid cell thick.Bug in
adjointplugin whereJaxSimulation.structuresdid not accept structures containingtd.PolySlab.
2.4.0 - 2023-9-11#
Added#
Configuration option
config.log_suppressioncan be used to control the suppression of log messages.web.abort()andJob.abort()methods allowing user to abort running tasks without deleting them. If a task is aborted, it cannot be restarted later, a new one needs to be created and submitted.FastDispersionFitterfor fast fitting of material dispersion data.Simulation.monitors_data_sizeproperty mapping monitor name to its data size in bytes.Source with arbitrary user-specified time dependence through
CustomSourceTime.Interface for specifying material heat and charge perturbation models. Specifically, non-dispersive and dispersive mediums with heat and/or charge perturbation models can be defined through classes
PerturbationMediumandPerturbationPoleResidue, where perturbations to each parameter is specified using classParameterPerturbation. A convenience functionSimulation.perturbed_mediums_copyis added to classSimulationwhich applies heat and/or charge fields to mediums containing perturbation models.Added
hlimandvlimkwargs toSimulation.plot()andSimulation.plot_eps()for setting horizontal and vertical plot limits.Added support for chi3 nonlinearity via
NonlinearSusceptibilityclass.Spatial downsampling allowed in
PermittivityMonitorthrough theinterval_spaceargument.ClipOperationgeometry type allows the construction of complex geometries through boolean operations.Operations on geometry (
+,|,*,&,-,^) will create the appropriateClipOperationorGeometryGroup.Geometry.from_shapelyto extrude shapely primitives into Tidy3D geometry.Geometry.from_gdsto extrude GDS cells into geometry groups with support for holes.components.geometry.utils.traverse_geometryused internally to traverse geometry trees.components.geometry.utils.flatten_groupsused internally to validate large geometry trees.
Changed#
Add
widthandheightoptions toSimulation.plot_3d().sim_with_source(),sim_with_monitor(), andsim_with_mode_solver_monitor()methods allowing theModeSolverto create a copy of itsSimulationwith an addedModeSource,ModeMonitor, orModeSolverMonitor, respectively.nyquist_stepalso taking the frequency range of frequency-domain monitors into account.Added option to allow DC component in
GaussianPulsespectrum, by settingremove_dc_component=FalseinGaussianPulse.Jax installation from
pip install "tidy3d[jax]"handled same way on windows as other OS if python >= 3.9.colocateintroduced as an argument toModeSolverand a Field inModeSolverMonitor, set to True by default.FieldTimeMonitor-s andFieldMonitor-s that havecolocate=Truereturn fields colocated to the grid boundaries rather than centers. This matches better user expectations for example when the simulation has a symmetry (explicitly defined, or implicit) w.r.t. a given axis. When colocating to centers, fields would bedl / 2away from that symmetry plane, and components that are expected to go to zero do not (of course, they still do if interpolated to the symmetry plane). Another convenient use case is that it is easier to place a 2D monitor exactly on a grid boundary in the automatically generated grid, by simply passing an override structure with the monitor geometry.In these monitors,
colocateis now set toTrueby default. This is to avoid a lot of potential confusion coming from returning non-colocated fields by default, when colocated fields need to be used when computing quantities that depend on more than one field component, like flux or field intensity.Field colocation for computations like flux, Poynting, and modal overlap also happen to cell boundaries rather than centers. The effect on final results should be close to imperceptible as verified by a large number of backend tests and our online examples. Any difference can be at most on the scale of the difference that can be observed when slightly modifying the grid resolution.
GeometryGroupaccepts otherGeometryGroupinstances as group elements.FDTD and mode solver tasks always upload
hdf5.gzfile instead ofhdf5orjson.web.download_json()will downloadsimulation.hdf5.gzand unzip it, then load the json from the hdf5 file.SimulationTask.get_simulation_hdf5()will download simulation.hdf5.gz and unzip it to hdf5 file.The width of Tidy3D logging output is changed to 80 characters.
Upgrades to
pydantic==2.*withpydantic.v1imports.Uses
rufffor linting instead ofpylint.Added lower bound validator to
freqsin mode solver.Added lower bound validator to
group_index_stepinModeSpec.ComponentModeler.freqsnow aFreqArray, so it can be initialized from numpy, list or tuple.
Fixed#
Handles
TIDY3D_ENVproperly when set toprod.Redundant phase compensation for shifted source in smatrix plugin.
Bug in angled mode solver with negative
angle_theta.Properly include
JaxSimulation.input_structuresinJaxSimulationData.plot_field().Numerically stable sigmoid function in radius of curvature constraint.
Spatial monitor downsampling when the monitor is crossing a symmetry plane or Bloch boundary conditions.
Cast
JaxDataArray.__abs__output tojnp.array, reducing conversions needed in objective functions.Correct color and zorder for line segments when plotting 2D geometries.
Bug in
Simulation.eps_boundsthat was always setting the lower bound to 1.Extended lower limit of frequency range for
Grapheneto zero.Improved warnings for
Medium2D.Improved mode solver handling of 1D problem to avoid singular matrix issue.
Set
colocate=Falseautomatically in outputFieldMonitorobjects in adjoint plugin, warning instead of erroring for backwards compatibility.Validation for
ModeSpec.group_index_stepworking incorrectly if the value was set to 1.
2.3.3 - 2023-07-28#
Added#
Changed#
Fixed#
Adjoint plugin import failures after
jax.numpy.DeviceArray->jax.Arrayin jax 0.4.14.Fixed definition of shapely box bounds in Geometry.intersections_2dbox()
2.3.2 - 2023-7-21#
Added#
Changed#
Surface integration monitor validator changed to error only if all integration surfaces are outside of the simulation domain.
Inverse design convenience utilities in
plugins.adjoint.utilsfor image filtering (ConicFilter), projection (BinaryProjector), and radius of curvature penalization (RadiusPenalty).
Fixed#
Properly handle sign flip in
ModeMonitoroutputs withdirection="-"in adjoint plugin.Bug in
CustomMedium.grids, which was giving incorrect grid boundaries at edges.Out of date endpoint in
migrateoption of webapi.
2.3.1 - 2023-7-14#
Added#
Support for differentiating with respect to
JaxMedium.conductivity.Validating that every surface (unless excluded in
exclude_surfaces) of a 3DSurfaceIntegrationMonitor(flux monitor or field projection monitor) is not completely outside the simulation domain.
Changed#
Source validation happens before simulation upload and raises an error if no source is present.
Warning instead of error if structure out of simulation bounds.
Internal refactor of
ComponentModelerto simplify logic.(Changed effective 2.3.0) Backward-direction mode amplitudes from
ModeMonitorshave a flipped sign compared to previous versions. Previously, the amplitudes were computed directly through the dot productamp = (mode, field), while, since 2.3.0, we useamp = (mode, field) / (mode, mode)instead. The modes are already normalized to unit directed flux, such that(mode, mode) = 1for forward modes, and(mode, mode) = -1for backward modes (the dot product of a mode with itself is equal to the flux through the mode plane). Therefore, the change in theampformula is equivalent to a sign change for backward modes. This makes their interpretation more intuitive, since the amplitude is now1if the recorded field and a mode match exactly. A-1amplitude means that the fields match exactly except for apiphase shift. This interpretation is also now independent of forward/backward direction.
Fixed#
Point-like objects correctly appear as single points using
plt.scatter.Cleaner display of
ArrayLikein docs.ArrayLikevalidation properly fails withNoneornancontents.Apply finite grid correction to the fields when calculating the Poynting vector from 2D monitors.
JaxCustomMediumproperly handles complex-valued permittivity.
2.3.0 - 2023-6-30#
Added#
Specification of spatial permittivity distribution of dispersive material using user-supplied data through
CustomPoleResidue,CustomSellmeier,CustomLorentz,CustomDebye, andCustomDrudecomponents.CustomAnisotropicMediumwhere each component can take user-supplied data to define spatial permittivity distribution of non-dispersive or dispersive material.Coords.spatial_interpto interpolate spatial data avoiding pitfalls ofxarray.interpin directions where there is a single data point.All medium types accept
allow_gainwhich isFalseby default, but allows the medium to be active ifTrue.Causality validation in
PoleResiduemodel.Group index calculation added to mode monitors and available through
ModeData.n_group.Support for
JaxGeometryGroupin adjoint plugin.Support for gradients w.r.t.
FieldMonitordata fromoutput_monitorsin adjoint plugin.estimate_cost()method forJobandBatch.s3utils.get_s3_sts_tokenaccepts extra query parameters.plugins.mode.webto control the server-side mode solver.Support for
JaxDataArray.interp, allowing differentiable linear interpolation.Support for
JaxSimulationData.get_intensity(), allowing intensity distribution to be differentiated inadjointplugin.Support for
JaxFieldData.fluxto compute differentiable flux value fromFieldData.All custom medium types accept
subpixelwhich isFalseby default, but applies subpixel averaging of the permittivity on the interfaces of the structure (including exterior boundary and intersection interfaces with other structures) ifTrueand simulation’ssubpixelis alsoTrue.
Changed#
Add
Medium2Dto full simulation in tests.DispersionFitterandStableDispersionFitterunified in a singleDispersionFitterinterface.StableDispersionFitterdeprecated, with stable fitter now being run instead throughplugins.dispersion.web.run(DispersionFitter).Removed validator from
CustomFieldSourcethat ensured data spanned the source geometry. Now the current values are extrapolated outside of the supplied data ranges.CustomMediumnow take fieldspermittivityandconductivity.eps_datasetwill be deprecated in v3.0.Moved
CustomMedium._interptoCoords.spatial_interpto be used by custom current sources.Adjoint simulations no longer contain unused gradient permittivity monitors, reducing processing time.
Batchprints total estimated cost ifverbose=True.Unified config and authentication.
Remove restriction that
JaxCustomMediummust not be a 3D pixelated array.Limit total number of input structures in adjoint plugin for performance reasons.
ModeSolverandModeSolverMonitornow containdirectionfield that explicitly specifies the mode propagation direction (default is “+”).Added an
interpolateoption toCustomCurrentSourceandUniformCurrentSource, which uses linear interpolation to emulate exact placement of the source along directions where the source has zero size, rather than snapping to the nearest grid location, similar to the behavior forPointDipole. Default:True.
Fixed#
Plotting 2D materials in
SimulationData.plot_fieldand other circumstances.More segments in plotting of large cylinder and sphere cross-sections.
Proper handling of nested list of custom data components in IO, needed for custom dispersive medium coefficients.
ElectromagneticFieldData.outer_dotnow works correctly forFieldData, not onlyModeSolverData.Fix to the setting of the mode solver PML parameters that produces better results for modes which do not decay in the PML, and fewer spurious modes.
Fix to single-precision mode solver to do the type conversion on the final matrix only rather than at intermediate steps, which improves accuracy in some cases.
Improvements to graphene medium fit.
Schema titles in
ArrayLikefields.Fix
web.estimate_costerror/time-out for large simulations, it should now always work but may take some time for complex cases.A more accurate injection and decomposition of backward propagating waveguide modes in lossy and gyrotropic systems.
2.2.3 - 2023-6-15#
Added#
Changed#
Fixed#
Callback URL: “call_back_url” replaced with proper “callbackUrl”.
2.2.2 - 2023-5-25#
Added#
Changed#
Tidy3D component
.to_hdf5()and.from_hdf5()now accept custom encoder and decoder functions for more flexible IO.
Fixed#
JaxDataArraysare properly handled when reading and writing to file, dramatically reducing the VJP simulation download size in server-side adjoint.A bug in a total-field scattered-field (TFSF) validator which was causing unnecessary errors when a TFSF surface intersected with 2D materials.
CI tests working with binary installation of gdstk instead of compiling from source.
2.2.1 - 2023-5-23#
Added#
Changed#
Fixed#
Downgrade
typing_extensionsto<=4.5.0to avoid bug with pydantic for python <= 3.9.Bug in
ModeSolverwhich was causing a preconditioner to be applied even when it is not needed.
2.2.0 - 2023-5-22#
Added#
Fully anisotropic medium class (
FullyAnisotropicMedium) that allows to simulate materials with permittivity and conductivity tensors oriented arbitrary with respect to simulation grid.Adjoint processing is done server side by default, to avoid unnecessary downloading of data.
JaxPolySlabinadjointplugin, which can track derivatives through its.vertices.run_localandrun_async_localoptions intidy3d.plugins.adjoint.webto provide way to run adjoint processing locally.web.test()to simply test if the authentication is configured correctly and raise exception otherwise.SimulationTask.get_running_tasks()to get a list of running tasks from the server.Retry for set number of seconds in web functions if internet connection errors.
Argument
scaletoModeSolver.plot_fieldto control plot scaling.Simulation.plot_3d()method to make 3D rendering of simulation.
Changed#
Perfect electric conductors (PECs) are now modeled as high-conductivity media in both the frontend and backend mode solvers, and their presence triggers the use of a preconditioner to improve numerical stability and robustness. Consequently, the mode solver provides more accurate eigenvectors and field distributions when PEC structures are present.
Include source amplitude in
amp_time.Increased the maximum allowed estimated simulation data storage to 50GB. Individual monitors with projected data larger than 10GB will trigger a warning.
PolySlab.insidenow usesmatplotlib.path.contains_pointsfor better performance.JaxCustomMediumaccepts a maximum of 250,000 grid cells to avoid slow server-side processing.PolySlab.insidenow usesmatplotlib.path.contains_points.JaxCustomMediumaccepts a maximum of 250,000 grid cells.Logging messages are suppressed and summarized to avoid repetitions.
Fixed#
Log messages provide the correct caller origin (file name and line number).
Medium2Dis removed from the list of allowed options forSimulation.mediumin the documentation.Symmetry works properly in
adjointplugin.
2.1.1 - 2023-4-25#
Added#
Changed#
adjointplugin now filters out adjoint sources that are below a threshold in amplitude relative to the maximum amplitude of the monitor data, reducing unnecessary processing by eliminating sources that won’t contribute to the gradient.web.run_asyncusesBatchunder the hood instead ofasyncio.
Fixed#
More helpful error messages from HTTP responses.
Bug in
_validate_no_structures_pml, which was using wrong pml thicknesses.Broken
callback_urlin webapi.
2.1.0 - 2023-4-18#
Added#
Group index calculation added to ModeSpec.
Waveguide plugin for quickly calculating modes in dielectric waveguides.
ElectromagneticFieldData.dot_intepto calculate mode overlap integrals between modes with different discretizations.ElectromagneticFieldData.mode_areato calculate the effective mode area.ElectromagneticFieldData.intensityreturns the sum of the squared components of the electric field.Group index calculation added to ModeSolver.
Web interface prints clickable link to task on Tidy3D web interface.
Allow configuration through API key in python via
tidy3d.web.configure(apikey: str)function.
Changed#
adjointplugin now filters out adjoint sources that are below a threshold in amplitude relative to the maximum amplitude of the monitor data, reducing unnecessary processing by eliminating sources that won’t contribute to the gradient.ArrayLikefields usenp.ndarrayinternally instead ofTidyNDArraysubclass. Tidy3D objects are no longer hashable, instead, hash theobj.json()string.
Fixed#
web.Batchmonitoring is more robust, will not raise exception if a job errors or diverges. In this case, the progressbar text will render in red.More robust handling for 2D structure validator.
2.0.3 - 2023-4-11#
Added#
Changed#
Times logged in
tidy3d.logduring solver run now split intoSolver time(time-stepping only),Field projection time(after the time stepping if any field projection monitors present) andData write time(when the raw data is packaged to disk). Previously,Solver timeused to include theField projection timeand notData write time.
Fixed#
Port name duplication in smatrix plugin for multimode ports.
Web functions create the leading directories for the supplied filename if they don’t exist.
Some docstring examples that were giving warnings.
web.monitor()only prints message when condition met.PML boxes have non-zero extent along any dimensions where the simulation has 0 size, to fix plotting issues for 2D simulations.
Improved PEC handling around curved interfaces and structure intersections. Old handling accessible with
subpixel=False(previously, it was independent of the subpixel setting).Fix to field projections sometimes containing
NaNvalues.
2.0.2 - 2023-4-3#
Added#
Changed#
Fixed#
Bug in web interface when
Simulationupload was not putting quotes aroundtd.infvalues.
2.0.1 - 2023-3-31#
Added#
Changed#
Default Tidy3D logging level is now set to
'WARNING'.Tidy3D is no longer pip installable from
tidy3d-betaon PyPI.Plugins must be imported from their respective directories, eg.
from tidy3d.plugins.mode import ModeSolver.Removed
Geometry.intersections().Log level only accepts upper case strings.
PolySlabreference_planeis"middle"by default.Boundary conditions are now
PML()by default.PointDipolesources now have a continuous dependence on the source position, as opposed to snapping to Yee grid locations. Behavior is controlled by theinterpolateargument, set toTrueby default.smatrixplugin accepts list of frequencies and returns data as anxarray.DataArrayinstead of a nesteddict.importlib-metadataversion set to>= 6.0.0.
Fixed#
Helpful error message if user has insufficient credits.
1.10.0 - 2023-3-28#
Added#
TriangleMeshclass for modeling geometries specified by triangle surface meshes, with support for STL file import.Total-field scattered-field (TFSF) source which allows angled plane waves to be injected into a finite region of space (the total-field region), such that only scattered fields exist outside this region (scattered-field region).
Medium2Dclass for surface conductivity model of a 2D material.Entries in
material_libraryfor graphene and some common TMDs.Ability to create a 2D representation of a thin 3D material.
SimulationData.plot_fieldaccepts new field components and values, including the Poynting vector.SimulationData.get_poynting_vectorfor calculating the 3D Poynting vector at the Yee cell centers.Post-init validation of Tidy3D components.
Validate post-Simulation init to error if any structures have bounds that terminate inside of the PML.
Validate
slab_boundsforPolySlab.
Changed#
Tidy3D account authentication done solely through API key. Migration option offered for users with old username / password authentication.
export_matlib_to_fileinmaterial_libraryexports material’s full name in addition to abbreviation.Simpler progress bars for
run_async.Medium property
n_cfladded to adjust time step size according to CFL condition.In the mode solver plugin, regular methods in
solver.pytransformed into classmethods.ArrayLiketypes are stored internally asnp.ndarrayand written to json as lists.constrained_array()provides way to validateArrayLikevalues based onndimanddtype.Pip installing tidy3d automatically creates
~/.tidy3ddirectory in home directory.Percentage done and field decay determined through http request.
SourceTimeplotting methods.plot()and.plot_spectrum()accept avalkwarg, which selects which part of the data ('real','imag', or'abs') to plot, rather than plotting all at once.
Fixed#
Bug in remote file transfer when client environment has no correct certificate authority pem file install locally.
Tidy3D exceptions inherit from
ValueErrorso they are handled properly by pydantic.Two unstable materials in
material_library:Cu_JohnsonChristy1972andNi_JohnsonChristy1972.TiOx_HoribStableadded for improved stability.Bug in infinite long cylinder when the
reference_planeis not at the bottom or the cylinder is slanted.
1.9.3 - 2023-3-08#
Fixed#
Allow new
tidy3d.config.logging_levelto accept lower case for backwards compatibility.
1.9.2 - 2023-3-08#
Added#
set_logging_consoleallows redirection of console messages to stderr.
Changed#
Use custom logger to avoid changing global logging state when importing tidy3d.
Separate logging configuration from custom exception definitions.
1.9.1 - 2023-3-06#
Fixed#
Avoiding shapely warning in some cases when checking intersection with an empty shape.
Medium.eps_modelerror when supplied a list of frequencies rather than a numpy array.Set install requirement
rich<12.6.0to fix double output in webapi functions.
1.9.0 - 2023-3-01#
Added#
Specification of relative permittivity distribution using raw, user-supplied data through a
CustomMediumcomponent.Automatic differentiation through
Tidy3Dsimulations usingjaxthroughtidy3d.plugins.adjoint.New Drude model variants for Gold and Silver in the
material_library.Plugin
ComplexPolySlabfor supporting complex polyslabs containing self-intersecting polygons during extrusion.Asynchronous running of multiple simulations concurrently using
web.run_async.Jax-compatible
run_asyncin theadjointplugin for efficiently running multi-simulation objectives concurrently and differentiating result.Warning in
Simulation.epsilonif many grid cells and structures provided and slow run time expected as a result.verboseoption intidy3d.webfunctions and containers. IfFalse, there will be no non-essential output when running simulations over web api.Warning if PML or absorbing boundaries are used along a simulation dimension with zero size.
Changed#
Saving and loading of
.hdf5files is made orders of magnitude faster due to an internal refactor.PolySlab.from_gdssupportsgds_cellfrom bothgdspyandgdstk, both packages are made optional requirements.Adjoint plugin
JaxCustomMediumis made faster and can handle several thousand pixels without significant overhead.Jax is made an optional requirement. The adjoint plugin supports jax versions 0.3 and 0.4 for windows and non-windows users, respectively.
Issue a deprecation warning that
Geometry.intersectionswill be renamed toGeometry.intersections_planein 2.0.Limit some warnings to only show for the first structure for which they are encountered.
Billed flex unit no longer shown at the end of
web.runas it may take a few seconds until it is available. Instead, added aweb.real_cost(task_id)function to get the cost after a task run.Refactored
tidy3d.webfor more robustness and test coverage.
Fixed#
Progressbars always set to 100% when webapi functions are finished.
Faster handling of
Geometry.intersectsandGeometry.insideby taking into account geometry bounds.Numpy divide by zero warning in mode solver fixed by initializing jacobians as real instead of complex.
Bug in validators for 2D objects being in homogeneous media which were looking at the infinite plane in which the objects lie. This can also significantly speed up some validators in the case of many structures.
Sources and monitors with bend radii are displayed with curved arrows.
1.8.4 - 2023-2-13#
Fixed#
Error importing
Axestype with most recentmatplotlibrelease (3.7).
1.8.3 - 2023-1-26#
Fixed#
Bug in
Simulation.epsilonwithcoord_key="centers"in which structures were not rendered.Missing
@functools.wrapinensure_freq_in_rangedecorator frommedium.pycausing incorrect docstrings.
1.8.2 - 2023-1-12#
Added#
Warning if users install via
tidy3d-betaon pip, from now on, best to usetidy3ddirectly.Support for dispersive media in
AnisotropicMedium
Changed#
Support shapely version >=2.0 for all python versions.
Internally refactor
Simulation.epsilonand moveeps_diagonaltoStructurein preparation for future changes.Readme displays updated instructions for installing tidy3d (remove beta version mention).
Fixed#
Field decay warning in mode solver when symmetry present.
Formatting bug in Tidy3d custom exceptions.
Removed#
1.8.1 - 2022-12-30#
Added#
Environment variable
TIDY3D_SSL_VERIFYto optionally disable SSL authentication (default isTrue).Billed FlexUnit cost displayed at the end of
web.monitor.
Fixed#
Bug on Windows systems with submitting
CustomFieldSourcedata to the server.Fix to
FieldData.symmetry_expanded_copyfor monitors withcolocate=True.
Changed#
The
Simulationversion updater is called every time aSimulationobject is loaded, not justfrom_file.Boundary specifications that rely on the default
Periodicboundary now print a deprecation warning, as the default boundaries will change toPMLin Tidy3D 2.0.
1.8.0 - 2022-12-14#
Added#
CustomFieldSourcethat can inject arbitrary source fields.ElectromagneticFieldData.fluxproperty for data corresponding to 2D monitors, andElectromagneticFieldData.dotmethod for computing the overlap integral over two sets of frequency-domain field data.Data corresponding to 2D
FieldMonitorandFieldTimeMonitor, as well as toModeSolverMonitor, now also storesgrid_correctiondata related to the finite grid along the normal direction. This needs to be taken into account to avoid e.g. numerical oscillations of the flux with the exact position of the monitor that is due to the interpolation from the grid cell boundaries. These corrections are automatically applied when using thefluxanddotmethods.Resonance finding plugin for estimating resonance frequency and Q-factor of multiple resonances from time-domain data. Accessed through
tidy3d.plugins.ResonanceFinder.New
.updated_copy(**kwargs)method to all tidy3d objects to add a more convenient shortcut to copying an instance with updated fields, i.e.med.copy(update=dict(permittivity=3.0))becomesmed.updated_copy(permittivity=3.0).Test support for python 3.11.
sidewall_angleoption forCylinderthat allows aCylinderto be tuned into a conical frustum or a cone.reference_planeforPolySlabthat provides options to define the vertices at the bottom, middle, or top of thePolySlab.Automesh generation:
MeshOverrideStructurethat allows for a direct grid size specification in override structures, anddl_minthat bounds the minimal grid size.More material models to the material database such as gold from Olman2012.
In
AdvancedFitterParamforStableDispersionFitter,random_seedoption to set the random seed, andbound_f_lowerto set the lower bound of pole frequency.Introduced the option to project fields at near, intermediate, and far distances using an exact Green’s function formalism which does not make far-field approximations. This can be enabled in any
AbstractFieldProjectionMonitorby settingfar_field_approx=False. A tutorial notebook as a comprehensive reference for field projections was added to the documentation.Tracking of modes in
ModeSolverDatabased on overlap values, controlled throughModeSpec.track_freq.Native broadband support for
GassuainBeamAstigmaticGaussianBeam, andModeSourcethrough thenum_freqsargument.Apodization option for frequency-domain monitors to ignore temporal data in the beginning and/or end of a simulation
Changed#
Minimum flex unit charge reduced from
0.1to0.025.Default Courant factor was changed from
0.9to0.99.A point dipole source placed on a symmetry plane now always has twice the amplitude of the same source in a simulation without the symmetry plane, as expected by continuity with the case when the dipole is slightly off the symmetry plane, in which case there are effectively two dipoles, the original one and its mirror image. Previously, the amplitude was only doubled for dipoles polarized normal to the plane, because of Yee grid specifics.
FluxMonitorandFluxTimeMonitorno longer snap fields to centers, but instead provide continuous interpolation of the flux over the exact geometry of the monitor.Major refactor to internal handling of data structures, including pure
Datasetcomponents that do not depend on otherTidy3Dcomponents and may therefore be used to define custom data inTidy3Dmodels.Speed and memory usage improvement when writing and reading Tidy3d models to and from
.hdf5files.Writing
Tidy3Dmodels containing custom data to.jsonfile will log a warning and exclude the raw data from the file for performance reasons.Material database reorganization and fixing a few references to the dispersion data.
The name
Near2Farhas been replaced withFieldProjection. For example,Near2FarAngleMonitoris nowFieldProjectionAngleMonitor.The API for far field projections has been simplified and several methods have now become properties. For example, the radar cross section is now accessed as
.radar_cross_section, not.radar_cross_section().Added a method
renormalize_fieldstoAbstractFieldProjectionDatato re-project far fields to different projection distances.The API for
DiffractionDatawas refactored to unify it with the API forAbstractFieldProjectionData.The user no longer needs to supply
orders_xandorders_ywhen creating aDiffractionMonitor; all allowed orders are automatically generated and returned in the resultingDiffractionData.The user no longer needs to supply a
mediumwhen creating aDiffractionMonitoror anyAbstractFieldProjectionMonitor; the medium through which fields are to be projected is now determined automatically based on the medium in which the monitor is placed.The following attributes of
AbstractFieldProjectionMonitorare now properties rather than methods:fields_spherical,fields_cartesian,power,radar_cross_section.
Fixed#
Some issues in
DiffractionMonitorthat is notz-normal that could lead to solver errors or wrong results.Bug leading to solver error when
Absorberboundaries withnum_layers = 0are used.Bug leading to solver error when a
FieldMonitorcrosses aBlochBoundaryand not all field components are recorded.When running a
Batch,path_diris created if not existing.Ignore shapely
STRtreedeprecation warning.Ignore x axis when plotting 1D
Simulationcross sections to avoid plot irregularities.Local web api tests.
Use Tidy3D logger for some warnings that used to use default python logging.
Changed#
Replaced
gdspydependency withgdstk.
1.7.1 - 2022-10-10#
Added#
mediumfield inDiffractionMonitorfor decomposition of fields that are not in vacuum.
Fixed#
Bug in meshing an empty simulation with zero size along one dimension.
Bug causing error in the solver when a
PermittivityMonitoris present in the list of monitors and is not at the end of the list.
1.7.0 - 2022-10-03#
Added#
DiffractionMonitorto compute the power amplitude distribution in all diffraction orders in simulations of periodic structures.PolySlabcan be oriented alongxory, not justz.
Removed#
Loading components without validation no longer supported as it is too unpredictable.
Webplots plugin was removed as it was cumbersome to maintain and no longer used in web UI.
1.6.3 - 2022-9-13#
Added#
Type field for
DataArraysubclasses written tohdf5.
Fixed#
Docstring for
FluxMonitorandFluxTimeMonitor.
Removed#
Explicit error message about
grid_sizedeprecation.
1.6.2 - 2022-9-6#
Added#
Support for
Near2Farmonitors in the presence of simulation symmetries.
Fixed#
Bug in 3D
Near2Farmonitors where surfaces defined inexclude_surfaceswill no actually be excluded.Bug in getting angles from
k-space values inNear2FarKSpaceMonitor.Bug in
SimulationData.plot_fieldwhen getting the position along the normal axis for a 2D plot.
1.6.1 - 2022-8-31#
Fixed#
Bug in new simulation upload on Windows machines.
1.6.0 - 2022-8-29#
Added#
New classes of near-to-far monitors for server-side computation of the near field to far field projection.
Option to exclude
DataArrayFields from aTidy3dBaseModeljson.Option to save/load all models to/from
hdf5format.Option to load base models without validation.
Support negative sidewall angle for slanted
PolySlab-s.Option to specify only a subset of the S-matrix to compute in the S-matrix plugin, as well as to provide mapping between elements (due to symmetries).
More Lorentz-Drude material models to the material database.
Fixed#
Raise a more meaningful error if login failed after
MAX_ATTEMPTS.Environment login credentials set to
""are now ignored and credentials stored to file are still looked for.Improved subpixel coefficients computation around sharp edges, corners, and three-structure intersections.
Changed#
Major refactor of the way data structures are used internally.
ModeFieldMonitor->ModeSolerMonitorwith associatedModeSolverData.ModeSolverDatais now also stored internally inModeSolver, and theplot_fieldmethod can be called directly fromModeSolverinstead ofModeSolverData.Field data for monitors that have a zero size along a given dimension is now interpolated to the exact
monitor.centeralong that dimension.Removed
nloptfrom requirements, user-side material fitting now usesscipy.New Field
normalize_indexinSimulation- used to be input parameter when loading simulation data. A givenSimulationDatacan still be renormalized to a different source later on using the newSimulationData.renormalize.FluxMonitorandFluxTimeMonitor-s can now have a 3D box geometry, in which case the flux going out of all box surfaces is computed (optionally, some surfaces can be excluded).Frequency-domain monitors require a non-empty list of frequencies.
Reduced the minimum flex unit cost to run a simulation to
0.1.Reduced the premium cost for dispersive materials in typical cases.
Added a cost for monitors that should be negligible in typical cases but affects large monitors that significantly slow down the simulation.
1.5.0 - 2022-7-21#
Fixed#
Bug in computing the
boundsofGeometryGroup.Bug in auto-mesh generation.
Added#
Ability to compute field projections server-side.
Changed#
All Tidy3D components apart from data structures are now fully immutable.
Stopped support for python 3.6, improved support for python 3.10.
Web material fitter for lossless input data (no
kdata provided) will now return a lossless medium.sort_bychanged tofilter_polinModeSpec.centerno longer a field of allGeometrycomponents, instead only present when needed, removed inPolySlabandGeometryGroup.Planargeometries no longer have a mandatorylengthfield, but havecenter_axisandlengt_axisproperties for the center and length along the extrusion axis.PolySlabnow defined exclusively throughslab_bounds, whileCylinderthroughcenterandlength.In mode solver, allow precision to switch between double and single precision.
Near-to-far transformation tool is no longer a plugin, but is now part of Tidy3D’s new core data structures
1.4.1 - 2022-6-13#
Fixed#
Bug in plotting polarization of a normal incidence source for some
angle_phi.Bloch vector values required to be real rather than complex.
Web security mitigation.
1.4.0 - 2022-6-3#
Fixed#
Bug in plotting when alpha is turned off in permittivity overlay.
Bug in plotting polarization of an angled incidence source (S,P -> P,S).
Throw warning if user tries to download data instances in
yamlorjsonformat.Arrow length plotting issues for infinite sources.
Issues with nonuniform mesh not extending exactly to simulation boundaries.
Added#
Bloch periodic boundary conditions, enabling modeling of angled plane wave.
GeometryGroupobject to associate severalGeometryinstances in a singleStructureleading to improved performance for many objects.Ability to uniquely specify boundary conditions on all 6
Simulationboundaries.Options in field monitors for spatial downsampling and evaluation at Yee grid centers.
BatchData.load()can load the data for a batch directly from a directory.Utility for updating
Simulationobjects from old versions ofTidy3dto current version.Explicit
web.functions for downloading onlysimulation.jsonandtidy3d.logfiles.
Changed#
Batchobjects automatically download their json file upondownloadandload.Uses
shapelyinstead ofgdspyto merge polygons from a gds cell.ComponentModeler(S matrix tool) stores theBatchrather than theBatchData.Custom caching of properties to speed up subsequent calculations.
Tidy3D configuration now done through setting attributes of
tidy3d.configobject.
1.3.3 - 2022-5-18#
Fixed#
Bug in
Cylinder.insidewhenaxis != 2.
Added#
AstigmaticGaussianBeamsource.
Changed#
Internal functions that may require hashing the simulation many times now use a
make_staticdecorator. This pre-computes the simulation hash and stores it, and makes sure that the simulation has not changed at the beginning and end of the function execution.Speeding up initialization of
PolySlabwhen there is no dilation or slant angle.Allow customizing data range that colormap covers in
plot_field.Speeding up of the automatic grid generation using Rtree and other improvements.
Better handling of http response errors.
In
web.monitor, the estimated cost is only displayed when available; avoid “Unable to get cost” warning.In
PolySlab.from_gds, the selected polygons are first merged if possible, before thePolySlab-s are made. This avoids bugs e.g. in the case of slanted walls.
1.3.2 - 2022-4-30#
Fixed#
Bug in nonuniform mesh where the simulation background medium may be taken into account if higher than other structures overriding it.
1.3.1 - 2022-4-29#
Added#
Changed#
The
copy()method of Tidy3D components is deep by default.Maximum allowed number of distinct materials is now 65530.
Fixed#
Monitor/source opacity values also applied to associated arrows.
Auto meshing in the presence of symmetries ignores anything outside of the main symmetry quadrant.
If an interface is completely covered by another structure, it is ignored by the mesher.
1.3.0 - 2022-4-26#
Added#
New
grid_specField inSimulationthat allows more flexibility in defining the mesh.GridSpec1dclass defining how the meshing along each dimension should be done, with subclassesUniformGridandCustomGridthat cover the functionality previously offered by supplying a float or a list of floats toSimulation.grid_size. New functionality offered byAutoGridsubclass, with the mesh automatically generated based on the minimum required steps per wavelength.New
PointDipolesource.Opacity kwargs for monitor and source in
sim.plot.Separated
plotly-based requirements from core requirements file, can be added with"pip install tidy3d-beta[plotly]".
Changed#
Simulation.grid_specuses the defaultGridSpec, which hasAutoGrid(min_steps_per_wvl=10)in each direction. To initialize aSimulationthen it is no longer needed to provide grid information, if sources are added to the simulation. Otherwise an error will be raised asking to provide a wavelength for the auto mesh.VolumeSourceis now calledUniformCurrentSource.S-matrix module now places the monitors exactly at the port locations and offsets the source slightly for numerical reasons (more accurate).
Fixed bug in
PolySlabvisualization with sidewalls.Inheritance structure of
Sourcereorganized.Better handling of only one
td.infinBox.from_bounds.Added proper label to intensity plots.
Made all attributes
Field()objects indata.pyto clean up docs.Proper handling of
Medium.eps_modelat frequency oftd.infandNone.
Removed#
Simulation.grid_sizeis removed in favor ofSimulation.grid_spec.
1.2.2 - 2022-4-16#
Added#
SimulationDataAppGUI for visualizing contents ofSimulationDataintidy3d.plugings.SimulationPlotlyinterface for generatingSimulation.plot()figures usingplotlyinstead ofmatplotlib.New
PermittivityMonitorandPermittivityDatato store the complex relative permittivity as used in the simulation.The maximum credit cost for a simulation can now be queried using
web.estimate_cost. It is also displayed by default duringweb.upload.
Changed#
Faster plotting for matplotlib and plotly.
SimulationDatanormalization keeps track of source index and can be normalized when loading directly from .hdf5 file.Monitor data with symmetries now store the minimum required data to file and expands the symmetries on the fly.
Significant speedup in plotting complicated simulations without patch transparency.
When a list of
dlis provided as agrid_sizealong a given direction, the grid is placed such that the total sizenp.sum(dl)is centered at the simulation center. Previously, a grid boundary was always placed at the simulation center.
1.2.1 - 2022-3-30#
Added#
Changed#
webapifunctions now only authenticate when needed.Credentials storing folder only created when needed.
Added maximum number of attempts in authentication.
Made plotly plotting faster.
Cached Simulation.medium and Simulation.medium_map computation.
1.2.0 - 2022-3-28#
Added#
PolySlabgeometries support dilation and angled sidewalls.Percent done monitoring of jobs running longer than 10 seconds.
Can use vectorized spherical coordinates in
tidy3d.plugins.Near2Far.ModeSolverreturns aModeSolverDataobject similar toSimulationData, containing all the information about the modes.ModeFieldMonitorandModeFieldDataallow the results of a mode solve run server-side to be stored.Plotting of
ModeFieldDatafields inSimulationData.plot_fieldandModeSolverData.plot_field.Ordering of modes by polarization fraction can be specified in
ModeSpec.Angled mode sources.
Changed#
Significant speed improvement for
Near2Farcalculations.freqno longer passed toModeSolverupon init, instead a list offreqspassed toModeSolver.solve.Mode solver now returns
ModeSolverDataobject containing information about the mode fields and propagation constants as data arrays over frequency and mode index.Reorganized some of the internal
Sourceclasses.Major improvements to
Batchobjects.Batch.run()returns aBatchDataobject that mapstask_nametoSimulationData.Infinity stored as
strin json outputs, conforming to json file specifications.No longer need to specify one of
x/y/zinSimulationData.plot_fieldif the monitor has a zero-sized dimension.Simulation.run_timebut must be > 0 to upload to server.
1.1.1 - 2022-3-2#
Added#
Changed#
Fixed issue where smatrix was not uploaded to pyPI.
1.1.0 - 2022-3-1#
Added#
Simulationsymmetries now fully functional.Ability to perform near-to-far transformations from multiple surface monitors oriented along the x, y or z directions using
tidy3d.plugins.Near2Far.tidy3d.plugins.ComponentModelertool for scattering matrix calculations.
Changed#
Major enhancements to near field to far field transformation tool: multiple monitors supported with arbitrary configuration, user control over sampling point density.
Fixed visualization bug in symmetry.
1.0.2 - 2022-2-24#
Added#
Clarified license terms to not include scripts written using the tidy3d python API.
Simulation symmetries are now enabled but currently only affect the mode solver, if the mode plane lies on the simulation center and there’s a symmetry.
Validator that mode objects with symmetries are either entirely in the main quadrant, or lie on the symmetry axis.
Simulation.plotly()makes a plotly figure of the cross section.Dispersion fitter can parse urls from refractiveindex.info
Clarified license terms to not include scripts written using the tidy3d python API.
Changed#
Fixed a bug in python 3.6 where polyslab vertices loaded differently from file.
1.0.1 - 2022-2-16#
Added#
Selmeier.from_dispersion()method to quickly make a single-pole fit for lossless weakly dispersive materials.Stable dispersive material fits via webservice.
Allow to load dispersive data directly by providing URL to txt or csv file
Validates simulation based on discretized size.
Changed#
Polyslab.from_gdsreturns a list ofPolySlabobjects imported from all polygons in given layer and dtype, can optionally specify single dtype.Warning about structure close to PML disabled if Absorber type.
Source dft now ignores insignificant time amplitudes for speed.
New color schemes for plots.
1.0.0 - 2022-1-31#
Added#
Stable dispersive material fits via webservice.
Changed#
Refined and updated documentation.
0.2.0 - 2022-1-29#
Added#
FieldMonitor.surface()to split volume monitors into their surfaces.Units and annotation to data.
Faster preprocessing.
Web authentication using environment variables
TIDY3D_USERandTIDY3D_PASS.callback_urlin web API to put job metadata when a job is finished.Support for non uniform grid size definition.
Gaussian beam source.
Automated testing through tox and github actions.
0.1.1 - 2021-11-09#
Added#
PML parameters and padding Grid with pml pixels by @momchil-flex in #64
Documentation by @tylerflex in #63
Gds import from @tylerflex in #69
Logging, by @tylerflex in #70
Multi-pole Drude medium by @weiliangjin2021 in #73
Mode Solver: from @tylerflex in #74
Near2Far from @tylerflex in #77
Changed#
Separated docs from @tylerflex in #78
0.1.0 - 2021-10-21#
Added#
Web API implemented by converting simulations to old tidy3D
Alpha Release Changes#
22.1.1#
Solver speed improvement (gain depending on simulation + hardware details).
Bringing the speed of the non-angled mode solver back to pre-21.4.2 levels.
21.4.4#
Improvements to subpixel averaging for dispersive materials.
Enabled web login using environment variables
TIDY3D_USERandTIDY3D_PASS.
21.4.3#
Bugfix when running simulation with zero
run_time.More internal logging.
Fixed unstable
'Li1993_293K'variant ofcSiin the material library.
21.4.2.2#
Bugfix when downloading data on Windows.
Bugfix in material fitting tool when target tolerance is not reached.
21.4.2#
New Gaussian beam source and
example usage <examples/GratingCoupler.html>__.Modal sources and monitors in bent and in angled waveguides with
tutorial <examples/Modes_bent_angled.html>__.Nyquist-limit sampling in frequency-domain monitors (much faster without loss of accuracy).
Support for Drude model of material dispersion.
Small bugfixes to some of the other dispersion models.
PEC boundaries applied by default at the truncation of any boundary with PML, avoiding potential issues with using periodic boundaries under the PML instead.
Source normalization no longer adding a spurious frequency-dependent phase to the fields.
Fixed bug in unpacking monitor fields with symmetries and
interpolate=False.Lots of streamlining on the backend side.
21.4.1#
Fixed bug with zero-size monitor plotting.
Fixed bug with empty simulation run introduced in 21.4.0.
21.4.0#
A few small fixes.
21.3.1.6#
Fixed nonlinear constraint in dispersive material fitting tool.
Fixed potential issue when a monitor stores neither
'E'nor'H'.Fixed some backwards compatibility issues introduced in 21.3.1.5.
21.3.1.5#
Frequency monitors can now optionally store the complex permittivity at the same locations where the E-fields are recorded, at the monitor frequencies.
Frequency monitors now also have an
'interpolate'keyword, which defaults toTrueand reproduces the behavior of previous versions. If set toFalse, however, the raw fields evaluated at their corresponding Yee grid locations are returned, instead of the fields interpolated to the Yee cell centers. This also affects the returned permittivity, if requested.Reorganized internal source time dependence handling, enabling more complicated functionality in the future, like custom source time.
Total field in the simulation now sampled at the time step of the peak of the source time dependence, for better estimation of the shutoff factor.
A number of bug fixes, especially in the new plotting introduced in 21.3.1.4.
21.3.1.4#
Reorganized plotting:
Speeding up structure visualizations.
Structures now shown based on primitive definitions rather than grid discretization. This then shows the physical structures but not what the simulation “sees”. Will add an option to display the grid lines in next version.
Bumped down matplotlib version requirement to 3.2 and python version requirement to 3.6.
Improved handling of PEC interfaces.- Reorganized and extended internal logging.
Added
tidy3d.__version__.A number of fixes to the example notebooks and the colab integration.
21.3.1.3#
Bumping back python version requirement from 3.8 to 3.7.
21.3.1.2#
Hotfix to an internal bug in some simulation runs.
21.3.1.1#
New dispersion fitting tool for material data and accompanying
tutorial <examples/Fitting.html>__.(
beta) Non-uniform Cartesian meshing now supported. The grid coordinates are provided by hand toSimulation. Next step is implementing auto-meshing.DispersionModelobjects can now be directly used as materials.Fixed bug to
Cylindersubpixel averaging.Small bugs fixes/added checks for some edge cases.
21.3.1.0#
Rehash of symmetries and support for mode sources and monitors with symmetries.
Anisotropic materials (diagonal epsilon tensor).
Rehashed error handling to output more runtime errors to tidy3d.log.
Job and Batch classes for better simulation handling (eventually to fully replace webapi functions).
A large number of small improvements and bug fixes.