File: cherenkov-radiation.py

package info (click to toggle)
meep-openmpi 1.17.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 51,676 kB
  • sloc: cpp: 29,881; python: 17,210; lisp: 1,225; makefile: 479; sh: 249; ansic: 133; javascript: 5
file content (29 lines) | stat: -rw-r--r-- 872 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## moving point charge with superluminal phase velocity in dielectric media emitting Cherenkov radiation

import meep as mp

sx = 60
sy = 60
cell_size = mp.Vector3(sx,sy,0)

dpml = 1.0
pml_layers = [mp.PML(thickness=dpml)]

v = 0.7 # velocity of point charge

symmetries = [mp.Mirror(direction=mp.Y)]

sim = mp.Simulation(resolution=10,
                    cell_size=cell_size,
                    default_material=mp.Medium(index=1.5),
                    symmetries=symmetries,
                    boundary_layers=pml_layers)

def move_source(sim):
    sim.change_sources([mp.Source(mp.ContinuousSource(frequency=1e-10),
                                  component=mp.Ex,
                                  center=mp.Vector3(-0.5*sx+dpml+v*sim.meep_time()))])

sim.run(move_source,
        mp.at_every(2, mp.output_png(mp.Hz, "-vZc dkbluered -M 1")),
        until=sx/v)