47 #include <Xyce_config.h>
54 #include <N_ERH_ErrorMgr.h>
61 #include <N_UTL_Math.h>
95 myReactionName(right.myReactionName)
135 std::vector<double> &concs,
136 std::vector<double> &constant_vec)
165 double C0,
double t0,
185 myReactionName(right.myReactionName)
224 std::vector<double> &concs,
225 std::vector<double> &constant_vec)
253 double N,
double Energy,
254 double C0,
double t0,
277 myReactionName(right.myReactionName)
304 return(
K_f*exp(-
E/KbT));
316 std::vector<double> &concs,
317 std::vector<double> &constant_vec)
320 return(
K_f*exp(-
E/KbT));
349 double C0,
double t0,
370 myReactionName(right.myReactionName)
408 std::vector<double> &concs,
409 std::vector<double> &constant_vec)
443 std::vector<Specie> &VariableSpecies, std::vector<Specie> &ConstantSpecies,
444 std::vector< std::pair<int,double> > &Reactants,
445 double iC0,
double t0,
double x0)
447 coulombAttraction(false)
454 if ( ! ((Reactants.size() == 1 && Reactants[0].second == 2.0) ||
455 (Reactants.size() == 2 && Reactants[0].second == 1.0 &&
456 Reactants[1].second == 1.0)))
458 Report::UserError msg;
459 msg <<
"Invalid attempt to use complex rate method. This method is only valid for binary complexing reactions:\n";
460 if (Reactants.size() == 1)
462 msg <<
" Only one reactant specified, but its stoichimetric coefficient is not 2.";
464 else if (Reactants.size() == 2)
466 msg <<
" Two reactants specified, but both stoichimetric coefficient are not 1.";
470 msg <<
" More than two reactants specified.";
474 if (Reactants[0].first >= 0)
475 Specie1 = &(VariableSpecies[Reactants[0].first]);
477 Specie1 = &(ConstantSpecies[-(Reactants[0].first+1)]);
480 if (Reactants.size() == 1)
486 if (Reactants[1].first >= 0)
487 Specie2 = &(VariableSpecies[Reactants[1].first]);
489 Specie2 = &(ConstantSpecies[-(Reactants[1].first+1)]);
532 reaction_distance_factor(right.reaction_distance_factor),
534 Specie1(right.Specie1),
535 Specie2(right.Specie2),
536 classC0(right.classC0),
537 coulombAttraction(right.coulombAttraction),
538 myReactionName(right.myReactionName)
594 std::vector<double> &concs,
595 std::vector<double> &constant_vec)
644 std::vector<Specie> &VariableSpecies, std::vector<Specie> &ConstantSpecies,
645 std::vector< std::pair<int,double> > &Reactants,
646 double C0,
double t0,
double x0,
double mult)
654 if ( ! ((Reactants.size() == 1 && Reactants[0].second == 2.0) ||
655 (Reactants.size() == 2 && Reactants[0].second == 1.0 &&
656 Reactants[1].second == 1.0)))
658 Report::UserError msg;
659 msg <<
"Invalid attempt to use complex rate method. This method is only valid for binary complexing reactions:\n";
660 if (Reactants.size() == 1)
662 msg <<
" Only one reactant specified, but its stoichimetric coefficient is not 2.";
664 else if (Reactants.size() == 2)
666 msg <<
" Two reactants specified, but both stoichimetric coefficient are not 1.";
670 msg <<
" More than two reactants specified.";
674 if (Reactants[0].first >= 0)
675 Specie1 = &(VariableSpecies[Reactants[0].first]);
677 Specie1 = &(ConstantSpecies[-(Reactants[0].first+1)]);
680 if (Reactants.size() == 1)
686 if (Reactants[1].first >= 0)
687 Specie2 = &(VariableSpecies[Reactants[1].first]);
689 Specie2 = &(ConstantSpecies[-(Reactants[1].first+1)]);
735 reaction_distance_factor(right.reaction_distance_factor),
737 Specie1(right.Specie1),
738 Specie2(right.Specie2),
739 myReactionName(right.myReactionName)
785 std::vector<double> &concs,
786 std::vector<double> &constant_vec)
829 std::vector<Specie> &VariableSpecies, std::vector<Specie> &ConstantSpecies,
830 std::vector< std::pair<int,double> > &Reactants,
831 std::vector< std::pair<int,double> > &Products,
832 double bindingEnergy,
double degenAB,
double degenA,
double degenB,
833 double siliconConcentration,
834 double C0,
double t0,
double x0)
835 :concSi(siliconConcentration),
840 deltaE(bindingEnergy)
847 if ( ! ((Products.size() == 1 && Products[0].second == 2.0) ||
848 (Products.size() == 2 && Products[0].second == 1.0 &&
849 Products[1].second == 1.0)))
851 Report::UserError msg;
852 msg <<
"Invalid attempt to use decomplex rate method. This method is only valid for decomplexing reactions with two products:\n";
853 if (Products.size() == 1)
855 msg <<
" Only one product specified, but its stoichimetric coefficient is not 2.";
857 else if (Products.size() == 2)
859 msg <<
" Two products specified, but both stoichimetric coefficient are not 1.";
863 msg <<
" More than two products specified.";
867 if (Products[0].first >= 0)
868 Specie1 = &(VariableSpecies[Products[0].first]);
870 Specie1 = &(ConstantSpecies[-(Products[0].first+1)]);
873 if (Products.size() == 1)
879 if (Products[1].first >= 0)
880 Specie2 = &(VariableSpecies[Products[1].first]);
882 Specie2 = &(ConstantSpecies[-(Products[1].first+1)]);
924 :Specie1(right.Specie1),
925 Specie2(right.Specie2),
926 reaction_distance_factor(right.reaction_distance_factor),
928 deltaE(right.deltaE),
929 gammaA(right.gammaA),
930 gammaB(right.gammaB),
931 gammaAB(right.gammaAB),
932 concSi(right.concSi),
935 myReactionName(right.myReactionName)
990 std::vector<double> &concs,
991 std::vector<double> &constant_vec)
1039 std::vector<Specie> &VariableSpecies, std::vector<Specie> &ConstantSpecies,
1040 std::vector< std::pair<int,double> > &Reactants,
1041 std::vector< std::pair<int,double> > &Products,
1043 double C0,
double t0,
double x0)
1049 if ( ! (Reactants.size() == 3 && Reactants[0].second == 1.0 &&
1050 Reactants[1].second == 1.0 && Reactants[2].second == 1.0) )
1052 Report::UserError() <<
"Invalid attempt to use rate method. This method is only valid for ternary reactions";
1055 if (Reactants[0].first >= 0)
1056 Specie1 = &(VariableSpecies[Reactants[0].first]);
1058 Specie1 = &(ConstantSpecies[-(Reactants[0].first+1)]);
1061 if (Reactants.size() == 1)
1067 if (Reactants[1].first >= 0)
1068 Specie2 = &(VariableSpecies[Reactants[1].first]);
1070 Specie2 = &(ConstantSpecies[-(Reactants[1].first+1)]);
1075 double carrierThermalVelocity;
1077 if(Reactants[2].first == -1)
1078 carrierThermalVelocity = 20335471.413078606;
1080 carrierThermalVelocity = 16805108.930336751;
1113 :Specie1(right.Specie1),
1114 Specie2(right.Specie2),
1115 reaction_distance_factor(right.reaction_distance_factor),
1172 std::vector<double> &concs,
1173 std::vector<double> &constant_vec)
FDEmissionRateCalculator(double sigma, double Energy, double v, double C0, double t0, double x0)
Rate constant calculator for Electron or Hole emission reaction.
virtual void setScaleFactors(double C0, double t0, double x0)
set concentration, time, and space scale factors (space scale factor is currently unused by any calcu...
ScalarT getDiffusionCoefficient(ScalarT Temperature)
EmissionRateCalculator(double sigma, double v, double N, double Energy, double C0, double t0, double x0)
virtual double rateConstantScaleFactor()
return current scale factor for rate constant
std::string myReactionName
virtual double computeRateConstant(double T)
return rate constant at given temperature
virtual void setScaleFactors(double iC0, double t0, double x0)
set concentration, time, and space scale factors (space scale factor is currently unused by any calcu...
Pure virtual class to augment a linear system.
Rate constant calculator for Electron or Hole emission reaction.
std::string myReactionName
virtual EmissionRateCalculator * Clone()
create a copy of this calculator
virtual void setScaleFactors(double C0, double t0, double x0)
set concentration, time, and space scale factors (space scale factor is currently unused by any calcu...
ComplexRateCalculator(std::vector< Specie > &VariableSpecies, std::vector< Specie > &ConstantSpecies, std::vector< std::pair< int, double > > &Reactants, double C0, double t0, double x0)
virtual double rateConstantScaleFactor()
return current scale factor for rate constant
double reaction_distance_factor
virtual void setScaleFactors(double C0, double t0, double x0)
set concentration, time, and space scale factors (space scale factor is currently unused by any calcu...
virtual void setScaleFactors(double C0, double t0, double x0)
set concentration, time, and space scale factors (space scale factor is currently unused by any calcu...
std::string myReactionName
virtual BourgoinCorbettHoleRateCalculator * Clone()
create a copy of this calculator
double chargeNumberProduct
std::string myReactionName
virtual void setScaleFactors(double C0, double t0, double x0)
set concentration, time, and space scale factors (space scale factor is currently unused by any calcu...
std::string myReactionName
virtual ComplexRateCalculator * Clone()
create a copy of this calculator
virtual SimpleRateCalculator * Clone()
create a copy of this calculator
double chargeNumberProduct
ComplexMultiplierRateCalculator(std::vector< Specie > &VariableSpecies, std::vector< Specie > &ConstantSpecies, std::vector< std::pair< int, double > > &Reactants, double C0, double t0, double x0, double multiplier)
virtual double computeRateConstant(double T)
return rate constant at given temperature
SimpleRateCalculator(double k, double C0, double t0, double x0)
virtual double computeRateConstant(double T)
return rate constant at given temperature
virtual ComplexMultiplierRateCalculator * Clone()
create a copy of this calculator
Rate constant calculator for a irreversible two-species complexing reaction.
virtual double rateConstantScaleFactor()
return current scale factor for rate constant
virtual double computeRateConstant(double T)
return rate constant at given temperature
virtual double computeRateConstant(double T)
return rate constant at given temperature
virtual double rateConstantScaleFactor()
return current scale factor for rate constant
double reaction_distance_factor
std::string myReactionName
double reaction_distance_factor
virtual double rateConstantScaleFactor()
return current scale factor for rate constant
CaptureRateCalculator(double sigma, double v, double C0, double t0, double x0)
double chargeNumberProduct
DecomplexRateCalculator(std::vector< Specie > &VariableSpecies, std::vector< Specie > &ConstantSpecies, std::vector< std::pair< int, double > > &Reactants, std::vector< std::pair< int, double > > &Products, double bindingEnergy, double degenAB, double degenA, double degenB, double siliconConcentration, double C0, double t0, double x0)
virtual void setScaleFactors(double C0, double t0, double x0)
set concentration, time, and space scale factors (space scale factor is currently unused by any calcu...
virtual FDEmissionRateCalculator * Clone()
create a copy of this calculator
virtual double computeRateConstant(double T)
return rate constant at given temperature
virtual double computeRateConstant(double T)
return rate constant at given temperature
Class for trivial, constant rate constant (independent of temperature)
virtual double rateConstantScaleFactor()
return current scale factor for rate constant
BourgoinCorbettHoleRateCalculator(std::vector< Specie > &VariableSpecies, std::vector< Specie > &ConstantSpecies, std::vector< std::pair< int, double > > &Reactants, std::vector< std::pair< int, double > > &Products, double sigma, double C0, double t0, double x0)
virtual double computeRateConstant(double T)
return rate constant at given temperature
double reaction_distance_factor
Rate constant calculator for Electron or Hole capture reaction.
std::string myReactionName
virtual DecomplexRateCalculator * Clone()
create a copy of this calculator
virtual double rateConstantScaleFactor()
return current scale factor for rate constant
virtual double rateConstantScaleFactor()
return current scale factor for rate constant
virtual void setScaleFactors(double C0, double t0, double x0)
set concentration, time, and space scale factors (space scale factor is currently unused by any calcu...
virtual CaptureRateCalculator * Clone()
create a copy of this calculator