Description Performs the step-index Fiber Coupling calculation at a given surface using an attached Analysis Surface and return the real and imaginary part of the coupling coefficient. The power efficiency is then calculated as coupleReal*coupleReal + coupleImag*coupleImag. Depending on the number of rays traced, it may be necessary to dimension ray index and ray counter variables as data type Huge_ instead of Long. Please see Multi-threaded Raytracing for more information.
Syntax count = FiberCoupleStepIndex( coupleReal, coupleImag, nEntity, nCoordSys, ana, semiApeCore, refIndexCore, refIndexClad )
Parameters count (Long or Huge_) The number of rays used in the calculation.
coupleReal As Double Return value of the real part of the coupling coefficient.
coupleImag As Double Return value of the imaginary part of the coupling coefficient.
nEntity As Long Include in the calculation only those rays on the entity with the given node number nEntity.
nCoordSys As Long Identifier of the FRED entity whose coordinate system the data in the analysis parameter is expressed.
ana As T_ANALYSIS Data structure defining the Analysis Surface on which the calculation will be performed.
semiApeCore As Double Semi-aperture of the fiber core in system units.
refIndexCore As Double Refractive index of the fiber core.
refIndexClad As Double Refractive index of fiber cladding.
Example The example below demonstrates how to calculate the power coupling efficiency of a source into a single-mode step index fiber.
Sub Main
'Nodes used in the analysis Dim fiberID As Long, anaID As Long, surfID As Long, srcID As Long fiberID = FindFullName( "Geometry.SMF" ) anaID = FindFullName( "Analysis Surface(s).Fiber Interface" ) surfID = FindFullName( "Geometry.SMF.Analysis Plane.Surface" ) srcID = FindFullName( "Optical Sources.ML725C8F" )
'Load the analysis grid structure into the T_ANALYSIS variable Dim ana As T_ANALYSIS LoadAnalysis anaID, ana
'Trace rays DeleteRays TraceCreate
'Create ARN of Irradiance at fiber and determine total power Dim fiberPower As Double Dim numRays As Long, arnNode As Long numRays = IrradianceToARN( anaID, "FiberPower", arnNode ) fiberPower = ARNComputeTotalPower( arnNode )
'Quantities needed in the fiber coupling analysis Dim wavelength As Double, n_core As Double, n_clad As Double, r As Double Dim core_mat_id As Long, clad_mat_id As Long wavelength = 1.31 core_mat_id = FindMaterial( "Fiber Core" ) clad_mat_id = FindMaterial( "Fiber Cladding" ) n_core = RefractiveIndex ( core_mat_id, wavelength ) n_clad = RefractiveIndex ( clad_mat_id, wavelength ) r = 0.005 'mm
'Calculate fiber coupling coefficients Dim count As Long Dim coupleReal As Double, coupleImag As Double, CE As Double count = FiberCoupleStepIndex( coupleReal, coupleImag, surfID, -1, ana, r, n_core, n_clad ) CE = coupleReal*coupleReal + coupleImag*coupleImag
'Calculate power coupling coefficient by multipling power by the coupling coefficient Dim modePower As Double modePower = fiberPower * CE
End Sub
See Also
|