- "description": "Contains all information about Tidy3d simulation.\n\nParameters\n----------\ncenter : Tuple[float, float, float] = (0.0, 0.0, 0.0)\n [units = um]. Center of object in x, y, and z.\nsize : Tuple[NonNegativeFloat, NonNegativeFloat, NonNegativeFloat] = None\n [units = um]. Size in x, y, and z directions.\ngrid_size : Tuple[Union[PositiveFloat, List[pydantic.types.PositiveFloat]], Union[PositiveFloat, List[pydantic.types.PositiveFloat]], Union[PositiveFloat, List[pydantic.types.PositiveFloat]]] = None\n [units = um]. If components are float, uniform grid size along x, y, and z. If components are array like, defines an array of nonuniform grid sizes centered at the simulation center . Note: if supplied sizes do not cover the simulation size, the first and last sizes are repeated to cover size. \nrun_time : PositiveFloat = None\n [units = sec]. Total electromagnetic evolution time in seconds. Note: If simulation 'shutoff' is specified, simulation will terminate early when shutoff condition met. \nmedium : Union[Medium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude] = Medium(name=None, frequency_range=None, type='Medium', permittivity=1.0, conductivity=0.0)\n Background medium of simulation, defaults to vacuum if not specified.\nsymmetry : Tuple[Literal[0, -1, 1], Literal[0, -1, 1], Literal[0, -1, 1]] = (0, 0, 0)\n Tuple of integers defining reflection symmetry across a plane bisecting the simulation domain normal to the x-, y-, and z-axis, respectvely. Each element can be ``0`` (no symmetry), ``1`` (even, i.e. 'PMC' symmetry) or ``-1`` (odd, i.e. 'PEC' symmetry). Note that the vectorial nature of the fields must be taken into account to correctly determine the symmetry value.\nstructures : List[Structure] = []\n List of structures present in simulation. Note: Structures defined later in this list override the simulation material properties in regions of spatial overlap.\nsources : List[Annotated[Union[tidy3d.components.source.VolumeSource, tidy3d.components.source.GaussianBeam, tidy3d.components.source.ModeSource, tidy3d.components.source.PlaneWave], FieldInfo(discriminator='type', extra={})]] = []\n List of electric current sources injecting fields into the simulation.\nmonitors : List[Union[FieldMonitor, FieldTimeMonitor, FluxMonitor, FluxTimeMonitor, ModeMonitor, ModeFieldMonitor]] = []\n List of monitors in the simulation. Note: monitor names are used to access data after simulation is run.\npml_layers : Tuple[Union[PML, StablePML, Absorber, NoneType], Union[PML, StablePML, Absorber, NoneType], Union[PML, StablePML, Absorber, NoneType]] = (None, None, None)\n Specifications for the absorbing layers on x, y, and z edges. If ``None``, no absorber will be added on that dimension and periodic boundary conditions will be used.\nshutoff : NonNegativeFloat = 1e-05\n Ratio of the instantaneous integrated E-field intensity to the maximum value at which the simulation will automatically terminate time stepping. Used to prevent extraneous run time of simulations with fully decayed fields. Set to ``0`` to disable this feature.\nsubpixel : bool = True\n If ``True``, uses subpixel averaging of the permittivity based on structure definition, resulting in much higher accuracy for a given grid size.\ncourant : ConstrainedFloatValue = 0.9\n Courant stability factor, controls time step to spatial step ratio. Lower values lead to more stable simulations for dispersive materials, but result in longer simulation times.\nversion : str = 1.2.0\n String specifying the front end version number.\n\nExample\n-------\n>>> from tidy3d import Sphere, Cylinder, PolySlab\n>>> from tidy3d import VolumeSource, GaussianPulse\n>>> from tidy3d import FieldMonitor, FluxMonitor\n>>> sim = Simulation(\n... size=(2.0, 2.0, 2.0),\n... grid_size=(0.1, 0.1, 0.1),\n... run_time=40e-11,\n... structures=[\n... Structure(\n... geometry=Box(size=(1, 1, 1), center=(-1, 0, 0)),\n... medium=Medium(permittivity=2.0),\n... ),\n... ],\n... sources=[\n... VolumeSource(\n... size=(0, 0, 0),\n... center=(0, 0.5, 0),\n... polarization=\"Hx\",\n... source_time=GaussianPulse(\n... freq0=2e14,\n... fwidth=4e13,\n... ),\n... )\n... ],\n... monitors=[\n... FieldMonitor(size=(0, 0, 0), center=(0, 0, 0), freqs=[1.5e14, 2e14], name='point'),\n... FluxMonitor(size=(1, 1, 0), center=(0, 0, 0), freqs=[2e14, 2.5e14], name='flux'),\n... ],\n... symmetry=(0, 0, 0),\n... pml_layers=(\n... PML(num_layers=20),\n... PML(num_layers=30),\n... None,\n... ),\n... shutoff=1e-6,\n... courant=0.8,\n... subpixel=False,\n... )",
0 commit comments