Skip to content

2D Visualisation in 3D simulations #2197

Answered by smartalecH
Srinivas-Ganti asked this question in Q&A
Discussion options

You must be logged in to vote

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 within plot2D().

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 spe…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Srinivas-Ganti
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants