{"id":22466,"library":"tidy3d","title":"Tidy3D","description":"A fast FDTD solver for electromagnetic simulations, developed by Flexcompute. Current version is 2.11.1, with a rapid release cadence (multiple minor versions per month). Requires Python >=3.10, <3.15.","status":"active","version":"2.11.1","language":"python","source_language":"en","source_url":"https://github.com/flexcompute/tidy3d","tags":["FDTD","electromagnetic simulation","photonics","computational electromagnetics"],"install":[{"cmd":"pip install tidy3d","lang":"bash","label":"Install from PyPI"},{"cmd":"pip install tidy3d[all]","lang":"bash","label":"Install with all extras (e.g., adjoint, visualization)"}],"dependencies":[{"reason":"Core numerical library, version <2.4 required (patched in 2.10.1)","package":"numpy","optional":false},{"reason":"Data validation and settings management, v2 used since 2.10.0rc3","package":"pydantic","optional":false},{"reason":"Automatic differentiation for adjoint optimization","package":"autograd","optional":true}],"imports":[{"note":"All components are accessible via the tidy3d namespace.","symbol":"Simulation","correct":"import tidy3d as td\nsim = td.Simulation(...)"},{"note":"web is a submodule for cloud execution.","symbol":"web","correct":"from tidy3d import web\nweb.run(simulation, task_name='my_task')"},{"note":"Adjoint plugin is in tidy3d.plugins.adjoint.","symbol":"adjoint","correct":"import tidy3d as td\nimport tidy3d.plugins.adjoint as tda\n# or: from tidy3d.plugins.adjoint import ..."},{"note":"Various plugins live under tidy3d.plugins.","symbol":"plugins","correct":"from tidy3d.plugins import dispersion, mode, ..."}],"quickstart":{"code":"import tidy3d as td\nimport numpy as np\n\n# Define a simple waveguide simulation\nsim = td.Simulation(\n    size=(4.0, 2.5, 2.0),\n    grid_spec=td.GridSpec.auto(min_steps_per_wvl=10),\n    boundary_spec=td.BoundarySpec.pml(x=False, y=True, z=True),\n    structures=[\n        td.Structure(\n            geometry=td.Box(center=(0, 0, 0), size=(td.inf, 0.5, 0.22)),\n            medium=td.Medium(permittivity=2.0)\n        )\n    ],\n    sources=[\n        td.PointDipole(\n            center=(-1.5, 0, 0),\n            polarization='Ex',\n            source_time=td.GaussianPulse(freq0=200e12, fwidth=40e12)\n        )\n    ],\n    monitors=[\n        td.FieldMonitor(center=(0,0,0), size=(0,0,0), freqs=[200e12], name='point')\n    ],\n    run_time=1e-12\n)\n\n# Run locally (requires solver; for cloud use: web.run(sim, task_name='test'))\n# data = web.run(sim, task_name='quickstart')\nprint('Simulation created successfully.')","lang":"python","description":"Creates a basic waveguide with a point dipole source and field monitor. For cloud execution, uncomment the web.run() call and set your API key via environment variable TIDY3D_API_KEY."},"warnings":[{"fix":"Use si_units=True in simulation constructor to switch to meters, or manually convert.","message":"Default units are micrometers (um), but frequencies are in Hz. Ensure size, center, and wavelength-related parameters are consistent.","severity":"gotcha","affected_versions":"all"},{"fix":"Use the new API via tidy3d.plugins.adjoint. Refer to migration guide.","message":"The 'adjoint' plugin API changed with pydantic v2 migration in 2.10.0rc3. Old code using 'td.adjoint' may break.","severity":"deprecated","affected_versions":"<2.10.0rc3"},{"fix":"Run 'tidy3d configure' or set environment variable TIDY3D_API_KEY=your_api_key.","message":"When using cloud execution, you must set the TIDY3D_API_KEY environment variable or configure credentials via 'tidy3d configure'.","severity":"gotcha","affected_versions":"all"},{"fix":"Downgrade numpy to <2.4, or upgrade tidy3d to 2.10.2+ which includes a patch.","message":"numpy>=2.4 is not supported (as of 2.10.1). Installing tidy3d with numpy 2.4 may cause errors.","severity":"breaking","affected_versions":"<=2.10.1"},{"fix":"Estimate run_time as n_periods / fwidth where n_periods is at least 10-20.","message":"The 'run_time' parameter must be long enough for the pulse to decay; otherwise, the simulation may error.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install tidy3d' in your active environment.","cause":"Tidy3D not installed or installed in a different environment.","error":"ModuleNotFoundError: No module named 'tidy3d'"},{"fix":"Ensure all required parameters (size, run_time, etc.) are provided. Check documentation for defaults.","cause":"Missing required parameter in simulation constructor.","error":"pydantic.error_wrappers.ValidationError: 1 validation error for Simulation\nsize\n  field required (type=value_error.missing)"},{"fix":"Set environment variable TIDY3D_API_KEY or run 'tidy3d configure' to set credentials.","cause":"Invalid or missing TIDY3D_API_KEY.","error":"web.RunError: Authentication failed. Check your API key."},{"fix":"Increase min_steps_per_wvl (e.g., 20) or manually specify a finer grid.","cause":"GridSpec.auto() with too few steps per wavelength.","error":"ValueError: Grid size too small: at least 10 grid steps per wavelength are recommended."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}