tidy3d.ChargeToleranceSpec#

class ChargeToleranceSpec[source]#

Bases: Tidy3dBaseModel

Charge tolerance parameters relevant to multiple simulation analysis types.

Parameters:
  • abs_tol (PositiveFloat = 10000000000.0) – Absolute tolerance used as stop criteria when converging towards a solution. This is honored by the legacy solver only; on the accelerated (default) solver, rel_tol is the effective convergence criterion.

  • rel_tol (PositiveFloat = 1e-10) – Relative tolerance used as stop criteria when converging towards a solution.

  • max_iters (PositiveInt = 120) – Indicates the maximum number of iterations to be run. The solver will stop either when this maximum of iterations is met or when the tolerance criteria has been met.

  • ramp_up_iters (PositiveInt = 1) – In order to help in start up, quantities such as doping are ramped up until they reach their specified value. This parameter determines how many of this iterations it takes to reach full values.

  • max_pseudo_steps (PositiveInt = 60) – Maximum number of pseudo time steps used per physical step in the drift-diffusion solver.

  • cfl_number (PositiveFloat = 1000000000.0) – CFL multiplier used in the drift-diffusion solver. Controls the pseudo time step size and acts as the upper bound of the adaptive CFL controller.

  • cfl_min (Optional[PositiveFloat] = None) – Lower bound of the adaptive CFL controller in the drift-diffusion solver. When None (default), the solver uses cfl_number * 1e-6 so behaviour matches setups that predate this field. Setting cfl_min equal to cfl_number effectively runs the solver with a constant CFL (no adaptive backoff).

  • preconditioner_iterations (PositiveInt = 50) – Maximum number of preconditioner iterations in the linear solver of the drift-diffusion solver.

Example

>>> import tidy3d as td
>>> charge_settings = td.ChargeToleranceSpec()

Attributes

abs_tol#
rel_tol#
max_iters#
ramp_up_iters#
max_pseudo_steps#
cfl_number#
cfl_min#
preconditioner_iterations#