47 #include <Xyce_config.h>
51 #include <N_UTL_Misc.h>
63 #include <N_ERH_ErrorMgr.h>
152 double C0,
double t0,
221 double N,
double Energy,
222 double C0,
double t0,
268 return(
K_f*exp(-
E/KbT));
300 std::vector<Specie> &VariableSpecies, std::vector<Specie> &ConstantSpecies,
301 std::vector< std::pair<int,double> > &Reactants,
302 double C0,
double t0,
double x0)
307 if ( ! ((Reactants.size() == 1 && Reactants[0].second == 2.0) ||
308 (Reactants.size() == 2 && Reactants[0].second == 1.0 &&
309 Reactants[1].second == 1.0)))
312 msg =
"ComplexRateCalculator: Invalid attempt to use complex rate method.";
313 msg =
" This method is only valid for binary complexing reactions:\n";
314 if (Reactants.size() == 1)
316 msg +=
" Only one reactant specified, but its stoichimetric coefficient is not 2.\n";
318 else if (Reactants.size() == 2)
320 msg +=
" Two reactants specified, but both stoichimetric coefficient are not 1.\n";
324 msg +=
" More than two reactants specified.\n";
328 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL,msg);
331 if (Reactants[0].first >= 0)
332 Specie1 = &(VariableSpecies[Reactants[0].first]);
334 Specie1 = &(ConstantSpecies[-(Reactants[0].first+1)]);
337 if (Reactants.size() == 1)
343 if (Reactants[1].first >= 0)
344 Specie2 = &(VariableSpecies[Reactants[1].first]);
346 Specie2 = &(ConstantSpecies[-(Reactants[1].first+1)]);
379 reaction_distance_factor(right.reaction_distance_factor),
381 Specie1(right.Specie1),
382 Specie2(right.Specie2)
450 std::vector<Specie> &VariableSpecies, std::vector<Specie> &ConstantSpecies,
451 std::vector< std::pair<int,double> > &Reactants,
452 std::vector< std::pair<int,double> > &Products,
453 double bindingEnergy,
double degenAB,
double degenA,
double degenB,
454 double siliconConcentration,
455 double C0,
double t0,
double x0)
456 :concSi(siliconConcentration),
461 deltaE(bindingEnergy)
466 if ( ! ((Products.size() == 1 && Products[0].second == 2.0) ||
467 (Products.size() == 2 && Products[0].second == 1.0 &&
468 Products[1].second == 1.0)))
471 msg =
"DeomplexRateCalculator: Invalid attempt to use decomplex rate method.";
472 msg =
" This method is only valid for decomplexing reactions with two products:\n";
473 if (Products.size() == 1)
475 msg +=
" Only one product specified, but its stoichimetric coefficient is not 2.\n";
477 else if (Products.size() == 2)
479 msg +=
" Two products specified, but both stoichimetric coefficient are not 1.\n";
483 msg +=
" More than two products specified.\n";
487 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL,msg);
490 if (Products[0].first >= 0)
491 Specie1 = &(VariableSpecies[Products[0].first]);
493 Specie1 = &(ConstantSpecies[-(Products[0].first+1)]);
496 if (Products.size() == 1)
502 if (Products[1].first >= 0)
503 Specie2 = &(VariableSpecies[Products[1].first]);
505 Specie2 = &(ConstantSpecies[-(Products[1].first+1)]);
537 :Specie1(right.Specie1),
538 Specie2(right.Specie2),
539 reaction_distance_factor(right.reaction_distance_factor),
541 deltaE(right.deltaE),
542 gammaA(right.gammaA),
543 gammaB(right.gammaB),
544 gammaAB(right.gammaAB),
545 concSi(right.concSi),