2D Visualisation in 3D simulations #2197
-
Hi everyone, I am wondering if there is a standard way of quickly visualizing a slice of the simulation using meep.plot2D(). I tried to do this but i am getting errors, I show a minimal example of a 3D geometry of a THz absorber on fused quartz. Is there a way to run plot2D without the simulation starting? Thanks for your suggestions.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
First off your simulation is enormous... (2000x2000x648) pixels... Second, as the error indicates, "The specified user volume is completely outside of the simulation domain." You think you are setting the size of your volume, but in reality, you are setting the center. Third, you can indeed initialize the 2D slice without initializing the entire 3D stack using the : Putting all of that together: sim = mp.Simulation(resolution = 5, cell_size = cell_size, geometry = geom)
sim.plot2D(output_plane=mp.Volume(size=mp.Vector3(p,0,tstack)),
eps_parameters={'resolution':50},frequency=1
) gets you this: Note that I specified a random frequency ( |
Beta Was this translation helpful? Give feedback.
First off your simulation is enormous... (2000x2000x648) pixels...
Second, as the error indicates, "The specified user volume is completely outside of the simulation domain." You think you are setting the size of your volume, but in reality, you are setting the center.
Third, you can indeed initialize the 2D slice without initializing the entire 3D stack using the :
eps_parameters={'resolution':<resolution_goes_here>}
parameter withinplot2D()
.Putting all of that together:
gets you this:
Note that I spe…