16 #include "component.h"
37 #define NP(node) real (getV (node))
38 #define BP(pnode,nnode) (NP(pnode) - NP(nnode))
39 #define _load_static_residual2(pnode,nnode,current)\
40 _rhs[pnode] -= current;\
41 _rhs[nnode] += current;
42 #define _load_static_augmented_residual2(pnode,nnode,current)\
43 _rhs[pnode] -= current;\
44 _rhs[nnode] += current;
45 #define _load_static_residual1(node,current)\
46 _rhs[node] -= current;
47 #define _load_static_augmented_residual1(node,current)\
48 _rhs[node] -= current;
49 #define _load_static_jacobian4(pnode,nnode,vpnode,vnnode,conductance)\
50 _jstat[pnode][vpnode] += conductance;\
51 _jstat[nnode][vnnode] += conductance;\
52 _jstat[pnode][vnnode] -= conductance;\
53 _jstat[nnode][vpnode] -= conductance;\
55 _ghs[pnode] += conductance * BP(vpnode,vnnode);\
56 _ghs[nnode] -= conductance * BP(vpnode,vnnode);\
58 _rhs[pnode] += conductance * BP(vpnode,vnnode);\
59 _rhs[nnode] -= conductance * BP(vpnode,vnnode);\
61 #define _load_static_jacobian2p(node,vpnode,vnnode,conductance)\
62 _jstat[node][vpnode] += conductance;\
63 _jstat[node][vnnode] -= conductance;\
65 _ghs[node] += conductance * BP(vpnode,vnnode);\
67 _rhs[node] += conductance * BP(vpnode,vnnode);\
69 #define _load_static_jacobian2s(pnode,nnode,node,conductance)\
70 _jstat[pnode][node] += conductance;\
71 _jstat[nnode][node] -= conductance;\
73 _ghs[pnode] += conductance * NP(node);\
74 _ghs[nnode] -= conductance * NP(node);\
76 _rhs[pnode] += conductance * NP(node);\
77 _rhs[nnode] -= conductance * NP(node);\
79 #define _load_static_jacobian1(node,vnode,conductance)\
80 _jstat[node][vnode] += conductance;\
82 _ghs[node] += conductance * NP(vnode);\
84 _rhs[node] += conductance * NP(vnode);\
86 #define _load_dynamic_residual2(pnode,nnode,charge)\
87 if (doTR) _charges[pnode][nnode] += charge;\
89 _qhs[pnode] -= charge;\
90 _qhs[nnode] += charge;\
92 #define _load_dynamic_residual1(node,charge)\
93 if (doTR) _charges[node][node] += charge;\
95 _qhs[node] -= charge;\
97 #define _load_dynamic_jacobian4(pnode,nnode,vpnode,vnnode,capacitance)\
99 _jdyna[pnode][vpnode] += capacitance;\
100 _jdyna[nnode][vnnode] += capacitance;\
101 _jdyna[pnode][vnnode] -= capacitance;\
102 _jdyna[nnode][vpnode] -= capacitance;\
105 _caps[pnode][nnode][vpnode][vnnode] += capacitance;\
108 _chs[pnode] += capacitance * BP(vpnode,vnnode);\
109 _chs[nnode] -= capacitance * BP(vpnode,vnnode);\
111 #define _load_dynamic_jacobian2s(pnode,nnode,vnode,capacitance)\
113 _jdyna[pnode][vnode] += capacitance;\
114 _jdyna[nnode][vnode] -= capacitance;\
117 _caps[pnode][nnode][vnode][vnode] += capacitance;\
120 _chs[pnode] += capacitance * NP(vnode);\
121 _chs[nnode] -= capacitance * NP(vnode);\
123 #define _load_dynamic_jacobian2p(node,vpnode,vnnode,capacitance)\
125 _jdyna[node][vpnode] += capacitance;\
126 _jdyna[node][vnnode] -= capacitance;\
129 _caps[node][node][vpnode][vnnode] += capacitance;\
132 _chs[node] += capacitance * BP(vpnode,vnnode);\
134 #define _load_dynamic_jacobian1(node,vnode,capacitance)\
136 _jdyna[node][vnode] += capacitance;\
139 _caps[node][node][vnode][vnode] += capacitance;\
142 _chs[node] += capacitance * NP(vnode);\
145 #define _save_whitenoise1(n1,pwr,type)\
146 _white_pwr[n1][n1] += pwr;
147 #define _save_whitenoise2(n1,n2,pwr,type)\
148 _white_pwr[n1][n2] += pwr;
149 #define _save_flickernoise1(n1,pwr,exp,type)\
150 _flicker_pwr[n1][n1] += pwr;\
151 _flicker_exp[n1][n1] += exp;
152 #define _save_flickernoise2(n1,n2,pwr,exp,type)\
153 _flicker_pwr[n1][n2] += pwr;\
154 _flicker_exp[n1][n2] += exp;
155 #define _load_whitenoise2(n1,n2,pwr)\
156 cy (n1,n2) -= pwr/kB/T0; cy (n2,n1) -= pwr/kB/T0;\
157 cy (n1,n1) += pwr/kB/T0; cy (n2,n2) += pwr/kB/T0;
158 #define _load_whitenoise1(n1,pwr)\
159 cy (n1,n1) += pwr/kB/T0;
160 #define _load_flickernoise2(n1,n2,pwr,exp)\
161 cy (n1,n2) -= pwr*pow(_freq,-exp)/kB/T0;\
162 cy (n2,n1) -= pwr*pow(_freq,-exp)/kB/T0;\
163 cy (n1,n1) += pwr*pow(_freq,-exp)/kB/T0;\
164 cy (n2,n2) += pwr*pow(_freq,-exp)/kB/T0;
165 #define _load_flickernoise1(n1,pwr,exp)\
166 cy (n1,n1) += pwr*pow(_freq,-exp)/kB/T0;
169 #define m00_hypot(v00,x,y) v00 = xhypot(x,y);
170 #define m10_hypot(v10,v00,x,y) v10 = (x)/(v00);
171 #define m11_hypot(v11,v00,x,y) v11 = (y)/(v00);
172 #define m00_max(v00,x,y) v00 = ((x)>(y))?(x):(y);
173 #define m10_max(v10,v00,x,y) v10 = ((x)>(y))?1.0:0.0;
174 #define m11_max(v11,v00,x,y) v11 = ((x)>(y))?0.0:1.0;
175 #define m00_min(v00,x,y) v00 = ((x)<(y))?(x):(y);
176 #define m10_min(v10,v00,x,y) v10 = ((x)<(y))?1.0:0.0;
177 #define m11_min(v11,v00,x,y) v11 = ((x)<(y))?0.0:1.0;
178 #define m00_pow(v00,x,y) v00 = pow(x,y);
179 #define m10_pow(v10,v00,x,y) v10 = (x==0.0)?0.0:(v00)*(y)/(x);
180 #define m11_pow(v11,v00,x,y) v11 = (x==0.0)?0.0:(log(x)*(v00));
182 #define m00_div(v00,v10,x,y) double v10=1/(y); double v00=(x)*v10;
183 #define m10_div(v10,v00,vv,x,y)
184 #define m11_div(v11,v00,vv,x,y) double v11 = -v00*vv;
186 #define m00_mult(v00,v10,v11,x,y) double v10=(x); double v11=(y); double v00=v10*v11;
187 #define m00_add(v00,x,y) double v00=(x)+(y);
189 #define m00_cos(v00,x) v00 = cos(x);
190 #define m10_cos(v10,v00,x) v10 = (-sin(x));
191 #define m00_sin(v00,x) v00 = sin(x);
192 #define m10_sin(v10,v00,x) v10 = (cos(x));
193 #define m00_tan(v00,x) v00 = tan(x);
194 #define m10_tan(v10,v00,x) v10 = (1.0/cos(x)/cos(x));
195 #define m00_cosh(v00,x) v00 = cosh(x);
196 #define m10_cosh(v10,v00,x) v10 = (sinh(x));
197 #define m00_sinh(v00,x) v00 = sinh(x);
198 #define m10_sinh(v10,v00,x) v10 = (cosh(x));
199 #define m00_tanh(v00,x) v00 = tanh(x);
200 #define m10_tanh(v10,v00,x) v10 = (1.0/cosh(x)/cosh(x));
201 #define m00_acos(v00,x) v00 = acos(x);
202 #define m10_acos(v10,v00,x) v10 = (-1.0/sqrt(1-x*x));
203 #define m00_asin(v00,x) v00 = asin(x);
204 #define m10_asin(v10,v00,x) v10 = (+1.0/sqrt(1-x*x));
205 #define m00_atan(v00,x) v00 = atan(x);
206 #define m10_atan(v10,v00,x) v10 = (+1.0/(1+x*x));
207 #define m00_atanh(v00,x) v00 = atanh(x);
208 #define m10_atanh(v10,v00,x) v10 = (+1.0/(1-x*x));
209 #define m00_logE(v00,x) v00 = log(x);
210 #define m10_logE(v10,v00,x) v10 = (1.0/x);
211 #define m00_log10(v00,x) v00 = log10(x);
212 #define m10_log10(v10,v00,x) v10 = (1.0/x/M_LN10);
213 #define m00_sqrt(v00,x) v00 = sqrt(x);
214 #define m10_sqrt(v10,v00,x) v10 = (0.5/v00);
215 #define m00_fabs(v00,x) v00 = fabs(x);
216 #define m10_fabs(v10,v00,x) v10 = (((x)>=0)?(+1.0):(-1.0));
218 #define m00_exp(v00,x) v00 = exp(x);
219 #define m10_exp(v10,v00,x) v10 = v00;
221 #define m00_abs(v00) ((v00)<(0)?(-(v00)):(v00))
222 #define m00_floor(v00,x) v00 = floor(x);
223 #define m00_limexp(v00,x) v00 = ((x)<80.0?exp(x):exp(80.0)*(x-79.0));
224 #define m10_limexp(v10,v00,x) v10 = ((x)<80.0?(v00):exp(80.0));
226 #define m20_logE(v00) (-1.0/v00/v00)
227 #define m20_exp(v00) exp(v00)
228 #define m20_limexp(v00) ((v00)<80.0?exp(v00):0.0)
229 #define m20_sqrt(v00) (-0.25/(v00)/sqrt(v00))
230 #define m20_fabs(v00) 0.0
231 #define m20_pow(x,y) ((y)*((y)-1.0)*pow(x,y)/(x)/(x))
232 #define m00_vt(x) (kBoverQ*(x))
233 #define m10_vt(x) (kBoverQ)
236 #define _modelname "nigbt"
237 #define _instancename getName()
238 #define _circuit_temp (getPropertyDouble("Temp")+273.15)
239 #define _param_given(p) (isPropertyGiven(p)?1:0)
243 #define _vt_nom (kBoverQ*_circuit_temp)
245 using namespace device;
254 void nigbt::initModel (
void)
271 initializeInstance ();
292 void nigbt::initVerilog (
void)
299 for (i1 = 0; i1 < 9; i1++) {
300 for (i2 = 0; i2 < 9; i2++) {
301 _charges[i1][i2] = 0.0;
305 for (i1 = 0; i1 < 9; i1++) {
306 for (i2 = 0; i2 < 9; i2++) {
307 for (i3 = 0; i3 < 9; i3++) {
308 for (i4 = 0; i4 < 9; i4++) {
309 _caps[i1][i2][i3][i4] = 0.0;
313 for (i1 = 0; i1 < 9; i1++) {
318 for (i2 = 0; i2 < 9; i2++) {
319 _jstat[i1][i2] = 0.0;
320 _jdyna[i1][i2] = 0.0;
326 void nigbt::loadVariables (
void)
354 #define _DERIVATEFORDDX
357 void nigbt::initializeModel (
void)
361 #if defined(_DYNAMIC)
368 #if defined(_DYNAMIC)
372 #if defined(_DYNAMIC)
378 double m00_pow(d00_pow0,Tj,1.5)
379 double m00_exp(d00_exp1,(7000.0/Tj))
380 Ni=((3.88e16*d00_pow0)/d00_exp1);
383 double m00_pow(d00_pow0,(300/Tj),0.87)
384 Vnsat=(10.0e6*d00_pow0);
387 double m00_pow(d00_pow0,(300/Tj),0.52)
388 Vpsat=(8.37e6*d00_pow0);
391 double m00_pow(d00_pow0,(Tj/300),1.5)
392 Alpha1=(1.04e21*d00_pow0);
395 double m00_pow(d00_pow0,(Tj/300),2.0)
396 Alpha2=(7.45e13*d00_pow0);
399 double m00_pow(d00_pow0,(Tj/To),(Jsne*A))
400 double m00_exp(d00_exp1,(14000*((1/Tj)-(1/To))))
401 Isne=(((Jsne*A)*d00_pow0)/d00_exp1);
404 double m00_pow(d00_pow0,(To/Tj),Kp)
409 #if defined(_DYNAMIC)
416 void nigbt::initializeInstance (
void)
421 void nigbt::initialStep (
void)
426 void nigbt::finalStep (
void)
431 void nigbt::calcVerilog (
void)
436 #if defined(_DERIVATE)
438 double iNsat_Vvar_Ql_GND;
440 double iNsat_Vvar_Nsat_GND;
441 double iNsat_Vvar_Mucinv_GND;
442 double iNsat_Vvar_dVecdt_GND;
446 #if defined(_DERIVATE)
448 double iQl_Vvar_Nsat_GND;
449 double iQl_Vvar_Ql_GND;
450 double iQl_Vvar_Mucinv_GND;
453 #if defined(_DERIVATE)
454 double iMucinv_Vvar_Ql_GND;
455 double iMucinv_Vvar_Mucinv_GND;
457 double iMucinv_Vvar_Nsat_GND;
459 #if defined(_DYNAMIC)
461 #if defined(_DERIVATE)
463 double Qmult_Vvar_Nsat_GND;
464 double Qmult_Vvar_Ql_GND;
468 #if defined(_DYNAMIC)
470 #if defined(_DERIVATE)
471 double Qcer_Vvar_Ql_GND;
473 double Qcer_Vvar_Nsat_GND;
477 #if defined(_DYNAMIC)
479 #if defined(_DERIVATE)
481 double Qgd_Vvar_Nsat_GND;
485 #if defined(_DERIVATE)
487 double Imult_Vvar_Nsat_GND;
490 double Imult_Vvar_Ql_GND;
491 double Imult_Vvar_Mucinv_GND;
492 double Imult_Vvar_dVecdt_GND;
495 #if defined(_DERIVATE)
497 double Igen_Vvar_Nsat_GND;
500 #if defined(_DERIVATE)
505 #if defined(_DERIVATE)
506 double Ibss_Vvar_Ql_GND;
508 double Ibss_Vvar_Nsat_GND;
511 #if defined(_DERIVATE)
513 double Ic_Vvar_Ql_GND;
515 double Ic_Vvar_Nsat_GND;
516 double Ic_Vvar_Mucinv_GND;
517 double Ic_Vvar_dVecdt_GND;
520 #if defined(_DERIVATE)
522 double Icss_Vvar_Ql_GND;
524 double Icss_Vvar_Nsat_GND;
525 double Icss_Vvar_Mucinv_GND;
528 #if defined(_DERIVATE)
530 double It_Vvar_Ql_GND;
532 double It_Vvar_Nsat_GND;
533 double It_Vvar_Mucinv_GND;
536 #if defined(_DERIVATE)
538 double M_Vvar_Nsat_GND;
541 #if defined(_DERIVATE)
545 #if defined(_DERIVATE)
546 double BVcbo_Vvar_Nsat_GND;
552 #if defined(_DERIVATE)
553 double Rb_Vvar_Ql_GND;
555 double Rb_Vvar_Nsat_GND;
556 double Rb_Vvar_Mucinv_GND;
559 #if defined(_DERIVATE)
561 double Neff_Vvar_Nsat_GND;
562 double Neff_Vvar_Mucinv_GND;
563 double Neff_Vvar_Ql_GND;
566 #if defined(_DERIVATE)
567 double Deltap_Vvar_Ql_GND;
568 double Deltap_Vvar_Mucinv_GND;
570 double Deltap_Vvar_Nsat_GND;
573 #if defined(_DERIVATE)
574 double Plo_Vvar_Ql_GND;
575 double Plo_Vvar_Mucinv_GND;
577 double Plo_Vvar_Nsat_GND;
580 #if defined(_DERIVATE)
582 double Tanh_Vvar_Nsat_GND;
583 double Tanh_Vvar_Mucinv_GND;
586 #if defined(_DERIVATE)
588 double WL2_Vvar_Nsat_GND;
589 double WL2_Vvar_Mucinv_GND;
592 #if defined(_DERIVATE)
594 double WL_Vvar_Nsat_GND;
595 double WL_Vvar_Mucinv_GND;
598 #if defined(_DERIVATE)
599 double L_Vvar_Mucinv_GND;
602 #if defined(_DERIVATE)
603 double Dc_Vvar_Mucinv_GND;
606 #if defined(_DERIVATE)
607 double Mueff_Vvar_Mucinv_GND;
608 double Mueff_Vvar_Ql_GND;
610 double Mueff_Vvar_Nsat_GND;
613 #if defined(_DERIVATE)
614 double Mupc_Vvar_Mucinv_GND;
617 #if defined(_DERIVATE)
618 double Munc_Vvar_Mucinv_GND;
620 #if defined(_DYNAMIC)
622 #if defined(_DERIVATE)
624 double Cgd_Vvar_Nsat_GND;
627 #if defined(_DYNAMIC)
629 #if defined(_DERIVATE)
631 double Cgdj_Vvar_Nsat_GND;
636 #if defined(_DERIVATE)
637 double Ccer_Vvar_Ql_GND;
639 double Ccer_Vvar_Nsat_GND;
642 #if defined(_DERIVATE)
644 double Cbcj_Vvar_Nsat_GND;
648 #if defined(_DERIVATE)
650 double Qb_Vvar_Nsat_GND;
652 #if defined(_DYNAMIC)
654 #if defined(_DERIVATE)
656 double Qds_Vvar_Nsat_GND;
659 #if defined(_DYNAMIC)
661 #if defined(_DERIVATE)
666 #if defined(_DERIVATE)
668 double W_Vvar_Nsat_GND;
671 #if defined(_DERIVATE)
673 double Wbcj_Vvar_Nsat_GND;
676 #if defined(_DYNAMIC)
678 #if defined(_DERIVATE)
680 double Wgdj_Vvar_Nsat_GND;
684 #if defined(_DERIVATE)
685 double Nscl_Vvar_Nsat_GND;
688 #if defined(_DERIVATE)
689 double dVecdt_Vvar_dVecdt_GND;
692 #if defined(_DERIVATE)
693 double Mucinv_Vvar_Mucinv_GND;
696 #if defined(_DERIVATE)
697 double Nsat_Vvar_Nsat_GND;
700 #if defined(_DERIVATE)
701 double Ql_Vvar_Ql_GND;
704 #if defined(_DERIVATE)
708 #if defined(_DERIVATE)
712 #if defined(_DERIVATE)
716 #if defined(_DERIVATE)
720 #if defined(_DERIVATE)
724 #if defined(_DERIVATE)
728 #if defined(_DERIVATE)
732 #if defined(_DERIVATE)
735 #if defined(_DERIVATE)
739 #if defined(_DERIVATE)
743 #if defined(_DERIVATE)
747 #if defined(_DERIVATE)
751 #if defined(_DERIVATE)
755 #if defined(_DERIVATE)
759 #if defined(_DERIVATE)
763 #if defined(_DERIVATE)
767 #if defined(_DERIVATE)
771 #if defined(_DERIVATE)
772 Nsat_Vvar_Nsat_GND=1.0;
775 #if defined(_DERIVATE)
776 Mucinv_Vvar_Mucinv_GND=1.0;
779 #if defined(_DERIVATE)
780 dVecdt_Vvar_dVecdt_GND=1.0;
784 double m00_max(d00_max0,(Nl+Nsat),1
e-20)
785 #if defined(_DERIVATE)
786 double m10_max(d10_max0,d00_max0,(Nl+Nsat),1
e-20)
788 #if defined(_DERIVATE)
789 Nscl_Vvar_Nsat_GND=(d10_max0*Nsat_Vvar_Nsat_GND);
797 #if defined(_DYNAMIC)
799 double m00_sqrt(d00_sqrt0,((((2*1.03594
e-10)*(Vdg+Vtd))/1.602176462
e-19)/Nscl))
800 double
m00_min(d00_min1,d00_sqrt0,Wl)
801 #if defined(_DERIVATE)
802 double m10_sqrt(d10_sqrt0,d00_sqrt0,((((2*1.03594
e-10)*(Vdg+Vtd))/1.602176462
e-19)/Nscl))
803 double
m10_min(d10_min1,d00_min1,d00_sqrt0,Wl)
805 #if defined(_DERIVATE)
806 Wgdj_Vb_G=(d10_min1*((((2*1.03594e-10)*Vdg_Vb_G)/1.602176462e-19)/Nscl)*d10_sqrt0);
807 Wgdj_Vvar_Nsat_GND=(d10_min1*(-(((2*1.03594e-10)*(Vdg+Vtd))/1.602176462
e-19)*Nscl_Vvar_Nsat_GND/Nscl/Nscl)*d10_sqrt0);
815 #if defined(_DYNAMIC)
816 #if defined(_DERIVATE)
818 Wgdj_Vvar_Nsat_GND=0.0;
828 #if defined(_DYNAMIC)
830 double m00_sqrt(d00_sqrt0,((((2*1.03594
e-10)*(Vds+0.6))/1.602176462
e-19)/Nscl))
831 double
m00_min(d00_min1,d00_sqrt0,Wl)
832 #if defined(_DERIVATE)
833 double m10_sqrt(d10_sqrt0,d00_sqrt0,((((2*1.03594
e-10)*(Vds+0.6))/1.602176462
e-19)/Nscl))
834 double
m10_min(d10_min1,d00_min1,d00_sqrt0,Wl)
842 #if defined(_DYNAMIC)
851 double m00_sqrt(d00_sqrt0,((((2*1.03594
e-10)*(Vbc+0.6))/1.602176462
e-19)/Nscl))
852 double
m00_min(d00_min1,d00_sqrt0,Wl)
853 #if defined(_DERIVATE)
854 double m10_sqrt(d10_sqrt0,d00_sqrt0,((((2*1.03594
e-10)*(Vbc+0.6))/1.602176462
e-19)/Nscl))
855 double
m10_min(d10_min1,d00_min1,d00_sqrt0,Wl)
857 #if defined(_DERIVATE)
858 Wbcj_Vb_E=(d10_min1*((((2*1.03594e-10)*Vbc_Vb_E)/1.602176462e-19)/Nscl)*d10_sqrt0);
859 Wbcj_Vvar_Nsat_GND=(d10_min1*(-(((2*1.03594e-10)*(Vbc+0.6))/1.602176462
e-19)*Nscl_Vvar_Nsat_GND/Nscl/Nscl)*d10_sqrt0);
866 #if defined(_DERIVATE)
868 Wbcj_Vvar_Nsat_GND=0.0;
872 #if defined(_DERIVATE)
874 W_Vvar_Nsat_GND=(-Wbcj_Vvar_Nsat_GND);
877 #if defined(_DYNAMIC)
878 #if defined(_DERIVATE)
879 Qgs_VG_E=(Cgs*Vgs_VG_E);
887 #if defined(_DYNAMIC)
889 double m00_sqrt(d00_sqrt0,((((2*1.03594
e-10)*(Vds+0.6))*1.602176462
e-19)*Nscl))
890 #if defined(_DERIVATE)
891 double m10_sqrt(d10_sqrt0,d00_sqrt0,((((2*1.03594
e-10)*(Vds+0.6))*1.602176462
e-19)*Nscl))
893 #if defined(_DERIVATE)
894 Qds_Vb_E=(Ads*((2*1.03594e-10)*Vds_Vb_E)*1.602176462e-19*Nscl*d10_sqrt0);
895 Qds_Vvar_Nsat_GND=(Ads*((((2*1.03594e-10)*(Vds+0.6))*1.602176462
e-19)*Nscl_Vvar_Nsat_GND)*d10_sqrt0);
903 #if defined(_DYNAMIC)
904 #if defined(_DERIVATE)
906 Qds_Vvar_Nsat_GND=0.0;
912 #if defined(_DERIVATE)
913 Qb_Vb_E=((1.602176462e-19*A)*W_Vb_E)*Nscl;
914 Qb_Vvar_Nsat_GND=((((1.602176462e-19*A)*W_Vvar_Nsat_GND)*Nscl)+(((1.602176462
e-19*A)*W)*Nscl_Vvar_Nsat_GND));
916 Qb=(((1.602176462e-19*A)*W)*Nscl);
917 #if defined(_DYNAMIC)
919 double m00_sqrt(d00_sqrt0,((((2*1.03594
e-10)*1.602176462
e-19)*Nl)*0.6))
923 #if defined(_DERIVATE)
924 Cbcj_Vb_E=(-(A*1.03594e-10)*Wbcj_Vb_E/(Wbcj+1
e-20)/(Wbcj+1
e-20));
925 Cbcj_Vvar_Nsat_GND=(-(A*1.03594e-10)*Wbcj_Vvar_Nsat_GND/(Wbcj+1
e-20)/(Wbcj+1
e-20));
927 Cbcj=((A*1.03594e-10)/(Wbcj+1
e-20));
928 #if defined(_DERIVATE)
929 Ccer_Vvar_Ql_GND=((Ql_Vvar_Ql_GND*Cbcj/3)/(Qb+1
e-20));
930 Ccer_Vb_E=((((Ql*Cbcj_Vb_E)/3)*(Qb+1
e-20)-((Ql*Cbcj)/3)*Qb_Vb_E)/(Qb+1
e-20)/(Qb+1
e-20));
931 Ccer_Vvar_Nsat_GND=((((Ql*Cbcj_Vvar_Nsat_GND)/3)*(Qb+1
e-20)-((Ql*Cbcj)/3)*Qb_Vvar_Nsat_GND)/(Qb+1
e-20)/(Qb+1
e-20));
933 Ccer=(((Ql*Cbcj)/3)/(Qb+1
e-20));
934 #if defined(_DYNAMIC)
935 Cdsj=((Ads*1.03594e-10)/(Wdsj+1
e-20));
937 #if defined(_DYNAMIC)
938 #if defined(_DERIVATE)
939 Cgdj_Vb_G=(-(Agd*1.03594e-10)*Wgdj_Vb_G/(Wgdj+1
e-20)/(Wgdj+1
e-20));
940 Cgdj_Vvar_Nsat_GND=(-(Agd*1.03594e-10)*Wgdj_Vvar_Nsat_GND/(Wgdj+1
e-20)/(Wgdj+1
e-20));
942 Cgdj=((Agd*1.03594e-10)/(Wgdj+1
e-20));
948 #if defined(_DYNAMIC)
949 #if defined(_DERIVATE)
951 Cgd_Vvar_Nsat_GND=0.0;
958 #if defined(_DYNAMIC)
959 #if defined(_DERIVATE)
960 Cgd_Vb_G=(((Coxd*Cgdj_Vb_G)*(Coxd+Cgdj)-(Coxd*Cgdj)*Cgdj_Vb_G)/(Coxd+Cgdj)/(Coxd+Cgdj));
961 Cgd_Vvar_Nsat_GND=(((Coxd*Cgdj_Vvar_Nsat_GND)*(Coxd+Cgdj)-(Coxd*Cgdj)*Cgdj_Vvar_Nsat_GND)/(Coxd+Cgdj)/(Coxd+Cgdj));
963 Cgd=((Coxd*Cgdj)/(Coxd+Cgdj));
967 #if defined(_DERIVATE)
968 Munc_Vvar_Mucinv_GND=(-1*Mucinv_Vvar_Mucinv_GND/((1/Mun)+Mucinv)/((1/Mun)+Mucinv));
970 Munc=(1/((1/Mun)+Mucinv));
971 #if defined(_DERIVATE)
972 Mupc_Vvar_Mucinv_GND=(-1*Mucinv_Vvar_Mucinv_GND/((1/Mup)+Mucinv)/((1/Mup)+Mucinv));
974 Mupc=(1/((1/Mup)+Mucinv));
978 #if defined(_DERIVATE)
979 Mueff_Vvar_Mucinv_GND=(Munc_Vvar_Mucinv_GND+(Mupc_Vvar_Mucinv_GND*Ql/(Ql+Qb)));
980 Mueff_Vvar_Ql_GND=(((Mupc*Ql_Vvar_Ql_GND)*(Ql+Qb)-(Mupc*Ql)*Ql_Vvar_Ql_GND)/(Ql+Qb)/(Ql+Qb));
981 Mueff_Vb_E=(-(Mupc*Ql)*Qb_Vb_E/(Ql+Qb)/(Ql+Qb));
982 Mueff_Vvar_Nsat_GND=(-(Mupc*Ql)*Qb_Vvar_Nsat_GND/(Ql+Qb)/(Ql+Qb));
984 Mueff=(Munc+((Mupc*Ql)/(Ql+Qb)));
988 #if defined(_DERIVATE)
989 Mueff_Vvar_Mucinv_GND=Munc_Vvar_Mucinv_GND;
990 Mueff_Vvar_Ql_GND=0.0;
992 Mueff_Vvar_Nsat_GND=0.0;
996 #if defined(_DERIVATE)
997 Dc_Vvar_Mucinv_GND=(((((((2*0.0*
m10_vt(Tj))*Munc)+((2*
m00_vt(Tj))*Munc_Vvar_Mucinv_GND))*Mupc)+(((2*
m00_vt(Tj))*Munc)*Mupc_Vvar_Mucinv_GND))*(Munc+Mupc)-(((2*
m00_vt(Tj))*Munc)*Mupc)*(Munc_Vvar_Mucinv_GND+Mupc_Vvar_Mucinv_GND))/(Munc+Mupc)/(Munc+Mupc));
999 Dc=((((2*
m00_vt(Tj))*Munc)*Mupc)/(Munc+Mupc));
1001 double m00_sqrt(d00_sqrt0,(Dc*Tau))
1002 #if defined(_DERIVATE)
1003 double m10_sqrt(d10_sqrt0,d00_sqrt0,(Dc*Tau))
1005 #if defined(_DERIVATE)
1006 L_Vvar_Mucinv_GND=Dc_Vvar_Mucinv_GND*Tau*d10_sqrt0;
1010 #if defined(_DERIVATE)
1012 WL_Vvar_Nsat_GND=(W_Vvar_Nsat_GND/
L);
1013 WL_Vvar_Mucinv_GND=(-W*L_Vvar_Mucinv_GND/L/
L);
1016 #if defined(_DERIVATE)
1017 WL2_Vb_E=(WL_Vb_E/2);
1018 WL2_Vvar_Nsat_GND=(WL_Vvar_Nsat_GND/2);
1019 WL2_Vvar_Mucinv_GND=(WL_Vvar_Mucinv_GND/2);
1024 #if defined(_DERIVATE)
1025 double m10_tanh(d10_tanh0,d00_tanh0,WL2)
1027 #if defined(_DERIVATE)
1028 Tanh_Vb_E=WL2_Vb_E*d10_tanh0;
1029 Tanh_Vvar_Nsat_GND=WL2_Vvar_Nsat_GND*d10_tanh0;
1030 Tanh_Vvar_Mucinv_GND=WL2_Vvar_Mucinv_GND*d10_tanh0;
1037 #if defined(_DERIVATE)
1038 Plo_Vvar_Ql_GND=(Ql_Vvar_Ql_GND/(((1.602176462e-19*A)*L)*Tanh));
1039 Plo_Vvar_Mucinv_GND=(-Ql*((((1.602176462e-19*A)*L_Vvar_Mucinv_GND)*Tanh)+(((1.602176462
e-19*A)*
L)*Tanh_Vvar_Mucinv_GND))/(((1.602176462
e-19*A)*
L)*Tanh)/(((1.602176462e-19*A)*L)*Tanh));
1040 Plo_Vb_E=(-Ql*(((1.602176462e-19*A)*L)*Tanh_Vb_E)/(((1.602176462
e-19*A)*
L)*Tanh)/(((1.602176462e-19*A)*L)*Tanh));
1041 Plo_Vvar_Nsat_GND=(-Ql*(((1.602176462e-19*A)*L)*Tanh_Vvar_Nsat_GND)/(((1.602176462
e-19*A)*
L)*Tanh)/(((1.602176462e-19*A)*L)*Tanh));
1043 Plo=(Ql/(((1.602176462e-19*A)*L)*Tanh));
1047 #if defined(_DERIVATE)
1048 Plo_Vvar_Ql_GND=0.0;
1049 Plo_Vvar_Mucinv_GND=0.0;
1051 Plo_Vvar_Nsat_GND=0.0;
1061 #if defined(_DERIVATE)
1062 double m10_sinh(d10_sinh0,d00_sinh0,WL2)
1063 double
m10_sinh(d10_sinh1,d00_sinh1,WL)
1065 #if defined(_DERIVATE)
1066 Deltap_Vvar_Ql_GND=(Plo_Vvar_Ql_GND*d00_sinh0/d00_sinh1);
1067 Deltap_Vvar_Mucinv_GND=((((Plo_Vvar_Mucinv_GND*d00_sinh0)+(Plo*WL2_Vvar_Mucinv_GND*d10_sinh0))*d00_sinh1-(Plo*d00_sinh0)*WL_Vvar_Mucinv_GND*d10_sinh1)/d00_sinh1/d00_sinh1);
1068 Deltap_Vb_E=((((Plo_Vb_E*d00_sinh0)+(Plo*WL2_Vb_E*d10_sinh0))*d00_sinh1-(Plo*d00_sinh0)*WL_Vb_E*d10_sinh1)/d00_sinh1/d00_sinh1);
1069 Deltap_Vvar_Nsat_GND=((((Plo_Vvar_Nsat_GND*d00_sinh0)+(Plo*WL2_Vvar_Nsat_GND*d10_sinh0))*d00_sinh1-(Plo*d00_sinh0)*WL_Vvar_Nsat_GND*d10_sinh1)/d00_sinh1/d00_sinh1);
1071 Deltap=((Plo*d00_sinh0)/d00_sinh1);
1076 #if defined(_DERIVATE)
1077 Deltap_Vvar_Ql_GND=0.0;
1078 Deltap_Vvar_Mucinv_GND=0.0;
1080 Deltap_Vvar_Nsat_GND=0.0;
1092 #if defined(_DERIVATE)
1093 double Plo2_Vvar_Ql_GND;
1095 #if defined(_DERIVATE)
1096 double Plo2_Vvar_Mucinv_GND;
1098 #if defined(_DERIVATE)
1101 #if defined(_DERIVATE)
1102 double Plo2_Vvar_Nsat_GND;
1104 #if defined(_DERIVATE)
1107 #if defined(_DERIVATE)
1108 double Con2_Vvar_Nsat_GND;
1110 #if defined(_DERIVATE)
1111 double Con2_Vvar_Mucinv_GND;
1113 #if defined(_DERIVATE)
1114 double Con3_Vvar_Ql_GND;
1116 #if defined(_DERIVATE)
1117 double Con3_Vvar_Mucinv_GND;
1119 #if defined(_DERIVATE)
1122 #if defined(_DERIVATE)
1123 double Con3_Vvar_Nsat_GND;
1125 #if defined(_DERIVATE)
1126 double Con4_Vvar_Ql_GND;
1128 #if defined(_DERIVATE)
1129 double Con4_Vvar_Mucinv_GND;
1131 #if defined(_DERIVATE)
1134 #if defined(_DERIVATE)
1135 double Con4_Vvar_Nsat_GND;
1138 #if defined(_DERIVATE)
1139 Plo2_Vvar_Ql_GND=((Plo_Vvar_Ql_GND*Plo)+(Plo*Plo_Vvar_Ql_GND));
1140 Plo2_Vvar_Mucinv_GND=((Plo_Vvar_Mucinv_GND*Plo)+(Plo*Plo_Vvar_Mucinv_GND));
1141 Plo2_Vb_E=((Plo_Vb_E*Plo)+(Plo*Plo_Vb_E));
1142 Plo2_Vvar_Nsat_GND=((Plo_Vvar_Nsat_GND*Plo)+(Plo*Plo_Vvar_Nsat_GND));
1147 #if defined(_DERIVATE)
1148 double m10_sinh(d10_sinh0,d00_sinh0,WL)
1150 #if defined(_DERIVATE)
1151 Con2_Vb_E=(-1*WL_Vb_E*d10_sinh0/d00_sinh0/d00_sinh0);
1152 Con2_Vvar_Nsat_GND=(-1*WL_Vvar_Nsat_GND*d10_sinh0/d00_sinh0/d00_sinh0);
1153 Con2_Vvar_Mucinv_GND=(-1*WL_Vvar_Mucinv_GND*d10_sinh0/d00_sinh0/d00_sinh0);
1157 #if defined(_DERIVATE)
1158 Con3_Vvar_Ql_GND=Plo2_Vvar_Ql_GND*Con2*Con2;
1159 Con3_Vvar_Mucinv_GND=((((Plo2_Vvar_Mucinv_GND*Con2)+(Plo2*Con2_Vvar_Mucinv_GND))*Con2)+((Plo2*Con2)*Con2_Vvar_Mucinv_GND));
1160 Con3_Vb_E=((((Plo2_Vb_E*Con2)+(Plo2*Con2_Vb_E))*Con2)+((Plo2*Con2)*Con2_Vb_E));
1161 Con3_Vvar_Nsat_GND=((((Plo2_Vvar_Nsat_GND*Con2)+(Plo2*Con2_Vvar_Nsat_GND))*Con2)+((Plo2*Con2)*Con2_Vvar_Nsat_GND));
1163 Con3=((Plo2*Con2)*Con2);
1165 double m00_sqrt(d00_sqrt0,(Nl2+Con3))
1166 #if defined(_DERIVATE)
1167 double m10_sqrt(d10_sqrt0,d00_sqrt0,(Nl2+Con3))
1169 #if defined(_DERIVATE)
1170 Con4_Vvar_Ql_GND=((Con3_Vvar_Ql_GND*d10_sqrt0*Tanh*(Nl+((Plo*Con2)*Tanh))-(d00_sqrt0*Tanh)*Plo_Vvar_Ql_GND*Con2*Tanh)/(Nl+((Plo*Con2)*Tanh))/(Nl+((Plo*Con2)*Tanh)));
1171 Con4_Vvar_Mucinv_GND=((((Con3_Vvar_Mucinv_GND*d10_sqrt0*Tanh)+(d00_sqrt0*Tanh_Vvar_Mucinv_GND))*(Nl+((Plo*Con2)*Tanh))-(d00_sqrt0*Tanh)*((((Plo_Vvar_Mucinv_GND*Con2)+(Plo*Con2_Vvar_Mucinv_GND))*Tanh)+((Plo*Con2)*Tanh_Vvar_Mucinv_GND)))/(Nl+((Plo*Con2)*Tanh))/(Nl+((Plo*Con2)*Tanh)));
1172 Con4_Vb_E=((((Con3_Vb_E*d10_sqrt0*Tanh)+(d00_sqrt0*Tanh_Vb_E))*(Nl+((Plo*Con2)*Tanh))-(d00_sqrt0*Tanh)*((((Plo_Vb_E*Con2)+(Plo*Con2_Vb_E))*Tanh)+((Plo*Con2)*Tanh_Vb_E)))/(Nl+((Plo*Con2)*Tanh))/(Nl+((Plo*Con2)*Tanh)));
1173 Con4_Vvar_Nsat_GND=((((Con3_Vvar_Nsat_GND*d10_sqrt0*Tanh)+(d00_sqrt0*Tanh_Vvar_Nsat_GND))*(Nl+((Plo*Con2)*Tanh))-(d00_sqrt0*Tanh)*((((Plo_Vvar_Nsat_GND*Con2)+(Plo*Con2_Vvar_Nsat_GND))*Tanh)+((Plo*Con2)*Tanh_Vvar_Nsat_GND)))/(Nl+((Plo*Con2)*Tanh))/(Nl+((Plo*Con2)*Tanh)));
1175 Con4=((d00_sqrt0*Tanh)/(Nl+((Plo*Con2)*Tanh)));
1178 double m00_sqrt(d00_sqrt0,(Nl2+Con3))
1180 #if defined(_DERIVATE)
1181 double m10_sqrt(d10_sqrt0,d00_sqrt0,(Nl2+Con3))
1182 double
m10_atanh(d10_atanh1,d00_atanh1,Con4)
1184 #if defined(_DERIVATE)
1185 Neff_Vb_E=((((WL2_Vb_E*d00_sqrt0)+(WL2*Con3_Vb_E*d10_sqrt0))*d00_atanh1-(WL2*d00_sqrt0)*Con4_Vb_E*d10_atanh1)/d00_atanh1/d00_atanh1);
1186 Neff_Vvar_Nsat_GND=((((WL2_Vvar_Nsat_GND*d00_sqrt0)+(WL2*Con3_Vvar_Nsat_GND*d10_sqrt0))*d00_atanh1-(WL2*d00_sqrt0)*Con4_Vvar_Nsat_GND*d10_atanh1)/d00_atanh1/d00_atanh1);
1187 Neff_Vvar_Mucinv_GND=((((WL2_Vvar_Mucinv_GND*d00_sqrt0)+(WL2*Con3_Vvar_Mucinv_GND*d10_sqrt0))*d00_atanh1-(WL2*d00_sqrt0)*Con4_Vvar_Mucinv_GND*d10_atanh1)/d00_atanh1/d00_atanh1);
1188 Neff_Vvar_Ql_GND=(((WL2*Con3_Vvar_Ql_GND*d10_sqrt0)*d00_atanh1-(WL2*d00_sqrt0)*Con4_Vvar_Ql_GND*d10_atanh1)/d00_atanh1/d00_atanh1);
1190 Neff=((WL2*d00_sqrt0)/d00_atanh1);
1195 #if defined(_DERIVATE)
1197 Neff_Vvar_Nsat_GND=0.0;
1198 Neff_Vvar_Mucinv_GND=0.0;
1199 Neff_Vvar_Ql_GND=0.0;
1206 #if defined(_DERIVATE)
1208 Rb_Vb_E=(W_Vb_E/(((1.602176462e-19*Munc)*A)*Nl));
1209 Rb_Vvar_Nsat_GND=(W_Vvar_Nsat_GND/(((1.602176462e-19*Munc)*A)*Nl));
1210 Rb_Vvar_Mucinv_GND=(-W*(1.602176462e-19*Munc_Vvar_Mucinv_GND)*A*Nl/(((1.602176462
e-19*Munc)*A)*Nl)/(((1.602176462e-19*Munc)*A)*Nl));
1212 Rb=(W/(((1.602176462e-19*Munc)*A)*Nl));
1216 #if defined(_DERIVATE)
1217 Rb_Vvar_Ql_GND=(-W*(((1.602176462e-19*Mueff_Vvar_Ql_GND)*A*Neff)+(((1.602176462e-19*Mueff)*A)*Neff_Vvar_Ql_GND))/(((1.602176462e-19*Mueff)*A)*Neff)/(((1.602176462
e-19*Mueff)*A)*Neff));
1218 Rb_Vb_E=((W_Vb_E*(((1.602176462e-19*Mueff)*A)*Neff)-W*(((1.602176462
e-19*Mueff_Vb_E)*A*Neff)+(((1.602176462
e-19*Mueff)*A)*Neff_Vb_E)))/(((1.602176462e-19*Mueff)*A)*Neff)/(((1.602176462
e-19*Mueff)*A)*Neff));
1219 Rb_Vvar_Nsat_GND=((W_Vvar_Nsat_GND*(((1.602176462e-19*Mueff)*A)*Neff)-W*(((1.602176462
e-19*Mueff_Vvar_Nsat_GND)*A*Neff)+(((1.602176462
e-19*Mueff)*A)*Neff_Vvar_Nsat_GND)))/(((1.602176462e-19*Mueff)*A)*Neff)/(((1.602176462
e-19*Mueff)*A)*Neff));
1220 Rb_Vvar_Mucinv_GND=(-W*(((1.602176462e-19*Mueff_Vvar_Mucinv_GND)*A*Neff)+(((1.602176462e-19*Mueff)*A)*Neff_Vvar_Mucinv_GND))/(((1.602176462e-19*Mueff)*A)*Neff)/(((1.602176462
e-19*Mueff)*A)*Neff));
1222 Rb=(W/(((1.602176462e-19*Mueff)*A)*Neff));
1224 #if defined(_DYNAMIC)
1225 Vebj=(0.6-(((Ql-Qbi)*(Ql-Qbi))/(((((2*1.602176462
e-19)*Nl)*1.03594
e-10)*A)*A)));
1227 #if defined(_DYNAMIC)
1229 double m00_logE(d00_logE0,((((Plo/Ni)/Ni)+(1/Nl))*(Nl+Plo)))
1230 double
m00_logE(d00_logE1,((Plo+Nl)/Nl))
1231 #if defined(_DERIVATE)
1232 double m10_logE(d10_logE0,d00_logE0,((((Plo/Ni)/Ni)+(1/Nl))*(Nl+Plo)))
1233 double
m10_logE(d10_logE1,d00_logE1,((Plo+Nl)/Nl))
1235 Vebd=((
m00_vt(Tj)*d00_logE0)-((Dc/Munc)*d00_logE1));
1242 #if defined(_DYNAMIC)
1252 #if defined(_DYNAMIC)
1258 #if defined(_DYNAMIC)
1260 double m00_min(d00_min0,Vebj,Vebd)
1261 #if defined(_DERIVATE)
1262 double m10_min(d10_min0,d00_min0,Vebj,Vebd)
1263 double
m11_min(d11_min0,d00_min0,Vebj,Vebd)
1273 double m00_pow(d00_pow0,Nscl,0.75)
1274 #if defined(_DERIVATE)
1275 double m10_pow(d10_pow0,d00_pow0,Nscl,0.75)
1277 #if defined(_DERIVATE)
1278 BVcbo_Vvar_Nsat_GND=(-(BVf*5.34e13)*(d10_pow0*Nscl_Vvar_Nsat_GND)/d00_pow0/d00_pow0);
1280 BVcbo=((BVf*5.34e13)/d00_pow0);
1282 #if defined(_DERIVATE)
1287 double m00_pow(d00_pow0,(Vnrt/BVcbo),BVn)
1288 #if defined(_DERIVATE)
1289 double m10_pow(d10_pow0,d00_pow0,(Vnrt/BVcbo),BVn)
1291 #if defined(_DERIVATE)
1292 M_Vb_E=(-1*(-(d10_pow0*(Vnrt_Vb_E/BVcbo)))/(1-d00_pow0)/(1-d00_pow0));
1293 M_Vvar_Nsat_GND=(-1*(-(d10_pow0*(-Vnrt*BVcbo_Vvar_Nsat_GND/BVcbo/BVcbo)))/(1-d00_pow0)/(1-d00_pow0));
1300 #if defined(_DERIVATE)
1301 It_VC_e=(Vae_VC_e/Rb);
1302 It_Vvar_Ql_GND=(-Vae*Rb_Vvar_Ql_GND/Rb/Rb);
1303 It_Vb_E=(-Vae*Rb_Vb_E/Rb/Rb);
1304 It_Vvar_Nsat_GND=(-Vae*Rb_Vvar_Nsat_GND/Rb/Rb);
1305 It_Vvar_Mucinv_GND=(-Vae*Rb_Vvar_Mucinv_GND/Rb/Rb);
1311 #if defined(_DERIVATE)
1312 It_VC_e=(Vae_VC_e/1
e-6);
1315 It_Vvar_Nsat_GND=0.0;
1316 It_Vvar_Mucinv_GND=0.0;
1323 #if defined(_DERIVATE)
1324 Icss_VC_e=((1/(1+B))*It_VC_e);
1325 Icss_Vvar_Ql_GND=(((1/(1+B))*It_Vvar_Ql_GND)+(((B/(1+B))*((4*Dp)/((W*W)+1
e-20)))*Ql_Vvar_Ql_GND));
1326 Icss_Vb_E=(((1/(1+B))*It_Vb_E)+((B/(1+B))*(-(4*Dp)*((W_Vb_E*W)+(W*W_Vb_E))/((W*W)+1
e-20)/((W*W)+1
e-20)))*Ql);
1327 Icss_Vvar_Nsat_GND=(((1/(1+B))*It_Vvar_Nsat_GND)+((B/(1+B))*(-(4*Dp)*((W_Vvar_Nsat_GND*W)+(W*W_Vvar_Nsat_GND))/((W*W)+1
e-20)/((W*W)+1
e-20)))*Ql);
1328 Icss_Vvar_Mucinv_GND=((1/(1+B))*It_Vvar_Mucinv_GND);
1330 Icss=(((1/(1+B))*It)+(((B/(1+B))*((4*Dp)/((W*W)+1
e-20)))*Ql));
1334 #if defined(_DERIVATE)
1336 Icss_Vvar_Ql_GND=0.0;
1338 Icss_Vvar_Nsat_GND=0.0;
1339 Icss_Vvar_Mucinv_GND=0.0;
1343 #if defined(_DERIVATE)
1345 Ic_Vvar_Ql_GND=(Icss_Vvar_Ql_GND+Ccer_Vvar_Ql_GND*dVecdt);
1346 Ic_Vb_E=(Icss_Vb_E+Ccer_Vb_E*dVecdt);
1347 Ic_Vvar_Nsat_GND=(Icss_Vvar_Nsat_GND+Ccer_Vvar_Nsat_GND*dVecdt);
1348 Ic_Vvar_Mucinv_GND=Icss_Vvar_Mucinv_GND;
1349 Ic_Vvar_dVecdt_GND=(Ccer*dVecdt_Vvar_dVecdt_GND);
1351 Ic=(Icss+(Ccer*dVecdt));
1358 #if defined(_DERIVATE)
1359 Ibss_Vvar_Ql_GND=((Ql_Vvar_Ql_GND/Tau)+((((((Ql_Vvar_Ql_GND*Ql)+(Ql*Ql_Vvar_Ql_GND))/Qb)/Qb)*4*Nscl*Nscl/Ni)/Ni)*Isne);
1360 Ibss_Vb_E=(((((-(Ql*Ql)*Qb_Vb_E/Qb/Qb)*Qb-((Ql*Ql)/Qb)*Qb_Vb_E)/Qb/Qb)*4*Nscl*Nscl/Ni)/Ni)*Isne;
1361 Ibss_Vvar_Nsat_GND=(((((((((-(Ql*Ql)*Qb_Vvar_Nsat_GND/Qb/Qb)*Qb-((Ql*Ql)/Qb)*Qb_Vvar_Nsat_GND)/Qb/Qb)*4*Nscl)+(((((Ql*Ql)/Qb)/Qb)*4)*Nscl_Vvar_Nsat_GND))*Nscl)+((((((Ql*Ql)/Qb)/Qb)*4)*Nscl)*Nscl_Vvar_Nsat_GND))/Ni)/Ni)*Isne;
1363 Ibss=((Ql/Tau)+(((((((((Ql*Ql)/Qb)/Qb)*4)*Nscl)*Nscl)/Ni)/Ni)*Isne));
1367 #if defined(_DERIVATE)
1368 Ibss_Vvar_Ql_GND=(Ql_Vvar_Ql_GND/Tau);
1370 Ibss_Vvar_Nsat_GND=0.0;
1377 #if defined(_DERIVATE)
1378 Ibss_Vvar_Ql_GND=0.0;
1380 Ibss_Vvar_Nsat_GND=0.0;
1387 #if defined(_DERIVATE)
1398 #if defined(_DERIVATE)
1400 Imos_VG_E=((((((KpT*Vth_VG_E)*Vth)+((KpT*Vth)*Vth_VG_E))/2)*(1+(Theta*Vth))-(((KpT*Vth)*Vth)/2)*(Theta*Vth_VG_E))/(1+(Theta*Vth))/(1+(Theta*Vth)));
1402 Imos=((((KpT*Vth)*Vth)/2)/(1+(Theta*Vth)));
1406 #if defined(_DERIVATE)
1407 Imos_Vb_E=(((Kf*KpT)*((Vth*Vds_Vb_E)-((((Kf*Vds_Vb_E)*Vds)+((Kf*Vds)*Vds_Vb_E))/2)))/(1+(Theta*Vth)));
1408 Imos_VG_E=((((Kf*KpT)*Vth_VG_E*Vds)*(1+(Theta*Vth))-((Kf*KpT)*((Vth*Vds)-(((Kf*Vds)*Vds)/2)))*(Theta*Vth_VG_E))/(1+(Theta*Vth))/(1+(Theta*Vth)));
1410 Imos=(((Kf*KpT)*((Vth*Vds)-(((Kf*Vds)*Vds)/2)))/(1+(Theta*Vth)));
1417 double m00_sqrt(d00_sqrt0,((((2*1.03594
e-10)*Vbc)/1.602176462
e-19)/Nscl))
1418 #if defined(_DERIVATE)
1419 double m10_sqrt(d10_sqrt0,d00_sqrt0,((((2*1.03594
e-10)*Vbc)/1.602176462
e-19)/Nscl))
1421 #if defined(_DERIVATE)
1422 Igen_Vb_E=((((1.602176462e-19*Ni)*A)*((((2*1.03594e-10)*Vbc_Vb_E)/1.602176462e-19)/Nscl)*d10_sqrt0)/Tau);
1423 Igen_Vvar_Nsat_GND=((((1.602176462e-19*Ni)*A)*(-(((2*1.03594e-10)*Vbc)/1.602176462e-19)*Nscl_Vvar_Nsat_GND/Nscl/Nscl)*d10_sqrt0)/Tau);
1425 Igen=((((1.602176462e-19*Ni)*A)*d00_sqrt0)/Tau);
1430 #if defined(_DERIVATE)
1432 Igen_Vvar_Nsat_GND=0.0;
1436 #if defined(_DERIVATE)
1437 Imult_Vb_E=(((M_Vb_E*(Imos+Ic))+((M-1)*(Imos_Vb_E+Ic_Vb_E)))+((M_Vb_E*Igen)+(M*Igen_Vb_E)));
1438 Imult_Vvar_Nsat_GND=(((M_Vvar_Nsat_GND*(Imos+Ic))+((M-1)*Ic_Vvar_Nsat_GND))+((M_Vvar_Nsat_GND*Igen)+(M*Igen_Vvar_Nsat_GND)));
1439 Imult_VG_E=((M-1)*Imos_VG_E);
1440 Imult_VC_e=((M-1)*Ic_VC_e);
1441 Imult_Vvar_Ql_GND=((M-1)*Ic_Vvar_Ql_GND);
1442 Imult_Vvar_Mucinv_GND=((M-1)*Ic_Vvar_Mucinv_GND);
1443 Imult_Vvar_dVecdt_GND=((M-1)*Ic_Vvar_dVecdt_GND);
1445 Imult=(((M-1)*(Imos+Ic))+(M*Igen));
1446 #if defined(_DYNAMIC)
1447 #if defined(_DERIVATE)
1448 Qgd_Vb_G=((Cgd_Vb_G*Vdg)+(Cgd*Vdg_Vb_G));
1449 Qgd_Vvar_Nsat_GND=Cgd_Vvar_Nsat_GND*Vdg;
1453 #if defined(_DYNAMIC)
1454 #if defined(_DERIVATE)
1455 Qcer_Vvar_Ql_GND=Ccer_Vvar_Ql_GND*Vec;
1456 Qcer_Vb_E=Ccer_Vb_E*Vec;
1457 Qcer_Vvar_Nsat_GND=Ccer_Vvar_Nsat_GND*Vec;
1458 Qcer_Ve_E=(Ccer*Vec_Ve_E);
1462 #if defined(_DYNAMIC)
1463 #if defined(_DERIVATE)
1464 Qmult_Vb_E=((M_Vb_E*Qcer)+((M-1)*Qcer_Vb_E));
1465 Qmult_Vvar_Nsat_GND=((M_Vvar_Nsat_GND*Qcer)+((M-1)*Qcer_Vvar_Nsat_GND));
1466 Qmult_Vvar_Ql_GND=((M-1)*Qcer_Vvar_Ql_GND);
1467 Qmult_Ve_E=((M-1)*Qcer_Ve_E);
1475 double m00_pow(d00_pow0,Deltap,(2.0/3.0))
1476 double
m00_logE(d00_logE1,(1+(Alpha2/d00_pow0)))
1477 #if defined(_DERIVATE)
1478 double m10_pow(d10_pow0,d00_pow0,Deltap,(2.0/3.0))
1479 double
m10_logE(d10_logE1,d00_logE1,(1+(Alpha2/d00_pow0)))
1481 #if defined(_DERIVATE)
1482 iMucinv_Vvar_Ql_GND=(((Deltap_Vvar_Ql_GND*d00_logE1)+(Deltap*(-Alpha2*(d10_pow0*Deltap_Vvar_Ql_GND)/d00_pow0/d00_pow0)*d10_logE1))/Alpha1);
1483 iMucinv_Vvar_Mucinv_GND=(((Deltap_Vvar_Mucinv_GND*d00_logE1)+(Deltap*(-Alpha2*(d10_pow0*Deltap_Vvar_Mucinv_GND)/d00_pow0/d00_pow0)*d10_logE1))/Alpha1);
1484 iMucinv_Vb_E=(((Deltap_Vb_E*d00_logE1)+(Deltap*(-Alpha2*(d10_pow0*Deltap_Vb_E)/d00_pow0/d00_pow0)*d10_logE1))/Alpha1);
1485 iMucinv_Vvar_Nsat_GND=(((Deltap_Vvar_Nsat_GND*d00_logE1)+(Deltap*(-Alpha2*(d10_pow0*Deltap_Vvar_Nsat_GND)/d00_pow0/d00_pow0)*d10_logE1))/Alpha1);
1487 iMucinv=((Deltap*d00_logE1)/Alpha1);
1492 #if defined(_DERIVATE)
1493 iMucinv_Vvar_Ql_GND=0.0;
1494 iMucinv_Vvar_Mucinv_GND=0.0;
1496 iMucinv_Vvar_Nsat_GND=0.0;
1500 #if defined(_DERIVATE)
1501 iQl_Vb_E=(((((1.602176462e-19*A)*W_Vb_E)*Plo)+(((1.602176462
e-19*A)*W)*Plo_Vb_E))/2);
1502 iQl_Vvar_Nsat_GND=(((((1.602176462e-19*A)*W_Vvar_Nsat_GND)*Plo)+(((1.602176462
e-19*A)*W)*Plo_Vvar_Nsat_GND))/2);
1503 iQl_Vvar_Ql_GND=((((1.602176462e-19*A)*W)*Plo_Vvar_Ql_GND)/2);
1504 iQl_Vvar_Mucinv_GND=((((1.602176462e-19*A)*W)*Plo_Vvar_Mucinv_GND)/2);
1506 iQl=((((1.602176462e-19*A)*W)*Plo)/2);
1507 #if defined(_DERIVATE)
1508 iNsat_VC_e=(Ic_VC_e/((1.602176462e-19*A)*Vpsat));
1509 iNsat_Vvar_Ql_GND=(Ic_Vvar_Ql_GND/((1.602176462e-19*A)*Vpsat));
1510 iNsat_Vb_E=((Ic_Vb_E/((1.602176462e-19*A)*Vpsat))-(Imos_Vb_E/((1.602176462
e-19*A)*Vnsat)));
1511 iNsat_Vvar_Nsat_GND=(Ic_Vvar_Nsat_GND/((1.602176462e-19*A)*Vpsat));
1512 iNsat_Vvar_Mucinv_GND=(Ic_Vvar_Mucinv_GND/((1.602176462e-19*A)*Vpsat));
1513 iNsat_Vvar_dVecdt_GND=(Ic_Vvar_dVecdt_GND/((1.602176462e-19*A)*Vpsat));
1514 iNsat_VG_E=(-(Imos_VG_E/((1.602176462e-19*A)*Vnsat)));
1516 iNsat=((Ic/((1.602176462e-19*A)*Vpsat))-(Imos/((1.602176462
e-19*A)*Vnsat)));
1518 #if defined(_DERIVATE)
1521 #if defined(_DYNAMIC)
1523 #if defined(_DERIVATE)
1528 #if defined(_DERIVATE)
1531 #if defined(_DYNAMIC)
1533 #if defined(_DERIVATE)
1539 #if defined(_DERIVATE)
1548 #if defined(_DYNAMIC)
1550 #if defined(_DERIVATE)
1555 #if defined(_DYNAMIC)
1557 #if defined(_DERIVATE)
1565 #if defined(_DERIVATE)
1573 #if defined(_DYNAMIC)
1575 #if defined(_DERIVATE)
1583 #if defined(_DERIVATE)
1589 #if defined(_DYNAMIC)
1591 #if defined(_DERIVATE)
1599 #if defined(_DERIVATE)
1607 #if defined(_DERIVATE)
1614 #if defined(_DERIVATE)
1621 #if defined(_DERIVATE)
1631 #if defined(_DERIVATE)
1634 #if defined(_DYNAMIC)
1636 #if defined(_DERIVATE)
1656 for (
int i1 = 0; i1 < 9; i1++) {
1657 setI (i1, _rhs[i1]);
1658 for (
int i2 = 0; i2 < 9; i2++) {
1659 setY (i1, i2, _jstat[i1][i2]);
1693 matrix nigbt::calcMatrixY (nr_double_t frequency)
1699 for (
int i1 = 0; i1 < 9; i1++) {
1700 for (
int i2 = 0; i2 < 9; i2++) {
1701 y (i1,i2) =
rect (_jstat[i1][i2], _jdyna[i1][i2] * 2 *
M_PI * _freq);
1735 int i1, i2, i3, i4, state;
1738 for (i1 = 0; i1 < 9; i1++) {
1739 for (i2 = 0; i2 < 9; i2++) {
1740 state = 2 * (i2 + 9 * i1);
1742 if (_charges[i1][i2] != 0.0)
1747 for (i1 = 0; i1 < 9; i1++) {
1748 state = 2 * (i1 + 9 * i1);
1749 if (_charges[i1][i1] != 0.0)
1754 for (i1 = 0; i1 < 9; i1++) {
1755 for (i2 = 0; i2 < 9; i2++) {
1757 for (i3 = 0; i3 < 9; i3++) {
1758 for (i4 = 0; i4 < 9; i4++) {
1760 if (_caps[i1][i2][i3][i4] != 0.0)
1765 for (i1 = 0; i1 < 9; i1++) {
1766 for (i2 = 0; i2 < 9; i2++) {
1768 for (i3 = 0; i3 < 9; i3++) {
1769 if (_caps[i1][i2][i3][i3] != 0.0)
1774 for (i1 = 0; i1 < 9; i1++) {
1775 for (i3 = 0; i3 < 9; i3++) {
1776 for (i4 = 0; i4 < 9; i4++) {
1778 if (_caps[i1][i1][i3][i4] != 0.0)
1783 for (i1 = 0; i1 < 9; i1++) {
1784 for (i3 = 0; i3 < 9; i3++) {
1785 if (_caps[i1][i1][i3][i3] != 0.0)
1791 matrix nigbt::calcMatrixCy (nr_double_t frequency)
1831 for (
int i1 = 0; i1 < 9; i1++) {
1832 setQ (i1, _qhs[i1]);
1833 setCV (i1, _chs[i1]);
1834 setGV (i1, _ghs[i1]);
1835 for (
int i2 = 0; i2 < 9; i2++) {
1836 setQV (i1, i2, _jdyna[i1][i2]);