NonlinearRHS.jl
Luna.NonlinearRHS.TransFree — Type
TransFreeTransform 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, ornothing.Et_nl: preallocated buffer for the combined field + noise, passed toEt_to_Pt!. The propagating field (Eto) is never modified.
Luna.NonlinearRHS.TransFree — Method
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)viacopy_scale!and 3D inverse FFT, and stored asEt_noise. Generate withFields.generate_noise_field.
Luna.NonlinearRHS.TransFree — Method
(t::TransFree)(nl, Eω, z)Calculate the reciprocal-domain (ω-kx-ky-space) nonlinear response due to the field Eω and place the result in nl.
Luna.NonlinearRHS.TransModal — Type
TransModalTransform E(ω) -> Pₙₗ(ω) for multimode propagation via spatial integration.
Fields
Emω_noise: modal noise field(nω, nmodes)for the modified shot-noise model, ornothing. 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 asEr.Er_nl: preallocated buffer for the combined field + noise, passed toEt_to_Pt!.
Luna.NonlinearRHS.TransModal — Method
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 simulationts::Modes.ToSpace: pre-createdToSpacefor conversion from modal fields to spaceFT::FFTW.Plan: the time-frequency Fourier transform for the oversampled time gridresp:Tupleof response functionsdensityfun: callable which returns the gas density as a function ofznorm!: normalisation function as fctn ofz, can be created vianorm_modalrtol::Float=1e-3: relative tolerance on theHCubatureintegrationatol::Float=0.0: absolute tolerance on theHCubatureintegrationmfcn::Int=512: maximum number of function evaluations for one modal integrationfull::Bool=false: iftrue, use full 2-D mode integral, iffalse, only do radial integralnoise_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 withFields.generate_noise_field.
Luna.NonlinearRHS.TransModeAvg — Type
TransModeAvgTransform 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), ornothingfor the traditional model.Et_nl: preallocated buffer for the combined field + noise. WhenEt_noiseis present,Et_nl = Eto + Et_noiseis computed at each step and passed toEt_to_Pt!. The propagating field (Eto) is never modified; dispersion acts only on the physical field.
Luna.NonlinearRHS.TransModeAvg — Method
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 asEt_noisefor injection into the nonlinear operator at every propagation step. Generate withFields.generate_noise_field.
Luna.NonlinearRHS.TransRadial — Type
TransRadialTransform 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, ornothing.Et_nl: preallocated buffer for the combined field + noise, passed toEt_to_Pt!. The propagating field (Eto) is never modified.
Luna.NonlinearRHS.TransRadial — Method
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 asEt_noise. Generate withFields.generate_noise_field.
Luna.NonlinearRHS.TransRadial — Method
(t::TransRadial)(nl, Eω, z)Calculate the reciprocal-domain (ω-k-space) nonlinear response due to the field Eω and place the result in nl
Luna.NonlinearRHS.Et_to_Pt! — Method
Et_to_Pt!(Pt, Et, responses, density)Accumulate responses induced by Et in Pt.
Luna.NonlinearRHS.const_norm_free — Method
const_norm_free(grid, xygrid, nfun)Make function to return normalisation factor for 3D propagation without re-calculating at every step.
Luna.NonlinearRHS.const_norm_radial — Method
const_norm_radial(ω, q, nfun)Make function to return normalisation factor for radial symmetry without re-calculating at every step.
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.
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.
Luna.NonlinearRHS.norm_free — Method
norm_free(grid, xygrid, nfun)Make function to return normalisation factor for 3D propagation.
Luna.NonlinearRHS.norm_modal — Method
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.
Luna.NonlinearRHS.norm_radial — Method
norm_radial(ω, q, nfun)Make function to return normalisation factor for radial symmetry.
Luna.NonlinearRHS.to_freq! — Method
to_freq!(Aω, Aωo, Ato, FTplan)Transform oversampled A(t) to A(ω) on normal grid
Luna.NonlinearRHS.to_time! — Method
to_time!(Ato, Aω, Aωo, IFTplan)Transform $A(ω)$ on normal grid to $A(t)$ on oversampled time grid.