This project simulates the coupling of a tilted, elliptical Gaussian beam into a step-index optical fiber, the phase evolution of the signal through the fiber, and its subsequent diffraction into free space.
It integrates three distinct physical stages:
- Coupling: Decomposition of the input field into Linearly Polarized (LP) fiber modes.
- Fiber Transit: Independent phase evolution of each excited mode.
- Free Space Diffraction: Propagation of the output field using the Angular Spectrum Method (ASM) with aliasing control.
The simulation assumes the weakly-guiding approximation (
The code first solves the scalar Helmholtz equation to find the transverse field profiles of the guided
Since the modes are normalized such that
Once coupled, the field propagates through a fiber of length
where
This phase slippage between modes causes the spatial intensity profile to change along the fiber (intermodal interference), even though the power distribution among modes remains constant (assuming no losses).
The field exiting the fiber,
The Algorithm:
-
Spectral Decomposition (FFT): The spatial field
$E(x,y,0)$ is decomposed into plane waves:$$A(k_x, k_y; 0) = \mathcal{F}\{E(x,y,0)\}$$ -
Propagation in k-space: The phase shift transfer function
$H(k_x, k_y)$ is applied:$$A(k_x, k_y; z) = A(k_x, k_y; 0) \cdot e^{j k_z z}$$ where
$k_z = \sqrt{k_0^2 - k_x^2 - k_y^2}$ . -
Reconstruction (IFFT): The propagated field is recovered via Inverse FFT:
Aliasing Control:
The code (free_propagate_asm_scalar_aliasing_robust) implements a padding strategy. Since the beam diverges (
-
LP_projection.py: The main entry point. Defines physical parameters, runs the simulation pipeline, and triggers visualization. -
source/:-
LP_projection_functions.py: Contains solvers for fiber modes (root finding for characteristic equations), tilted Gaussian beam generation (Euler angles), and overlap integrals. -
propagation.py: Contains the propagation engines:-
fiber_propagation: Applies$\beta_{lm}$ phase factors using Pandas for data handling. -
free_propagate_asm_scalar...: Implements the FFT-based Angular Spectrum Method with automatic padding.
-
-
graph.py: Dedicated plotting library for generating the summary dashboard.
-
- numpy: Array manipulations and FFT operations.
- scipy: Bessel functions (
jv,kn) and root finding (root_scalar). - matplotlib: Visualization and plotting.
- pandas: Data structures for managing mode coefficients efficiently.
- Ensure you have the required dependencies installed.
- Configure the simulation parameters in the
PARAMETERSsection ofLP_projection.py. - Run the main script from your terminal:
python LP_projection.py
Note: All length parameters (waist, offset, wavelength, etc.) are specified in units of fiber core radii.
FIBER_V: The normalized frequency (V-number) of the fiber.MODES_TO_TEST: A list of(l, m)tuples specifying which LP modes to include in the basis.FIBER_LENGTH: Length of the fiber, used to calculate relative phases at fiber end face.DIST_FROM_FIBER: DDistance from the fiber end face at which the diffracted field is calculated.LAMBDA: Wavelength of the injected beam.DIST_TO_WAIST: Distance from the beam waist to the fiber input plane.W0_X,W0_Y: Beam waist radii along x and y.X0,Y0: Beam's incidence point (offset) on the fiber plane.ROLL_ANGLE,PITCH_ANGLE,YAW_ANGLE: Euler angles (in radians) to define the beam's tilt.GRID_SIZE: The resolution of the simulation grid (e.g., 500 for a 500x500 grid).
The script creates an output/ directory containing summary_figure.png (auto-incremented filename), displaying the intensity profiles and coupling tables.
Below is an example of the simulation output (summary_figure_2.jpg), showing the input Gaussian beam, the excited modes inside the fiber, the output field after propagation, and the diffracted field in free space.
