Non density-based sensitivity analysis using adjoint solver #2002
Replies: 5 comments 3 replies
-
Hi, I am actually interested in the same thing as you. Indeed, I need to reproduce the results of this article https://opg.optica.org/prj/fulltext.cfm?uri=prj-8-4-528&id=429433 (Inverse design of digital nanophotonic devices using the adjoint method) but unfortunately, until now, I have not been able to... (BTW, if I succeed, it can make a beautiful example). If you succeed, please, share your solution ! A possible way of resolution for your issue will be to use the library autograd or jax. It will allow your simulation to include a gradient. |
Beta Was this translation helpful? Give feedback.
-
Sure, this is possible. But there are a few caveats concerning how you implement this within the current framework. Note that to obtain sensitivity information w.r.t. the parameters you're describing, you need to use a levelset. Technically, the adjoint solver was meant to work with density-based methods (which are starkly different than levelsets). But we recently added some features that hybridize the two frameworks, provided the following conditions are met:
import autograd.numpy as npa
x = npa.linspace(0,L,N) # where N is the number of MaterialGrid DOF, and L is grating length
def fx(Λ):
return npa.sin(2*npa.pi/Λ*x) # where Λ is grating period where the output of
The adjoint solver will provide the gradient, |
Beta Was this translation helpful? Give feedback.
-
In particular, for a given shape (e.g. a polygon), if you define the material grid to be 0.5 + a signed distance function, and then set β=infinity, then the subpixel smoothing and the gradients will work. |
Beta Was this translation helpful? Give feedback.
-
Hi, Thanks a lot for your answers! |
Beta Was this translation helpful? Give feedback.
-
Hello! I'm a novice user of meep. You said you have examples only for topology optimization using a material grid. Can you share it with me? Thank you very much! Or do you have other optimization examples of vertical coupler with meep? |
Beta Was this translation helpful? Give feedback.
-
Hi meep community,
Just recently, I started using meep and it’s a great tool. Thanks for developing and maintaining it.
I came across the adjoint optimization and wanted to use it for a sensitivity analysis of design parameters, e.g., period, fill factor etc. of a grating coupler. Is that possible in meep? I found examples only for topology optimization using a material grid and haven’t been able to adapt it so far.
I created a class with an update-method so that it can be used as the design variables. However, the optimizer doesn’t update the parameters. I guess that’s because the derivative w.r.t. the parameters is not defined. Is that correct and is there a way to adapt the adjoint optimizer for this use case?
Beta Was this translation helpful? Give feedback.
All reactions