conda create -yn nv-resonator
conda activate nv-resonator
conda install -yc conda-forge fenics-dolfinx=0.7 petsc=*=complex* pyvista libstdcxx-ng gmsh scipy
pip install gmsh
To generate a mesh,
gmsh mesh/resonator.geo -2
You can view it with
gmsh mesh/resonator.msh
We're looking for radial or axial modes, so we only need to simulate a longitudinal slice parallel to the ring's axis. Rotating around the bottom edge will give the full ring. To create images of the wave modes, run
python modes.py
It should save them in images/modes/<freq>.png
. Here's an example of the electric field:
and the magnetic field:
- The magnetic field solver is using Nedelec elements because they are curl conforming. However, that is in Cartesian coordinates, not cylindrical, which creates a 2-3% error in resonance frequency. We need to either create cylindrical Nedelec elements, or modify the solver. I'm leaning towards the former.
In Cavity-Enhanced Microwave Readout of a Solid-State Spin Sensor by Dirk Englund, et al., they use dielectric resonators to couple with an NV center. Their resonators have the following parameters:
outer_radius (a) = 8.17e-3
inner_radius (b) ~ 4e-3
height (L) = 7.26e-3
permittivity (ε) ~ 34
The readout frequency of an NV center is ~2.87 GHz, so they want to tune the cavity to have a mode ~3 GHz. Their simulation (above) places the diamond between two resonators as a source. A cylindrical resonator's
given by Kajfez & Guillon in Dielectric resonators and readily available on Wikipedia. This approximation yields resonance ~2.86 GHz, and their simulation is ~2.90 GHz.
Our system is slightly different. They used an aluminum shield, but that is only important for increasing the relaxation time. Since we are using ours only as a magnetometer, it is fine to leave it open to the air. In addition, we are using an LED instead of a LASER, so we can place the diamond at one end of a longer ring, rather than orienting it between two smaller rings. The simplified resonator is defined in mesh/resonator.geo
, while a reconstruction of their double-resonator is found in mesh/double.geo
.
Starting from Maxwell's equations,
where
we get
Since
this reduces to
In cylindrical coordinates, and assuming
The weak formulation is
The Sommerfeld radiation boundary condition is
so we're left with
Letting
where
The derivation for
Finally, we only apply the radiation boundary condition along the three non-axial edges of our mesh. The axis just has the Dirichlet