gds_fdtd.materials.select

Per-engine material-source selection — how a solver picks a material model.

A technology material may name up to three sources of optical constants, and each engine chooses exactly one at build time:

source

what it is

engines

eda

the engine’s own database model (tidy3d / lumerical in the tech file)

tidy3d, Lumerical (beamz has none)

rii

a refractiveindex.info page (rii:)

all three

nk

a single neutral constant index (nk:)

all three

Selection rule (per material, per engine):

  1. If the material sets source: explicitly, that source is used — and it is an error if that source is not defined for the engine in question.

  2. Otherwise the default precedence is eda → rii → nk: the first one that is defined (and applies to the engine) wins.

  3. If none applies to the engine, a MaterialSourceError is raised (e.g. a Lumerical-only material asked to run on tidy3d).

You do not need to specify all three — most materials give the engine model and let dispersion be exact; add rii for an engine-independent measured model, or just nk for a quick constant. beamz has no vendor database, so its eda slot is always empty (it uses rii or nk).

Module Attributes

SOURCES

valid sources, in default-precedence order.

Functions

available_sources(material, engine)

The sources defined for this material that apply to engine, in precedence order (eda, rii, nk).

check_materials(tech_dict, engine)

Validate that every material has a usable source for engine.

iter_materials(tech_dict)

Yield (label, material_dict) for every material in a solver-dict technology (substrate, superstrate, each device layer).

select_source(material, engine, *[, name])

Choose the optical-constant source for material on engine.

source_index(material, source, wavelength_um, *)

Constant complex index n + ik for a chosen source at one wavelength.