def __init__(self, comment="", simtime=200e-12, resolution=6e-6, hole=0e-6, cells=1, monzc=0e-6, Kx=0, Ky=0, cutw=20e-6, cutl=80e-6, thick=50e-6, holecy=0e-6, period=100e-6): meep_utils.AbstractMeepModel.__init__(self) ## Base class initialisation self.simulation_name = "PKCutSheet" ## self.register_locals(locals()) ## Remember the parameters ## Definition of materials used self.materials = [meep_materials.material_TiO2_THz(where = self.where_TiO2), ] ## Dimension constants for the simulation monzd = thick+100e-6 ## monitor z-distance self.monzd = monzd self.size_x, self.size_y, self.size_z = period, period, 200e-6 + cells*self.monzd ## constants for the simulation self.pml_thickness = 50e-6 (self.monitor_z1, self.monitor_z2) = (-(monzd*cells)/2+monzc, (monzd*cells)/2+monzc) self.simtime = simtime # [s] self.srcWidth = 1000e9 self.srcFreq = 4e9 + self.srcWidth/2 + (Ky**2+Kx**2)**.5 / (2*np.pi/3e8) ## cutoff for oblique incidence self.interesting_frequencies = (0., 1000e9) self.TestMaterials() ## catches (most) errors in structure syntax, before they crash the callback
def __init__(self, comment="", simtime=1000e-12, resolution=5e-6, cells=1, monzc=0e-6, Kx=0, Ky=0, xs=50e-6, ys=50e-6, zs=50e-6, xyspacing=100e-6, monzd=100e-6): meep_utils.AbstractMeepModel.__init__(self) ## Base class initialisation self.simulation_name = "PKCTest" ## self.register_locals(locals()) ## Remember the parameters ## Definition of materials used self.materials = [meep_materials.material_TiO2_THz(where = self.where_TiO2), ] ## Dimension constants for the simulation self.monzd = monzd self.size_x, self.size_y, self.size_z = xyspacing, xyspacing, 400e-6 + cells*self.monzd ## constants for the simulation self.pml_thickness = 100e-6 self.monitor_z1 =-(monzd*cells)/2+self.monzc - self.padding self.monitor_z2 = (monzd*cells)/2+self.monzc + self.padding self.simtime = simtime # [s] self.srcWidth = 1000e9 self.srcFreq = 4e9 + self.srcWidth/2 + (Ky**2+Kx**2)**.5 / (2*np.pi/3e8) ## cutoff for oblique incidence self.interesting_frequencies = (0., 1000e9) self.TestMaterials() ## catches (most) errors in structure syntax, before they crash the callback
def __init__(self, comment="", simtime=100e-12, resolution=2e-6, cells=1, monzc=0e-6, Kx=0, Ky=0, padding=20e-6, monzd=60e-6, epsilon=100): meep_utils.AbstractMeepModel.__init__(self) ## Base class initialisation self.simulation_name = "XCylWire" ## self.register_locals(locals()) ## Remember the parameters ## Initialization of materials used if 'TiO2' in comment: self.materials = [meep_materials.material_TiO2_THz(where = self.where_diel)] elif 'DielLossless' in comment: self.materials = [meep_materials.material_dielectric(where = self.where_diel, eps=epsilon, loss=0.0)] elif 'Diel' in comment: self.materials = [meep_materials.material_dielectric(where = self.where_diel, eps=epsilon, loss=0.05)] else: self.materials = [] self.materials += [meep_materials.material_Metal_THz(where = self.where_metal)] ## Dimension constants for the simulation self.pml_thickness = 10e-6 self.size_x = 40e-6 self.size_y = 30e-6 self.size_z = 80e-6+cells*self.monzd + 2*self.padding + 2*self.pml_thickness ## constants for the simulation (self.monitor_z1, self.monitor_z2) = (-(monzd*cells)/2+monzc - padding, (monzd*cells)/2+monzc + padding) self.simtime = simtime # [s] self.srcWidth = 2000e9 self.srcFreq = 4e9 + self.srcWidth/2 + (Ky**2+Kx**2)**.5 / (2*np.pi/3e8) ## cutoff for oblique incidence self.interesting_frequencies = (0., 1000e9) #meep_utils.plot_eps(self.materials, freq_range=(1e10, 1e14), plot_conductivity=True) self.TestMaterials() ## catches (most) errors in structure syntax, before they crash the callback
def __init__(self, comment="", simtime=100e-12, resolution=6e-6, cells=1, monzc=0e-6, Kx=0, Ky=0, padding=50e-6, radius=20e-6, xspacing=100e-6, monzd=100e-6, epsilon=600): meep_utils.AbstractMeepModel.__init__(self) ## Base class initialisation self.simulation_name = "YCylWire" ## self.register_locals(locals()) ## Remember the parameters ## Initialization of materials used if 'TiO2' in comment: self.materials = [meep_materials.material_TiO2_THz(where = self.where_wire)] elif 'STO' in comment: self.materials = [meep_materials.material_STO_THz(where = self.where_wire)] elif 'Diel' in comment: self.materials = [meep_materials.material_dielectric(where = self.where_wire, eps=epsilon, loss=0.001)] else: self.materials = [meep_materials.material_Metal_THz(where = self.where_wire)] ## Dimension constants for the simulation #self.size_x, self.size_y, self.size_z = xyspacing, xyspacing, 400e-6+cells*self.monzd self.pml_thickness = 20e-6 self.size_x = xspacing self.size_y = resolution/1.8 self.size_z = 200e-6+cells*self.monzd + 2*self.padding + 2*self.pml_thickness ## constants for the simulation self.monitor_z1 =-(monzd*cells)/2+self.monzc - self.padding self.monitor_z2 = (monzd*cells)/2+self.monzc + self.padding self.simtime = simtime # [s] self.srcWidth = 3000e9 self.srcFreq = 1e12 #4e9 + self.srcWidth/2 + (Ky**2+Kx**2)**.5 / (2*np.pi/3e8) ## cutoff for oblique incidence self.interesting_frequencies = (0., 3000e9) self.TestMaterials() ## catches (most) errors in structure syntax, before they crash the callback
def __init__(self, comment="", simtime=1000e-12, resolution=5e-6, cells=1, monzc=0e-6, BarWidth=100e-6, BarThick=100e-6, SubstrThick=50e-6, BarPeriod=200e-6, YCellShift=0, Kx=0, Ky=0): meep_utils.AbstractMeepModel.__init__(self) ## Base class initialisation self.simulation_name = "CKEBars" ## self.register_locals(locals()) ## Remember the parameters ## Initialization of materials used self.materials = [meep_materials.material_TiO2_THz(where = self.where_TiO2), meep_materials.material_dielectric(where = self.where_substr, eps=1.0)] ## XXX ## Dimension constants for the simulation monzd = BarThick + SubstrThick ## monitor z-distance self.monzd = monzd self.size_x, self.size_y, self.size_z = resolution/1.8, BarPeriod, 500e-6 + cells*self.monzd ## constants for the simulation self.pml_thickness = 100e-6 (self.monitor_z1, self.monitor_z2) = (-(monzd*cells)/2+monzc, (monzd*cells)/2+monzc) self.simtime = simtime # [s] self.srcFreq, self.srcWidth = 500e9, 1000e9 # [Hz], note: "Last source time" = 10/srcWidth self.interesting_frequencies = (0., 1000e9) self.TestMaterials() ## catches (most) errors in structure syntax, before they crash the callback
def __init__(self, comment="", simtime=100e-12, resolution=2e-6, cells=1, monzc=0e-6, Kx=0, Ky=0, padding=20e-6, monzd=60e-6, epsilon=100): meep_utils.AbstractMeepModel.__init__( self) ## Base class initialisation self.simulation_name = "XCylWire" ## self.register_locals(locals()) ## Remember the parameters ## Initialization of materials used if 'TiO2' in comment: self.materials = [ meep_materials.material_TiO2_THz(where=self.where_diel) ] elif 'DielLossless' in comment: self.materials = [ meep_materials.material_dielectric(where=self.where_diel, eps=epsilon, loss=0.0) ] elif 'Diel' in comment: self.materials = [ meep_materials.material_dielectric(where=self.where_diel, eps=epsilon, loss=0.05) ] else: self.materials = [] self.materials += [ meep_materials.material_Metal_THz(where=self.where_metal) ] ## Dimension constants for the simulation self.pml_thickness = 10e-6 self.size_x = 40e-6 self.size_y = 30e-6 self.size_z = 80e-6 + cells * self.monzd + 2 * self.padding + 2 * self.pml_thickness ## constants for the simulation (self.monitor_z1, self.monitor_z2) = (-(monzd * cells) / 2 + monzc - padding, (monzd * cells) / 2 + monzc + padding) self.simtime = simtime # [s] self.srcWidth = 2000e9 self.srcFreq = 4e9 + self.srcWidth / 2 + (Ky**2 + Kx**2)**.5 / ( 2 * np.pi / 3e8) ## cutoff for oblique incidence self.interesting_frequencies = (0., 1000e9) #meep_utils.plot_eps(self.materials, freq_range=(1e10, 1e14), plot_conductivity=True) self.TestMaterials( ) ## catches (most) errors in structure syntax, before they crash the callback
def __init__(self, comment="", simtime=200e-12, resolution=6e-6, hole=0e-6, cells=1, monzc=0e-6, Kx=0, Ky=0, cutw=20e-6, cutl=80e-6, thick=50e-6, holecy=0e-6, period=100e-6): meep_utils.AbstractMeepModel.__init__( self) ## Base class initialisation self.simulation_name = "PKCutSheet" ## self.register_locals(locals()) ## Remember the parameters ## Definition of materials used self.materials = [ meep_materials.material_TiO2_THz(where=self.where_TiO2), ] ## Dimension constants for the simulation monzd = thick + 100e-6 ## monitor z-distance self.monzd = monzd self.size_x, self.size_y, self.size_z = period, period, 200e-6 + cells * self.monzd ## constants for the simulation self.pml_thickness = 50e-6 (self.monitor_z1, self.monitor_z2) = (-(monzd * cells) / 2 + monzc, (monzd * cells) / 2 + monzc) self.simtime = simtime # [s] self.srcWidth = 1000e9 self.srcFreq = 4e9 + self.srcWidth / 2 + (Ky**2 + Kx**2)**.5 / ( 2 * np.pi / 3e8) ## cutoff for oblique incidence self.interesting_frequencies = (0., 1000e9) self.TestMaterials( ) ## catches (most) errors in structure syntax, before they crash the callback
def __init__(self, comment="", simtime=100e-12, resolution=3e-6, cells=1, monzc=0e-6, Kx=0, Ky=0, padding=50e-6, radius=10e-6, yspacing=100e-6, zspacing=100e-6, monzd=200e-6, epsilon=100, **other_args): meep_utils.AbstractMeepModel.__init__(self) ## Base class initialisation self.simulation_name = "Wedge" ## print(other_args) self.register_locals(locals(), other_args) ## Remember the parameters ## Initialization of materials used if 'TiO2' in comment: self.materials = [meep_materials.material_TiO2_THz(where = self.where_wire)] elif 'STO' in comment: self.materials = [meep_materials.material_STO_THz(where = self.where_wire)] elif 'DielLossless' in comment: self.materials = [meep_materials.material_dielectric(where = self.where_wire, eps=epsilon, loss=0.0)] elif 'DielLoLoss' in comment: self.materials = [meep_materials.material_dielectric(where = self.where_wire, eps=epsilon, loss=0.005)] else: self.materials = [meep_materials.material_dielectric(where = self.where_wire, eps=epsilon, loss=0)] ## Dimension constants for the simulation #self.size_x, self.size_y, self.size_z = xyspacing, xyspacing, 400e-6+cells*self.monzd self.pml_thickness = 50e-6 self.size_x = resolution/1.8 self.size_y = 2200e-6 self.size_z = 2000e-6+cells*self.monzd + 2*self.padding + 2*self.pml_thickness ## constants for the simulation (self.monitor_z1, self.monitor_z2) = (-(monzd*cells)/2+monzc - padding, (monzd*cells)/2+monzc + padding) self.simtime = simtime # [s] self.src_width = 3000e9 self.src_freq = 4e9 + self.src_width/2 + (Ky**2+Kx**2)**.5 / (2*np.pi/3e8) ## cutoff for oblique incidence self.interesting_frequencies = (0., 2000e9) ## Test the validity of the model #meep_utils.plot_eps(self.materials, plot_conductivity=True, #draw_instability_area=(self.f_c(), 3*meep.use_Courant()**2), mark_freq={self.f_c():'$f_c$'}) try: self.test_materials() ## catches (most) errors in structure syntax, before they crash the callback except: print(sys.exc())
def __init__(self, comment="", simtime=10e-12, resolution=2e-6, cells=1, monzc=0e-6, spacing=120e-6, radius1=15e-6, radius2=12e-6, padding=0, Kx=0, Ky=0, metalpos=1000): meep_utils.AbstractMeepModel.__init__( self) ## Base class initialisation self.simulation_name = "SE" self.register_locals(locals()) ## Remember the parameters ## Definition of materials used self.materials = [ meep_materials.material_TiO2_THz(where=self.where_TiO2), meep_materials.material_Metal_THz(where=self.where_metal) ] ## Dimension constants for the simulation monzd = spacing ## monitor z-distance self.monzd = monzd self.size_x, self.size_y, self.size_z = spacing, spacing, 60e-6 + cells * self.monzd ## constants for the simulation self.pml_thickness = 10e-6 (self.monitor_z1, self.monitor_z2) = (-(monzd * cells) / 2 + monzc - padding, (monzd * cells) / 2 + monzc + padding) self.simtime = simtime # [s] self.srcFreq, self.srcWidth = 1000e9, 7000e9 # [Hz], note: "Last source time" = 10/srcWidth self.interesting_frequencies = (0., 5000e9) self.TestMaterials( ) ## catches (most) errors in structure syntax, before they crash the callback
def __init__(self, comment="", simtime=1000e-12, resolution=5e-6, cells=1, monzc=0e-6, BarWidth=100e-6, BarThick=100e-6, SubstrThick=50e-6, BarPeriod=200e-6, YCellShift=0, Kx=0, Ky=0): meep_utils.AbstractMeepModel.__init__( self) ## Base class initialisation self.simulation_name = "CKEBars" ## self.register_locals(locals()) ## Remember the parameters ## Initialization of materials used self.materials = [ meep_materials.material_TiO2_THz(where=self.where_TiO2), meep_materials.material_dielectric(where=self.where_substr, eps=1.0) ] ## XXX ## Dimension constants for the simulation monzd = BarThick + SubstrThick ## monitor z-distance self.monzd = monzd self.size_x, self.size_y, self.size_z = resolution / 1.8, BarPeriod, 500e-6 + cells * self.monzd ## constants for the simulation self.pml_thickness = 100e-6 (self.monitor_z1, self.monitor_z2) = (-(monzd * cells) / 2 + monzc, (monzd * cells) / 2 + monzc) self.simtime = simtime # [s] self.srcFreq, self.srcWidth = 500e9, 1000e9 # [Hz], note: "Last source time" = 10/srcWidth self.interesting_frequencies = (0., 1000e9) self.TestMaterials( ) ## catches (most) errors in structure syntax, before they crash the callback
def __init__(self, comment="", simtime=100e-12, resolution=3e-6, cells=1, monzc=0e-6, Kx=0, Ky=0, padding=50e-6, radius=10e-6, yspacing=100e-6, zspacing=100e-6, monzd=200e-6, epsilon=100, **other_args): meep_utils.AbstractMeepModel.__init__( self) ## Base class initialisation self.simulation_name = "Wedge" ## print(other_args) self.register_locals(locals(), other_args) ## Remember the parameters ## Initialization of materials used if 'TiO2' in comment: self.materials = [ meep_materials.material_TiO2_THz(where=self.where_wire) ] elif 'STO' in comment: self.materials = [ meep_materials.material_STO_THz(where=self.where_wire) ] elif 'DielLossless' in comment: self.materials = [ meep_materials.material_dielectric(where=self.where_wire, eps=epsilon, loss=0.0) ] elif 'DielLoLoss' in comment: self.materials = [ meep_materials.material_dielectric(where=self.where_wire, eps=epsilon, loss=0.005) ] else: self.materials = [ meep_materials.material_dielectric(where=self.where_wire, eps=epsilon, loss=0) ] ## Dimension constants for the simulation #self.size_x, self.size_y, self.size_z = xyspacing, xyspacing, 400e-6+cells*self.monzd self.pml_thickness = 50e-6 self.size_x = resolution / 1.8 self.size_y = 2200e-6 self.size_z = 2000e-6 + cells * self.monzd + 2 * self.padding + 2 * self.pml_thickness ## constants for the simulation (self.monitor_z1, self.monitor_z2) = (-(monzd * cells) / 2 + monzc - padding, (monzd * cells) / 2 + monzc + padding) self.simtime = simtime # [s] self.src_width = 3000e9 self.src_freq = 4e9 + self.src_width / 2 + (Ky**2 + Kx**2)**.5 / ( 2 * np.pi / 3e8) ## cutoff for oblique incidence self.interesting_frequencies = (0., 2000e9) ## Test the validity of the model #meep_utils.plot_eps(self.materials, plot_conductivity=True, #draw_instability_area=(self.f_c(), 3*meep.use_Courant()**2), mark_freq={self.f_c():'$f_c$'}) try: self.test_materials( ) ## catches (most) errors in structure syntax, before they crash the callback except: print(sys.exc())
def __init__(self, comment="", simtime=100e-12, resolution=6e-6, cells=1, monzc=0e-6, padding=50e-6, radius=25e-6, wzofs=0e-6, spacing=75e-6, wlth=10e-6, wtth=10e-6, Kx=0, Ky=0, epsilon=100): meep_utils.AbstractMeepModel.__init__( self) ## Base class initialisation self.simulation_name = "SphereWire" ## monzd = spacing self.register_locals(locals()) ## Remember the parameters #wlth=1e-6 #wtth=90e-6 #wlth=6e-6 #wtth=1000e-6 ## Definition of materials used #self.materials = [meep_materials.material_dielectric(where = self.where_diel, eps=4.)] #self.materials = [meep_materials.material_TiO2_THz_HIEPS(where = self.where_TiO2), #meep_materials.material_Metal_THz(where = self.where_metal)] ## Initialization of materials used if 'TiO2NC' in comment: self.materials = [ meep_materials.material_TiO2_NC_THz(where=self.where_TiO2), ] #meep_materials.material_Metal_THz(where = self.where_metal) ] elif 'TiO2' in comment: self.materials = [ meep_materials.material_TiO2_THz(where=self.where_TiO2), meep_materials.material_Metal_THz(where=self.where_metal) ] elif 'Diel' in comment: self.materials = [ meep_materials.material_dielectric(where=self.where_TiO2, eps=epsilon), meep_materials.material_Metal_THz(where=self.where_metal) ] else: self.materials = [ meep_materials.material_STO_THz(where=self.where_TiO2), meep_materials.material_Metal_THz(where=self.where_metal) ] ## constants for the simulation self.pml_thickness = 20e-6 self.monitor_z1, self.monitor_z2 = (-(monzd * cells) / 2 + monzc - padding, (monzd * cells) / 2 + monzc + padding) self.simtime = simtime # [s] self.srcFreq, self.srcWidth = 1000e9, 2000e9 # [Hz], note: "Last source time" = 10/srcWidth self.interesting_frequencies = (0e9, 1000e9) ## Dimension constants for the simulation self.size_x = spacing self.size_y = spacing self.size_z = 60e-6 + cells * monzd + 2 * self.pml_thickness + 2 * self.padding #self.size_x, self.size_y, self.size_z = resolution/1.8, spacing, size_z ## two dimensional case XXX self.TestMaterials() print "CellCenters:", self.cell_centers()