Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meep integration: automatically use effective refractive index #504

Closed
HelgeGehring opened this issue Jun 30, 2022 · 3 comments
Closed

Meep integration: automatically use effective refractive index #504

HelgeGehring opened this issue Jun 30, 2022 · 3 comments

Comments

@HelgeGehring
Copy link
Collaborator

Using the function calculate_effective_permittivity introduced in #501 3D simulations can be reduced to 2D simulations.
How would we best integrate it into the meep-plugin to set it automatically?

from gdsfactory.components import mmi1x2
from gdsfactory.simulation.gmeep import write_sparameters_meep
from gdsfactory.simulation.effective_permittivity import calculate_effective_permittivity

mmi = mmi1x2(width_mmi=5, length_mmi=10, gap_mmi=1, length_taper=2)
mmi.show()
material_name_to_meep = {
    'si': float(calculate_effective_permittivity(3.477 ** 2, 1.444 ** 2, 1.444 ** 2, .22, 1.55, 'te')[0] ** .5)}
write_sparameters_meep(mmi, resolution=20, is_3d=False, animate=True, material_name_to_meep=material_name_to_meep)


@joamatab
Copy link
Contributor

Hi Helge,

yes, i like it, it's very simple and functional :)

I think material_name_to_meep maps LayerStack layer names to refractive index (not permitivity). I also made some changes to be more consistent in this branch

let me know what you think

@HelgeGehring
Copy link
Collaborator Author

Looks good!

@joamatab
Copy link
Contributor

awesome! I will merge it and then work on an example on the notebooks :)

this looks great Helge! now we can do 2.5D FDTD simulations 🎉

@joamatab joamatab closed this as completed Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants