Skip to content

Commit 9859e8a

Browse files
committed
schema, readme, tests 1.9.0rc1
1 parent 0a97042 commit 9859e8a

File tree

4 files changed

+172
-4
lines changed

4 files changed

+172
-4
lines changed

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
55

66
## [Unreleased]
77

8+
## [1.9.0rc1] - 2023-2-3
9+
10+
### Added
11+
- Specification of relative permittivity distribution using raw, user-supplied data through a `CustomMedium` component.
12+
- Automatic differentiation through `Tidy3D` simulations using `jax` through `tidy3d.plugins.adjoint`.
13+
- New Drude model variants for Gold and Silver in the `material_library`.
14+
15+
### Changed
16+
- Saving and loading of `.hdf5` files is made orders of magnitude faster due to an internal refactor.
17+
818
## [1.8.3] - 2023-1-26
919

1020
### Fixed
@@ -541,7 +551,8 @@ which fields are to be projected is now determined automatically based on the me
541551
- Job and Batch classes for better simulation handling (eventually to fully replace webapi functions).
542552
- A large number of small improvements and bug fixes.
543553

544-
[Unreleased]: https://github.com/flexcompute/tidy3d/compare/v1.8.3...develop
554+
[Unreleased]: https://github.com/flexcompute/tidy3d/compare/v1.9.0rc1...develop
555+
[1.9.0rc1]: https://github.com/flexcompute/tidy3d/compare/v1.8.3...v1.9.0rc1
545556
[1.8.2]: https://github.com/flexcompute/tidy3d/compare/v1.8.2...v1.8.3
546557
[1.8.2]: https://github.com/flexcompute/tidy3d/compare/v1.8.1...v1.8.2
547558
[1.8.1]: https://github.com/flexcompute/tidy3d/compare/v1.8.0...v1.8.1

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,30 @@ The easiest way to install tidy3d is through [pip](https://pip.pypa.io/en/stable
3939
pip install tidy3d
4040
```
4141

42+
This will install the latest stable version, to get the a "pre-release" version.
43+
44+
```
45+
pip install --pre tidy3d
46+
```
47+
48+
And to get a specific version `x.y.z`
49+
50+
```
51+
pip install tidy3d==x.y.z
52+
```
53+
54+
### Installing on Windows
55+
56+
Pre-release `1.9.0rc1` introduces the `adjoint` plugin, which uses [jax](https://jax.readthedocs.io/en/latest/) for automatic differentiation of tidy3d simulations. As windows users may have trouble installing `jax`, the recommended approach is to use [jax-windows-builder](https://github.com/cloudhan/jax-windows-builder) to first install jaxlib before tidy3d.
57+
58+
```
59+
pip install "jax[cpu]===0.3.14" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
60+
pip install tidy3d
61+
```
62+
63+
More details can be found [here](https://jax.readthedocs.io/en/latest/developer.html#additional-notes-for-building-jaxlib-from-source-on-windows).
64+
65+
4266
### Installing from source
4367

4468
For development purposes, and to get the latest development versions, you can download and install the package from source as:

tests/sims/simulation_1_9_0rc1.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"type": "Simulation", "center": [0.0, 0.0, 0.0], "size": [8.0, 8.0, 8.0], "run_time": 1e-12, "medium": {"name": null, "frequency_range": null, "type": "Medium", "permittivity": 1.0, "conductivity": 0.0}, "symmetry": [0, 0, 0], "structures": [{"geometry": {"type": "Box", "center": [-1.0, 0.0, 0.0], "size": [1.0, 1.0, 1.0]}, "name": null, "type": "Structure", "medium": {"name": null, "frequency_range": null, "type": "Medium", "permittivity": 2.0, "conductivity": 0.0}}, {"geometry": {"type": "Box", "center": [-1.0, 0.0, 0.0], "size": [1.0, "Infinity", 1.0]}, "name": null, "type": "Structure", "medium": {"name": null, "frequency_range": null, "type": "Medium", "permittivity": 1.0, "conductivity": 3.0}}, {"geometry": {"type": "Sphere", "radius": 1.0, "center": [1.0, 0.0, 1.0]}, "name": null, "type": "Structure", "medium": {"name": null, "frequency_range": null, "type": "Sellmeier", "coeffs": [[1.03961212, 0.00600069867], [0.231792344, 0.0200179144]]}}, {"geometry": {"type": "Box", "center": [-1.0, 0.0, 0.0], "size": [1.0, 1.0, 1.0]}, "name": null, "type": "Structure", "medium": {"name": null, "frequency_range": null, "type": "Lorentz", "eps_inf": 2.0, "coeffs": [[1.0, 2.0, 3.0]]}}, {"geometry": {"type": "Box", "center": [-1.0, 0.0, 0.0], "size": [1.0, 1.0, 1.0]}, "name": null, "type": "Structure", "medium": {"name": null, "frequency_range": null, "type": "Debye", "eps_inf": 2.0, "coeffs": [[1.0, 3.0]]}}, {"geometry": {"type": "Box", "center": [-1.0, 0.0, 0.0], "size": [1.0, 1.0, 1.0]}, "name": null, "type": "Structure", "medium": {"name": null, "frequency_range": null, "type": "Drude", "eps_inf": 2.0, "coeffs": [[1.0, 3.0]]}}, {"geometry": {"type": "GeometryGroup", "geometries": [{"type": "Box", "center": [-1.0, 0.0, 0.0], "size": [1.0, 1.0, 1.0]}]}, "name": null, "type": "Structure", "medium": {"name": "PEC", "frequency_range": null, "type": "PECMedium"}}, {"geometry": {"type": "Cylinder", "axis": 1, "sidewall_angle": 0.0, "reference_plane": "bottom", "radius": 1.0, "center": [1.0, 0.0, -1.0], "length": 2.0}, "name": null, "type": "Structure", "medium": {"name": null, "frequency_range": null, "type": "AnisotropicMedium", "xx": {"name": null, "frequency_range": null, "type": "Medium", "permittivity": 1.0, "conductivity": 0.0}, "yy": {"name": null, "frequency_range": null, "type": "Medium", "permittivity": 2.0, "conductivity": 0.0}, "zz": {"name": null, "frequency_range": null, "type": "Medium", "permittivity": 3.0, "conductivity": 0.0}}}, {"geometry": {"type": "PolySlab", "axis": 2, "sidewall_angle": 0.0, "reference_plane": "bottom", "slab_bounds": [-1.0, 1.0], "dilation": 0.0, "vertices": [[-1.5, -1.5], [-0.5, -1.5], [-0.5, -0.5]]}, "name": null, "type": "Structure", "medium": {"name": null, "frequency_range": null, "type": "PoleResidue", "eps_inf": 1.0, "poles": [[{"real": 0.0, "imag": 6206417594288582.0}, {"real": -0.0, "imag": -3.311074436985222e+16}]]}}], "sources": [{"type": "UniformCurrentSource", "center": [0.0, 0.5, 0.0], "size": [0.0, 0.0, 0.0], "source_time": {"amplitude": 1.0, "phase": 0.0, "type": "GaussianPulse", "freq0": 200000000000000.0, "fwidth": 40000000000000.0, "offset": 5.0}, "name": null, "polarization": "Hx"}, {"type": "PointDipole", "center": [0.0, 0.5, 0.0], "size": [0, 0, 0], "source_time": {"amplitude": 1.0, "phase": 0.0, "type": "GaussianPulse", "freq0": 200000000000000.0, "fwidth": 40000000000000.0, "offset": 5.0}, "name": null, "polarization": "Ex"}, {"type": "ModeSource", "center": [0.0, 0.5, 0.0], "size": [2.0, 0.0, 2.0], "source_time": {"amplitude": 1.0, "phase": 0.0, "type": "GaussianPulse", "freq0": 200000000000000.0, "fwidth": 40000000000000.0, "offset": 5.0}, "name": null, "num_freqs": 1, "direction": "-", "mode_spec": {"num_modes": 1, "target_neff": null, "num_pml": [0, 0], "filter_pol": null, "angle_theta": 0.0, "angle_phi": 0.0, "precision": "single", "bend_radius": null, "bend_axis": null, "track_freq": "central", "type": "ModeSpec"}, "mode_index": 0}, {"type": "PlaneWave", "center": [0.0, 0.0, 0.0], "size": [0.0, "Infinity", "Infinity"], "source_time": {"amplitude": 1.0, "phase": 0.0, "type": "GaussianPulse", "freq0": 200000000000000.0, "fwidth": 40000000000000.0, "offset": 5.0}, "name": null, "direction": "+", "angle_theta": 0.0, "angle_phi": 0.0, "pol_angle": 0.1}, {"type": "GaussianBeam", "center": [0.0, 0.0, 0.0], "size": [0.0, 3.0, 3.0], "source_time": {"amplitude": 1.0, "phase": 0.0, "type": "GaussianPulse", "freq0": 200000000000000.0, "fwidth": 40000000000000.0, "offset": 5.0}, "name": null, "num_freqs": 1, "direction": "+", "angle_theta": 0.0, "angle_phi": 0.0, "pol_angle": 1.5707963267948966, "waist_radius": 1.0, "waist_distance": 0.0}, {"type": "AstigmaticGaussianBeam", "center": [0.0, 0.0, 0.0], "size": [0.0, 3.0, 3.0], "source_time": {"amplitude": 1.0, "phase": 0.0, "type": "GaussianPulse", "freq0": 200000000000000.0, "fwidth": 40000000000000.0, "offset": 5.0}, "name": null, "num_freqs": 1, "direction": "+", "angle_theta": 0.0, "angle_phi": 0.0, "pol_angle": 1.5707963267948966, "waist_sizes": [1.0, 2.0], "waist_distances": [3.0, 4.0]}, {"type": "CustomFieldSource", "center": [0.0, 1.0, 2.0], "size": [2.0, 2.0, 0.0], "source_time": {"amplitude": 1.0, "phase": 0.0, "type": "GaussianPulse", "freq0": 200000000000000.0, "fwidth": 40000000000000.0, "offset": 5.0}, "name": null, "field_dataset": {"type": "FieldDataset", "Ex": "ScalarFieldDataArray", "Ey": null, "Ez": null, "Hx": null, "Hy": null, "Hz": null}}], "boundary_spec": {"x": {"plus": {"name": null, "type": "PML", "num_layers": 20, "parameters": {"sigma_order": 3, "sigma_min": 0.0, "sigma_max": 1.5, "type": "PMLParams", "kappa_order": 3, "kappa_min": 1.0, "kappa_max": 3.0, "alpha_order": 1, "alpha_min": 0.0, "alpha_max": 0.0}}, "minus": {"name": null, "type": "Absorber", "num_layers": 100, "parameters": {"sigma_order": 3, "sigma_min": 0.0, "sigma_max": 6.4, "type": "AbsorberParams"}}, "type": "Boundary"}, "y": {"plus": {"name": null, "type": "BlochBoundary", "bloch_vec": 1.0}, "minus": {"name": null, "type": "BlochBoundary", "bloch_vec": 1.0}, "type": "Boundary"}, "z": {"plus": {"name": null, "type": "Periodic"}, "minus": {"name": null, "type": "Periodic"}, "type": "Boundary"}, "type": "BoundarySpec"}, "monitors": [{"type": "FieldMonitor", "center": [0.0, 0.0, 0.0], "size": [0.0, 0.0, 0.0], "name": "field", "freqs": [150000000000000.0, 200000000000000.0], "apodization": {"start": null, "end": null, "width": null, "type": "ApodizationSpec"}, "fields": ["Ex"], "interval_space": [1, 1, 1], "colocate": false}, {"type": "FieldTimeMonitor", "center": [0.0, 0.0, 0.0], "size": [0.0, 0.0, 0.0], "name": "field_time", "start": 0.0, "stop": null, "interval": 100, "fields": ["Ex", "Ey", "Ez", "Hx", "Hy", "Hz"], "interval_space": [1, 1, 1], "colocate": false}, {"type": "FluxMonitor", "center": [0.0, 0.0, 0.0], "size": [1.0, 1.0, 0.0], "name": "flux", "freqs": [200000000000000.0, 250000000000000.0], "apodization": {"start": null, "end": null, "width": null, "type": "ApodizationSpec"}, "normal_dir": "+", "exclude_surfaces": null}, {"type": "FluxTimeMonitor", "center": [0.0, 0.0, 0.0], "size": [1.0, 1.0, 0.0], "name": "flux_time", "start": 0.0, "stop": null, "interval": 1, "normal_dir": "+", "exclude_surfaces": null}, {"type": "PermittivityMonitor", "center": [0.0, 0.0, 0.0], "size": [1.0, 1.0, 0.1], "name": "eps", "freqs": [100000000000000.0], "apodization": {"start": null, "end": null, "width": null, "type": "ApodizationSpec"}}, {"type": "ModeMonitor", "center": [0.0, 0.0, 0.0], "size": [1.0, 1.0, 0.0], "name": "mode", "freqs": [200000000000000.0, 250000000000000.0], "apodization": {"start": null, "end": null, "width": null, "type": "ApodizationSpec"}, "mode_spec": {"num_modes": 1, "target_neff": null, "num_pml": [0, 0], "filter_pol": null, "angle_theta": 0.0, "angle_phi": 0.0, "precision": "single", "bend_radius": null, "bend_axis": null, "track_freq": "central", "type": "ModeSpec"}}, {"type": "ModeSolverMonitor", "center": [0.0, 0.0, 0.0], "size": [1.0, 1.0, 0.0], "name": "mode_solver", "freqs": [200000000000000.0, 250000000000000.0], "apodization": {"start": null, "end": null, "width": null, "type": "ApodizationSpec"}, "mode_spec": {"num_modes": 1, "target_neff": null, "num_pml": [0, 0], "filter_pol": null, "angle_theta": 0.0, "angle_phi": 0.0, "precision": "single", "bend_radius": null, "bend_axis": null, "track_freq": "central", "type": "ModeSpec"}}, {"type": "FieldProjectionAngleMonitor", "center": [0.0, 0.0, 0.0], "size": [0.0, 2.0, 2.0], "name": "proj_angle", "freqs": [250000000000000.0, 300000000000000.0], "apodization": {"start": null, "end": null, "width": null, "type": "ApodizationSpec"}, "normal_dir": "+", "exclude_surfaces": null, "custom_origin": [1.0, 2.0, 3.0], "far_field_approx": true, "proj_distance": 1000000.0, "theta": [-1.5707963267948966, -1.5390630676677268, -1.5073298085405573, -1.4755965494133876, -1.443863290286218, -1.4121300311590483, -1.3803967720318788, -1.348663512904709, -1.3169302537775396, -1.2851969946503699, -1.2534637355232003, -1.2217304763960306, -1.189997217268861, -1.1582639581416914, -1.1265306990145216, -1.0947974398873521, -1.0630641807601826, -1.0313309216330129, -0.9995976625058433, -0.9678644033786736, -0.936131144251504, -0.9043978851243344, -0.8726646259971648, -0.8409313668699951, -0.8091981077428254, -0.7774648486156558, -0.7457315894884862, -0.7139983303613165, -0.6822650712341469, -0.6505318121069773, -0.6187985529798077, -0.5870652938526381, -0.5553320347254684, -0.5235987755982987, -0.4918655164711292, -0.46013225734395946, -0.42839899821678995, -0.3966657390896202, -0.3649324799624507, -0.333199220835281, -0.30146596170811146, -0.26973270258094173, -0.23799944345377222, -0.2062661843266025, -0.17453292519943298, -0.14279966607226324, -0.11106640694509373, -0.079333147817924, -0.047599888690754266, -0.015866629563584755, 0.015866629563584977, 0.04759988869075449, 0.07933314781792422, 0.11106640694509373, 0.14279966607226346, 0.17453292519943298, 0.2062661843266027, 0.23799944345377222, 0.26973270258094195, 0.30146596170811146, 0.3331992208352812, 0.3649324799624507, 0.39666573908962044, 0.42839899821678995, 0.4601322573439597, 0.4918655164711292, 0.5235987755982991, 0.5553320347254687, 0.5870652938526382, 0.6187985529798077, 0.6505318121069776, 0.6822650712341471, 0.7139983303613167, 0.7457315894884862, 0.7774648486156561, 0.8091981077428256, 0.8409313668699951, 0.8726646259971647, 0.9043978851243346, 0.9361311442515041, 0.9678644033786736, 0.9995976625058436, 1.031330921633013, 1.0630641807601826, 1.0947974398873521, 1.126530699014522, 1.1582639581416916, 1.189997217268861, 1.2217304763960306, 1.2534637355232006, 1.28519699465037, 1.3169302537775396, 1.348663512904709, 1.380396772031879, 1.4121300311590486, 1.443863290286218, 1.475596549413388, 1.5073298085405575, 1.539063067667727, 1.5707963267948966], "phi": [0.0, 1.5707963267948966]}, {"type": "FieldProjectionCartesianMonitor", "center": [0.0, 0.0, 0.0], "size": [0.0, 2.0, 2.0], "name": "proj_cartesian", "freqs": [250000000000000.0, 300000000000000.0], "apodization": {"start": null, "end": null, "width": null, "type": "ApodizationSpec"}, "normal_dir": "+", "exclude_surfaces": null, "custom_origin": [1.0, 2.0, 3.0], "far_field_approx": true, "proj_axis": 2, "proj_distance": 5.0, "x": [-1.0, 0.0, 1.0], "y": [-2.0, -1.0, 0.0, 1.0, 2.0]}, {"type": "FieldProjectionKSpaceMonitor", "center": [0.0, 0.0, 0.0], "size": [0.0, 2.0, 2.0], "name": "proj_kspace", "freqs": [250000000000000.0, 300000000000000.0], "apodization": {"start": null, "end": null, "width": null, "type": "ApodizationSpec"}, "normal_dir": "+", "exclude_surfaces": null, "custom_origin": [1.0, 2.0, 3.0], "far_field_approx": true, "proj_axis": 2, "proj_distance": 1000000.0, "ux": [0.1, 0.2], "uy": [0.3, 0.4, 0.5]}, {"type": "FieldProjectionAngleMonitor", "center": [0.0, 0.0, 0.0], "size": [0.0, 2.0, 2.0], "name": "proj_angle_exact", "freqs": [250000000000000.0, 300000000000000.0], "apodization": {"start": null, "end": null, "width": null, "type": "ApodizationSpec"}, "normal_dir": "+", "exclude_surfaces": null, "custom_origin": [1.0, 2.0, 3.0], "far_field_approx": true, "proj_distance": 1000000.0, "theta": [-1.5707963267948966, -1.5390630676677268, -1.5073298085405573, -1.4755965494133876, -1.443863290286218, -1.4121300311590483, -1.3803967720318788, -1.348663512904709, -1.3169302537775396, -1.2851969946503699, -1.2534637355232003, -1.2217304763960306, -1.189997217268861, -1.1582639581416914, -1.1265306990145216, -1.0947974398873521, -1.0630641807601826, -1.0313309216330129, -0.9995976625058433, -0.9678644033786736, -0.936131144251504, -0.9043978851243344, -0.8726646259971648, -0.8409313668699951, -0.8091981077428254, -0.7774648486156558, -0.7457315894884862, -0.7139983303613165, -0.6822650712341469, -0.6505318121069773, -0.6187985529798077, -0.5870652938526381, -0.5553320347254684, -0.5235987755982987, -0.4918655164711292, -0.46013225734395946, -0.42839899821678995, -0.3966657390896202, -0.3649324799624507, -0.333199220835281, -0.30146596170811146, -0.26973270258094173, -0.23799944345377222, -0.2062661843266025, -0.17453292519943298, -0.14279966607226324, -0.11106640694509373, -0.079333147817924, -0.047599888690754266, -0.015866629563584755, 0.015866629563584977, 0.04759988869075449, 0.07933314781792422, 0.11106640694509373, 0.14279966607226346, 0.17453292519943298, 0.2062661843266027, 0.23799944345377222, 0.26973270258094195, 0.30146596170811146, 0.3331992208352812, 0.3649324799624507, 0.39666573908962044, 0.42839899821678995, 0.4601322573439597, 0.4918655164711292, 0.5235987755982991, 0.5553320347254687, 0.5870652938526382, 0.6187985529798077, 0.6505318121069776, 0.6822650712341471, 0.7139983303613167, 0.7457315894884862, 0.7774648486156561, 0.8091981077428256, 0.8409313668699951, 0.8726646259971647, 0.9043978851243346, 0.9361311442515041, 0.9678644033786736, 0.9995976625058436, 1.031330921633013, 1.0630641807601826, 1.0947974398873521, 1.126530699014522, 1.1582639581416916, 1.189997217268861, 1.2217304763960306, 1.2534637355232006, 1.28519699465037, 1.3169302537775396, 1.348663512904709, 1.380396772031879, 1.4121300311590486, 1.443863290286218, 1.475596549413388, 1.5073298085405575, 1.539063067667727, 1.5707963267948966], "phi": [0.0, 1.5707963267948966]}, {"type": "DiffractionMonitor", "center": [0.0, 0.0, 0.0], "size": [0.0, "Infinity", "Infinity"], "name": "diffraction", "freqs": [100000000000000.0, 200000000000000.0], "apodization": {"start": null, "end": null, "width": null, "type": "ApodizationSpec"}, "normal_dir": "+"}], "grid_spec": {"grid_x": {"type": "AutoGrid", "min_steps_per_wvl": 10.0, "max_scale": 1.4, "dl_min": 0.0, "mesher": {"type": "GradedMesher"}}, "grid_y": {"type": "CustomGrid", "dl": [0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, 0.04]}, "grid_z": {"type": "UniformGrid", "dl": 0.05}, "wavelength": null, "override_structures": [{"geometry": {"type": "Box", "center": [-1.0, 0.0, 0.0], "size": [1.0, 1.0, 1.0]}, "name": null, "type": "Structure", "medium": {"name": null, "frequency_range": null, "type": "Medium", "permittivity": 2.0, "conductivity": 0.0}}], "type": "GridSpec"}, "shutoff": 0.0001, "subpixel": false, "normalize_index": 0, "courant": 0.8, "version": "1.9.0rc1"}

0 commit comments

Comments
 (0)