API Reference
Types
UTDKernels.EXP_IWT — Constant
EXP_IWTDefault phasor convention constant for $exp(+i \omega t)$.
UTDKernels.PhasorConvention — Type
PhasorConvention(sgn)Time-harmonic phasor convention. sgn = +1 for exp(+iωt).
UTDKernels.Wedge — Type
Wedge(alpha)Wedge with exterior (free-space) angle alpha ∈ (0, 2π]. Faces at φ=0 and φ=alpha. The half-plane corresponds to alpha=2π.
UTDKernels.RayAngles — Type
RayAngles(phi, phip)Observation azimuth phi and incident azimuth phip. Inputs may be any real angles; kernel routines map them to the wedge interval.
UTDKernels.Distances — Type
Distances(s, sp)s: edge-to-observer distance. sp: source-to-edge distance (Inf for plane wave).
Wedge parameters
UTDKernels.wedge_n — Function
Wedge parameter n = α/π (standard KP parameter).
UTDKernels.wedge_nu — Function
Wedge parameter ν = π/α.
UTDKernels.effective_L — Function
Effective distance parameter L = s·s'/(s+s').
Angle utilities
UTDKernels.wrap_angle — Function
wrap_angle(phi, alpha)Wrap angle phi into [0, alpha) via modular arithmetic.
Transition function
UTDKernels.F_utd — Function
F_utd(x::Number) -> ComplexF64Evaluate the UTD transition function at x (real or complex). Uses the erfcx representation for numerical stability.
Diffraction coefficients
UTDKernels.pec_wedge_DsDh — Function
pec_wedge_DsDh(wedge, ang, k, L; convention=EXP_IWT) -> (Ds, Dh)Compute the soft and hard scalar UTD diffraction coefficients for a PEC wedge using the Kouyoumjian–Pathak four-term form.
Arguments
wedge::Wedge: wedge geometryang::RayAngles: observation and incident azimuthsk::Number: wavenumber (real positive for lossless media)L::Real: effective distance parameter s·s'/(s+s')
Returns
(Ds, Dh): tuple of complex diffraction coefficients
pec_wedge_DsDh(wedge, ang, k, Li, Lro, Lrn; Rs=-1, Rh=+1, convention=EXP_IWT)Generalized PEC wedge coefficient with separate transition distances:
Lifor incident-shadow terms (D1,D2)Lrnfor reflection from facen(D3)Lrofor reflection from faceo(D4)
For PEC, use Rs=-1, Rh=+1 (soft/hard reflection signs).
UTDKernels.pec_wedge_apply_sh — Function
pec_wedge_apply_sh(Ds, Dh, Es_i, Eh_i, k, s, sp; convention=EXP_IWT)Apply the PEC wedge diffraction dyadic in the soft/hard basis:
E_s^d = Ds · E_s^i · A(s,s') · exp(-iks)
E_h^d = Dh · E_h^i · A(s,s') · exp(-iks)Returns (Esd, Ehd).
UTDKernels.spreading_factor — Function
spreading_factor(s, sp)UTD spreading factor A(s,s') = √(s'/(s(s+s'))) for a straight edge. For plane-wave incidence (sp=Inf), returns 1/√s.
pec_wedge_DsDh provides both:
- a single-
LAPI for standard KP usage, and - a three-distance (
Li,Lro,Lrn) API for separated incident/reflection transition distances.
Regime detection
UTDKernels.wedge_transition_args — Function
wedge_transition_args(wedge, ang, k, L; tol=1e-10) -> NamedTupleCompute the transition arguments and regime classification for each of the four KP terms.
Returns a NamedTuple with:
gj: NTuple{4,Float64} – signed quantities cos((2nπNj - βj)/2)Xj: NTuple{4,<:Number} – transition arguments kL·a_jregime: NTuple{4,Symbol} – :lit, :shadow, or :transition
Diagnostics
UTDKernels.inspect_kp_terms — Function
inspect_kp_terms(wedge, ang, k, L)Print a diagnostic summary of all four KP terms for debugging.