NonlinearRHS.jl

Luna.NonlinearRHS.TransFreeType
TransFree

Transform E(ω) -> Pₙₗ(ω) for 3D free-space propagation.

Fields

  • Et_noise: precomputed time-domain noise on the oversampled real-space grid (nto, ny, nx) for the modified shot-noise model, or nothing.
  • Et_nl: preallocated buffer for the combined field + noise, passed to Et_to_Pt!. The propagating field (Eto) is never modified.
source
Luna.NonlinearRHS.TransFreeMethod
TransFree(TT, scale, grid, xygrid, FT, responses, densityfun, normfun; noise_field=nothing)

Construct a TransFree to calculate the reciprocal-domain nonlinear polarisation for 3D free-space propagation.

Keyword arguments

  • noise_field=nothing: optional (nω, ny, nx) frequency/k-space noise field for the modified shot-noise model. When provided, it is converted to the real-space oversampled time domain (nto, ny, nx) via copy_scale! and 3D inverse FFT, and stored as Et_noise. Generate with Fields.generate_noise_field.
source
Luna.NonlinearRHS.TransFreeMethod
(t::TransFree)(nl, Eω, z)

Calculate the reciprocal-domain (ω-kx-ky-space) nonlinear response due to the field and place the result in nl.

source
Luna.NonlinearRHS.TransModalType
TransModal

Transform E(ω) -> Pₙₗ(ω) for multimode propagation via spatial integration.

Fields

  • Emω_noise: modal noise field (nω, nmodes) for the modified shot-noise model, or nothing. When present, the noise is projected to real space at each integration point and combined with the field in a separate buffer (Er_nl) for nonlinear evaluation. The propagating field (Er) is never modified.
  • Er_noise: preallocated buffer for the real-space time-domain noise, same shape as Er.
  • Er_nl: preallocated buffer for the combined field + noise, passed to Et_to_Pt!.
source
Luna.NonlinearRHS.TransModalMethod
TransModal(grid, ts, FT, resp, densityfun, norm!; rtol=1e-3, atol=0.0, mfcn=300, full=false, noise_field=nothing)

Construct a TransModal, transform E(ω) -> Pₙₗ(ω) for modal fields.

Arguments

  • grid::AbstractGrid : the grid used in the simulation
  • ts::Modes.ToSpace : pre-created ToSpace for conversion from modal fields to space
  • FT::FFTW.Plan : the time-frequency Fourier transform for the oversampled time grid
  • resp : Tuple of response functions
  • densityfun : callable which returns the gas density as a function of z
  • norm! : normalisation function as fctn of z, can be created via norm_modal
  • rtol::Float=1e-3 : relative tolerance on the HCubature integration
  • atol::Float=0.0 : absolute tolerance on the HCubature integration
  • mfcn::Int=512 : maximum number of function evaluations for one modal integration
  • full::Bool=false : if true, use full 2-D mode integral, if false, only do radial integral
  • noise_field=nothing : optional (nω, nmodes) noise field for the modified shot-noise model. Each mode column should contain independent noise with the one-photon-per-mode spectral density. Generate with Fields.generate_noise_field.
source
Luna.NonlinearRHS.TransModeAvgType
TransModeAvg

Transform E(ω) -> Pₙₗ(ω) for mode-averaged single-mode propagation.

Fields

  • Et_noise: precomputed time-domain noise on the oversampled grid for the modified shot-noise model (Chen & Wise, arXiv:2410.20567), or nothing for the traditional model.
  • Et_nl: preallocated buffer for the combined field + noise. When Et_noise is present, Et_nl = Eto + Et_noise is computed at each step and passed to Et_to_Pt!. The propagating field (Eto) is never modified; dispersion acts only on the physical field.
source
Luna.NonlinearRHS.TransModeAvgMethod
TransModeAvg(TT, grid, FT, resp, densityfun, norm!, aeff; noise_field=nothing)

Construct a TransModeAvg transform for mode-averaged propagation.

Keyword arguments

  • noise_field=nothing: optional frequency-domain noise field (on the normal grid) for the modified shot-noise model. When provided, it is converted to the oversampled time grid and stored as Et_noise for injection into the nonlinear operator at every propagation step. Generate with Fields.generate_noise_field.
source
Luna.NonlinearRHS.TransRadialType
TransRadial

Transform E(ω) -> Pₙₗ(ω) for radially symmetric free-space propagation.

Fields

  • Et_noise: precomputed time-domain noise on the oversampled real-space grid (nto, nr) for the modified shot-noise model, or nothing.
  • Et_nl: preallocated buffer for the combined field + noise, passed to Et_to_Pt!. The propagating field (Eto) is never modified.
source
Luna.NonlinearRHS.TransRadialMethod
TransRadial(TT, grid, HT, FT, responses, densityfun, normfun; noise_field=nothing)

Construct a TransRadial to calculate the reciprocal-domain nonlinear polarisation.

Keyword arguments

  • noise_field=nothing: optional (nω, nk) frequency/k-space noise field for the modified shot-noise model. When provided, it is converted to the real-space time domain (nto, nr) via inverse FFT and inverse Hankel transform, and stored as Et_noise. Generate with Fields.generate_noise_field.
source
Luna.NonlinearRHS.TransRadialMethod
(t::TransRadial)(nl, Eω, z)

Calculate the reciprocal-domain (ω-k-space) nonlinear response due to the field and place the result in nl

source
Luna.NonlinearRHS.copy_scale!Method
copy_scale!(dest, source, N, scale)

Copy first N elements from source to dest and simultaneously multiply by scale factor. For multi-dimensional dest and source, work along first axis.

source
Luna.NonlinearRHS.copy_scale_both!Method
copy_scale_both!(dest::Vector, source::Vector, N, scale)

Copy first and last N elements from source to first and last N elements in dest and simultaneously multiply by scale factor. For multi-dimensional dest and source, work along first axis.

source
Luna.NonlinearRHS.norm_freeMethod
norm_free(grid, xygrid, nfun)

Make function to return normalisation factor for 3D propagation.

Note

Here, nfun(ω; z) needs to take frequency ω and a keyword argument z.

source
Luna.NonlinearRHS.norm_modalMethod
norm_modal(grid; shock=true)

Normalisation function for modal propagation. If shock is false, the intrinsic frequency dependence of the nonlinear response is ignored, which turns off optical shock formation/ self-steepening.

source
Luna.NonlinearRHS.norm_radialMethod
norm_radial(ω, q, nfun)

Make function to return normalisation factor for radial symmetry.

Note

Here, nfun(ω; z) needs to take frequency ω and a keyword argument z.

source