• Main Page
  • Related Pages
  • Classes
  • Files
  • File List
  • File Members

SaturableAbsorber.hh

Go to the documentation of this file.
00001 // $Id:
00002 
00003 //###################################################################
00004 //
00005 //           Optical Communication Systems Simulator
00006 //
00007 //       Copyright (2009)
00008 //       Optical Fiber Communications Laboratory (OFCL)
00009 //       Computer Science & Electrical Engineering Department (CSEE)
00010 //       University of Maryland Baltimore County (UMBC)
00011 //
00012 //###################################################################
00013 
00014 #ifndef _SATURABLE_ABSORBER_HH_
00015 #define _SATURABLE_ABSORBER_HH_
00016 
00017 #include "ocsOptSignal.hh"
00018 #include "ocsOptFiberLocalError.hh"
00019 
00020 // Written by John Zweck August 2009.
00021 
00023 
00111 enum typeSaturableAbsorption {NO_SAT_ABS=0,
00112                               QUADRATIC_NO_LOSS_ANALYTIC=1,
00113                               QUADRATIC_NO_LOSS=2,
00114                               QUADRATIC_WITH_LOSS_ANALYTIC=3,
00115                               QUADRATIC_WITH_LOSS=4,
00116                               RATIONAL_QUADRATIC=5,
00117                               COUPLED_ODE=6};
00118 
00119 
00120 class SaturableAbsorber
00121 {
00122    public:
00123 
00124    SaturableAbsorber(string InFileName, OptSignal *oOptSignal2);
00125 
00126    void Apply(double  * PropagatedLength);
00127 
00128    string WriteTypeSaturableAbsorption(void);
00129    string WriteTypeStepSizes(void);
00130 
00131    private:
00132    
00133    void ApplyQuadraticNoLossAnalytic(void);
00134    void ApplyQuadraticWithLossAnalytic(void);
00135 
00136    void ApplyHeunsMethod(void);
00137 
00138    void ApplyHeunsMethodConstantSteps(void);
00139    void ApplyHeunsMethodLocalError(void);
00140 
00141    void ApplyHeunsSingleStep(double StepSizeZ);
00142    void ComputeSAFunction(cplx * U_XIn, cplx * U_YIn, double * SAFOut);
00143 
00144    double RungaKutta4Step(cplx* U_XIn, cplx * U_YIn,
00145                           double x_in, int time_index_in);
00146 
00147    double FastSaturableAbsorptionFunction(cplx u);
00148    double CoupledODESatAbsFunction(double Power,double loss);
00149 
00150    void UpdateTime(void);
00151    void UpdateFreq(void);
00152    void ComputeDeltaZMax(void);
00153    double ComputeRelativeError(void);
00154    void CopyFftMatricesTimeData(fftMatrices * OrigData,
00155                                 fftMatrices * CopyOfData);
00156 
00157 
00158    typeSimulation TypeSimulation;
00159    OptSignal * oOptSignal;
00160    cfftw *fft;
00161    fftMatrices sfftM;
00162    int qtPoints;
00163 
00164    int DebugFlag;
00165 
00167    typeSaturableAbsorption TypeSaturableAbsorption;
00168 
00170 
00171    double SaturableAbsorberLength;
00172 
00177    double FastSaturableAbsorptionNonlinearCoefficient;
00178 
00185    double FastSaturableAbsorptionAttenuationCoefficient;
00186 
00188 
00189    double CoupledODEUnsaturatedNepperLoss;
00190 
00192 
00193    double CoupledODERelaxationTime;
00194 
00196 
00197    double CoupledODESaturationPower;
00198 
00200 
00201    typeStepSizes TypeStepSizes;
00202 
00204    int NumSteps;
00205    
00206    double RelativeErrorGoal;
00207    double DeltaZMaxInfile;
00208    double DeltaZMax;
00209    double DeltaZInitial;
00210    bool InitializedDeltaZInitialFlag;
00211 
00212    fftMatrices sfftM_Start;
00213    fftMatrices sfftM_Coarse;
00214    cplx * LaserWorkX;
00215    cplx * LaserWorkY;
00216 
00217    double * SAF1;
00218    double * SAF2;
00219 
00220 
00221 };
00222 
00223 
00224 
00225 #endif /* _SATURABLE_ABSORBER_HH_ */

Generated on Fri Jul 2 2010 12:57:48 for OCS by  doxygen 1.7.1