diff --git a/CHANGELOG.md b/CHANGELOG.md index 61e0fd07a..5d4893f38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +## [1.8.1] - 2022-12-30 + +### Added +- Environment variable `TIDY3D_SSL_VERIFY` to optionally disable SSL authentication (default is `True`). +- Billed FlexUnit cost displayed at the end of `web.monitor`. + +### Fixed +- Bug on Windows systems with submitting `CustomFieldSource` data to the server. +- Fix to `FieldData.symmetry_expanded_copy` for monitors with `colocate=True`. + +### Changed +- The `Simulation` version updater is called every time a `Simulation` object is loaded, not just `from_file`. +- Boundary specifications that rely on the default `Periodic` boundary now print a deprecation warning, as the default boundaries will change to + `PML` in Tidy3D 2.0. + ## [1.8.0] - 2022-12-14 ### Added @@ -502,7 +517,8 @@ which fields are to be projected is now determined automatically based on the me - Job and Batch classes for better simulation handling (eventually to fully replace webapi functions). - A large number of small improvements and bug fixes. -[Unreleased]: https://github.com/flexcompute/tidy3d/compare/v1.8.0...develop +[Unreleased]: https://github.com/flexcompute/tidy3d/compare/v1.8.1...develop +[1.8.1]: https://github.com/flexcompute/tidy3d/compare/v1.8.0...v1.8.1 [1.8.0]: https://github.com/flexcompute/tidy3d/compare/v1.7.1...v1.8.0 [1.7.1]: https://github.com/flexcompute/tidy3d/compare/v1.7.0...v1.7.1 [1.7.0]: https://github.com/flexcompute/tidy3d/compare/v1.6.3...v1.7.0 diff --git a/tidy3d/schema.json b/tidy3d/schema.json index 8d7fb0ff6..a0d8a0460 100644 --- a/tidy3d/schema.json +++ b/tidy3d/schema.json @@ -1,6 +1,6 @@ { "title": "Simulation", - "description": "Contains all information about Tidy3d simulation.\n\nParameters\n----------\ncenter : Tuple[float, float, float] = (0.0, 0.0, 0.0)\n [units = um]. Center of object in x, y, and z.\nsize : Tuple[NonNegativeFloat, NonNegativeFloat, NonNegativeFloat]\n [units = um]. Size in x, y, and z directions.\nrun_time : PositiveFloat\n [units = sec]. Total electromagnetic evolution time in seconds. Note: If simulation 'shutoff' is specified, simulation will terminate early when shutoff condition met. \nmedium : Union[Medium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude] = Medium(name=None, frequency_range=None, type='Medium', permittivity=1.0, conductivity=0.0)\n Background medium of simulation, defaults to vacuum if not specified.\nsymmetry : Tuple[Literal[0, -1, 1], Literal[0, -1, 1], Literal[0, -1, 1]] = (0, 0, 0)\n Tuple of integers defining reflection symmetry across a plane bisecting the simulation domain normal to the x-, y-, and z-axis at the simulation center of each axis, respectvely. Each element can be ``0`` (no symmetry), ``1`` (even, i.e. 'PMC' symmetry) or ``-1`` (odd, i.e. 'PEC' symmetry). Note that the vectorial nature of the fields must be taken into account to correctly determine the symmetry value.\nstructures : Tuple[Structure, ...] = ()\n Tuple of structures present in simulation. Note: Structures defined later in this list override the simulation material properties in regions of spatial overlap.\nsources : Tuple[Annotated[Union[tidy3d.components.source.UniformCurrentSource, tidy3d.components.source.PointDipole, tidy3d.components.source.GaussianBeam, tidy3d.components.source.AstigmaticGaussianBeam, tidy3d.components.source.ModeSource, tidy3d.components.source.PlaneWave, tidy3d.components.source.CustomFieldSource], FieldInfo(default=PydanticUndefined, discriminator='type', extra={})], ...] = ()\n Tuple of electric current sources injecting fields into the simulation.\nboundary_spec : BoundarySpec = BoundarySpec(x=Boundary(plus=Periodic(name=None,, type='Periodic'),, minus=Periodic(name=None,, type='Periodic'),, type='Boundary'), y=Boundary(plus=Periodic(name=None,, type='Periodic'),, minus=Periodic(name=None,, type='Periodic'),, type='Boundary'), z=Boundary(plus=Periodic(name=None,, type='Periodic'),, minus=Periodic(name=None,, type='Periodic'),, type='Boundary'), type='BoundarySpec')\n Specification of boundary conditions along each dimension.\nmonitors : Tuple[Annotated[Union[tidy3d.components.monitor.FieldMonitor, tidy3d.components.monitor.FieldTimeMonitor, tidy3d.components.monitor.PermittivityMonitor, tidy3d.components.monitor.FluxMonitor, tidy3d.components.monitor.FluxTimeMonitor, tidy3d.components.monitor.ModeMonitor, tidy3d.components.monitor.ModeSolverMonitor, tidy3d.components.monitor.FieldProjectionAngleMonitor, tidy3d.components.monitor.FieldProjectionCartesianMonitor, tidy3d.components.monitor.FieldProjectionKSpaceMonitor, tidy3d.components.monitor.DiffractionMonitor], FieldInfo(default=PydanticUndefined, discriminator='type', extra={})], ...] = ()\n Tuple of monitors in the simulation. Note: monitor names are used to access data after simulation is run.\ngrid_spec : GridSpec = GridSpec(grid_x=AutoGrid(type='AutoGrid',, min_steps_per_wvl=10.0,, max_scale=1.4,, dl_min=0.0,, mesher=GradedMesher(type='GradedMesher')), grid_y=AutoGrid(type='AutoGrid',, min_steps_per_wvl=10.0,, max_scale=1.4,, dl_min=0.0,, mesher=GradedMesher(type='GradedMesher')), grid_z=AutoGrid(type='AutoGrid',, min_steps_per_wvl=10.0,, max_scale=1.4,, dl_min=0.0,, mesher=GradedMesher(type='GradedMesher')), wavelength=None, override_structures=(), type='GridSpec')\n Specifications for the simulation grid along each of the three directions.\nshutoff : NonNegativeFloat = 1e-05\n Ratio of the instantaneous integrated E-field intensity to the maximum value at which the simulation will automatically terminate time stepping. Used to prevent extraneous run time of simulations with fully decayed fields. Set to ``0`` to disable this feature.\nsubpixel : bool = True\n If ``True``, uses subpixel averaging of the permittivity based on structure definition, resulting in much higher accuracy for a given grid size.\nnormalize_index : Optional[NonNegativeInt] = 0\n Index of the source in the tuple of sources whose spectrum will be used to normalize the frequency-dependent data. If ``None``, the raw field data is returned unnormalized.\ncourant : ConstrainedFloatValue = 0.99\n Courant stability factor, controls time step to spatial step ratio. Lower values lead to more stable simulations for dispersive materials, but result in longer simulation times. This factor is normalized to no larger than 1 when CFL stability condition is met in 3D.\nversion : str = 1.8.0\n String specifying the front end version number.\n\nExample\n-------\n>>> from tidy3d import Sphere, Cylinder, PolySlab\n>>> from tidy3d import UniformCurrentSource, GaussianPulse\n>>> from tidy3d import FieldMonitor, FluxMonitor\n>>> from tidy3d import GridSpec, AutoGrid\n>>> from tidy3d import BoundarySpec, Boundary\n>>> sim = Simulation(\n... size=(2.0, 2.0, 2.0),\n... grid_spec=GridSpec(\n... grid_x = AutoGrid(min_steps_per_wvl = 20),\n... grid_y = AutoGrid(min_steps_per_wvl = 20),\n... grid_z = AutoGrid(min_steps_per_wvl = 20)\n... ),\n... run_time=40e-11,\n... structures=[\n... Structure(\n... geometry=Box(size=(1, 1, 1), center=(-1, 0, 0)),\n... medium=Medium(permittivity=2.0),\n... ),\n... ],\n... sources=[\n... UniformCurrentSource(\n... size=(0, 0, 0),\n... center=(0, 0.5, 0),\n... polarization=\"Hx\",\n... source_time=GaussianPulse(\n... freq0=2e14,\n... fwidth=4e13,\n... ),\n... )\n... ],\n... monitors=[\n... FieldMonitor(size=(0, 0, 0), center=(0, 0, 0), freqs=[1.5e14, 2e14], name='point'),\n... FluxMonitor(size=(1, 1, 0), center=(0, 0, 0), freqs=[2e14, 2.5e14], name='flux'),\n... ],\n... symmetry=(0, 0, 0),\n... boundary_spec=BoundarySpec(\n... x = Boundary.pml(num_layers=20),\n... y = Boundary.pml(num_layers=30),\n... z = Boundary.periodic(),\n... ),\n... shutoff=1e-6,\n... courant=0.8,\n... subpixel=False,\n... )", + "description": "Contains all information about Tidy3d simulation.\n\nParameters\n----------\ncenter : Tuple[float, float, float] = (0.0, 0.0, 0.0)\n [units = um]. Center of object in x, y, and z.\nsize : Tuple[NonNegativeFloat, NonNegativeFloat, NonNegativeFloat]\n [units = um]. Size in x, y, and z directions.\nrun_time : PositiveFloat\n [units = sec]. Total electromagnetic evolution time in seconds. Note: If simulation 'shutoff' is specified, simulation will terminate early when shutoff condition met. \nmedium : Union[Medium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude] = Medium(name=None, frequency_range=None, type='Medium', permittivity=1.0, conductivity=0.0)\n Background medium of simulation, defaults to vacuum if not specified.\nsymmetry : Tuple[Literal[0, -1, 1], Literal[0, -1, 1], Literal[0, -1, 1]] = (0, 0, 0)\n Tuple of integers defining reflection symmetry across a plane bisecting the simulation domain normal to the x-, y-, and z-axis at the simulation center of each axis, respectvely. Each element can be ``0`` (no symmetry), ``1`` (even, i.e. 'PMC' symmetry) or ``-1`` (odd, i.e. 'PEC' symmetry). Note that the vectorial nature of the fields must be taken into account to correctly determine the symmetry value.\nstructures : Tuple[Structure, ...] = ()\n Tuple of structures present in simulation. Note: Structures defined later in this list override the simulation material properties in regions of spatial overlap.\nsources : Tuple[Annotated[Union[tidy3d.components.source.UniformCurrentSource, tidy3d.components.source.PointDipole, tidy3d.components.source.GaussianBeam, tidy3d.components.source.AstigmaticGaussianBeam, tidy3d.components.source.ModeSource, tidy3d.components.source.PlaneWave, tidy3d.components.source.CustomFieldSource], FieldInfo(default=PydanticUndefined, discriminator='type', extra={})], ...] = ()\n Tuple of electric current sources injecting fields into the simulation.\nboundary_spec : Optional[BoundarySpec] = None\n Specification of boundary conditions along each dimension. If ``None``, periodic boundary conditions are applied on all sides. Default will change to PML in 2.0 so explicitly setting the boundaries is recommended.\nmonitors : Tuple[Annotated[Union[tidy3d.components.monitor.FieldMonitor, tidy3d.components.monitor.FieldTimeMonitor, tidy3d.components.monitor.PermittivityMonitor, tidy3d.components.monitor.FluxMonitor, tidy3d.components.monitor.FluxTimeMonitor, tidy3d.components.monitor.ModeMonitor, tidy3d.components.monitor.ModeSolverMonitor, tidy3d.components.monitor.FieldProjectionAngleMonitor, tidy3d.components.monitor.FieldProjectionCartesianMonitor, tidy3d.components.monitor.FieldProjectionKSpaceMonitor, tidy3d.components.monitor.DiffractionMonitor], FieldInfo(default=PydanticUndefined, discriminator='type', extra={})], ...] = ()\n Tuple of monitors in the simulation. Note: monitor names are used to access data after simulation is run.\ngrid_spec : GridSpec = GridSpec(grid_x=AutoGrid(type='AutoGrid',, min_steps_per_wvl=10.0,, max_scale=1.4,, dl_min=0.0,, mesher=GradedMesher(type='GradedMesher')), grid_y=AutoGrid(type='AutoGrid',, min_steps_per_wvl=10.0,, max_scale=1.4,, dl_min=0.0,, mesher=GradedMesher(type='GradedMesher')), grid_z=AutoGrid(type='AutoGrid',, min_steps_per_wvl=10.0,, max_scale=1.4,, dl_min=0.0,, mesher=GradedMesher(type='GradedMesher')), wavelength=None, override_structures=(), type='GridSpec')\n Specifications for the simulation grid along each of the three directions.\nshutoff : NonNegativeFloat = 1e-05\n Ratio of the instantaneous integrated E-field intensity to the maximum value at which the simulation will automatically terminate time stepping. Used to prevent extraneous run time of simulations with fully decayed fields. Set to ``0`` to disable this feature.\nsubpixel : bool = True\n If ``True``, uses subpixel averaging of the permittivity based on structure definition, resulting in much higher accuracy for a given grid size.\nnormalize_index : Optional[NonNegativeInt] = 0\n Index of the source in the tuple of sources whose spectrum will be used to normalize the frequency-dependent data. If ``None``, the raw field data is returned unnormalized.\ncourant : ConstrainedFloatValue = 0.99\n Courant stability factor, controls time step to spatial step ratio. Lower values lead to more stable simulations for dispersive materials, but result in longer simulation times. This factor is normalized to no larger than 1 when CFL stability condition is met in 3D.\nversion : str = 1.8.1\n String specifying the front end version number.\n\nExample\n-------\n>>> from tidy3d import Sphere, Cylinder, PolySlab\n>>> from tidy3d import UniformCurrentSource, GaussianPulse\n>>> from tidy3d import FieldMonitor, FluxMonitor\n>>> from tidy3d import GridSpec, AutoGrid\n>>> from tidy3d import BoundarySpec, Boundary\n>>> sim = Simulation(\n... size=(2.0, 2.0, 2.0),\n... grid_spec=GridSpec(\n... grid_x = AutoGrid(min_steps_per_wvl = 20),\n... grid_y = AutoGrid(min_steps_per_wvl = 20),\n... grid_z = AutoGrid(min_steps_per_wvl = 20)\n... ),\n... run_time=40e-11,\n... structures=[\n... Structure(\n... geometry=Box(size=(1, 1, 1), center=(-1, 0, 0)),\n... medium=Medium(permittivity=2.0),\n... ),\n... ],\n... sources=[\n... UniformCurrentSource(\n... size=(0, 0, 0),\n... center=(0, 0.5, 0),\n... polarization=\"Hx\",\n... source_time=GaussianPulse(\n... freq0=2e14,\n... fwidth=4e13,\n... ),\n... )\n... ],\n... monitors=[\n... FieldMonitor(size=(0, 0, 0), center=(0, 0, 0), freqs=[1.5e14, 2e14], name='point'),\n... FluxMonitor(size=(1, 1, 0), center=(0, 0, 0), freqs=[2e14, 2.5e14], name='flux'),\n... ],\n... symmetry=(0, 0, 0),\n... boundary_spec=BoundarySpec(\n... x = Boundary.pml(num_layers=20),\n... y = Boundary.pml(num_layers=30),\n... z = Boundary.periodic(),\n... ),\n... shutoff=1e-6,\n... courant=0.8,\n... subpixel=False,\n... )", "type": "object", "properties": { "type": { @@ -193,43 +193,7 @@ }, "boundary_spec": { "title": "Boundaries", - "description": "Specification of boundary conditions along each dimension.", - "default": { - "x": { - "plus": { - "name": null, - "type": "Periodic" - }, - "minus": { - "name": null, - "type": "Periodic" - }, - "type": "Boundary" - }, - "y": { - "plus": { - "name": null, - "type": "Periodic" - }, - "minus": { - "name": null, - "type": "Periodic" - }, - "type": "Boundary" - }, - "z": { - "plus": { - "name": null, - "type": "Periodic" - }, - "minus": { - "name": null, - "type": "Periodic" - }, - "type": "Boundary" - }, - "type": "BoundarySpec" - }, + "description": "Specification of boundary conditions along each dimension. If ``None``, periodic boundary conditions are applied on all sides. Default will change to PML in 2.0 so explicitly setting the boundaries is recommended.", "allOf": [ { "$ref": "#/definitions/BoundarySpec" @@ -367,7 +331,7 @@ "version": { "title": "Version", "description": "String specifying the front end version number.", - "default": "1.8.0", + "default": "1.8.1", "type": "string" } }, @@ -791,7 +755,7 @@ "type": "number" }, "coeffs": { - "title": "Epsilon at Infinity", + "title": "Coefficients", "description": "List of (:math:`\\Delta\\epsilon_i, f_i, \\delta_i`) values for model.", "units": [ "None (relative permittivity)", @@ -3045,23 +3009,12 @@ }, "BoundarySpec": { "title": "BoundarySpec", - "description": "Specifies boundary conditions on each side of the domain and along each dimension.\n\nParameters\n----------\nx : Boundary = Boundary(plus=Periodic(name=None,, type='Periodic'), minus=Periodic(name=None,, type='Periodic'), type='Boundary')\n Boundary condition on the plus and minus sides along the x axis.\ny : Boundary = Boundary(plus=Periodic(name=None,, type='Periodic'), minus=Periodic(name=None,, type='Periodic'), type='Boundary')\n Boundary condition on the plus and minus sides along the y axis.\nz : Boundary = Boundary(plus=Periodic(name=None,, type='Periodic'), minus=Periodic(name=None,, type='Periodic'), type='Boundary')\n Boundary condition on the plus and minus sides along the z axis.", + "description": "Specifies boundary conditions on each side of the domain and along each dimension.\n\nParameters\n----------\nx : Optional[Boundary] = None\n Boundary condition on the plus and minus sides along the x axis. If ``None`, periodic boundaries are applied. Default will change to PML in 2.0 so explicitly setting the boundaries is recommended.\ny : Optional[Boundary] = None\n Boundary condition on the plus and minus sides along the y axis. If ``None`, periodic boundaries are applied. Default will change to PML in 2.0 so explicitly setting the boundaries is recommended.\nz : Optional[Boundary] = None\n Boundary condition on the plus and minus sides along the z axis. If ``None`, periodic boundaries are applied. Default will change to PML in 2.0 so explicitly setting the boundaries is recommended.", "type": "object", "properties": { "x": { "title": "Boundary condition along x.", - "description": "Boundary condition on the plus and minus sides along the x axis.", - "default": { - "plus": { - "name": null, - "type": "Periodic" - }, - "minus": { - "name": null, - "type": "Periodic" - }, - "type": "Boundary" - }, + "description": "Boundary condition on the plus and minus sides along the x axis. If ``None`, periodic boundaries are applied. Default will change to PML in 2.0 so explicitly setting the boundaries is recommended.", "allOf": [ { "$ref": "#/definitions/Boundary" @@ -3070,18 +3023,7 @@ }, "y": { "title": "Boundary condition along y.", - "description": "Boundary condition on the plus and minus sides along the y axis.", - "default": { - "plus": { - "name": null, - "type": "Periodic" - }, - "minus": { - "name": null, - "type": "Periodic" - }, - "type": "Boundary" - }, + "description": "Boundary condition on the plus and minus sides along the y axis. If ``None`, periodic boundaries are applied. Default will change to PML in 2.0 so explicitly setting the boundaries is recommended.", "allOf": [ { "$ref": "#/definitions/Boundary" @@ -3090,18 +3032,7 @@ }, "z": { "title": "Boundary condition along z.", - "description": "Boundary condition on the plus and minus sides along the z axis.", - "default": { - "plus": { - "name": null, - "type": "Periodic" - }, - "minus": { - "name": null, - "type": "Periodic" - }, - "type": "Boundary" - }, + "description": "Boundary condition on the plus and minus sides along the z axis. If ``None`, periodic boundaries are applied. Default will change to PML in 2.0 so explicitly setting the boundaries is recommended.", "allOf": [ { "$ref": "#/definitions/Boundary"