Skip to content

Simulation

Learn how to simulate your circuits and devices to verify behavior before fabrication. GDSFactory+ integrates multiple simulation engines for circuit analysis and device modeling.

Circuit Simulation

Run end-to-end simulations on your circuits. The following guides walk through complete design workflows that include simulation:

Or jump directly to: - Run Your First Circuit Simulation — Quick walkthrough of the simulation UI and how to modify and re-run simulations

Device Simulation

Simulate individual components and devices:

  • Mode Solver Simulations — Use FDFD and finite element methods to analyze waveguides, couplers, and other photonic devices

Available Simulation Engines

GDSFactory+ integrates with several simulation engines. See the FAQ for details on engine capabilities and limits.

FDTD with the Python SDK

When your DataLab deployment provides FDTD, submit a prepared FDTD input directory with the public JobDefinition.FDTD engine:

from gdsfactoryplus import sim

prepared = sim.upload_simulation(
    "fdtd-input",
    job_definition=sim.JobDefinition.FDTD,
    solver_version=None,
)
job = sim.start_simulation(prepared)
print(job.solver_version, job.container_image)
job = sim.wait_for_simulation(job)
results = sim.download_results(job, output_dir="fdtd-results")

Omitting solver_version, or setting it to None, preserves the default server-selected version. Explicit version identifiers require a DataLab server that supports solver_version; pass a version supported by that deployment. The SDK forwards the identifier unchanged and leaves validation to DataLab. Only one served version is needed to use this API.

The complete sim.run_simulation helper accepts the same optional argument. For cache lookups, use the same solver_version in sim.check_cache("fdtd", input_hash, solver_version=version) as in the upload. The input hash is a deterministic hash of your input files that you compute.

job.solver_version exposes the version when returned by the server and is None for responses without that field. job.container_image is the server-selected execution-image reference.