flex_rf.tidy3d.ModeSolver
Type: class │ Base(s): Tidy3dBaseModel
Description
Section titled “Description”Interface for solving electromagnetic eigenmodes in a 2D plane with translational invariance in the third dimension.
Parameters
Section titled “Parameters”simulation [MODE_SIMULATION_TYPE] |
|
Simulation or EMESimulation defining all structures and mediums. |
plane [MODE_PLANE_TYPE] |
|
Cross-sectional plane in which the mode will be computed. |
mode_spec [ModeSpecType] |
|
Container with specifications about the modes to be solved for. |
freqs [FreqArray] |
|
A list of frequencies at which to solve. |
direction [Direction] = '+' |
|
Direction of waveguide mode propagation along the axis defined by its normal dimension. |
colocate [bool] = True |
|
Toggle whether fields should be colocated to grid cell boundaries (i.e. primal grid nodes). Default is |
use_colocated_integration [bool] = True |
|
Only takes effect when |
conjugated_dot_product [bool] = True |
|
Use conjugated or non-conjugated dot product for mode decomposition. |
fields [tuple[EMField, ...]] = ['Ex', 'Ey', 'Ez', 'Hx', 'Hy', 'Hz'] |
|
Collection of field components to store in the monitor. Note that some methods like |
Methods
Section titled “Methods”as_fdtd_mode_solver() |
|
Construct a new |
bend_axis_3d() |
|
Converts the 2D bend axis into its corresponding 3D axis for a bend structure. For a straight waveguide, the rotated axis is equivalent to the bend axis and can be determined using angle_phi. |
bend_center() |
|
Computes the bend center based on plane center, angle_theta and angle_phi. |
data() |
|
|
data_raw() |
|
|
grid_snapped() |
|
The output grid snapped to the plane normal and to simulation 0-sized dims if any. |
is_plane(val: MODE_PLANE_TYPE) |
|
Raise validation error if not planar. |
normal_axis() |
|
Axis normal to the mode plane. |
normal_axis_2d() |
|
Axis normal to the mode plane in a 2D plane that is normal to the bend_axis_3d. |
plane_center_tangential(plane: MODE_PLANE_TYPE) |
|
Mode lane center in the tangential axes. |
plane_in_sim_bounds() |
|
Check that the plane is at least partially inside the simulation bounds. |
plot(ax: Ax = None, hlim: tuple[float, float] | None = None, vlim: tuple[float, float] | None = None, fill_structures: bool = True, **patch_kwargs: Any) |
|
Plot the mode plane simulation’s components. |
plot_3d(width: int = 800, height: int = 800) |
|
Render 3D plot of |
plot_eps(freq: float | None = None, alpha: float | None = None, ax: Ax = None) |
|
Plot the mode plane simulation’s components. The permittivity is plotted in grayscale based on its value at the specified frequency. |
plot_field(field_name: str, val: Literal['real', 'imag', 'abs'] = 'real', scale: PlotScale = 'lin', eps_alpha: float = 0.2, robust: bool = True, vmin: float | None = None, vmax: float | None = None, ax: Ax = None, cmap: str | Colormap | None = None, **sel_kwargs: Any) |
|
Plot the field for a |
plot_field_components(field_names: str | tuple[str, ...], mode_indices: int | tuple[int, ...] | None = None, val: Literal['real', 'imag', 'abs'] = 'real', scale: PlotScale = 'lin', eps_alpha: float = 0.2, robust: bool = True, vmin: float | None = None, vmax: float | None = None, ax: Any = None, cmap: str | Colormap | None = None, figsize: tuple[float, float] | None = None, titles: bool = True, show_n_eff: bool = False, **sel_kwargs: Any) |
|
Plot multiple field components for one or more modes in a single call. |
plot_grid(ax: Ax = None, **kwargs: Any) |
|
Plot the mode plane cell boundaries as lines. |
plot_pml(ax: Ax = None) |
|
Plot the mode plane absorbing boundaries. |
plot_structures_eps(freq: float | None = None, alpha: float | None = None, cbar: bool = True, reverse: bool = False, ax: Ax = None) |
|
Plot the mode plane simulation’s components. The permittivity is plotted in grayscale based on its value at the specified frequency. |
reduced_simulation_copy() |
|
Strip objects not used by the mode solver from simulation object. This might significantly reduce upload time in the presence of custom mediums. |
rotated_bend_center() |
|
Calculate the center at the rotated bend such that the modal plane is normal to the azimuthal direction of the bend. |
rotated_mode_solver_data() |
rotated_structures_copy() |
|
Create a copy of the original ModeSolver with rotated structures to the simulation and updates the ModeSpec to disable bend correction and reset angles to normal. |
sim_data() |
|
|
sim_with_mode_solver_monitor(name: str) |
|
Creates |
sim_with_monitor(freqs: list[float] | None = None, name: str | None = None) |
|
Creates |
sim_with_source(source_time: SourceTime, direction: Direction = None, mode_index: NonNegativeInt = 0) |
|
Creates |
solve() |
|
|
solver_symmetry() |
|
Get symmetry for solver for propagation along self.normal axis. |
theta_reference() |
|
Computes the azimutal angle of the reference modal plane. |
to_fdtd_mode_solver() |
|
Construct a new |
to_mode_solver_monitor(name: str, colocate: bool | None = None, mode_spec: ModeSpec | None = None, freqs: list[float] | None = None) |
|
Creates |
to_monitor(freqs: list[float] | None = None, name: str | None = None) |
|
Creates |
to_source(source_time: SourceTime, direction: Direction = None, mode_index: NonNegativeInt = 0, num_freqs: PositiveInt = 1, **kwargs: Any) |
|
Creates |
validate_pre_upload() |
|
Validate the fully initialized mode solver is ok for upload to our servers. |