Skip to content

Simulation and topology optimization of 3d distributed emitters

License

Notifications You must be signed in to change notification settings

mochen4/DistributedEmitterOpt.jl

 
 

Repository files navigation

DistributedEmitterOpt logo DistributedEmitterOpt.jl

Docs

Adjoint-based topology optimization for nanophotonic SERS substrates and other distributed emission problems.

Installation

using Pkg
Pkg.add(url="https://github.com/ianmatthewhammond/DistributedEmitterOpt.jl")

Usage

using DistributedEmitterOpt

# Define geometry and generate mesh
geo = SymmetricGeometry(532.0; L=200.0, W=200.0)
meshfile = "design.msh"
genmesh(geo, meshfile; per_x=false, per_y=false)

# Configure physics
env = Environment(mat_design="Ag", mat_substrate="Ag", mat_fluid=1.33)
pde = MaxwellProblem(
    env = env,
    inputs = [FieldConfig(532.0; θ=0.0, pol=:y)],
    outputs = [FieldConfig(600.0; θ=0.0, pol=:y)]
)

# Build optimization problem
prob = OptimizationProblem(pde, SERSObjective(), meshfile, UmfpackSolver();
    per_x = false,
    per_y = false,
    foundry_mode = true
)

# Run optimization
init_uniform!(prob, 0.5)
g_opt, p_opt = optimize!(prob; max_iter=100)

Features

  • Adjoint sensitivity analysis for efficient gradient computation
  • β-continuation for smooth gray-to-binary transition
  • 2D foundry mode (grid DOFs) and 3D FE mode (mesh DOFs)
  • Multi-wavelength and multi-polarization support
  • Anisotropic Raman polarizability tensors
  • Linewidth constraints via Zygote AD

Documentation

See the documentation for:

Dependencies

Built on Gridap.jl for finite elements and NLopt.jl for optimization.

License

MIT

About

Simulation and topology optimization of 3d distributed emitters

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Julia 98.4%
  • Python 1.6%