Configuration Reference#
All configuration for tidy3d lives under a single object:
from tidy3d import config
The tables below list the built-in sections and every option they expose.
How to read this page#
Environment variable overrides always take precedence. Follow the pattern
TIDY3D_<SECTION>__<FIELD>(nesting continues with additional__segments such asTIDY3D_PLUGINS__SAMPLE__ENABLED).The Persisted column marks fields written to disk when you call
config.save(). Unmarked fields remain in-memory unless you passinclude_defaults=Trueor store them in profiles or environment variables.Descriptions call out notable allowed values, defaults, and persistence behavior. Literal values appear in quotes and tuples use the
(x, y, z)notation seen throughout the API.
Logging (config.logging)#
Controls the verbosity and suppression behavior of the global logger.
Option |
Default |
Persisted |
Description |
|---|---|---|---|
|
|
Yes |
Lowest logging level that will be emitted. Accepts |
|
|
No |
Suppress repeated log messages when |
|
|
No |
Show each unique warning message at most once per process when |
Simulation (config.simulation)#
Optional overrides that tweak solver behavior at runtime.
Option |
Default |
Persisted |
Description |
|---|---|---|---|
|
|
No |
Controls whether local subpixel averaging is used in |
Microwave (config.microwave)#
Options that apply to the microwave solver add-on.
Option |
Default |
Persisted |
Description |
|---|---|---|---|
|
|
No |
Skip the warning about RF license availability when set to |
Adjoint (config.adjoint)#
Parameters for adjoint behavior, including local execution settings and numerical tolerances.
These overrides apply only when local_gradient is True; otherwise the service uses its
remote defaults and emits a warning reminding you to enable local gradients.
Option |
Default |
Persisted |
Description |
|---|---|---|---|
|
|
No |
Minimum fraction of the smallest wavelength used when discretizing cylinders for autograd derivatives. |
|
|
No |
Number of material sample points per wavelength for cylinder discretization (must be positive). |
|
|
No |
Fallback fraction of the minimum wavelength when adaptive spacing is needed (must be |
|
|
No |
Smallest normalized spacing allowed when constructing adaptive finite-difference stencils (must be |
|
|
No |
Fraction of minimum local grid size used to snap coordinates outside of boundaries for shape gradients (must be |
|
|
No |
Real permittivity threshold below which a material is treated as PEC in shape-gradient boundary integration (must be |
|
|
Yes |
Enable local gradient evaluation. Remote gradients ignore other adjoint overrides unless this is |
|
|
Yes |
Directory (relative to the working directory) where intermediate gradient artifacts are stored when |
|
|
Yes |
Launch canonical adjoint simulations for supported monitors in parallel with the forward solve when local gradients are enabled. If any unsupported monitors are present, parallel adjoint is disabled and the sequential adjoint pipeline is used. |
|
|
Yes |
Policy for selecting mode directions when launching parallel adjoint simulations. Accepts |
|
|
No |
Floating-point precision used for gradient calculations. Accepts |
|
|
No |
Cell spacing between samples for polynomial autograd monitors. |
|
|
No |
Cell spacing between samples for custom autograd monitors. |
|
|
No |
Fraction of uniform samples reused when building Gauss quadrature nodes (between |
|
|
No |
Maximum Gauss–Legendre order used in composite quadrature rules (must be positive). |
|
|
No |
Padding tolerance used when clipping polygon edges during surface integrations (must be |
|
|
No |
Upper bound on the number of frequencies processed per chunk during gradient evaluation. Set to a positive integer to enable chunking or leave |
|
|
Yes |
Fraction of reported available RAM reserved for local adjoint postprocessing when auto-selecting frequency chunk sizes (between |
|
|
No |
Maximum number of structures whose fields may be traced in an adjoint run (must be positive). |
|
|
No |
Maximum number of adjoint simulations dispatched per forward solve (must be positive). |
Web (config.web)#
Settings for the cloud API client and related environment overrides.
Option |
Default |
Persisted |
Description |
|---|---|---|---|
|
|
Yes |
API key used for authentication. The value is masked when serialized. Also accepts |
|
|
No |
Verify SSL certificates for API requests. |
|
|
Yes |
Allow the web service to return cached simulation results when available. |
|
|
No |
Base URL for API calls. Must be an HTTP or HTTPS URL. |
|
|
No |
Base URL for the Tidy3D website. Must be an HTTP or HTTPS URL. |
|
|
No |
AWS region used by the platform’s S3 storage. |
|
|
No |
HTTP request timeout in seconds (between |
|
|
No |
Default worker count for configurable |
|
|
No |
Explicit TLS version to enforce. Accepts |
|
|
No |
Additional environment variables exported before API calls. Useful for proxy or credential helpers. |
Local Cache (config.local_cache)#
Controls the optional on-disk cache for simulation artifacts.
Option |
Default |
Persisted |
Description |
|---|---|---|---|
|
|
Yes |
Turn the local cache on or off. When enabled, results are reused if the inputs match. |
|
Platform-dependent |
Yes |
Directory where cached artifacts are stored. The path is expanded, resolved, and created if missing. Uses |
|
|
Yes |
Maximum cache size in gigabytes. |
|
|
Yes |
Maximum number of cached simulations retained. |
Batch Data Cache (config.batch_data_cache)#
Controls the optional in-memory cache for loaded batch task data.
Option |
Default |
Persisted |
Description |
|---|---|---|---|
|
|
No |
Cache batch results in memory when files are below the size threshold. |
|
|
No |
Cache batch task data only when the combined size of all task data files is at or below this threshold. |
vGPU (config.vgpu)#
Defaults used for virtual GPU cloud runs.
Option |
Default |
Persisted |
Description |
|---|---|---|---|
|
|
No |
Default queue priority for vGPU runs. When set, must be between |
|
|
No |
Default virtual GPU allocation for vGPU runs. When set, must be one of |
|
|
No |
Default flag to allow vGPU runs above the estimated memory limit. |
Plugins (config.plugins)#
Container that holds plugin-defined sections. After a plugin calls
@register_plugin("name"), its configuration becomes available under
config.plugins.<name> and follows the same persistence and environment variable rules described above (for example TIDY3D_PLUGINS__NAME__FIELD).