# Simulation

These advanced fields belong to tidy3d.Simulation (opens new window).

# Normalized Courant Factor

courant: Normalized Courant-Friedrichs-Lewy (CFL) stability factor controlling the time step to spatial step ratio.

  • Type: floating-point number
  • Constraint: (0, 1]
  • Default: 0.99

For a 3D grid in an isotropic medium with refractive index nn, the time step must satisfy:

Δt≤nc1Δx2+1Δy2+1Δz2 \Delta t \leq \frac{n}{c \sqrt{\frac{1}{\Delta x^2} + \frac{1}{\Delta y^2} + \frac{1}{\Delta z^2}}}

The GUI value is normalized so the CFL condition is met when courant is no larger than 1. Lower values can improve stability for dispersive materials, but increase simulation time.

See tidy3d.Simulation.courant (opens new window).

# Normalization

normalize_index: Index of the source whose spectrum is used to normalize frequency-domain data.

  • Type: integer or None
  • Constraint: greater than or equal to 0 when an index is used
  • Default: 0, which means the first source

Set to None to return raw unnormalized data.

# Precision

precision: Floating point precision to use in the computations.

  • Type: string
  • Options: hybrid, double
  • Default: hybrid

Use double when very high numerical accuracy is needed for a large or long-running simulation.

# Relax Courant

relax_courant: Toggle whether the solver may relax the Courant-related time-step behavior.

  • Type: Boolean
  • Options: True, False
  • Default: False