You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To compare influence of geometry, simulation was carried out with different permittivity for the same material and geometry for Gaussian frequency of 200 KHz.
Question : In the wave propagated geometry's transmittance spectrum, frequency shift is expected. But power is reduced as permittivity increases (Figure 1). Is it possible to observe frequency shift?
Please note that geometry and flux region aligned to collect the wave, can be found in the figure 1.
Code for the above results as follows
`
import matplotlib.pyplot as plt
import numpy as np
import meep as mp
resolution = 20 # pixels/um
sx = 16 # size of cell in X direction
sy = 16 # size of cell in Y direction
cell = mp.Vector3(sx, sy, 0)
dpml = 2.0
pml_layers = [mp.PML(dpml)]
pad = 4 # padding distance between waveguide and cell edge
w = 5 # width of waveguide
wvg_xcen = 0.5 * (sx - w - 2 * pad) # x center of vert. wvg
wvg_ycen = -0.5 * (sy - w - 2 * pad) # y center of horiz. wvg
epsilon_values = [2, 3, 4, 5, 6]
fcen = 200e3 # pulse center frequency
df = 0.1 # pulse width (in frequency)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have kick-started in pymeep using this transmittance spectra example.
To compare influence of geometry, simulation was carried out with different permittivity for the same material and geometry for Gaussian frequency of 200 KHz.
Question : In the wave propagated geometry's transmittance spectrum, frequency shift is expected. But power is reduced as permittivity increases (Figure 1). Is it possible to observe frequency shift?
Please note that geometry and flux region aligned to collect the wave, can be found in the figure 1.
Code for the above results as follows
`
import matplotlib.pyplot as plt
import numpy as np
import meep as mp
resolution = 20 # pixels/um
sx = 16 # size of cell in X direction
sy = 16 # size of cell in Y direction
cell = mp.Vector3(sx, sy, 0)
dpml = 2.0
pml_layers = [mp.PML(dpml)]
pad = 4 # padding distance between waveguide and cell edge
w = 5 # width of waveguide
wvg_xcen = 0.5 * (sx - w - 2 * pad) # x center of vert. wvg
wvg_ycen = -0.5 * (sy - w - 2 * pad) # y center of horiz. wvg
epsilon_values = [2, 3, 4, 5, 6]
fcen = 200e3 # pulse center frequency
df = 0.1 # pulse width (in frequency)
src = mp.GaussianSource(fcen, fwidth=df)
src_center = mp.Vector3(0, -5, 0)
src_size = mp.Vector3(0, 0, 0)
sources = [mp.Source(src, component=mp.Ex, center=src_center, size=src_size)]
nfreq = 51
all_refl_flux = []
all_tran_flux = []
refl_freqs_all = []
trans_freqs_all = []
def run_simulation(epsilon):
global sim
geometry = [
mp.Block(
size=mp.Vector3(mp.inf, w, mp.inf),
center=mp.Vector3(0, wvg_ycen, 0),
material=mp.Medium(epsilon=epsilon),
)
]
for epsilon in epsilon_values:
run_simulation(epsilon)
plt.figure(figsize=(12, 8), dpi=200)
plt.subplot(1, 3, 1)
for i, epsilon in enumerate(epsilon_values):
plt.plot(refl_freqs_all[i], all_refl_flux[i], label=f"Epsilon = {epsilon}")
plt.xlabel("Frequency (Hz)")
plt.ylabel("Normalized Flux")
plt.legend(loc="upper right")
plt.title("Reflectance")
plt.subplot(1, 3, 2)
for i, epsilon in enumerate(epsilon_values):
plt.plot(trans_freqs_all[i], all_tran_flux[i], label=f"Epsilon = {epsilon}")
plt.xlabel("Frequency (Hz)")
plt.ylabel("Normalized Flux")
plt.legend(loc="upper right")
plt.title("Transmittance")
plt.subplot(1,3,3)
sim.plot2D(fields=mp.Ez)
plt.title("Simulation Geometry")
plt.xlabel("X")
plt.ylabel("Y")
plt.tight_layout()
plt.show()`
Beta Was this translation helpful? Give feedback.
All reactions