Hi!

I'm testing meep and wanted to check that the resonance frequencies of a simple 
cylindrical cavity match the analytical solutions.

I tried for two days now to get the code to work, but I never arrive at the 
correct resonance frequencies.

I'm testing with r = 46mm, h = 40mm. The analytical resonance frequencies are 
(with meep units at the end)

TE_1,1,0 = 1.909766 GHz = 0.006370
TM_0,1,0 = 2.494403 GHz = 0.008320
TE_2,1,0 = 3.168004 GHz = 0.010567
TE_0,1,0 = 3.974433 GHz = 0.013257
TM_1,1,0 = 3.974433 GHz = 0.013257
TE_1,1,1 = 4.205979 GHz = 0.014030
TE_3,1,0 = 4.357679 GHz = 0.014536

I am trying with this code and various modifications:

    # units in mm
    r = 46
    h = 40

    #c = mp.Cylinder(radius = r, height = h, material = mp.air)
    c = mp.Block(center = mp.Vector3(0.5 * r), size = mp.Vector3(r, 0, h), 
material = mp.air)

    pad = 10  # padding
    dpml = 10 # thickness of PML

    dimensions = mp.CYLINDRICAL
    cell = mp.Vector3(2 * r + 2 * pad + 2 * dpml, 0, h + 2 * pad + 2 * dpml)

    m = args.m

    geometry = [c]

    pml_layers = [mp.PML(dpml)]
    resolution = 5

    fcen = args.fcen
    df = args.df
    source = mp.Vector3(0.1 * r, 0, 0.3 * h)
    sources = [mp.Source(src=mp.GaussianSource(fcen, fwidth=df),
                         component=mp.Ez,
                         center=source)]

    sim = mp.Simulation(boundary_layers=pml_layers,
                        cell_size=cell,
                        default_material=mp.metal,
                        dimensions=dimensions,
                        geometry=geometry,
                        resolution=resolution,
                        sources=sources,
                        m=m)

    sim.run(mp.after_sources(mp.Harminv(mp.Ez, source, fcen, df)),
            until_after_sources = 200)

What am I doing wrong?

Thanks,
Alan
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to