BSLAMODE |
BSlabMode |
---|
BSlabWaveguide bend Polarization pol double beta double alpha double k0 Complex gamma Complex neff complex < double > normalization_factor double norm int set_field_coefficients_flag complex < double > C_s complex < double > C_f complex < double > D_f complex < double > D_c int Nr double hr Interval rinterval Cvector d_field_ER Cvector d_field_EY Cvector d_field_EP Cvector d_field_HR Cvector d_field_HY Cvector d_field_HP bool set_d_field_flag |
BSlabMode() BSlabMode( BSlabWaveguide BS) BSlabMode( BSlabWaveguide BS, Polarization bpol) BSlabMode( BSlabWaveguide BS, Polarization bpol, Complex bgamma) void set_field_coefficients() Complex field(Fcomp cp, double r) Complex field(Fcomp cp, double r, double p) Cvector fieldvec(Fcomp cp, int num, double r0, double r1) double field(Fcomp cp, Afo foa, double r) Complex field_cart(Fcomp cp, double x, double z) double totpower(Interval xinterval, double z, int xnodes) double totpower(Interval xinterval) double totpower(double theta) void normalize(double nrm) void profiledata(Fcomp cp, int num, double r0, double r1, char ext0, char ext1) void writeprofile(Fcomp cp, Afo foa, double fac, Interval disp, char ext0, char ext1, int num) void write_def(char ext0, char ext1) void read_def(Polarization p, char ext0, char ext1) void write(FILE *dat) void read(FILE *dat) void mfile(Fcomp cp, Afo foa, double fac, Interval disp, int np, char ext0, char ext1, char pltype) void mfile(Fcomp cp, double fac, Interval disp, int np, char ext0, char ext1, char pltype) complex < double > dispersion_eq(complex < double > z) int secant(complex < double > guess1, complex < double > guess2, double tol, int max_iter, complex < double > *root, int *iter_counter, int *exit_status) bool set_d_field(Interval rinterval_, int Nr_, int message) |
BSlabWaveguide bend
A bent waveguide under consideration
Polarization pol
Polarization of a mode (TE or TM)
double beta
Phase propagation constant of a mode (real part of &gamma)
double alpha
Attenuation constant of a mode (minus of imaginary part of &gamma)
double k0
Vacuume wavenumber corresponding to given vacuum wavelength (= 2&pi/&lambda)
Complex gamma
Complex valued propagation constant of a mode
Complex neff
Effective refractive index (=&gamma/k0)
complex < double > normalization_factor
double norm
int set_field_coefficients_flag
=0 if field coefficients are set, else 1.
complex < double > C_s
complex < double > C_f
complex < double > D_f
complex < double > D_c
Coefficients of mode profiles. More specifically, coefficient of Bessel function of first kind in substrate, of Bessel function of first kind in core, of Bessel function of second kind in core, and of Hankel function of second kind in cladding respectively.
int Nr
double hr
Interval rinterval
Radial interval "rinterval" is divided into "Nr" points with step size "hr".
To speed up computation, bend mode field values on "rinterval" are used.
Cvector d_field_ER
Cvector d_field_EY
Cvector d_field_EP
Cvector d_field_HR
Cvector d_field_HY
Cvector d_field_HP
Vector of discretised bent mode field values (r, y, &theta component of electric field and
magnetic field respectively) on radial interval "rinterval".
bool set_d_field_flag
Default value is false meaning no discretised field available. If set_d_field() is called it is set to true.
BSlabMode()
Default constructor
BSlabMode( BSlabWaveguide BS)
Constructor with initialisation of bent waveguide.
BSlabMode( BSlabWaveguide BS, Polarization bpol)
Constructor with initialisation of bent waveguide and polarization of a mode.
BSlabMode( BSlabWaveguide BS, Polarization bpol, Complex bgamma)
Constructor with initialisation of bent waveguide, polarization of a mode and (complex valued) mode propagation constant.
void set_field_coefficients()
Sets field coefficients of E_y or H_y
Complex field(Fcomp cp, double r)
For a given field component cp, this function gives bent mode profile (complex) value at radial distance r (cp: ER, EY, EP, HR, HY, HP, SR, SY, SP).
Complex field(Fcomp cp, double r, double p)
For a given field component cp, this function gives bent mode profile (complex) value at radial distance r and angular position p (cp: ER, EY, EP, HR, HY, HP, SR, SY, SP).
Cvector fieldvec(Fcomp cp, int num, double r0, double r1)
Store num equidistant values of component cp between r0 and r1 in a vector (cp: ER, EY, EP, HR, HY, HP, SR, SY, SP).
double field(Fcomp cp, Afo foa, double r)
'Realized' field values at radius r (cp: ER, EY, EP, HR, HY, HP, SR, SY, SP; foa: MOD, ORG, REP, IMP, SQR).
Complex field_cart(Fcomp cp, double x, double z)
Field values at position x, z, complex mode profiles (cp: EX - HZ, ER, EP, HR, HP, SX, SY, SZ, SP, SR)
double totpower(Interval xinterval, double z, int xnodes)
Azimuthal component of the Poynting vector numerically integrated over the entire cross section xinterval (in x-direction) at a z position. Numerical integration is carried out over a xinterval, by dividing it into xnodes points.
double totpower(Interval xinterval)
Azimuthal component of the Poynting vector integrated "analytically" over the entire cross section xinterval (in x-direction).
double totpower(double theta)
Azimuthal component of the Poynting vector integrated "analytically" over [0, infinity] (in r-direction) and at anular position theta.
void normalize(double nrm)
Normalize bent modes. To power normalize, set nrm=totpower().
void profiledata(Fcomp cp, int num, double r0, double r1, char ext0, char ext1)
Data file: num equidistant values of component cp between r0 and r1. cp: ER, EY, EP, HR, HY, HP, SR, SY, SP. Output file name ??.
void writeprofile(Fcomp cp, Afo foa, double fac, Interval disp, char ext0, char ext1, int num)
??
void write_def(char ext0, char ext1)
Output to file with default name.
void read_def(Polarization p, char ext0, char ext1)
Input from file with default name.
void write(FILE *dat)
Output to file dat.
void read(FILE *dat)
Input from file dat/
void mfile(Fcomp cp, Afo foa, double fac, Interval disp, int np, char ext0, char ext1, char pltype)
Field profile -> MATLAB .m file.
cp: EX - HZ, ER, EP, HR, HP, SX, SY, SZ, SP, SR
foa: MOD, ORG, REP, IMP, SQR
fac: output factor (typically 1.0 or -1.0)
disp: output region on the x axis
np: number of points in output mesh
ext0, ext1: filename id characters
pltype: 'L': geometry information + plot commands (default)
'V': field, mesh, and plot comand, to be included into *L.m
void mfile(Fcomp cp, double fac, Interval disp, int np, char ext0, char ext1, char pltype)
Complex mode profile -> MATLAB .m file
cp: EX - HZ, ER, EP, HR, HP, SX, SY, SZ, SP, SR
fac: output factor (typically 1.0 or -1.0)
disp: output region on the x axis
np: number of points in output mesh
ext0, ext1: filename id characters
pltype: 'r': real + imaginary part, 'a': amplitude + phase
complex < double > dispersion_eq(complex < double > z)
Dispersion equation for a given bent mode.
int secant(complex < double > guess1, complex < double > guess2, double tol, int max_iter, complex < double > *root, int *iter_counter, int *exit_status)
To find complex root with secant method.
bool set_d_field(Interval rinterval_, int Nr_, int message)
This function discretizes the field profile in the radial direction on the Interval rinterval_ into Nr_. This is useful to speed up the computation of overlap integrals involved in bent-straight waveguide couplers.
message = 0 => Don't show messages.