Antiresonant.jl

Amalthea.Antiresonant.RustZeisbergerHandleType

Mutable wrapper around a heap-allocated ZeisbergerNeff in the Rust shared library. A GC finalizer calls free_zeisberger_neff when the handle is no longer reachable, so the Rust heap allocation is always reclaimed.

source
Amalthea.Antiresonant.VincettiModeMethod
VincettiMode(a, args...; wallthickness, tube_radius, Ntubes, cladn, Nterms,
                         loss=true, kwargs...)

Create a mode with Marcatili-like mode fields but loss, dispersion and effective area given by the semi-empirical model developed by Vincetti et al. in refs [1-3]. Arguments are identical to Capillary.MarcatiliMode but with the following additions/changes as keyword arguments:

Mandatory keyword arguments

  • wallthickness : wall thickness of the resonators (cladding capillaries)
  • tube_radius : radius of the resonators
  • Ntubes : number of resonators

Optional keyword arguments

  • cladn : refractive index of the resonators as a function of (ω; z). Defaults to the refractive index of silica (SiO2).
  • Nterms : number of resonator dielectric modes to include in the model. Defaults to 8.
  • loss : can be true or false to switch loss on/off, or a Real to scale the loss.

To specify the gap between resonators, calculate the core radius with getRco(r_ext, N, δ) or calculate the external radius of the resonators with getr_ext(Rco, N, δ).

References

[1] L. Vincetti Empirical formulas for calculating loss in hollow core tube lattice fibers, Opt. Express, OE, vol. 24, no. 10, pp. 10313-10325, May 2016, doi: 10.1364/OE.24.010313.

[2] L. Vincetti and L. Rosa A simple analytical model for confinement loss estimation in hollow-core Tube Lattice Fibers Opt. Express, OE, vol. 27, no. 4, pp. 5230-5237, Feb. 2019, doi: 10.1364/OE.27.005230.

[3]L. Rosa, F. Melli, and L. Vincetti Analytical Formulas for Dispersion and Effective Area in Hollow-Core Tube Lattice Fibers Fibers, vol. 9, no. 10, Art. no. 10, Oct. 2021, doi: 10.3390/fib9100058.

source
Amalthea.Antiresonant.ZeisbergerModeMethod
ZeisbergerMode(args...; wallthickness, kwargs...)

Create a capillary-like mode with the effective index given by eq. (15) in [1].

wallthickness (mandatory kwarg) sets the thickness of the anti-resonant struts and loss (optional, defaults to true) can be either a Bool (to switch on/off loss completely) or a Real (to up/down-scale the loss given by the model). Other kwargs are passed on to the constructor of a Capillary.MarcatiliMode.

[1] Zeisberger, M., Schmidt, M.A. Analytic model for the complex effective index of the leaky modes of tube-type anti-resonant hollow core fibers. Sci Rep 7, 11761 (2017). https://doi.org/10.1038/s41598-017-12234-5

source
Amalthea.Antiresonant._kind_codeMethod
_kind_code(kind::Symbol) -> Cuint

Map a Julia mode-kind symbol to the integer code expected by Rust: :HE → 0, :EH → 1, :TE → 2, :TM → 3.

source
Amalthea.Antiresonant._loss_argsMethod
_loss_args(loss) -> (Cuint, Float64)

Encode a Julia loss value into (loss_on, loss_scale) for the Rust FFI: Val{true} → (1, 1.0) Val{false} → (0, 0.0) Number L → (1, Float64(L))

source
Amalthea.Antiresonant._make_rust_zeisberger_handleMethod
_make_rust_zeisberger_handle(m::ZeisbergerMode) -> Union{Nothing, RustZeisbergerHandle}

Build a Rust-side ZeisbergerNeff geometry handle from a ZeisbergerMode. Returns nothing when the toggle is off, the lib is missing, or init fails.

source
Amalthea.Antiresonant.getRcoMethod
getRco(r_ext, N, δ)

Calculate the inscribed core radius of a single-ring antiresonant PCF with N resonators with external radius r_ext and a gap between resonators of δ.

source
Amalthea.Antiresonant.getr_extMethod
getr_ext(Rco, N, δ)

Calculate the external radius of the resonators for a single-ring antiresonant PCF with core radius Rco, N resonators and a gap between resonators of δ.

source
Amalthea.Antiresonant.getδMethod
getδ(Rco, r_ext, N)

Calculate the gap between resonators in a single-ring antiresonant PCF with inscribed core radius Rco for N resonators with external radius r_ext.

source
Amalthea.LinearOps.neff_β_gridMethod
neff_β_grid(grid, mode::ZeisbergerMode, λ0)

Specialised neff_β_grid for anti-resonant fibre modes. When AMALTHEA_USE_RUST_DISPERSION=1 this uses the Rust zeisberger_neff_vector FFI to batch-compute the complex effective index for all positive-frequency grid points in a single Rust call per propagation step, replacing the per-ω Julia loop.

Julia still evaluates nco(ω) and ncl(ω) via its own (multi-term) Sellmeier model; Rust applies only the Zeisberger geometry (eq. 15). The first call for a given z triggers the Rust batch; subsequent calls for the same z return cached values in O(1).

Falls back silently to the Julia _neff loop if the Rust lib is not built, the toggle is off, or the ccall returns a non-zero error code.

source