failing to reproduce the reflectance of a thin film on Si #2297
MahmutRuzi
started this conversation in
General
Replies: 1 comment 1 reply
-
This puts an absorber (not sure why you aren't using a PML, which is better?) on all sides, whereas you should only have PML in the vertical (y) direction. In the other (x) direction, you want periodic boundary conditions (to model an infinite flat surface), so you don't want PML and you want to set the See also the diffraction grating tutorial. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, Dear meep developers.
Thanks for freely sharing this nice code, along with the excellent tutorials and documentation.
I am new to Meep and FDTD simulation in general. I tried to simulate the reflectance spectrum of a film (5.5 um thick, n=1.57) on a substrate (1um thick, n=3.41). The 1D simulation as shown in the examples give similar results to analytical results. However, when I tried to do the simulations in 2D, the result does not look like a reflectance spectrum. Can someone help me tell what I was doing wrong or how to improve?
#%% import libraries
import argparse
import meep as mp
import numpy as np
import math
import cmath
import matplotlib.pyplot as plt
from numpy import savez_compressed
#%%
def main(args):
resolution = args.res
theta = args.theta
l = args.struct_length
dsub = args.sub_thickness
dpml = args.pml_thickness
# w = args.width
# h = args.height
#%%
# wavelength range (in micron)
wvl_min = 2.5
wvl_max = 18.2
dair = 1.3*wvl_max
dthin = 5.5 # thin film thickness
#%%
if name == 'main':
parser = argparse.ArgumentParser()
parser.add_argument('-res', type=float, default=200, help='resolution (default: 200 pixels/um)')
parser.add_argument('-theta', type=float, default=0, help='angle of incident planewave (default: 0 degrees)')
parser.add_argument('-struct_length', type=float, default=1, help='structure length (default: 1 um)')
parser.add_argument('-sub_thickness', type=float, default=1, help='substrate thickness (default: 1 um)')
parser.add_argument('-pml_thickness', type=float, default=10, help='pml thickness in microns (default: 10 um)')
args = parser.parse_args()
main(args)
Beta Was this translation helpful? Give feedback.
All reactions