Thermo-optic phase shifter with a transparent heater#
Note: running this notebook end to end costs about 8.5 FlexCredits. Nearly all of it is the trench-depth sweep at the end, where each depth needs a transient heat simulation; the single-device sections before it are about 0.3 FlexCredits together.
Thermo-optic phase shifters are the standard way to tune a photonic integrated circuit, but they are hard to make efficient at visible wavelengths. Silicon nitride has a small thermo-optic coefficient, so a large temperature swing is needed, and a conventional metal heater has to be kept far from the waveguide to avoid inducing absorption. That separation is exactly what wastes the heat. A transparent conductive oxide heater, such as hydrogen-doped indium oxide (IHO), has an extinction coefficient small enough that it can sit directly on top of the waveguide core, which couples the heat in efficiently while keeping the insertion loss low.
In this notebook, we design such a phase shifter at \(\lambda = 532\) nm on a silicon nitride platform and optimize the air trenches that thermally isolate it. The trenches trade power against speed, so the optimum follows from a figure of merit that weights both. We find that a trench about \(1\ \mu m\) deep cuts the \(\pi\)-shift power from \(16.8\) mW to roughly \(4\) mW and the \(10-90\%\) switching time from \(5.6\ \mu s\) to about \(3\ \mu s\) at the same time. The device follows J. Caso, J. Parra, B. Rajeswaran, and P. Sanchis, βLow-loss hydrogen-doped indium oxide thermo-optic phase shifter for visible wavelengths,β Opt. Express 34(16), 29741-29750 (2026).
The workflow has three steps:
A steady-state heat simulation sets the dissipated power that holds the heater at its maximum allowed temperature.
A mode solve on the thermally perturbed cross-section gives the effective-index shift, hence the length and the power needed for a \(\pi\) phase shift.
A transient heat simulation gives the switching time.
[1]:
import matplotlib.pyplot as plt
import numpy as np
import tidy3d as td
import tidy3d.web as web
# the sweep builds many similar simulations; log each distinct warning only once
td.config.logging.warn_once = True
Simulation Setup#
The waveguide is a \(300 \times 150\) nm silicon nitride core on a \(3.3\ \mu m\) buried oxide, which is single-mode for both polarizations at \(532\) nm. The oxide is planarized flush with the top of the core, and the \(50\) nm thick IHO heater sits directly on that surface with no spacer. Working in the cross-section plane, you use \(x\) for the lateral direction, \(y\) for the vertical direction, and \(z\) for propagation.

[2]:
lda0 = 0.532 # design wavelength (um)
freq0 = td.C_0 / lda0 # design frequency
w_wg, h_wg = 0.3, 0.15 # Si3N4 core width and height (um)
w_heater, t_heater = 0.3, 0.05 # IHO heater width and thickness (um)
t_box = 3.3 # oxide between core bottom and Si substrate (um)
t_si = 10.0 # Si substrate included in the thermal model (um)
separation = 0.3 # gap left between the two trenches (um)
y_surf = h_wg # planarized oxide surface = heater underside
x_half = 20.0 # half width of the thermal domain (um)
y_top = 0.7 # top of the thermal domain (um)
inf_eff = 1e3 # effective infinity for semi-infinite layers
T_amb = 293.15 # ambient temperature (K)
dT_heater = 360.0 # max heater rise, i.e. the heater at 380 Β°C
Every material carries both an optical and a thermal specification so we wrap them in a MultiPhysicsMedium. The thermal side is a SolidSpec, whose conductivity is in \(W/(\mu m \cdot K)\), specific heat in \(J/(kg \cdot K)\) and density in \(kg/\mu m^3\). Air is a FluidSpec, which excludes it from the heat solve so that every exposed surface, including the trench walls, is adiabatic.
[3]:
heat_sin = td.SolidSpec(conductivity=18.5e-6, capacity=788, density=3100e-18)
heat_iho = td.SolidSpec(conductivity=4.7e-6, capacity=354, density=7310e-18)
heat_sio2 = td.SolidSpec(conductivity=1.38e-6, capacity=709, density=2203e-18)
heat_si = td.SolidSpec(conductivity=130e-6, capacity=700, density=2329e-18)
The optical side uses a PerturbationMedium so that a temperature field can later be mapped onto a refractive index change through the thermo-optic coefficient, supplied as a LinearHeatPerturbation. Silicon nitride has \(dn/dT = 2.45 \times 10^{-5}\ K^{-1}\), about \(2.6\) times larger than that of the oxide. The IHO index is \(2.04 + i\,4.86 \times 10^{-4}\); its own thermo-optic coefficient is not needed because the mode overlap with the heater is small.
[4]:
# facecolors for the cross-section plots, matching the schematic above
color_sin, color_iho, color_sio2 = "#5b8dd6", "#f3c515", "#fdf0b4"
color_si, color_air = "#31465f", "white"
def viz(color: str) -> td.VisualizationSpec:
"""Fix how a medium is drawn, instead of letting the plot pick a color."""
return td.VisualizationSpec(facecolor=color)
def perturbation_medium(
n: float, dndt: float, k: float = 0.0, color: str = "white"
) -> td.PerturbationMedium:
"""Optical medium whose refractive index shifts linearly with temperature."""
kwargs = {"viz_spec": viz(color)}
if k: # absorption enters as an equivalent conductivity
kwargs["conductivity"] = 2 * n * k * 2 * np.pi * freq0 * td.EPSILON_0
return td.PerturbationMedium(
permittivity=n**2 - k**2,
perturbation_spec=td.IndexPerturbation(
delta_n=td.ParameterPerturbation(
heat=td.LinearHeatPerturbation(coeff=dndt, temperature_ref=T_amb)
),
freq=freq0,
),
**kwargs,
)
mat_sin = td.MultiPhysicsMedium(
name="Si3N4", optical=perturbation_medium(2.06, 2.45e-5, color=color_sin), heat=heat_sin
)
mat_iho = td.MultiPhysicsMedium(
name="IHO", optical=perturbation_medium(2.04, 0.0, k=4.86e-4, color=color_iho),
heat=heat_iho
)
mat_sio2 = td.MultiPhysicsMedium(
name="SiO2", optical=perturbation_medium(1.47, 0.95e-5, color=color_sio2), heat=heat_sio2
)
mat_si = td.MultiPhysicsMedium(
name="Si", optical=td.Medium(permittivity=4.0**2, viz_spec=viz(color_si)), heat=heat_si
)
mat_air = td.MultiPhysicsMedium(
name="air",
optical=td.Medium(permittivity=1.0, viz_spec=viz(color_air)),
heat=td.FluidSpec(thermal_conductivity=0.026e-6, specific_heat=1006, density=1.177e-18),
)
The geometry goes into a Scene, which is convenient because the same object feeds both the heat solver and the mode solver. The air trenches are boxes that overwrite the oxide on either side of the core; the trench depth is measured downwards from the planarized surface, so a depth equal to the core height exposes the core sidewalls without etching into the oxide at all.
[5]:
def make_scene(depth: float) -> td.Scene:
"""Device cross-section with symmetric air trenches of the given depth (um)."""
# the layers run through the domain boundary rather than stopping on it: a structure
# bound that coincides with a simulation edge is ambiguous, and tidy3d warns about it
structures = [
td.Structure(
geometry=td.Box.from_bounds((-td.inf, -inf_eff, -td.inf), (td.inf, -t_box, td.inf)),
medium=mat_si,
name="substrate",
),
td.Structure(
geometry=td.Box.from_bounds((-td.inf, -t_box, -td.inf), (td.inf, y_surf, td.inf)),
medium=mat_sio2,
name="box",
),
]
if depth > 0:
for sign, side in ((-1, "left"), (1, "right")):
x_a, x_b = sorted((sign * separation / 2, sign * inf_eff))
structures.append(
td.Structure(
geometry=td.Box.from_bounds(
(x_a, y_surf - depth, -td.inf), (x_b, y_surf, td.inf)
),
medium=mat_air,
name=f"trench_{side}",
)
)
structures += [
td.Structure(
geometry=td.Box.from_bounds((-w_wg / 2, 0, -td.inf), (w_wg / 2, h_wg, td.inf)),
medium=mat_sin,
name="wg",
),
td.Structure(
geometry=td.Box.from_bounds(
(-w_heater / 2, y_surf, -td.inf), (w_heater / 2, y_surf + t_heater, td.inf)
),
medium=mat_iho,
name="heater",
),
]
return td.Scene(medium=mat_air, structures=structures)
Before building any simulation, plot the cross-section for a few trench depths to confirm that the etch lands where you expect.
[6]:
fig, axes = plt.subplots(1, 3, figsize=(13, 3.6), tight_layout=True)
for ax, depth in zip(axes, [0.15, 0.6, 1.4]):
make_scene(depth).plot(z=0, ax=ax)
ax.set_xlim(-0.8, 0.8)
ax.set_ylim(y_surf - depth - 0.5, 0.5)
ax.set_title(f"trench depth {depth} um")
plt.show()
Steady-State Heat Simulation#
The heater is driven by a HeatSource, whose rate is a volumetric power density. Because the cross-section is invariant along \(z\), it is more natural to work with the power dissipated per unit device length, q_line in \(W/\mu m\), and convert with the heater cross-sectional area. The base of the substrate is held at ambient with a
TemperatureBC and every other boundary is left adiabatic. A TemperatureMonitor covers the heater and the region where the optical mode lives, and unstructured=True returns the temperature on the solverβs own mesh, which avoids a lossy interpolation across the material interfaces.
Setting one dimension of size to zero makes this a 2D simulation. The AutoUnstructuredGrid uses one-third of the thin heater thickness as its baseline interface resolution. The \(0.4~\mu\text{m}\) target bulk spacing is expressed as a ratio to that resolution because the background spans a much larger scale. Note that relative_min_dl must be lowered from its default,
otherwise the requested interface size is clamped by the size of the domain.
[7]:
a_heater = w_heater * t_heater # heater cross-section (um^2)
def make_heat_sim(
depth: float,
q_line: float,
unsteady: tuple = None,
mesh_resolution: float = t_heater / 3,
) -> td.HeatChargeSimulation:
"""2D heat simulation of the phase shifter; `unsteady` is (time_step, num_steps)."""
y_bot = -t_box - t_si
bc_substrate = td.HeatChargeBoundarySpec(
placement=td.SimulationBoundary(surfaces=["y-"]),
condition=td.TemperatureBC(temperature=T_amb),
)
heater_source = td.HeatSource(rate=q_line / a_heater, structures=["heater"])
temp_monitor = td.TemperatureMonitor(
center=(0, y_surf + t_heater + 0.05 - 2.25, 0),
size=(4.0, 4.5, 0),
name="temperature",
unstructured=True,
)
kwargs = {}
if unsteady is not None:
time_step, num_steps = unsteady
kwargs["analysis_spec"] = td.UnsteadyHeatAnalysis(
initial_temperature=T_amb,
unsteady_spec=td.UnsteadySpec(time_step=time_step, total_time_steps=num_steps),
)
return td.HeatChargeSimulation.from_scene(
scene=make_scene(depth),
center=(0, (y_bot + y_top) / 2, 0),
size=(2 * x_half, y_top - y_bot, 0),
boundary_spec=[bc_substrate],
sources=[heater_source],
monitors=[temp_monitor],
grid_spec=td.AutoUnstructuredGrid(
dl_reference=mesh_resolution,
dl_bulk_ratio=0.4 / mesh_resolution,
relative_min_dl=0.0,
non_refined_structures=["substrate"],
),
**kwargs,
)
Steady heat conduction with temperature-independent properties is linear, so the drive level is not a design variable: you run one simulation at a convenient power and rescale the result so that the hottest point of the heater sits exactly at its limit of \(380\ ^\circ C\). The seed below keeps the raw temperatures physical across the whole sweep, which makes the intermediate plots easier to read, but any value gives the same rescaled answer.
[8]:
def q_seed(depth: float) -> float:
"""Rough power per unit length (W/um); the exact value follows by rescaling."""
return 4.6e-4 / (1 + 2.5 * depth)
def heater_scale(temperature) -> float:
"""Factor that brings the peak heater temperature rise to `dT_heater`."""
points = np.asarray(temperature.points.values)
in_heater = (
(np.abs(points[:, 0]) <= w_heater / 2 + 1e-9)
& (points[:, 1] >= y_surf - 1e-9)
& (points[:, 1] <= y_surf + t_heater + 1e-9)
)
rise = np.asarray(temperature.values.values) - T_amb
return dT_heater / rise[in_heater].max()
def rescaled(temperature, factor: float):
"""Same unstructured mesh, temperature rise multiplied by `factor`."""
rise = np.asarray(temperature.values.values) - T_amb
return temperature.updated_copy(values=temperature.values.copy(data=T_amb + factor * rise))
def drawable(dataset):
"""Drop the collapsed cells that a planar monitor returns, for plotting only.
The solver meshes in three dimensions and the planar monitor cuts through it,
so about three quarters of the triangles handed back have exactly zero area.
They carry no data and no interpolation uses them, but matplotlib's default
gouraud shading smears them into long streaks across the figure. Removing
them orphans some points, hence the `clean()`, which is also what the warning
that `updated_copy` prints is asking for.
"""
points = np.asarray(dataset.points.values)[:, :2]
cells = np.asarray(dataset.cells.values)
edge1 = points[cells[:, 1]] - points[cells[:, 0]]
edge2 = points[cells[:, 2]] - points[cells[:, 0]]
area = edge1[:, 0] * edge2[:, 1] - edge1[:, 1] * edge2[:, 0]
return dataset.updated_copy(cells=dataset.cells[area != 0]).clean()
It is good practice to check the cost before submitting. A HeatChargeSimulation task runs as two steps, meshing and solving, so Job.estimate_cost first reports the meshing step and, once that has run, the solver step; for this solver the estimate is the final billed cost. Note that web.estimate_cost(job.task_id) cannot be used here because a multi-step job has no single task id.
[9]:
heat_sim = make_heat_sim(depth=0.0, q_line=q_seed(0.0))
job = web.Job(simulation=heat_sim, task_name="tops_flat_steady", folder_name="tops")
cost = job.estimate_cost()
21:58:30 UTC Created task 'tops_flat_steady_mesh' with resource_id
'vom-5bf55946-8edd-4f67-983c-fed1fce39315' and task_type
'VOLUME_MESH'.
Tidy3D's VolumeMesher solver is currently in the beta stage. Cost
of VolumeMesher simulations is subject to change in the future.
β simulation.hdf5.gz βββββββββββββββββββββββββ 100.0% β’ 1.5/1.5 kB β’ ? β’ 0:00:00
21:58:33 UTC Estimated FlexCredit cost: 0.025. Use 'web.real_cost(task_id)' to
get the billed FlexCredit cost after a simulation run.
The FlexCredit estimate shown above is for the next workflow step
'mesh' only.
This is the mesh step. Run it first with 'Job.step()'; after it
completes, call 'Job.estimate_cost()' again for the solver
estimate.
[10]:
sim_data = job.run(path="data/tops_flat_steady.hdf5")
21:58:34 UTC status = queued
To cancel the simulation, use 'web.abort(task_id)' or
'web.delete(task_id)' or abort/delete the task in the web UI.
Terminating the Python script will not stop the job running on the
cloud.
21:58:46 UTC starting up solver
running solver
21:58:51 UTC status = success
Created task 'tops_flat_steady_solve' with resource_id
'hec-01175c85-c4a0-4c13-abf5-8887dec75636' and task_type
'HEAT_CHARGE'.
Tidy3D's HeatCharge solver is currently in the beta stage. Cost of
HeatCharge simulations is subject to change in the future.
β simulation.hdf5.gz βββββββββββββββββββββββββ 100.0% β’ 1.5/1.5 kB β’ ? β’ 0:00:00
21:58:53 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
21:58:54 UTC status = queued
To cancel the simulation, use 'web.abort(task_id)' or
'web.delete(task_id)' or abort/delete the task in the web UI.
Terminating the Python script will not stop the job running on the
cloud.
21:59:04 UTC status = preprocess
21:59:15 UTC starting up solver
running solver
21:59:19 UTC status = success
β simulation_data.hdf5.gz ββββββββββββββββ 100.0% β’ 222.5/222.5 kB β’ ? β’ 0:00:00
21:59:20 UTC Loading results from data/tops_flat_steady.hdf5
Rescale the field to the \(380\ ^\circ C\) operating point and look at it. Almost the whole core sits within a few tens of degrees of the heater, which is what makes a directly stacked heater efficient, and the heat spreads well beyond the core into the oxide, which is what the air trenches will later suppress.
[11]:
temperature = sim_data["temperature"].temperature
scale = heater_scale(temperature)
q_line_flat = q_seed(0.0) * scale
print(f"power per unit length at the 380 Β°C limit: {q_line_flat * 1e3:.4f} mW/um")
ax = drawable(rescaled(temperature, scale)).plot(grid=False, cmap="magma")
plt.xlim(-0.8, 0.8)
plt.ylim(-0.8, 0.4)
plt.gca().set_aspect("equal")
plt.title("Steady-state temperature (K)")
plt.show()
power per unit length at the 380 Β°C limit: 0.4612 mW/um
WARNING: Unstructured grid dataset contains unused points. Consider
calling 'clean()' to remove them.
Power for a \(\pi\) Phase Shift#
Now map the temperature onto the optical problem. PerturbationMedium.perturbed_copy samples the thermo-optic shift on the supplied field and returns a CustomMedium, and a ModeSimulation on the cross-section then gives the guided modes, which you solve locally with run_local. Install
tidy3d-extras (pip install tidy3d\[extras]) before running this notebook: local mode solving uses subpixel averaging only when that package is present, and without it the layer interfaces fall back to staircasing, which shifts \(n_{eff}\) by a few times \(10^{-3}\) and \(P_{\pi}\) by about a percent.
Two details matter for accuracy. First, use a fixed uniform grid whose step divides every layer boundary exactly, so that the discretization is identical for the hot and the cold structure and the difference of the two effective indices is clean; the TM mode is otherwise sensitive to how the horizontal interfaces fall on the Yee grid. Second, take the cold reference through the same perturbed_copy path, at uniform ambient temperature, so that nothing but the temperature field changes between
the two solves.
[12]:
x_half_opt, y_lo_opt, y_hi_opt = 1.5, -1.0, 0.75 # mode window (um)
dl_opt = 0.005 # divides y = 0, 0.15, 0.20 and x = +-0.15 exactly
def perturbed(medium, temperature):
"""Bake a temperature field into an optical medium, leaving others untouched."""
if temperature is None or not isinstance(medium, td.PerturbationMedium):
return medium
return medium.perturbed_copy(temperature=temperature, interp_method="linear")
def make_mode_sim(depth: float, temperature=None, num_modes: int = 2) -> td.ModeSimulation:
"""Mode simulation of the cross-section, perturbed by a temperature field."""
scene = make_scene(depth)
# keep only what the mode window contains: the substrate box extends far below it, and
# tidy3d warns about structures that fall entirely outside a simulation
structures = []
for s in scene.structures:
(x_a, y_a, _), (x_b, y_b, _) = s.geometry.bounds
if x_b <= -x_half_opt or x_a >= x_half_opt or y_b <= y_lo_opt or y_a >= y_hi_opt:
continue
structures.append(s.updated_copy(medium=perturbed(s.medium.optical, temperature)))
return td.ModeSimulation(
center=(0, (y_lo_opt + y_hi_opt) / 2, 0),
size=(2 * x_half_opt, y_hi_opt - y_lo_opt, 0),
medium=perturbed(scene.medium.optical, temperature),
structures=structures,
grid_spec=td.GridSpec.uniform(dl=dl_opt),
boundary_spec=td.BoundarySpec.all_sides(boundary=td.PML()),
mode_spec=td.ModeSpec(num_modes=num_modes, target_neff=2.06, precision="double"),
freqs=[freq0],
)
def solve_modes(mode_sim: td.ModeSimulation):
"""Local mode solve -> (n_eff, k_eff, TE fraction, mode data)."""
modes = mode_sim.run_local().modes
return (
np.real(modes.n_eff.values).ravel(),
np.real(modes.k_eff.values).ravel(),
np.asarray(modes.pol_fraction["te"].values).ravel(),
modes,
)
def te_tm(n_eff, te_fraction):
"""Indices of the fundamental TE and TM modes, most confined first."""
order = np.argsort(-n_eff)
return (
next(i for i in order if te_fraction[i] > 0.5),
next(i for i in order if te_fraction[i] <= 0.5),
)
The phase shift accumulated over a length \(L\) is \(2 \pi L \Delta n_{eff} / \lambda\), so the length that gives a \(\pi\) shift is \(L_{\pi} = \lambda / (2 \Delta n_{eff})\) and the power that goes with it is \(P_{\pi} = q' L_{\pi}\).
[13]:
def pi_shift_metrics(temperature_hot, depth: float) -> dict:
"""dn_eff, L_pi and P_pi for both polarizations from a steady temperature field."""
scale = heater_scale(temperature_hot)
hot = rescaled(temperature_hot, scale)
cold = rescaled(temperature_hot, 0.0) # ambient everywhere, same code path
n_cold, k_cold, te_cold, modes_cold = solve_modes(make_mode_sim(depth, cold))
n_hot, _, te_hot, _ = solve_modes(make_mode_sim(depth, hot))
out = {"modes_cold": modes_cold, "q_line": q_seed(depth) * scale}
for pol, i_cold, i_hot in zip(("te", "tm"), te_tm(n_cold, te_cold), te_tm(n_hot, te_hot)):
dn = n_hot[i_hot] - n_cold[i_cold]
length = lda0 / (2 * dn)
out[f"n_{pol}"] = n_cold[i_cold]
out[f"dn_{pol}"] = dn
out[f"L_{pol}"] = length
out[f"P_{pol}"] = out["q_line"] * length * 1e3 # mW
out[f"loss_{pol}"] = 4.343 * 4 * np.pi * k_cold[i_cold] / lda0 * length # dB
out[f"i_{pol}"] = i_cold
return out
flat = pi_shift_metrics(temperature, 0.0)
for pol in ("te", "tm"):
print(
f"{pol.upper()}: n_eff = {flat['n_' + pol]:.4f}, "
f"dn_eff = {flat['dn_' + pol]:.2e}, "
f"L_pi = {flat['L_' + pol]:.1f} um, "
f"P_pi = {flat['P_' + pol]:.2f} mW, "
f"loss = {flat['loss_' + pol]:.2f} dB"
)
21:59:48 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:00:14 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
TE: n_eff = 1.7258, dn_eff = 7.27e-03, L_pi = 36.6 um, P_pi = 16.88 mW, loss = 0.24 dB
TM: n_eff = 1.6604, dn_eff = 6.80e-03, L_pi = 39.1 um, P_pi = 18.03 mW, loss = 0.27 dB
Both polarizations are guided and single-mode, and the mode profiles show why the loss stays small: the field is concentrated in the nitride core and only its tail reaches the absorbing heater.
[14]:
modes = flat["modes_cold"]
fig, axes = plt.subplots(1, 2, figsize=(11, 3.6), tight_layout=True)
for ax, pol in zip(axes, ("te", "tm")):
intensity = sum(
np.abs(np.squeeze(getattr(modes, comp).isel(mode_index=flat[f"i_{pol}"], f=0).values)) ** 2
for comp in ("Ex", "Ey", "Ez")
)
ax.pcolormesh(
np.asarray(modes.Ex.x.values),
np.asarray(modes.Ex.y.values),
intensity.T,
cmap="magma",
shading="auto",
)
make_scene(0.0).plot_structures(z=0, ax=ax, fill=False)
ax.set_xlim(-0.6, 0.6)
ax.set_ylim(-0.4, 0.4)
ax.set_aspect("equal")
ax.set_xlabel(r"x ($\mu m$)")
ax.set_ylabel(r"y ($\mu m$)")
ax.set_title(f"{pol.upper()} mode intensity")
plt.show()
Switching Time#
The switching time comes from a transient run: add an UnsteadyHeatAnalysis to the same simulation, start from ambient, and drive the heater with the power just found.
Evaluating the optical phase at every one of the hundreds of time steps would mean hundreds of mode solves. Instead, use the fact that to first order in the temperature rise the phase is a linear functional of it,
so a weight built once from the cold mode intensity turns any temperature field into a phase. Only the ratio to the steady-state phase enters the \(10-90\%\) criterion, so the proportionality constant never has to be evaluated. The cell below builds that weight on the optical grid; because the field components are colocated on the grid boundaries, the intensity is averaged onto cell centers, where the material at each point is unambiguous.
[15]:
block = 5 # sample the temperature field every 5 optical cells (25 nm)
def phase_weight(depth: float, modes, i_mode: int):
"""(x, y, weight) sampling grid for the first-order phase integral."""
xs = np.asarray(modes.Ex.x.values)
ys = np.asarray(modes.Ex.y.values)
xc, yc = 0.5 * (xs[:-1] + xs[1:]), 0.5 * (ys[:-1] + ys[1:])
# n * dn/dT at cell centers: nitride core, oxide, and zero elsewhere
X, Y = np.meshgrid(xc, yc, indexing="ij")
core = (np.abs(X) <= w_wg / 2) & (Y > 0) & (Y < h_wg)
trench = (np.abs(X) > separation / 2) & (Y > y_surf - depth) & (Y < y_surf)
n_dndt = np.where(Y < y_surf, 1.47 * 0.95e-5, 0.0)
n_dndt[trench] = 0.0
n_dndt[core] = 2.06 * 2.45e-5
intensity = sum(
np.abs(np.squeeze(getattr(modes, comp).isel(mode_index=i_mode, f=0).values)) ** 2
for comp in ("Ex", "Ey", "Ez")
)
centered = 0.25 * (
intensity[:-1, :-1] + intensity[1:, :-1] + intensity[:-1, 1:] + intensity[1:, 1:]
)
weight = n_dndt * centered
nx, ny = (len(xc) // block) * block, (len(yc) // block) * block
weight = weight[:nx, :ny].reshape(nx // block, block, ny // block, block).sum(axis=(1, 3))
xb = xc[:nx].reshape(-1, block).mean(axis=1)
yb = yc[:ny].reshape(-1, block).mean(axis=1)
keep_x = weight.max(axis=1) > 1e-4 * weight.max()
keep_y = weight.max(axis=0) > 1e-4 * weight.max()
return xb[keep_x], yb[keep_y], weight[np.ix_(keep_x, keep_y)]
def phase(temperature, xb, yb, weight):
"""Weighted phase integral; an array over time for a transient field."""
rise = np.asarray(temperature.interp(x=xb, y=yb, z=0.0).values) - T_amb
if rise.ndim == 4: # x, y, z, t
return (weight[:, :, None] * rise[:, :, 0, :]).sum(axis=(0, 1))
return float((weight * rise[:, :, 0]).sum())
def switching_time(t, phi, phi_steady):
"""10-90% rise time of the phase relative to its steady-state value."""
ratio = phi / phi_steady
rising = np.maximum.accumulate(ratio) <= ratio # keep the monotone envelope
t_mono = np.concatenate(([0.0], t[rising]))
r_mono = np.concatenate(([0.0], ratio[rising]))
t10, t90 = np.interp([0.1, 0.9], r_mono, t_mono)
return t90 - t10, ratio
Six hundred steps over a window several times longer than the expected response resolves the rise finely enough that halving the step changes the answer by well under a percent.
[16]:
num_steps = 600
def total_time(depth: float) -> float:
"""Transient window (s), long enough to pass 90% at every trench depth."""
return (9.0 + 8.0 * depth) * 1e-6
tr_sim = make_heat_sim(
depth=0.0, q_line=q_line_flat, unsteady=(total_time(0.0) / num_steps, num_steps)
)
tr_job = web.Job(simulation=tr_sim, task_name="tops_flat_transient", folder_name="tops")
cost = tr_job.estimate_cost()
22:00:15 UTC Created task 'tops_flat_transient_mesh' with resource_id
'vom-3f3e1bbb-3b82-4baa-b49a-158ca8a90a8b' and task_type
'VOLUME_MESH'.
Tidy3D's VolumeMesher solver is currently in the beta stage. Cost
of VolumeMesher simulations is subject to change in the future.
β simulation.hdf5.gz βββββββββββββββββββββββββ 100.0% β’ 1.6/1.6 kB β’ ? β’ 0:00:00
22:00:17 UTC Estimated FlexCredit cost: 0.025. Use 'web.real_cost(task_id)' to
get the billed FlexCredit cost after a simulation run.
The FlexCredit estimate shown above is for the next workflow step
'mesh' only.
This is the mesh step. Run it first with 'Job.step()'; after it
completes, call 'Job.estimate_cost()' again for the solver
estimate.
[17]:
tr_data = tr_job.run(path="data/tops_flat_transient.hdf5")
22:00:19 UTC status = queued
To cancel the simulation, use 'web.abort(task_id)' or
'web.delete(task_id)' or abort/delete the task in the web UI.
Terminating the Python script will not stop the job running on the
cloud.
22:00:28 UTC starting up solver
running solver
22:00:35 UTC status = success
Created task 'tops_flat_transient_solve' with resource_id
'hec-bf57b55d-89ab-4eb2-b1b7-6a2e9fdd1826' and task_type
'HEAT_CHARGE'.
Tidy3D's HeatCharge solver is currently in the beta stage. Cost of
HeatCharge simulations is subject to change in the future.
β simulation.hdf5.gz βββββββββββββββββββββββββ 100.0% β’ 1.6/1.6 kB β’ ? β’ 0:00:00
22:00:36 UTC Estimated FlexCredit cost: 0.080. For this solver type, the
estimate is the final billed cost.
22:00:38 UTC status = queued
To cancel the simulation, use 'web.abort(task_id)' or
'web.delete(task_id)' or abort/delete the task in the web UI.
Terminating the Python script will not stop the job running on the
cloud.
22:00:47 UTC status = preprocess
22:00:58 UTC starting up solver
22:00:59 UTC running solver
22:03:07 UTC status = success
β simulation_data.hdf5.gz βββββββββββββ 100.0% β’ 3.3/3.3 MB β’ 7.9 MB/s β’ 0:00:00
22:03:09 UTC Loading results from data/tops_flat_transient.hdf5
[18]:
tr_temperature = tr_data["temperature"].temperature
time = np.asarray(tr_temperature.values.t.values) * 1e6 # us
fig, ax = plt.subplots(figsize=(6, 3.6), tight_layout=True)
for pol, style in (("te", "-"), ("tm", "--")):
xb, yb, weight = phase_weight(0.0, modes, flat[f"i_{pol}"])
tau, ratio = switching_time(
time, phase(tr_temperature, xb, yb, weight), phase(rescaled(temperature, scale), xb, yb, weight)
)
# the two polarizations agree to better than a percent, so dash one to keep both visible
ax.plot(time, ratio, style, label=f"{pol.upper()}, " + r"$\tau$ = " + f"{tau:.2f} " + r"$\mu s$")
for level in (0.1, 0.9):
ax.axhline(level, color="0.6", ls="--", lw=0.8)
ax.set_xlim(0, time[-1])
ax.set_ylim(0, 1.05)
ax.set_xlabel(r"Time ($\mu s$)")
ax.set_ylabel("Normalized phase shift")
ax.legend()
plt.show()
It is worth checking the linear-phase shortcut against the real thing. Solving the perturbed modes at an intermediate instant reproduces the normalized phase to better than \(10^{-3}\), which is far below the resolution of the \(10-90\%\) criterion.
[19]:
i_check = num_steps // 5
snapshot = tr_temperature.updated_copy(
values=tr_temperature.values.isel(t=i_check).drop_vars("t")
)
check = pi_shift_metrics(snapshot, 0.0)
xb, yb, weight = phase_weight(0.0, modes, flat["i_te"])
print(f"at t = {time[i_check]:.2f} us")
print(f" full mode solve : {check['dn_te'] / flat['dn_te'] / heater_scale(snapshot) * scale:.4f}")
print(
" linear weight : "
f"{phase(rescaled(snapshot, 1.0), xb, yb, weight) / phase(rescaled(temperature, scale), xb, yb, weight):.4f}"
)
22:03:35 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:04:01 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
at t = 1.82 us
full mode solve : 0.7305
linear weight : 0.7285
Trench-Depth Sweep#
Air trenches on either side of the waveguide leave a narrow oxide pillar that carries the heat down to the substrate. Deep trenches confine the heat, so the power falls monotonically, but they also raise the thermal mass that has to be heated, so beyond some depth the device slows down again. Because the two metrics pull in opposite directions, the optimum comes from a figure of merit that combines them,
with the trench-free device as the reference and weights \(a = b = 1\) that value power and speed equally.
Sweeping needs a steady and a transient simulation per depth, which is what makes up most of the cost of this notebook. Submit them together with a Batch.
[20]:
depths = [0.0, 0.05, 0.1, 0.15, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0,
1.1, 1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.0, 3.5, 4.0]
# the trench floor falls inside the nitride layer at these depths, which makes
# sliver elements; a slightly finer interface mesh avoids them
fine_mesh_depths = {0.1, 0.15}
sims = {}
for depth in depths:
mesh_resolution = 0.0125 if depth in fine_mesh_depths else t_heater / 3
sims[f"steady_{depth:.2f}"] = make_heat_sim(
depth, q_seed(depth), mesh_resolution=mesh_resolution
)
sims[f"transient_{depth:.2f}"] = make_heat_sim(
depth,
q_seed(depth),
unsteady=(total_time(depth) / num_steps, num_steps),
mesh_resolution=mesh_resolution,
)
batch = web.Batch(simulations=sims, folder_name="tops")
cost = batch.estimate_cost()
22:05:35 UTC Maximum FlexCredit cost: 1.150 for the next workflow step 'mesh'
across the batch.
This estimates the mesh step only. Run the mesh step first with
'Batch.step()'; after it completes, call 'Batch.estimate_cost()'
again for the solver estimate.
[21]:
batch_data = batch.run(path_dir="data")
22:05:57 UTC Estimated FlexCredit cost: 0.080. For this solver type, the
estimate is the final billed cost.
22:06:04 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:06:06 UTC Estimated FlexCredit cost: 0.080. For this solver type, the
estimate is the final billed cost.
22:06:09 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:06:12 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:06:14 UTC Estimated FlexCredit cost: 0.088. For this solver type, the
estimate is the final billed cost.
22:06:17 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:06:19 UTC Estimated FlexCredit cost: 0.088. For this solver type, the
estimate is the final billed cost.
22:06:22 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:06:24 UTC Estimated FlexCredit cost: 0.080. For this solver type, the
estimate is the final billed cost.
22:06:54 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:07:00 UTC Estimated FlexCredit cost: 0.079. For this solver type, the
estimate is the final billed cost.
22:07:06 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:07:12 UTC Estimated FlexCredit cost: 0.079. For this solver type, the
estimate is the final billed cost.
22:07:18 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:07:45 UTC Estimated FlexCredit cost: 0.079. For this solver type, the
estimate is the final billed cost.
22:07:55 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:08:10 UTC Estimated FlexCredit cost: 0.079. For this solver type, the
estimate is the final billed cost.
22:08:52 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:08:59 UTC Estimated FlexCredit cost: 0.079. For this solver type, the
estimate is the final billed cost.
22:09:01 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:09:25 UTC Estimated FlexCredit cost: 0.079. For this solver type, the
estimate is the final billed cost.
22:09:41 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:09:54 UTC Estimated FlexCredit cost: 0.078. For this solver type, the
estimate is the final billed cost.
22:09:57 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:10:02 UTC Estimated FlexCredit cost: 0.078. For this solver type, the
estimate is the final billed cost.
22:10:08 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:10:18 UTC Estimated FlexCredit cost: 0.078. For this solver type, the
estimate is the final billed cost.
22:10:34 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:10:44 UTC Estimated FlexCredit cost: 0.078. For this solver type, the
estimate is the final billed cost.
22:10:50 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:10:53 UTC Estimated FlexCredit cost: 0.078. For this solver type, the
estimate is the final billed cost.
22:11:03 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:11:26 UTC Estimated FlexCredit cost: 0.078. For this solver type, the
estimate is the final billed cost.
22:11:40 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:11:51 UTC Estimated FlexCredit cost: 0.078. For this solver type, the
estimate is the final billed cost.
22:11:53 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:12:20 UTC Estimated FlexCredit cost: 0.077. For this solver type, the
estimate is the final billed cost.
22:12:33 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:12:43 UTC Estimated FlexCredit cost: 0.077. For this solver type, the
estimate is the final billed cost.
22:12:45 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:12:51 UTC Estimated FlexCredit cost: 0.075. For this solver type, the
estimate is the final billed cost.
22:12:54 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:13:22 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:13:32 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:13:34 UTC Estimated FlexCredit cost: 0.025. For this solver type, the
estimate is the final billed cost.
22:15:14 UTC Batch complete.
steady_0.00 solve -> success βββββββββββββββββββββββββ 100% 0:00:22
transient_0.... solve -> success βββββββββββββββββββββββββ 100% 0:00:21
steady_0.05 solve -> success βββββββββββββββββββββββββ 100% 0:00:21
transient_0.... solve -> success βββββββββββββββββββββββββ 100% 0:00:15
steady_0.10 solve -> success βββββββββββββββββββββββββ 100% 0:00:20
transient_0.... solve -> success βββββββββββββββββββββββββ 100% 0:00:19
steady_0.15 solve -> success βββββββββββββββββββββββββ 100% 0:00:19
transient_0.... solve -> success βββββββββββββββββββββββββ 100% 0:00:18
steady_0.20 solve -> success βββββββββββββββββββββββββ 100% 0:00:18
transient_0.... solve -> success βββββββββββββββββββββββββ 100% 0:00:17
steady_0.30 solve -> success βββββββββββββββββββββββββ 100% 0:00:15
transient_0.... solve -> success βββββββββββββββββββββββββ 100% 0:00:18
steady_0.40 solve -> success βββββββββββββββββββββββββ 100% 0:00:20
transient_0.... solve -> success βββββββββββββββββββββββββ 100% 0:00:14
steady_0.50 solve -> success βββββββββββββββββββββββββ 100% 0:00:18
transient_0.... solve -> success βββββββββββββββββββββββββ 100% 0:00:19
steady_0.60 solve -> success βββββββββββββββββββββββββ 100% 0:00:16
transient_0.... solve -> success βββββββββββββββββββββββββ 100% 0:00:17
steady_0.70 solve -> success βββββββββββββββββββββββββ 100% 0:00:16
transient_0.... solve -> success βββββββββββββββββββββββββ 100% 0:00:18
steady_0.80 solve -> success βββββββββββββββββββββββββ 100% 0:00:17
transient_0.... solve -> success βββββββββββββββββββββββββ 100% 0:00:19
steady_0.90 solve -> success βββββββββββββββββββββββββ 100% 0:00:16
transient_0.... solve -> success βββββββββββββββββββββββββ 100% 0:00:19
steady_1.00 solve -> success βββββββββββββββββββββββββ 100% 0:00:19
transient_1.... solve -> success βββββββββββββββββββββββββ 100% 0:00:23
steady_1.10 solve -> success βββββββββββββββββββββββββ 100% 0:00:19
transient_1.... solve -> success βββββββββββββββββββββββββ 100% 0:00:25
steady_1.20 solve -> success βββββββββββββββββββββββββ 100% 0:00:17
transient_1.... solve -> success βββββββββββββββββββββββββ 100% 0:00:21
steady_1.40 solve -> success βββββββββββββββββββββββββ 100% 0:00:18
transient_1.... solve -> success βββββββββββββββββββββββββ 100% 0:00:18
steady_1.60 solve -> success βββββββββββββββββββββββββ 100% 0:00:14
transient_1.... solve -> success βββββββββββββββββββββββββ 100% 0:00:15
steady_1.80 solve -> success βββββββββββββββββββββββββ 100% 0:00:16
transient_1.... solve -> success βββββββββββββββββββββββββ 100% 0:00:17
steady_2.00 solve -> success βββββββββββββββββββββββββ 100% 0:00:17
transient_2.... solve -> success βββββββββββββββββββββββββ 100% 0:00:19
steady_2.50 solve -> success βββββββββββββββββββββββββ 100% 0:00:22
transient_2.... solve -> success βββββββββββββββββββββββββ 100% 0:00:17
steady_3.00 solve -> success βββββββββββββββββββββββββ 100% 0:00:16
transient_3.... solve -> success βββββββββββββββββββββββββ 100% 0:00:20
steady_3.50 solve -> success βββββββββββββββββββββββββ 100% 0:00:20
transient_3.... solve -> success βββββββββββββββββββββββββ 100% 0:00:16
steady_4.00 solve -> success βββββββββββββββββββββββββ 100% 0:00:17
transient_4.... solve -> success βββββββββββββββββββββββββ 100% 0:00:16
For each depth, rescale the steady field to the operating point, mode solve for \(L_{\pi}\), and reduce the transient to a switching time.
[22]:
results = []
for depth in depths:
steady = batch_data[f"steady_{depth:.2f}"]["temperature"].temperature
transient = batch_data[f"transient_{depth:.2f}"]["temperature"].temperature
metrics = pi_shift_metrics(steady, depth)
factor = heater_scale(steady)
hot = rescaled(steady, factor)
time = np.asarray(transient.values.t.values) * 1e6
row = {"depth": depth}
for pol in ("te", "tm"):
xb, yb, weight = phase_weight(depth, metrics["modes_cold"], metrics[f"i_{pol}"])
tau, _ = switching_time(
time, factor * phase(transient, xb, yb, weight), phase(hot, xb, yb, weight)
)
row[f"P_{pol}"] = metrics[f"P_{pol}"]
row[f"tau_{pol}"] = tau
results.append(row)
depth_um = np.array([r["depth"] for r in results])
fom = {}
for pol in ("te", "tm"):
power = np.array([r[f"P_{pol}"] for r in results])
tau = np.array([r[f"tau_{pol}"] for r in results])
fom[pol] = (power[0] / power) * (tau[0] / tau)
if pol == "te":
power_te, tau_te = power, tau
best = int(np.argmax(fom["te"]))
print(f"optimum trench depth : {depth_um[best]:.2f} um")
print(f" P_pi = {power_te[best]:.2f} mW (TE), {results[best]['P_tm']:.2f} mW (TM)")
print(f" tau = {tau_te[best]:.2f} us")
print(f" FOM = {fom['te'][best]:.2f}")
22:16:43 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:17:08 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:17:35 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:18:00 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:18:24 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:18:47 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:19:12 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:19:35 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:20:00 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:20:23 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:20:46 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:21:09 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:21:36 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:21:57 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:22:21 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:22:44 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:23:09 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:23:29 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:23:52 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:24:12 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:24:33 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:24:53 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:25:13 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:25:34 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:25:54 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:26:14 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:26:33 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:26:53 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:27:09 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:27:26 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:27:43 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:27:59 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:28:15 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:28:33 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:28:48 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:29:05 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:29:22 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:29:38 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:29:54 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:30:10 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:30:26 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:30:43 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:30:59 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:31:15 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:31:32 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
22:31:48 UTC WARNING: The mode plane is not bracketed by the dual grid along the
normal direction; this happens when it lies within half a cell of
the simulation boundary. The finite-grid correction is undefined
there and will not be applied, so mode amplitudes and overlaps at
this plane may be slightly inconsistent with field monitor data
computed on the same grid. Move the plane further from the
simulation boundary to avoid this.
optimum trench depth : 1.10 um
P_pi = 3.99 mW (TE), 4.27 mW (TM)
tau = 3.03 us
FOM = 7.88
The power falls by more than an order of magnitude across the sweep and saturates above about \(3.5\ \mu m\), which is where the trench reaches the silicon substrate and further etching adds no thermal resistance. The switching time is not monotonic: it bottoms out near \(0.6\ \mu m\), where the trenches already confine the heat but the oxide pillar is still short, and then grows as the pillar that has to be heated gets taller. The figure of merit therefore peaks between those two behaviors.
[23]:
fig, axes = plt.subplots(1, 3, figsize=(13, 3.6), tight_layout=True)
axes[0].plot(depth_um, power_te, "-o", ms=3.5, label="TE")
axes[0].plot(depth_um, [r["P_tm"] for r in results], "--", label="TM")
axes[0].set_ylabel(r"$P_{\pi}$ (mW)")
axes[0].set_ylim(0, 20)
axes[0].legend()
axes[1].plot(depth_um, tau_te, "-o", ms=3.5, label="TE")
axes[1].plot(depth_um, [r["tau_tm"] for r in results], "--", label="TM")
axes[1].set_ylabel(r"Switching time ($\mu s$)")
axes[1].set_ylim(0, 15)
axes[1].legend()
axes[2].plot(depth_um, fom["te"], "-o", ms=3.5, color="blue", label="TE")
axes[2].plot(depth_um, fom["tm"], "--", color="crimson", label="TM")
axes[2].set_ylabel("FOM")
axes[2].set_ylim(0, 8)
axes[2].legend()
for ax in axes:
ax.set_xlabel(r"Trench depth ($\mu m$)")
ax.set_xlim(0, 4)
ax.grid(alpha=0.3)
plt.show()
The optimized device reaches a \(\pi\) shift with about \(4\) mW over a heater shorter than \(40\ \mu m\), switches in roughly \(3\ \mu s\), and adds only a few tenths of a dB of loss, for both polarizations - a combination that a metal heater held far from the waveguide cannot reach. The same recipe, a steady solve for the power, a perturbed mode solve for the length, and a transient solve for the speed, carries over to any thermo-optic tuner.