Xyce  6.1
N_DEV_BJT.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // Copyright Notice
3 //
4 // Copyright 2002 Sandia Corporation. Under the terms
5 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
6 // Government retains certain rights in this software.
7 //
8 // Xyce(TM) Parallel Electrical Simulator
9 // Copyright (C) 2002-2015 Sandia Corporation
10 //
11 // This program is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 //-----------------------------------------------------------------------------
24 
25 //-----------------------------------------------------------------------------
26 // Filename : $RCSfile: N_DEV_BJT.h,v $
27 //
28 // Purpose :
29 //
30 // Special Notes :
31 //
32 // Creator : Eric R. Keiter, SNL, Parallel Computational Sciences
33 //
34 // Creation Date : 02/28/00
35 //
36 // Revision Information:
37 // ---------------------
38 //
39 // Revision Number: $Revision: 1.175 $
40 //
41 // Revision Date : $Date: 2015/09/25 21:19:47 $
42 //
43 // Current Owner : $Author: rlschie $
44 //-----------------------------------------------------------------------------
45 
46 
47 #ifndef Xyce_N_DEV_BJT_H
48 #define Xyce_N_DEV_BJT_H
49 
50 // ---------- Standard Includes ----------
51 
52 // ---------- Xyce Includes ----------
53 #include <N_DEV_Configuration.h>
54 #include <N_DEV_DeviceMaster.h>
55 #include <N_DEV_DeviceInstance.h>
56 #include <N_DEV_DeviceModel.h>
57 #include <N_DEV_DeviceBlock.h>
58 #include <N_DEV_Param.h>
59 
60 namespace Xyce {
61 namespace Device {
62 namespace BJT {
63 
64 class Model;
65 class Instance;
66 
67 typedef Sacado::Fad::SFad<double, 1> fadType;
68 
69 template <typename ScalarT>
70 inline ScalarT Xycemax ( ScalarT f1, ScalarT f2) { return f1 > f2 ? f1 : f2; }
71 
72 template <typename ScalarT>
73 inline ScalarT Xycemin ( ScalarT f1, ScalarT f2) { return f1 < f2 ? f1 : f2; }
74 
75 /// general sensitivity functor for all instance params.
77 {
78  public:
80  baseSensitivity() {};
81 
83 
84  virtual void operator()(
85  const ParameterBase &entity,
86  const std::string &param,
87  std::vector<double> & dfdp,
88  std::vector<double> & dqdp,
89  std::vector<double> & dbdp,
90  std::vector<int> & Findices,
91  std::vector<int> & Qindices,
92  std::vector<int> & Bindices
93  ) const ;
94 };
95 
96 /// general sensitivity functor for all model params.
98 {
99  public:
101  baseSensitivity() {};
102 
103  virtual ~bjtModelSensitivity() {};
104 
105  virtual void operator()(
106  const ParameterBase &entity,
107  const std::string &param,
108  std::vector<double> & dfdp,
109  std::vector<double> & dqdp,
110  std::vector<double> & dbdp,
111  std::vector<int> & Findices,
112  std::vector<int> & Qindices,
113  std::vector<int> & Bindices
114  ) const ;
115 };
116 
119 
120 struct Traits : public DeviceTraits<Model, Instance>
121 {
122  static const char *name() {return "Bipolar Junction Transistor";}
123  static const char *deviceTypeName() {return "Q level 1";}
124  static int numNodes() {return 3;}
125  static int numOptionalNodes() {return 4;}
126  static int numFillNodes() {return 1;}
127  static bool modelRequired() {return true;}
128  static bool isLinearDevice() {return false;}
129 
130  static Device *factory(const Configuration &configuration, const FactoryBlock &factory_block);
131  static void loadModelParameters(ParametricData<Model> &model_parameters);
132  static void loadInstanceParameters(ParametricData<Instance> &instance_parameters);
133 };
134 
135 template <typename ScalarT>
136 bool updateTemperature(
137  // inputs
138  // instance
139  const ScalarT & TEMP,
140 
141  // model
142  const ScalarT & TNOM,
143  const ScalarT & energyGap,
144  const ScalarT & tempExpIS,
145  const ScalarT & betaExp,
146  const ScalarT & potBE,
147  const ScalarT & depCapBE,
148  const ScalarT & juncExpBE,
149  const ScalarT & depCapBC,
150  const ScalarT & juncExpBC,
151  const ScalarT & depCapCoeff,
152  const ScalarT & satCur,
153  const ScalarT & betaF,
154  const ScalarT & betaR,
155 
156  const ScalarT & c2,
157  const ScalarT & c4,
158  bool c2Given,
159  bool c4Given,
160 
161  bool leakBECurrentGiven,
162  bool leakBCCurrentGiven,
163 
164  const ScalarT & leakBEEmissionCoeff,
165  const ScalarT & leakBCEmissionCoeff,
166 
167  const ScalarT & rollOffExp,
168  const ScalarT & baseResist,
169  const ScalarT & collectorResist,
170  const ScalarT & emitterResist,
171  const ScalarT & potBC,
172  const ScalarT & rollOffF,
173  const ScalarT & rollOffR,
174  const ScalarT & earlyVoltF,
175  const ScalarT & earlyVoltR,
176 
177  // outputs
178  ScalarT & vt,
179  ScalarT & leakBECurrent,
180  ScalarT & leakBCCurrent,
181  ScalarT & tBELeakCur,
182  ScalarT & tBCLeakCur,
183  ScalarT & tleakBEEmissionCoeff,
184  ScalarT & tleakBCEmissionCoeff,
185 
186  ScalarT & tRollOffExp,
187  ScalarT & tInvRollOffF,
188  ScalarT & tInvRollOffR,
189  ScalarT & tBaseResist,
190  ScalarT & tCollectorResist,
191  ScalarT & tEmitterResist,
192 
193  ScalarT & tBECap,
194  ScalarT & tBEPot,
195  ScalarT & tBCCap,
196  ScalarT & tBCPot,
197  ScalarT & tDepCap,
198  ScalarT & tF1,
199  ScalarT & tF4,
200  ScalarT & tF5,
201  ScalarT & tVCrit,
202  ScalarT & tSatCur,
203  ScalarT & tBetaF,
204  ScalarT & tBetaR,
205  ScalarT & tInvEarlyVoltF,
206  ScalarT & tInvEarlyVoltR
207  );
208 
209 template <typename ScalarT>
210 bool processParams(
211  // inputs
212  bool leakBECurrentGiven,
213  bool leakBCCurrentGiven,
214  bool c2Given,
215  bool c4Given,
216  bool minBaseResistGiven,
217  bool VAFgiven,
218  bool IKFgiven,
219  bool VARgiven,
220  bool IKRgiven,
221  bool VTFgiven,
222  bool FCgiven,
223 
224  const ScalarT & c2,
225  const ScalarT & c4,
226  const ScalarT & satCur,
227  const ScalarT & baseResist,
228  const ScalarT & earlyVoltF,
229  const ScalarT & rollOffF,
230  const ScalarT & earlyVoltR,
231  const ScalarT & rollOffR,
232 
233  const ScalarT & collectorResist,
234  const ScalarT & emitterResist,
235  const ScalarT & transTimeFVBC,
236  const ScalarT & excessPhase,
237  const ScalarT & transTimeF,
238  const ScalarT & juncExpBE,
239  const ScalarT & juncExpBC,
240 
241  //outputs
242  ScalarT & leakBECurrent,
243  ScalarT & leakBCCurrent,
244  ScalarT & minBaseResist,
245  ScalarT & invEarlyVoltF,
246  ScalarT & invRollOffF,
247  ScalarT & invEarlyVoltR,
248  ScalarT & invRollOffR,
249 
250  ScalarT & collectorConduct,
251  ScalarT & emitterConduct,
252  ScalarT & transTimeVBCFac,
253  ScalarT & excessPhaseFac,
254  ScalarT & depCapCoeff,
255 
256  ScalarT & f2,
257  ScalarT & f3,
258  ScalarT & f6,
259  ScalarT & f7
260  );
261 
262 template <typename ScalarT>
264  const ScalarT & td,
265  const ScalarT & qB,
266  const ScalarT & iBE,
267  bool dcopFlag,
268  bool beginIntegrationFlag,
269  double * currStaVec,
270  double * lastStaVec,
271  const int li_istateCEXBC
272  )
273 {};
274 
275 template <>
277  const fadType & td,
278  const fadType & qB,
279  const fadType & iBE,
280  bool dcopFlag,
281  bool beginIntegrationFlag,
282  double * currStaVec,
283  double * lastStaVec,
284  const int li_istateCEXBC
285  );
286 
287 
288 template <>
290  const double & td,
291  const double & qB,
292  const double & iBE,
293  bool dcopFlag,
294  bool beginIntegrationFlag,
295  double * currStaVec,
296  double * lastStaVec,
297  const int li_istateCEXBC
298  );
299 
300 template <typename ScalarT>
302  (const ScalarT & td,
303  const ScalarT & qB,
304  const ScalarT & iBE,
305  const ScalarT & gBE,
306 
307  const double dt0, //dt0 = getSolverState().currTimeStep;
308  const double dt1, //dt1 = getSolverState().lastTimeStep;
309 
310  bool dcopFlag,
311  bool beginIntegrationFlag,
312 
313  double * nextStaVec, // raw pointers fine here
314  const double * currStaVec, // raw pointers fine here
315  const double * lastStaVec, // raw pointers fine here
316 
317  const int li_istateCEXBC,
318 
319  ScalarT & iEX,
320  ScalarT & gEX,
321  ScalarT & iC_local)
322 {};
323 
324 
325 template <>
327  (const fadType & td,
328  const fadType & qB,
329  const fadType & iBE,
330  const fadType & gBE,
331 
332  const double dt0, //dt0 = getSolverState().currTimeStep;
333  const double dt1, //dt1 = getSolverState().lastTimeStep;
334 
335  bool dcopFlag,
336  bool beginIntegrationFlag,
337 
338  double * nextStaVec, // raw pointers fine here
339  const double * currStaVec, // raw pointers fine here
340  const double * lastStaVec, // raw pointers fine here
341 
342  const int li_istateCEXBC,
343 
344  fadType & iEX,
345  fadType & gEX,
346  fadType & iC_local);
347 
348 template <>
350  (const double & td,
351  const double & qB,
352  const double & iBE,
353  const double & gBE,
354 
355  const double dt0, //dt0 = getSolverState().currTimeStep;
356  const double dt1, //dt1 = getSolverState().lastTimeStep;
357 
358  bool dcopFlag,
359  bool beginIntegrationFlag,
360 
361  double * nextStaVec, // raw pointers fine here
362  const double * currStaVec, // raw pointers fine here
363  const double * lastStaVec, // raw pointers fine here
364 
365  const int li_istateCEXBC,
366 
367  double & iEX,
368  double & gEX,
369  double & iC_local);
370 
371 template <typename ScalarT>
372 void auxDAECalculations (
373  const ScalarT & i_fx,
374  const ScalarT & td,
375  const ScalarT & iBE,
376  const ScalarT & iBEleak,
377  const ScalarT & iBC,
378  const ScalarT & iBCleak,
379  const ScalarT & qB,
380  const ScalarT & invqB,
381  const ScalarT & tBetaF,
382  const ScalarT & tBetaR,
383 
384  const ScalarT & gBC,
385  const ScalarT & gBE,
386 
387  const ScalarT & dqBdvBp,
388  const ScalarT & dqBdvCp,
389  const ScalarT & dqBdvEp,
390 
391  bool dcopFlag,
392 
393  ScalarT & iCE,
394  ScalarT & iC,
395  ScalarT & iB,
396  ScalarT & iE,
397 
398  ScalarT & diCEdvBp,
399  ScalarT & diCEdvCp,
400  ScalarT & diCEdvEp,
401 
402  ScalarT & diBEdvBp,
403  ScalarT & diBEdvCp,
404  ScalarT & diBEdvEp
405  );
406 
407 template <typename ScalarT>
409  (
410  // inputs:
411  const ScalarT & vBE,
412  const ScalarT & vBC,
413  const ScalarT & vBX,
414  const ScalarT & vCS,
415 
416  const ScalarT & i_fx,
417 
418  // instance params:
419  const ScalarT & AREA,
420 
421  // instance variables:
422  const ScalarT & tSatCur,
423  const ScalarT & vt,
424  const ScalarT & tleakBEEmissionCoeff,
425  const ScalarT & tleakBCEmissionCoeff,
426  const ScalarT & tBELeakCur,
427  const ScalarT & tBCLeakCur,
428  const ScalarT & tInvRollOffF,
429  const ScalarT & tInvRollOffR,
430  const ScalarT & tRollOffExp,
431  const ScalarT & tInvEarlyVoltF,
432  const ScalarT & tInvEarlyVoltR,
433  const ScalarT & tBECap,
434  const ScalarT & tBCCap,
435  const ScalarT & tDepCap,
436  const ScalarT & tBEPot,
437  const ScalarT & tBCPot,
438  const ScalarT & tF1,
439  const ScalarT & tF4,
440  const ScalarT & tF5,
441 
442  // from device options:
443  const double & gmin,
444  const bool newExcessPhase,
445 
446  // from solver state:
447  const bool dcopFlag,
448  const bool tranopFlag,
449  const bool acopFlag,
450  const bool initTranFlag,
451  const bool beginIntegrationFlag,
452  const int newtonIter,
453  const double pdt,
454 
455  // model params:
456  const ScalarT & emissionCoeffF,
457  const ScalarT & emissionCoeffR,
458  const ScalarT & baseFracBCCap,
459  const ScalarT & CJS,
460  const ScalarT & depCapCoeff,
461  const ScalarT & potBC,
462  const ScalarT & transTimeF,
463  const ScalarT & transTimeR,
464  const ScalarT & transTimeBiasCoeffF,
465  const ScalarT & transTimeVBCFac,
466  const ScalarT & transTimeHighCurrF,
467  const ScalarT & juncExpBE,
468  const ScalarT & juncExpBC,
469  const ScalarT & potSubst,
470  const ScalarT & expSubst,
471 
472  const ScalarT & emitterConduct,
473  const ScalarT & collectorConduct,
474  const ScalarT & minBaseResist,
475  const ScalarT & baseResist,
476  const ScalarT & baseCurrHalfResist,
477 
478  const ScalarT & excessPhaseFac,
479 
480  // model params from processParams:
481  const ScalarT & f2,
482  const ScalarT & f3,
483  const ScalarT & f6,
484  const ScalarT & f7,
485 
486  const int level,
487 
488  // these are here b/c of the excess phase old-DAE form
489  double * nextStaVec,
490  double * currStaVec,
491  double * lastStaVec,
492  const int li_istateCEXBC,
493  const double dt0, // getSolverState().currTimeStep,
494  const double dt1, // getSolverState().lastTimeStep,
495 
496  // outputs:
497  ScalarT & iB,
498  ScalarT & iC,
499  ScalarT & iE,
500 
501  ScalarT & iBE,
502  ScalarT & gBE,
503  ScalarT & iBC,
504  ScalarT & gBC,
505  ScalarT & iCE,
506  ScalarT & iBEleak,
507  ScalarT & gBEleak,
508  ScalarT & iBCleak,
509  ScalarT & gBCleak,
510  ScalarT & qB,
511  ScalarT & invqB,
512  ScalarT & iBEhighCurr,
513  ScalarT & gBEhighCurr,
514 
515  ScalarT & capeqCB,
516  ScalarT & geqCB,
517 
518  ScalarT & qBEdep,
519  ScalarT & capBEdep,
520  ScalarT & qBEdiff,
521  ScalarT & capBEdiff,
522 
523  ScalarT & qBCdep,
524  ScalarT & capBCdep,
525  ScalarT & qBCdiff,
526  ScalarT & capBCdiff,
527 
528  ScalarT & qBX,
529  ScalarT & capBX,
530  ScalarT & qCS,
531  ScalarT & capCS,
532 
533  ScalarT & gEpr,
534  ScalarT & gCpr,
535  ScalarT & gX,
536 
537  ScalarT & diBrdvB,
538  ScalarT & diBrdvCp,
539  ScalarT & diBrdvEp,
540  ScalarT & diBrdvBp,
541 
542  ScalarT & diCEdvEp,
543  ScalarT & diCEdvCp,
544  ScalarT & diCEdvBp,
545 
546  ScalarT & diBEdvBp,
547  ScalarT & diBEdvCp,
548  ScalarT & diBEdvEp,
549 
550  ScalarT & gBEtot,
551  ScalarT & gBCtot,
552  ScalarT & tBetaF,
553  ScalarT & tBetaR
554  );
555 
556 
557 //-----------------------------------------------------------------------------
558 // Class : Instance
559 // Purpose : This class refers to a single instance of the BJT
560 // device. It contains indices into the matrix equation.
561 // See the comments for the ResistorInstance class for
562 // more details.
563 //
564 // The bjt will have 4 external nodes: collector, base,
565 // emitter, and substrate, and 3 internal nodes:
566 // collectorPrime, basePrime, and emitterPrime.
567 // Special Notes :
568 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
569 // Creation Date : 3/16/00
570 //-----------------------------------------------------------------------------
571 
572 class Instance : public DeviceInstance
573 {
574  friend class ParametricData<Instance>;
575  friend class Model;
576  friend class Traits;
577  friend class Master;
579  friend class bjtModelSensitivity;
580 
581  // functions
582 public:
583 
584  Instance(
585  const Configuration & configuration,
586  const InstanceBlock & IB,
587  Model & it_MB,
588  const FactoryBlock & factory_block);
589 
590  ~Instance();
591 
592 private:
593  Instance(const Instance &);
594  Instance &operator=(const Instance &);
595 
596 public:
597  void registerLIDs( const std::vector<int> & intLIDVecRef,
598  const std::vector<int> & extLIDVecRef );
599  void registerStateLIDs( const std::vector<int> & stateLIDVecRef );
600  void registerStoreLIDs( const std::vector<int> & stoLIDVecRef);
601  virtual void registerBranchDataLIDs(const std::vector<int> & branchLIDVecRef);
602 
603  void loadNodeSymbols(Util::SymbolTable &symbol_table) const; // override
604 
605  const std::vector< std::vector<int> > & jacobianStamp() const;
606  void registerJacLIDs( const std::vector< std::vector<int> > & jacLIDVec );
607 
608  bool processParams ();
609  bool updateTemperature (const double & temp = -999.0 );
610  bool lambertWCurrent (double &Id, double &Gd, double Vd, double Vte, double Isat);
611 
612  bool updateIntermediateVars ();
613  bool updatePrimaryState ();
614  bool updateSecondaryState ();
615 
616  int getNumNoiseSources () const;
617  void setupNoiseSources (Xyce::Analysis::NoiseData & noiseData);
618  void getNoiseSources (Xyce::Analysis::NoiseData & noiseData);
619 
620  void loadErrorWeightMask ();
621 
622 #ifdef Xyce_DEBUG_EXCESS_PHASE
623  bool plotfileFlag () {return true;}
624 #else
625  bool plotfileFlag () {return false;}
626 #endif
627 
630  (double & iEX, double & gEX, double & iC_local);
631 
632  // load functions, residual:
633  bool loadDAEQVector ();
634  bool loadDAEFVector ();
635 
636  void auxDAECalculations ();
637 
638  // load functions, Jacobian:
639  bool loadDAEdQdx ();
640  bool loadDAEdFdx ();
641 
642  // Debugging Excess Phase function:
643  bool outputPlotFiles(bool force_final_output);
644 
645  void setupPointers();
646 
647 protected:
648 private:
649 
650  //attributes
651 public:
652  //iterator reference to the BJT model which owns this instance.
653  // Getters and setters
655  {
656  return model_;
657  }
658 
659 private:
660 
661  Model & model_; //< Owning model
662 
663  //external instance params
664  double AREA; // The normalized emitter area (AREA)
665  double icVBE; // the inital base-emitter voltage (ICVBE)
666  double icVCE; // the inital collector-emitter voltage (ICVCE)
667  double TEMP; // instance temperature (TEMP)
668  bool OFF; // initial mode of operation (OFF)
670  bool IC_GIVEN;
672  bool offFlag;
673 
674  //generated instance params
675  double vt; //thermal junc. volt.
676  double tSatCur; //saturation current (temp. adj.)
677  double tBetaF; //forward beta (temp. adj.)
678  double tBetaR; //reverse beta (temp. adj.)
679  double tBELeakCur; //BE leakage current (temp. adj.)
680  double tBCLeakCur; //BC leakage current (temp. adj.)
681  double tBECap; //BE capacitance (temp. adj.)
682  double tBCCap; //BC capacitance (temp. adj.)
683  double tBEPot; //BE potential (temp. adj.)
684  double tBCPot; //BC potential (temp. adj.)
685  double tDepCap; //join pt in diode curve (temp. adj.)
686  double tF1; //polynomial coeff. (temp. adj.)
687  double tF4; //polynomial coeff. (temp. adj.)
688  double tF5; //polynomial coeff. (temp. adj.)
689  double tVCrit; //critical voltage (temp. adj.)
690 
691  // additional temperature-adjusted parameters
694  double tRollOffExp;
695  double tInvRollOffF;
696  double tInvRollOffR;
699  double tBaseResist;
702 
703  //generated intermediate variables
704  double vEEp; // e-e' voltage
705  double vBBp; // b-b' voltage
706  double vCCp; // c-c' voltage
707 
708  double vBE; // b'-e' voltage
709  double vBC; // b'-c' voltage
710  double vBX; // b-c' voltage
711  double vCS; // c'-s voltage
712 
713  double vBE_old; // b'-e' voltage, from previous newton step.
714  double vBC_old; // b'-c' voltage, from previous newton step.
715 
716  double vBE_orig; // b'-e' voltage, before pinning.
717  double vBC_orig; // b'-c' voltage, before pinning.
718 
719  double qB; // Base charge factor
720  double invqB; // inverse of qB
721  double dqBdvEp; // d(qB)/d(vE')
722  double dqBdvBp; // d(qB)/d(vB')
723  double dqBdvCp; // d(qB)/d(vC')
724 
725  double iBE; // b-e current (not including capacitors)
726  double iBC; // b-c current (not including capacitors)
727  double iBEleak;
728  double iBCleak;
729  double iCE; // c-e current
730 
731  double iB; // total current to base
732  double iC; // total current to collector
733  double iE; // total current to emitter
734 
735  // high current versions of iBE, gBE.
736  double iBEhighCurr;
737  double gBEhighCurr;
738 
739  double gBE;
740  double gBC;
741  double gBEleak;
742  double gBCleak;
743 
744  double gEpr; // conductance for e-e' resistance
745  double gCpr; // conductance for c-c' resistance
746 
747  double gX; // conductance for b-b' resistance
748 
749  double geqCB; // high current forward transit effect (conductance)
750  double capeqCB; // high current forward transit effect (capacitance)
751 
752  // Partial derivatives that originally were local to load function
753  double diBrdvB;
754  double diBrdvEp;
755  double diBrdvCp;
756  double diBrdvBp;
757  double diCEdvEp;
758  double diCEdvCp;
759  double diCEdvBp;
760  double diBEdvEp;
761  double diBEdvCp;
762  double diBEdvBp;
763 
764  double gBEtot;
765  double gBCtot;
766 
767  //state variables
768  double qBEdiff; // charge in the b-e diffusion capacitor
769  double iBEdiff; // current through the b-e diffusion capacitor
770  double capBEdiff; // capacitance for b-e diffusion capacitor
771  double qBEdep; // charge in the b-e depletion capacitor
772  double iBEdep; // current through the b-e diffusion capacitor
773  double capBEdep; // capacitance for b-e depletion capacitor
774  double qCS; // charge in the c-s capacitor
775  double iCS; // current through the c-s capacitor
776  double capCS; // capacitance for c-s capacitor
777  double qBCdiff; // charge in the b-c diffusion capacitor
778  double iBCdiff; // current through the b-c diffusion capacitor
779  double capBCdiff; // capacitance for b-c diffusion capacitor
780  double qBCdep; // charge in the b-c depletion capacitor
781  double iBCdep; // current through the b-c depletion capacitor
782  double capBCdep; // capacitance for b-c depletion capacitor
783  double qBX; // charge in the b-cP capacitor
784  double iBX; // current through the b-cP capacitor
785  double capBX; // capacitance for b-cP capacitor
786 
787  //local indexing of solution and state variables
788  int li_Coll;
789  int li_CollP;
790  int li_Base;
791  int li_BaseP;
792  int li_Emit;
793  int li_EmitP;
794  int li_Subst;
795 
796  //new variables for full new DAE integration of excess phase term
797  int li_Ifx;
798  int li_dIfx;
799 
806 
807  // for the "old" excess phase calculation.
809 
810  // stored data for limiting and lead currents.
818 
819  // branch data vector indexes for lead currents and power
820  /* int li_branchvBE; */
821  /* int li_branchvBC; */
822  /* int li_branch_capeqCB; */
827 
828  //conductance values
829  double gcpr;
830  double gepr;
831  double gx;
832  double gm;
833  double go;
834  double gmu;
835  double gpi;
836  double gccs;
837  double geqbx;
838  double geqbc;
839 
840  // excess phase variables
841  double nextCexbc;
842  double currCexbc;
843  double lastCexbc;
844  double phaseScalar;
845  double dt0,dt1;
846 
847  // Offset variables corresponding to the above declared indices.
872 
873  //new offsets for full new DAE integration of excess phase term
876 
877  // ERK. These 3 are only needed for dcop.
881 
884 
890 
891 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
892  // f-matrix pointers:
917 
918  //new offsets for full new DAE integration of excess phase term
921 
922  // ERK. These 3 are only needed for dcop.
926 
929 
935 
936 
937  // q-matrix pointers:
962 
963  //new offsets for full new DAE integration of excess phase term
966 
967  // ERK. These 3 are only needed for dcop.
971 
974 
980 #endif
981 
982 
983  static std::vector< std::vector<int> > jacStamp_RB_RC_RE_;
984  static std::vector< std::vector<int> > jacStamp_RB_RC_;
985  static std::vector< std::vector<int> > jacStamp_RB_RE_;
986  static std::vector< std::vector<int> > jacStamp_RC_RE_;
987  static std::vector< std::vector<int> > jacStamp_RB_;
988  static std::vector< std::vector<int> > jacStamp_RC_;
989  static std::vector< std::vector<int> > jacStamp_RE_;
990  static std::vector< std::vector<int> > jacStamp_;
991 
992  static std::vector<int> jacMap_RB_RC_RE_;
993  static std::vector<int> jacMap_RB_RC_;
994  static std::vector<int> jacMap_RB_RE_;
995  static std::vector<int> jacMap_RC_RE_;
996  static std::vector<int> jacMap_RB_;
997  static std::vector<int> jacMap_RC_;
998  static std::vector<int> jacMap_RE_;
999  static std::vector<int> jacMap_;
1000 
1001  static std::vector< std::vector<int> > jacMap2_RB_RC_RE_;
1002  static std::vector< std::vector<int> > jacMap2_RB_RC_;
1003  static std::vector< std::vector<int> > jacMap2_RB_RE_;
1004  static std::vector< std::vector<int> > jacMap2_RC_RE_;
1005  static std::vector< std::vector<int> > jacMap2_RB_;
1006  static std::vector< std::vector<int> > jacMap2_RC_;
1007  static std::vector< std::vector<int> > jacMap2_RE_;
1008  static std::vector< std::vector<int> > jacMap2_;
1009 
1011 };
1012 
1013 //-----------------------------------------------------------------------------
1014 // Class : Model
1015 // Purpose :
1016 // Special Notes :
1017 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
1018 // Creation Date : 3/16/00
1019 //-----------------------------------------------------------------------------
1020 class Model : public DeviceModel
1021 {
1022  typedef std::vector<Instance *> InstanceVector;
1023 
1024  friend class ParametricData<Model>;
1025  friend class Instance;
1026  friend class Traits;
1027  friend class Master;
1029  friend class bjtModelSensitivity;
1030 
1031 public:
1032  Model(
1033  const Configuration & configuration,
1034  const ModelBlock & MB,
1035  const FactoryBlock & factory_block);
1036 
1037  ~Model();
1038 
1039 private:
1040  Model();
1041  Model(const Model &);
1042  Model &operator=(const Model &);
1043 
1044 public:
1045  void updateIntermediateParams();
1046 
1047  virtual void forEachInstance(DeviceInstanceOp &op) const /* override */;
1048 
1049  virtual std::ostream &printOutInstances(std::ostream &os) const;
1050 
1051  bool processParams ();
1052  bool processInstanceParams ();
1053 
1054 
1055 public:
1056  void addInstance(Instance *instance)
1057  {
1058  instanceContainer.push_back(instance);
1059  }
1060 
1061 private:
1062  std::vector<Instance*> instanceContainer;
1063 
1064 private:
1065 
1066  //external model params
1067  int TYPE; //+1 = NPN, -1 = PNP
1068  double TNOM; //nominal temperature
1069  double satCur; //Saturation Current (IS)
1070 
1071  double betaF; //forward beta (BF)
1072  bool BFgiven; // given flag for forward beta (spice/Pspice)
1073  bool BFMgiven; // given flag for forward beta (hspice)
1074  double emissionCoeffF; //forward current emmission coeff (NF)
1075  double earlyVoltF; //forward early voltage (VAF)
1076  bool VAgiven; // given flag for fwd early voltage (Hspice/Pspice)
1077  bool VAFgiven; // given flag for fwd early voltage (Spice)
1078  bool VBFgiven; // given flag for fwd early voltage (Hspice)
1079 
1080  double rollOffF; //forward high current roll-off (IKF)
1081  bool IKFgiven; // given flag for high current roll-off (spice)
1082  bool IKgiven; // given flag for high current roll-off (pspice/hspice)
1083  bool JBFgiven; // given flag for high current roll-off (hspice)
1084 
1085  double leakBECurrent; //BE leakage saturation current (ISE)
1086  double leakBEEmissionCoeff;//BE leakage emission coeff. (NE)
1087  bool NEgiven; // given flag for leakage emission coef.(NE) (spice/pspice)
1088  bool NLEgiven; // given flag for leakage emission coef.(NLE) (hspice)
1089 
1090  double betaR; // reverse beta (BR)
1091  bool BRgiven; // given flag for reverse beta, BR (spice/pspice)
1092  bool BRMgiven; // given flag for reverse beta, BR (hspice)
1093 
1094  double emissionCoeffR; // reverse current emmission coeff (NR)
1095  double earlyVoltR; // reverse early voltage (VAR/VB/VRB/BV)
1096  bool VARgiven; // given flag for reverse early voltage(VAR) (spice)
1097  bool VBgiven; // given flag for reverse early voltage(VB) (pspice/hspice)
1098  bool VRBgiven; // given flag for reverse early voltage(VRB) (hspice)
1099  bool BVgiven; // given flag for reverse early voltage(BV) (hspice)
1100 
1101 
1102  double rollOffR; //reverse high current roll-off (IKR)
1103  bool IKRgiven; // given flag for reverse high current roll-off (IKR) (spice)
1104  bool JBRgiven; // given flag for reverse high current roll-off (JBR) (Hspice)
1105  double leakBCCurrent; //BC leakage saturation current (ISC)
1106  double leakBCEmissionCoeff;//BC leakage emission coeff. (NC)
1107 
1108  double baseResist; //zero bias base resistance (RB)
1109  double baseCurrHalfResist; //current for 1/2 base resistance (IRB)
1110  bool IRBgiven; // given flag for 1/2 base resist. (IRB, spice)
1111  bool JRBgiven; // given flag for 1/2 base resist. (JRB, spice)
1112  bool IOBgiven; // given flag for 1/2 base resist. (IOB, spice)
1113 
1114  double minBaseResist; //min base resistance for high current (RBM)
1115  double emitterResist; //emitter resistance (RE)
1116  double collectorResist; //collector resistance (RC)
1117 
1118  double depCapBE; //BE zero bias depletion capacitance (CJE)
1119  double potBE; //BE built-in potential (VJE)
1120  bool VJEgiven; // given flag for BE built-in potential (VJE,spice)
1121  bool PEgiven; // given flag for BE built-in potential (PE,pspice, hspice)
1122 
1123  double juncExpBE; //BE junction exponential factor (MJE)
1124  bool MJEgiven; // given flag for BE exponential factor (MJE,spice)
1125  bool MEgiven; // given flag for BE exponential factor (ME,pspice, hspice)
1126 
1127  double transTimeF; //ideal forward transit time (TF)
1128  double transTimeBiasCoeffF;//bias dependent coefficient for TF (XTF)
1129  double transTimeFVBC; //VBC dependence for TF (VTF)
1130  double transTimeHighCurrF; //high current parameter for TF (ITF)
1131  bool ITFgiven; // given flag for ITF (spice)
1132  bool JTFgiven; // given flag for JTF (hspice)
1133  bool VTFgiven; // given flag for VTF
1134  double excessPhase; //excess phase at freq=1.0/(TF*2PI) Hz (PTF)
1135 
1136  double depCapBC; //BC zero bias depletion capacitance (CJC)
1137  double potBC; //BC built-in potential (VJC)
1138  bool VJCgiven; // given flag for BC built-in potential (VJE,spice)
1139  bool PCgiven; // given flag for BC built-in potential (PE,pspice, hspice)
1140 
1141  double juncExpBC; //BC junction exponential factor (MJC)
1142  bool MJCgiven; // given flag for BC exponential factor (MJC,spice)
1143  bool MCgiven; // given flag for BC exponential factor (MC,pspice, hspice)
1144 
1145  double baseFracBCCap; //fraction of BC cap. to int. base node (XCJC)
1146  bool XCJCgiven; // given flag for spice/pspice.
1147  bool CDISgiven; // given flag for hspice
1148 
1149  double transTimeR; //ideal reverse transit time (TR)
1150 
1151  double CJS; //zero-bias coll-subst capacitance (CJS)
1152  bool CJSgiven; //zero-bias coll-subst capacitance (CJS) given flag (spice)
1153  bool CCSgiven; //zero-bias coll-subst capacitance (CCS) given flag (Pspice/Hspice)
1154  bool CSUBgiven; //zero-bias coll-subst capacitance (CSUB) given flag (Hspice)
1155 
1156  double potSubst; //substrate junction built-in potential (VJS)
1157  bool VJSgiven; // given flag for spice format (VJS)
1158  bool PSgiven; // given flag for spice format (PS)
1159  bool PSUBgiven; // given flag for spice format (PSUB)
1160 
1161  double expSubst; //subst. junction exponential factor (MJS)
1162  bool MJSgiven; // given flag for spice format (MJS)
1163  bool MSgiven; // given flag for spice format (MS)
1164  bool ESUBgiven; // given flag for spice format (ESUB)
1165 
1166  double betaExp; //beta temperature exponent (XTB)
1167  bool XTBgiven; // given for spice/pspice
1168  bool TBgiven; // given for hspice
1169  bool TCBgiven; // given for hspice
1170 
1171  double energyGap; //energy gap for temp. effect on IS (EG)
1172  double tempExpIS; //temp. exponent for IS (XTI)
1173  bool XTIgiven; // given for spice/hspice
1174  bool PTgiven; // given for pspice
1175 
1176  double depCapCoeff; //coeff. for fwd bias depletion cap. (FC)
1177  double fNCoeff; //flicker-noise coeff. (KF)
1178  double fNExp; //flicker-noise exponent (AF)
1179 
1180  double rollOffExp; //Pspice high-current rolloff parameter (NK)
1181 
1182  bool FCgiven; // given flag for FC
1183  bool NKgiven; // spice/pspice
1184  bool NKFgiven; // hspice
1185 
1186  double c2;
1187  double c4;
1188 
1189  bool leakBECurrentGiven; // specified as ISE (spice)
1190  bool JLEgiven; // hspice version of leakBECurrent
1191  bool leakBCCurrentGiven; // specified as ISC (spice)
1192  bool JLCgiven; // hspice version of leakBCCurrent
1193 
1194  bool c2Given;
1195  bool c4Given;
1197 
1198  //generated model params
1199  double invEarlyVoltF; //inverse of fwd early voltage
1200  double invEarlyVoltR; //inverse of rvs early voltage
1201  double invRollOffF; //inverse of fwd high curr. roll-off
1202  double invRollOffR; //inverse of rvs high curr. roll-off
1203  double collectorConduct; //collector conductance
1204  double emitterConduct; //emitter conductance
1205  double transTimeVBCFac; //VBC transit time factor
1206  double excessPhaseFac; //excess phase factor
1207 
1208  double f2;
1209  double f3;
1210  double f6;
1211  double f7;
1212 };
1213 
1214 
1215 //-----------------------------------------------------------------------------
1216 // Class : Master
1217 // Purpose :
1218 // Special Notes :
1219 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
1220 // Creation Date : 11/26/08
1221 //-----------------------------------------------------------------------------
1222 class Master : public DeviceMaster<Traits>
1223 {
1224 public:
1226  const Configuration & configuration,
1227  const FactoryBlock & factory_block,
1228  const SolverState & ss1,
1229  const DeviceOptions & do1)
1230  : DeviceMaster<Traits>(configuration, factory_block, ss1, do1)
1231  {}
1232 
1233  virtual bool updateState (double * solVec, double * staVec, double * stoVec);
1234  virtual bool updateSecondaryState (double * staDeriv, double * stoVec);
1235 
1236  // load functions, residual:
1237  virtual bool loadDAEVectors (double * solVec, double * fVec, double * qVec, double * bVec, double * storeLeadF, double * storeLeadQ, double * leadF, double * leadQ, double * junctionV);
1238 
1239  // load functions, Jacobian:
1240  virtual bool loadDAEMatrices (Linear::Matrix & dFdx, Linear::Matrix & dQdx);
1241 
1242  friend class Instance;
1243  friend class Traits;
1244  friend class Model;
1245 };
1246 
1247 void registerDevice();
1248 
1249 } // namespace BJT
1250 } // namespace Device
1251 } // namespace Xyce
1252 
1253 #endif
static std::vector< std::vector< int > > jacMap2_RB_RC_RE_
Definition: N_DEV_BJT.h:1001
const std::vector< std::vector< int > > & jacobianStamp() const
Definition: N_DEV_BJT.C:1570
Instance(const Configuration &configuration, const InstanceBlock &IB, Model &it_MB, const FactoryBlock &factory_block)
Definition: N_DEV_BJT.C:822
static std::vector< int > jacMap_RB_RE_
Definition: N_DEV_BJT.h:994
Pure virtual class to augment a linear system.
virtual bool updateSecondaryState(double *staDeriv, double *stoVec)
Updates the devices secondary state information.
Definition: N_DEV_BJT.C:4284
Master(const Configuration &configuration, const FactoryBlock &factory_block, const SolverState &ss1, const DeviceOptions &do1)
Definition: N_DEV_BJT.h:1225
bool updateIntermediateVars(const ScalarT &vBE, const ScalarT &vBC, const ScalarT &vBX, const ScalarT &vCS, const ScalarT &i_fx, const ScalarT &AREA, const ScalarT &tSatCur, const ScalarT &vt, const ScalarT &tleakBEEmissionCoeff, const ScalarT &tleakBCEmissionCoeff, const ScalarT &tBELeakCur, const ScalarT &tBCLeakCur, const ScalarT &tInvRollOffF, const ScalarT &tInvRollOffR, const ScalarT &tRollOffExp, const ScalarT &tInvEarlyVoltF, const ScalarT &tInvEarlyVoltR, const ScalarT &tBECap, const ScalarT &tBCCap, const ScalarT &tDepCap, const ScalarT &tBEPot, const ScalarT &tBCPot, const ScalarT &tF1, const ScalarT &tF4, const ScalarT &tF5, const double &gmin, const bool newExcessPhase, const bool dcopFlag, const bool tranopFlag, const bool acopFlag, const bool initTranFlag, const bool beginIntegrationFlag, const int newtonIter, const double pdt, const ScalarT &emissionCoeffF, const ScalarT &emissionCoeffR, const ScalarT &baseFracBCCap, const ScalarT &CJS, const ScalarT &depCapCoeff, const ScalarT &potBC, const ScalarT &transTimeF, const ScalarT &transTimeR, const ScalarT &transTimeBiasCoeffF, const ScalarT &transTimeVBCFac, const ScalarT &transTimeHighCurrF, const ScalarT &juncExpBE, const ScalarT &juncExpBC, const ScalarT &potSubst, const ScalarT &expSubst, const ScalarT &emitterConduct, const ScalarT &collectorConduct, const ScalarT &minBaseResist, const ScalarT &baseResist, const ScalarT &baseCurrHalfResist, const ScalarT &excessPhaseFac, const ScalarT &f2, const ScalarT &f3, const ScalarT &f6, const ScalarT &f7, const int level, double *nextStaVec, double *currStaVec, double *lastStaVec, const int li_istateCEXBC, const double dt0, const double dt1, ScalarT &iB, ScalarT &iC, ScalarT &iE, ScalarT &iBE, ScalarT &gBE, ScalarT &iBC, ScalarT &gBC, ScalarT &iCE, ScalarT &iBEleak, ScalarT &gBEleak, ScalarT &iBCleak, ScalarT &gBCleak, ScalarT &qB, ScalarT &invqB, ScalarT &iBEhighCurr, ScalarT &gBEhighCurr, ScalarT &capeqCB, ScalarT &geqCB, ScalarT &qBEdep, ScalarT &capBEdep, ScalarT &qBEdiff, ScalarT &capBEdiff, ScalarT &qBCdep, ScalarT &capBCdep, ScalarT &qBCdiff, ScalarT &capBCdiff, ScalarT &qBX, ScalarT &capBX, ScalarT &qCS, ScalarT &capCS, ScalarT &gEpr, ScalarT &gCpr, ScalarT &gX, ScalarT &diBrdvB, ScalarT &diBrdvCp, ScalarT &diBrdvEp, ScalarT &diBrdvBp, ScalarT &diCEdvEp, ScalarT &diCEdvCp, ScalarT &diCEdvBp, ScalarT &diBEdvBp, ScalarT &diBEdvCp, ScalarT &diBEdvEp, ScalarT &gBEtot, ScalarT &gBCtot, ScalarT &tBetaF, ScalarT &tBetaR)
Definition: N_DEV_BJT.C:5383
void registerDevice()
Definition: N_DEV_BJT.C:4728
static std::vector< std::vector< int > > jacStamp_RB_RC_
Definition: N_DEV_BJT.h:984
Model & operator=(const Model &)
Base class for all parameters.
Definition: N_DEV_Pars.h:169
static std::vector< std::vector< int > > jacStamp_RB_RC_RE_
Definition: N_DEV_BJT.h:983
void registerJacLIDs(const std::vector< std::vector< int > > &jacLIDVec)
Definition: N_DEV_BJT.C:1616
static std::vector< int > jacMap_RE_
Definition: N_DEV_BJT.h:998
static std::vector< int > jacMap_RB_RC_
Definition: N_DEV_BJT.h:993
std::vector< Instance * > InstanceVector
Definition: N_DEV_BJT.h:1022
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
Definition: N_DEV_BJT.C:4722
void loadNodeSymbols(Util::SymbolTable &symbol_table) const
Populates and returns the store name map.
Definition: N_DEV_BJT.C:1445
void registerLIDs(const std::vector< int > &intLIDVecRef, const std::vector< int > &extLIDVecRef)
Definition: N_DEV_BJT.C:1326
static std::vector< std::vector< int > > jacStamp_RB_RE_
Definition: N_DEV_BJT.h:985
static std::vector< std::vector< int > > jacStamp_RE_
Definition: N_DEV_BJT.h:989
ScalarT Xycemax(ScalarT f1, ScalarT f2)
Definition: N_DEV_BJT.h:70
general sensitivity functor for all model params.
Definition: N_DEV_BJT.h:97
void auxDAECalculations(const ScalarT &i_fx, const ScalarT &td, const ScalarT &iBE, const ScalarT &iBEleak, const ScalarT &iBC, const ScalarT &iBCleak, const ScalarT &qB, const ScalarT &invqB, const ScalarT &tBetaF, const ScalarT &tBetaR, const ScalarT &gBC, const ScalarT &gBE, const ScalarT &dqBdvBp, const ScalarT &dqBdvCp, const ScalarT &dqBdvEp, bool dcopFlag, ScalarT &iCE, ScalarT &iC, ScalarT &iB, ScalarT &iE, ScalarT &diCEdvBp, ScalarT &diCEdvCp, ScalarT &diCEdvEp, ScalarT &diBEdvBp, ScalarT &diBEdvCp, ScalarT &diBEdvEp)
Definition: N_DEV_BJT.C:5279
DeviceMaster instantiates a device as described by the device traits T.
void registerStoreLIDs(const std::vector< int > &stoLIDVecRef)
Definition: N_DEV_BJT.C:1519
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
static std::vector< int > jacMap_RC_
Definition: N_DEV_BJT.h:997
static std::vector< std::vector< int > > jacMap2_RE_
Definition: N_DEV_BJT.h:1007
void setupNoiseSources(Xyce::Analysis::NoiseData &noiseData)
Definition: N_DEV_BJT.C:2645
virtual void operator()(const ParameterBase &entity, const std::string &param, std::vector< double > &dfdp, std::vector< double > &dqdp, std::vector< double > &dbdp, std::vector< int > &Findices, std::vector< int > &Qindices, std::vector< int > &Bindices) const
Definition: N_DEV_BJT.C:5996
static std::vector< int > jacMap_
Definition: N_DEV_BJT.h:999
static std::vector< std::vector< int > > jacStamp_RB_
Definition: N_DEV_BJT.h:987
static std::vector< std::vector< int > > jacStamp_RC_RE_
Definition: N_DEV_BJT.h:986
general sensitivity functor for all instance params.
Definition: N_DEV_BJT.h:76
virtual void registerBranchDataLIDs(const std::vector< int > &branchLIDVecRef)
Definition: N_DEV_BJT.C:1549
bool processParams(bool leakBECurrentGiven, bool leakBCCurrentGiven, bool c2Given, bool c4Given, bool minBaseResistGiven, bool VAFgiven, bool IKFgiven, bool VARgiven, bool IKRgiven, bool VTFgiven, bool FCgiven, const ScalarT &c2, const ScalarT &c4, const ScalarT &satCur, const ScalarT &baseResist, const ScalarT &earlyVoltF, const ScalarT &rollOffF, const ScalarT &earlyVoltR, const ScalarT &rollOffR, const ScalarT &collectorResist, const ScalarT &emitterResist, const ScalarT &transTimeFVBC, const ScalarT &excessPhase, const ScalarT &transTimeF, const ScalarT &juncExpBE, const ScalarT &juncExpBC, ScalarT &leakBECurrent, ScalarT &leakBCCurrent, ScalarT &minBaseResist, ScalarT &invEarlyVoltF, ScalarT &invRollOffF, ScalarT &invEarlyVoltR, ScalarT &invRollOffR, ScalarT &collectorConduct, ScalarT &emitterConduct, ScalarT &transTimeVBCFac, ScalarT &excessPhaseFac, ScalarT &depCapCoeff, ScalarT &f2, ScalarT &f3, ScalarT &f6, ScalarT &f7)
Definition: N_DEV_BJT.C:4925
static std::vector< std::vector< int > > jacMap2_RB_RE_
Definition: N_DEV_BJT.h:1003
Sacado::Fad::SFad< double, 1 > fadType
Definition: N_DEV_BJT.h:65
static std::vector< std::vector< int > > jacMap2_RB_
Definition: N_DEV_BJT.h:1005
void oldDAEExcessPhaseCalculation1(const ScalarT &td, const ScalarT &qB, const ScalarT &iBE, bool dcopFlag, bool beginIntegrationFlag, double *currStaVec, double *lastStaVec, const int li_istateCEXBC)
Definition: N_DEV_BJT.h:263
static std::vector< int > jacMap_RB_
Definition: N_DEV_BJT.h:996
static bool modelRequired()
Definition: N_DEV_BJT.h:127
The Device class is an interface for device implementations.
Definition: N_DEV_Device.h:101
bool processInstanceParams()
processInstanceParams
Definition: N_DEV_BJT.C:3706
static const char * deviceTypeName()
Definition: N_DEV_BJT.h:123
virtual std::ostream & printOutInstances(std::ostream &os) const
Definition: N_DEV_BJT.C:4167
virtual void forEachInstance(DeviceInstanceOp &op) const
Apply a device instance "op" to all instances associated with this model.
Definition: N_DEV_BJT.C:4209
virtual bool loadDAEMatrices(Linear::Matrix &dFdx, Linear::Matrix &dQdx)
Populates the device's Jacobian object with these pointers.
Definition: N_DEV_BJT.C:4506
static bjtModelSensitivity bjtModelSens
Definition: N_DEV_BJT.h:118
virtual bool updateState(double *solVec, double *staVec, double *stoVec)
Updates the devices state information.
Definition: N_DEV_BJT.C:4228
static int numFillNodes()
Definition: N_DEV_BJT.h:126
bool updateTemperature(const double &temp=-999.0)
Definition: N_DEV_BJT.C:1863
Class Configuration contains device configuration data.
void addInstance(Instance *instance)
Definition: N_DEV_BJT.h:1056
static const char * name()
Definition: N_DEV_BJT.h:122
virtual bool loadDAEVectors(double *solVec, double *fVec, double *qVec, double *bVec, double *storeLeadF, double *storeLeadQ, double *leadF, double *leadQ, double *junctionV)
Populates the device's ExternData object with these pointers.
Definition: N_DEV_BJT.C:4315
static std::vector< std::vector< int > > jacStamp_RC_
Definition: N_DEV_BJT.h:988
static bool isLinearDevice()
Definition: N_DEV_BJT.h:128
virtual void operator()(const ParameterBase &entity, const std::string &param, std::vector< double > &dfdp, std::vector< double > &dqdp, std::vector< double > &dbdp, std::vector< int > &Findices, std::vector< int > &Qindices, std::vector< int > &Bindices) const
Definition: N_DEV_BJT.C:6499
void getNoiseSources(Xyce::Analysis::NoiseData &noiseData)
Definition: N_DEV_BJT.C:2700
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
Definition: N_DEV_BJT.C:73
std::vector< Instance * > instanceContainer
Definition: N_DEV_BJT.h:1062
bool updateTemperature( const ScalarT &TEMP, const ScalarT &TNOM, const ScalarT &energyGap, const ScalarT &tempExpIS, const ScalarT &betaExp, const ScalarT &potBE, const ScalarT &depCapBE, const ScalarT &juncExpBE, const ScalarT &depCapBC, const ScalarT &juncExpBC, const ScalarT &depCapCoeff, const ScalarT &satCur, const ScalarT &betaF, const ScalarT &betaR, const ScalarT &c2, const ScalarT &c4, bool c2Given, bool c4Given, bool leakBECurrentGiven, bool leakBCCurrentGiven, const ScalarT &leakBEEmissionCoeff, const ScalarT &leakBCEmissionCoeff, const ScalarT &rollOffExp, const ScalarT &baseResist, const ScalarT &collectorResist, const ScalarT &emitterResist, const ScalarT &potBC, const ScalarT &rollOffF, const ScalarT &rollOffR, const ScalarT &earlyVoltF, const ScalarT &earlyVoltR, ScalarT &vt, ScalarT &leakBECurrent, ScalarT &leakBCCurrent, ScalarT &tBELeakCur, ScalarT &tBCLeakCur, ScalarT &tleakBEEmissionCoeff, ScalarT &tleakBCEmissionCoeff, ScalarT &tRollOffExp, ScalarT &tInvRollOffF, ScalarT &tInvRollOffR, ScalarT &tBaseResist, ScalarT &tCollectorResist, ScalarT &tEmitterResist, ScalarT &tBECap, ScalarT &tBEPot, ScalarT &tBCCap, ScalarT &tBCPot, ScalarT &tDepCap, ScalarT &tF1, ScalarT &tF4, ScalarT &tF5, ScalarT &tVCrit, ScalarT &tSatCur, ScalarT &tBetaF, ScalarT &tBetaR, ScalarT &tInvEarlyVoltF, ScalarT &tInvEarlyVoltR)
Definition: N_DEV_BJT.C:4744
static std::vector< std::vector< int > > jacMap2_
Definition: N_DEV_BJT.h:1008
static int numOptionalNodes()
Definition: N_DEV_BJT.h:125
static std::vector< int > jacMap_RB_RC_RE_
Definition: N_DEV_BJT.h:992
bool lambertWCurrent(double &Id, double &Gd, double Vd, double Vte, double Isat)
Definition: N_DEV_BJT.C:2038
void registerStateLIDs(const std::vector< int > &stateLIDVecRef)
Definition: N_DEV_BJT.C:1493
void oldDAEExcessPhaseCalculation2(double &iEX, double &gEX, double &iC_local)
Definition: N_DEV_BJT.C:2789
void oldDAEExcessPhaseCalculation2(const ScalarT &td, const ScalarT &qB, const ScalarT &iBE, const ScalarT &gBE, const double dt0, const double dt1, bool dcopFlag, bool beginIntegrationFlag, double *nextStaVec, const double *currStaVec, const double *lastStaVec, const int li_istateCEXBC, ScalarT &iEX, ScalarT &gEX, ScalarT &iC_local)
Definition: N_DEV_BJT.h:302
static std::vector< int > jacMap_RC_RE_
Definition: N_DEV_BJT.h:995
bool processParams()
processParams
Definition: N_DEV_BJT.C:3625
Base sensitivity functor.
Definition: N_DEV_Pars.h:148
ModelBlock represents a .MODEL line from the netlist.
bool outputPlotFiles(bool force_final_output)
Definition: N_DEV_BJT.C:3552
The DeviceTraits template describes the configuration of a device.
Manages parameter binding for class C.
Definition: N_DEV_Pars.h:214
InstanceBlock represent a device instance line from the netlist.
static std::vector< std::vector< int > > jacStamp_
Definition: N_DEV_BJT.h:990
int getNumNoiseSources() const
Definition: N_DEV_BJT.C:2632
static std::vector< std::vector< int > > jacMap2_RB_RC_
Definition: N_DEV_BJT.h:1002
ScalarT Xycemin(ScalarT f1, ScalarT f2)
Definition: N_DEV_BJT.h:73
static std::vector< std::vector< int > > jacMap2_RC_
Definition: N_DEV_BJT.h:1006
static std::vector< std::vector< int > > jacMap2_RC_RE_
Definition: N_DEV_BJT.h:1004
static bjtInstanceSensitivity bjtInstanceSens
Definition: N_DEV_BJT.h:117
static void loadModelParameters(ParametricData< Model > &model_parameters)
Definition: N_DEV_BJT.C:116
Instance & operator=(const Instance &)