fix bugs HICHUM acload
This commit is contained in:
parent
1d5f88e93d
commit
e81b41c653
|
|
@ -382,8 +382,8 @@ HICUMacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
XQcth_Vrth = *(ckt->CKTstate0 + here->HICUMcqcth) * ckt->CKTomega;
|
||||
//Qxf
|
||||
XQxf_Vxf = *(ckt->CKTstate0 + here->HICUMcqxf) * ckt->CKTomega;
|
||||
XQxf1_Vxf1 = *(ckt->CKTstate0 + here->HICUMcqxf1) * ckt->CKTomega;
|
||||
XQxf2_Vxf2 = *(ckt->CKTstate0 + here->HICUMcqxf2) * ckt->CKTomega;
|
||||
XQxf1_Vxf1 = *(ckt->CKTstate0 + here->HICUMcqxf1) * ckt->CKTomega;
|
||||
XQxf2_Vxf2 = *(ckt->CKTstate0 + here->HICUMcqxf2) * ckt->CKTomega;
|
||||
|
||||
//Qrbi f_bp=+ f_bi=-
|
||||
*(here->HICUMbaseBPBaseBPPtr + 1) += XQrbi_Vbpbi;
|
||||
|
|
@ -523,8 +523,8 @@ HICUMacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
*(here->HICUMbaseTempPtr) += Ibbp_Vrth;
|
||||
*(here->HICUMbaseBPtempPtr) += -Ibbp_Vrth;
|
||||
// Stamp element: Re f_Ei = + f_E = -
|
||||
*(here->HICUMemitTempPtr) += -Ieie_Vrth;
|
||||
*(here->HICUMemitEItempPtr) += Ieie_Vrth;
|
||||
*(here->HICUMemitTempPtr) += -Ieie_Vrth;
|
||||
// Stamp element: Rbi f_Bp = + f_Bi = -
|
||||
*(here->HICUMbaseBPtempPtr) += Ibpbi_Vrth;
|
||||
*(here->HICUMbaseBItempPtr) += -Ibpbi_Vrth;
|
||||
|
|
@ -579,41 +579,29 @@ HICUMacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
// finish
|
||||
|
||||
//the charges
|
||||
//Qrbi from Bp to Bi f_Bi=- f_Bp=+
|
||||
*(here->HICUMbaseBItempPtr + 1) += -XQrbi_Vrth;
|
||||
*(here->HICUMbaseBPtempPtr + 1) += +XQrbi_Vrth;
|
||||
//Qjei from Bi to Ei f_Bi=- f_Ei=+
|
||||
*(here->HICUMbaseBItempPtr + 1) += -XQjei_Vrth;
|
||||
*(here->HICUMemitEItempPtr + 1) += +XQjei_Vrth;
|
||||
//Qf from Bi to Ei f_Bi=- f_Ei=+
|
||||
*(here->HICUMbaseBItempPtr + 1) += -XQf_Vrth;
|
||||
*(here->HICUMemitEItempPtr + 1) += +XQf_Vrth;
|
||||
//Qr from Bi to Ci f_Bi=- f_Ci=+
|
||||
*(here->HICUMbaseBItempPtr + 1) += -XQr_Vrth;
|
||||
*(here->HICUMcollCItempPtr + 1) += +XQr_Vrth;
|
||||
//Qjci from Bi to Ci f_Bi=- f_Ci=+
|
||||
*(here->HICUMbaseBItempPtr + 1) += -XQjci_Vrth;
|
||||
*(here->HICUMcollCItempPtr + 1) += +XQjci_Vrth;
|
||||
//Qjep from Bp to Ei f_Bp=- f_Ei=+
|
||||
*(here->HICUMbaseBPtempPtr + 1) += -XQjep_Vrth;
|
||||
*(here->HICUMemitEItempPtr + 1) += +XQjep_Vrth;
|
||||
//Qjcx_i from B to Ci f_B =- f_Ci=+
|
||||
*(here->HICUMbaseTempPtr + 1) += -Xqjcx0_t_i_Vrth;
|
||||
*(here->HICUMcollCItempPtr + 1) += +Xqjcx0_t_i_Vrth;
|
||||
//Qjcx_ii from Bp to Ci f_Bp=- f_Ci=+
|
||||
*(here->HICUMbaseBPtempPtr + 1) += -Xqjcx0_t_ii_Vrth;
|
||||
*(here->HICUMcollCItempPtr + 1) += +Xqjcx0_t_ii_Vrth;
|
||||
//Qdsu from Bp to Ci f_Bp=- f_Ci=+
|
||||
*(here->HICUMbaseBPtempPtr + 1) += -XQdsu_Vrth;
|
||||
*(here->HICUMcollCItempPtr + 1) += +XQdsu_Vrth;
|
||||
//Qjs from Si to Ci f_Si=- f_Ci=+
|
||||
*(here->HICUMsubsSItempPtr + 1) += -XQjs_Vrth;
|
||||
*(here->HICUMcollCItempPtr + 1) += +XQjs_Vrth;
|
||||
//Qscp from S to C f_S =- f_C =+
|
||||
*(here->HICUMsubsTempPtr + 1) += -XQscp_Vrth;
|
||||
*(here->HICUMcollTempPtr + 1) += +XQscp_Vrth;
|
||||
//Qcth from 0 to T f_0=- f_T=+
|
||||
*(here->HICUMtempTempPtr + 1) += -XQcth_Vrth;
|
||||
*(here->HICUMbaseBItempPtr + 1) += +XQrbi_Vrth;
|
||||
*(here->HICUMbaseBPtempPtr + 1) += -XQrbi_Vrth;
|
||||
*(here->HICUMbaseBItempPtr + 1) += +XQjei_Vrth;
|
||||
*(here->HICUMemitEItempPtr + 1) += -XQjei_Vrth;
|
||||
*(here->HICUMbaseBItempPtr + 1) += +XQf_Vrth;
|
||||
*(here->HICUMemitEItempPtr + 1) += -XQf_Vrth;
|
||||
*(here->HICUMbaseBItempPtr + 1) += +XQr_Vrth;
|
||||
*(here->HICUMcollCItempPtr + 1) += -XQr_Vrth;
|
||||
*(here->HICUMbaseBItempPtr + 1) += +XQjci_Vrth;
|
||||
*(here->HICUMcollCItempPtr + 1) += -XQjci_Vrth;
|
||||
*(here->HICUMbaseBPtempPtr + 1) += +XQjep_Vrth;
|
||||
*(here->HICUMemitEItempPtr + 1) += -XQjep_Vrth;
|
||||
*(here->HICUMbaseTempPtr + 1) += +Xqjcx0_t_i_Vrth;
|
||||
*(here->HICUMcollCItempPtr + 1) += -Xqjcx0_t_i_Vrth;
|
||||
*(here->HICUMbaseBPtempPtr + 1) += +Xqjcx0_t_ii_Vrth;
|
||||
*(here->HICUMcollCItempPtr + 1) += -Xqjcx0_t_ii_Vrth;
|
||||
*(here->HICUMbaseBPtempPtr + 1) += +XQdsu_Vrth;
|
||||
*(here->HICUMcollCItempPtr + 1) += -XQdsu_Vrth;
|
||||
*(here->HICUMsubsSItempPtr + 1) += +XQjs_Vrth;
|
||||
*(here->HICUMcollCItempPtr + 1) += -XQjs_Vrth;
|
||||
*(here->HICUMsubsTempPtr + 1) += +XQscp_Vrth;
|
||||
*(here->HICUMcollTempPtr + 1) += -XQscp_Vrth;
|
||||
*(here->HICUMtempTempPtr + 1) += +XQcth_Vrth;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -650,8 +650,8 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
|||
TSTALLOC(HICUMbaseBIEmitEIPtr,HICUMbaseBINode,HICUMemitEINode); //ei-bi
|
||||
TSTALLOC(HICUMemitEIBaseBIPtr,HICUMemitEINode,HICUMbaseBINode); //bi-ei
|
||||
if (nqs) {
|
||||
TSTALLOC(HICUMbaseBIXfPtr ,HICUMbaseBINode,HICUMxfNode); //ei-bi
|
||||
TSTALLOC(HICUMemitEIXfPtr ,HICUMemitEINode,HICUMxfNode); //ei-bi
|
||||
TSTALLOC(HICUMbaseBIXfPtr ,HICUMbaseBINode,HICUMxfNode); //bi - xf
|
||||
TSTALLOC(HICUMemitEIXfPtr ,HICUMemitEINode,HICUMxfNode); //ei - xf
|
||||
}
|
||||
|
||||
TSTALLOC(HICUMbaseBICollCIPtr,HICUMbaseBINode,HICUMcollCINode); //ci-bi
|
||||
|
|
|
|||
|
|
@ -1927,7 +1927,6 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
|
|||
//Cjei = ddx(Qjei,V(bi));
|
||||
hicum_qjmodf(Temp,here->HICUMcjei0_t,here->HICUMvdei_t,model->HICUMzei,here->HICUMajei_t,Vbiei,&Cjei,&Cjei_Vbiei, &Cjei_dT,&Qjei, &Qjei_Vbiei, &Qjei_dT);
|
||||
|
||||
|
||||
result = calc_hjei_vbe(Vbiei+1_e, Temp, here, model);
|
||||
hjei_vbe = result.rpart();
|
||||
hjei_vbe_Vbiei = result.dpart();
|
||||
|
|
@ -1955,7 +1954,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
Q_0_Vbiei = Q_0_Qjei*Qjei_Vbiei + Q_0_hjei_vbe*hjei_vbe_Vbiei;
|
||||
Q_0_Vbici = Q_0_Qjci*Qjci_Vbici ;
|
||||
Q_0_dT += Q_0_Qjei*Qjei_dT + Q_0_Qjci*Qjci_dT * Q_0_hjei_vbe*hjei_vbe_dT;
|
||||
Q_0_dT += Q_0_Qjei*Qjei_dT + Q_0_Qjci*Qjci_dT + Q_0_hjei_vbe*hjei_vbe_dT;
|
||||
|
||||
//Transit time calculation at low current density
|
||||
result = calc_T_f0(Temp, Vbici+1_e);
|
||||
|
|
@ -2049,7 +2048,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
|
|||
Tf_dick = result_Tf.dpart();
|
||||
|
||||
// add derivatives of Q_0 = f(Vbici,Vbiei,T)
|
||||
itf_dT += itf_dQ_pT*Q_0_dT; //WHY NOT Q_0 -> since we used Q_pT variable here instead of Q_0 to save space, see above
|
||||
itf_dT += itf_dQ_pT*Q_0_dT;
|
||||
itr_dT += itr_dQ_pT*Q_0_dT;
|
||||
Qf_dT += Qf_dQ_pT*Q_0_dT;
|
||||
Qr_dT += Qr_dQ_pT*Q_0_dT;
|
||||
|
|
@ -3488,8 +3487,8 @@ load:
|
|||
*(here->HICUMemitEIBaseBIPtr) += -Iciei_Vbici;
|
||||
if (nqs) {
|
||||
// with respect to Vxf2
|
||||
*(here->HICUMcollCIXf2Ptr) += Iciei_Vxf2;
|
||||
*(here->HICUMemitEIXf2Ptr) += -Iciei_Vxf2;
|
||||
*(here->HICUMcollCIXf2Ptr) += Iciei_Vxf2;
|
||||
*(here->HICUMemitEIXf2Ptr) += -Iciei_Vxf2;
|
||||
}
|
||||
// finish
|
||||
|
||||
|
|
@ -3722,8 +3721,8 @@ load:
|
|||
*(ckt->CKTrhs + here->HICUMemitEINode) += -rhs_current;
|
||||
*(ckt->CKTrhs + here->HICUMemitNode) += rhs_current;
|
||||
// with respect to Potential Vrth
|
||||
*(here->HICUMemitTempPtr) += -Ieie_Vrth;
|
||||
*(here->HICUMemitEItempPtr) += Ieie_Vrth;
|
||||
*(here->HICUMemitTempPtr) += -Ieie_Vrth;
|
||||
// finish
|
||||
|
||||
// Stamp element: Rbi f_Bp = + f_Bi = -
|
||||
|
|
|
|||
Loading…
Reference in New Issue