Skip to content

Conversation

@joamatab
Copy link
Contributor

Trying to fix #538

However the results from the simulation didn't seem correct

image

@momchil-flex
@yaugenst

@joamatab joamatab changed the title fix unused imports fix grating coupler simulation Jan 15, 2025
@github-actions github-actions bot added the bug Something isn't working label Jan 15, 2025
@joamatab joamatab requested a review from yaugenst January 15, 2025 04:25
# Define Gaussian beam source
gaussian_beam = td.GaussianBeam(
size=(td.inf, td.inf, 0),
size=(fiber_mfd, td.inf, 0),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The source size is a bit small, I would recommend using at least 2x fiber_mfd, 3x would be even better.

waveguide_port_center = [xy_shifted[0], xy_shifted[1], (size_z) / 2]
waveguide_port_center = [-sim_size[0] / 2 + port_waveguide_offset, 0, 0]

waveguide_monitor = td.ModeMonitor(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main issue I found while testing this was that the mode monitor z span was too large. The mode monitor was extending into the si substrate, which caused the monitor to overlap for slab modes instead of waveguide modes. I would recommend setting the default values (eg zmargin=0) so that the monitor doesn't extend into the substrate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

improve tidy3d grating coupler validation

3 participants