Build the waveguide-crossing optimization problem. The waveguide crossing is a cononical inverse design problem with both shape- and topology-optimization implementations. The idea is to find the optimal structure that maximizes transmission from one side to the other. It exhibits C
(
resolution: float,
beta: float,
use_smoothed_projection: bool,
min_length: float = DEFAULT_MIN_LENGTH,
dx: float = DEFAULT_DESIGN_REGION_WIDTH,
dy: float = DEFAULT_DESIGN_REGION_HEIGHT,
waveguide_width: float = DEFAULT_WAVEGUIDE_WIDTH,
eta: float = DEFAULT_ETA,
eta_e: float = DEFAULT_ETA_E,
damping_factor: float = 0.0,
)
| 35 | |
| 36 | |
| 37 | def build_optimization_problem( |
| 38 | resolution: float, |
| 39 | beta: float, |
| 40 | use_smoothed_projection: bool, |
| 41 | min_length: float = DEFAULT_MIN_LENGTH, |
| 42 | dx: float = DEFAULT_DESIGN_REGION_WIDTH, |
| 43 | dy: float = DEFAULT_DESIGN_REGION_HEIGHT, |
| 44 | waveguide_width: float = DEFAULT_WAVEGUIDE_WIDTH, |
| 45 | eta: float = DEFAULT_ETA, |
| 46 | eta_e: float = DEFAULT_ETA_E, |
| 47 | damping_factor: float = 0.0, |
| 48 | ) -> Tuple[mpa.OptimizationProblem, Callable]: |
| 49 | """Build the waveguide-crossing optimization problem. |
| 50 | |
| 51 | The waveguide crossing is a cononical inverse design problem with both |
| 52 | shape- and topology-optimization implementations. The idea is to find the |
| 53 | optimal structure that maximizes transmission from one side to the other. It |
| 54 | exhibits C4 symmetry, and generally resembles the following structure: |
| 55 | |
| 56 | | | |
| 57 | | | |
| 58 | ----- ------ |
| 59 | ----- ------ |
| 60 | | | |
| 61 | | | |
| 62 | |
| 63 | Args: |
| 64 | resolution: Simulation resolution in pixels/micron. |
| 65 | beta: Tanh function projection strength parameter, ranging from [0,∞]. |
| 66 | use_smoothed_projection: Whether or not to use the smoothed projection. |
| 67 | min_length: Minimum length scale in microns. |
| 68 | dx: Design region width in microns. |
| 69 | dy: Design region height in microns. |
| 70 | waveguide_width: Waveguide width in microns. |
| 71 | eta: Projection function threshold parameter. |
| 72 | eta_e: Projection function eroded threshold parameter. |
| 73 | damping_factor: The material grid damping scalar factor. |
| 74 | |
| 75 | Returns: |
| 76 | The corresponding optimization problem object and the mapping function |
| 77 | that applies the linear and nonlinear transformations. |
| 78 | """ |
| 79 | # Map the design region resolution to the yee grid, which is twice the standard resolution. |
| 80 | design_region_resolution = int(2 * resolution) |
| 81 | |
| 82 | # pml thickness |
| 83 | dpml = 1.0 |
| 84 | |
| 85 | filter_radius = mpa.get_conic_radius_from_eta_e(min_length, eta_e) |
| 86 | |
| 87 | sxy = dx + 1 + 2 * dpml |
| 88 | |
| 89 | silicon = mp.Medium(epsilon=12) |
| 90 | cell_size = mp.Vector3(sxy, sxy, 0) |
| 91 | boundary_layers = [mp.PML(thickness=dpml)] |
| 92 | |
| 93 | eig_parity = mp.EVEN_Y + mp.ODD_Z |
| 94 |
no outgoing calls
no test coverage detected