Hi all, Can someone provide an example as to how to define the geometry in PyMeep using meep.material_function? For the straight waveguide example if I define the waveguide using a function, how to include it in defining the geometry? Currently, I wrote
import meep as meep import numpy as np from matplotlib import pyplot as mp sx=16 # size of cell in X direction sy=8 # size of cell in Y direction sz=0 cell = meep.Vector3(sx, sy, sz) # define Gaussian l=100 # super-Gaussian parameter sgc=2*l wmyMaterial=1 # width of the waveguide def myMaterial(x): return 12*np.exp(-np.power(x, sgc) / (np.power(wmyMaterial, sgc))) x = np.linspace(-sy/2, sy/2, 100) mp.plot(x, myMaterial(x)) mp.title('waveguide') mp.xlabel('x') mp.ylabel('Amplitude') How to use this as the epsilon in meep.medium? Thanks in advance. Best regards, Jisha
_______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss