eliminate the source. #2358
truonghoailinh47
started this conversation in
General
Replies: 2 comments 5 replies
-
I am already done. Thank you. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Well, you put a CW current source along the x axis, so your simulation will include this — Meep is doing what you tell it to do. If you want to find a resonant mode, you should use a pulsed source (which turns off) and look at the fields some time later; see the tutorials. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear Meep developer, I am trying to simulate electric field of nanoparticles. But in the final result, I always got the source line. Can you guys help me how to remove it? Below is my code and result. Thank you so much.
import meep as mp
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
#radius
r = 25e-3
sizex = 480e-3
sizey = 480e-3
sizez= 480e-3
size_3d=(sizex, sizey, sizez)
courant = 0.5
#pixels/um
resolution = 500
pixel_size = 1/resolution
plane_th = 1r
#original thickness = 0.2sizex
pml_th= 0.4
#pml_th= 2.5e-3
fullx = sizex + 2pml_th
fully = sizey + 2pml_th
fullz = sizez + 2*pml_th
cell = mp. Vector3(fullx, fully,0)
pml_layers = [mp.PML(thickness= pml_th, direction =mp.X), mp.PML(thickness= pml_th, direction =mp.Y),mp.PML(thickness=pml_th, direction =mp.Z)]
nonpml_vol = mp.Volume(mp.Vector3(),size = mp.Vector3(sizex, sizey, sizez))
freq = 0.473
comp= mp.Ex
sources = [mp.Source(mp.ContinuousSource(frequency=freq, is_integrated= True),
size= mp.Vector3(fullx, 0,0),
component= comp,
center = mp.Vector3(0,0))]
geometry = [mp.Sphere (material = mp. Medium(epsilon = 11.753, D_conductivity = 2np.pi * 0.4731.2696/11.753),
center = mp.Vector3(0,0,0),
radius=r),
]
sim = mp.Simulation (cell_size = cell,
boundary_layers = pml_layers,
geometry = geometry,
sources = sources,
resolution= resolution,
force_complex_fields= True,
split_chunks_evenly = False,)
plt.show()
Beta Was this translation helpful? Give feedback.
All reactions