Build geometry using default_material #2662
dalarev
started this conversation in
Show and tell
Replies: 2 comments
-
This was in response to this thread in which I ask if one can Boolean AND |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everybody,
I wrote a "tutorial" script demonstrating how to use the
default_material
function to define geometry. Please find it here.I needed this capability for my own work, so I built a simple cylinder model to compare results using
default_material
withGeometricObject
.We use a dft field monitor to compare field profiles resulting from both methods. They seem to match up almost exactly, which is a nice validation.
Lessons learned:
default_material
, make sure that your grid axes match those of thesim
, or else the geometry will be scaled! This wasn't obvious to me - I assumed that meep would match spatial coordinates and insert the geometry appropriately. Perhaps this is spelled out in the documentation somewhere, but I was not aware of it.get_epsilon
data between the two methods yields some differences in the perimeter of the geometry. Perhaps this is due to slight grid and interpolation mismatches. This doesn't seem to impact the results.Hope this is useful to someone!
Beta Was this translation helpful? Give feedback.
All reactions