fixed bugs
This commit is contained in:
parent
479c2a19ea
commit
1d7da49e27
|
|
@ -528,7 +528,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
double Ibpbi, Ibpbi_Vbpbi, Ibpbi_Vbici, Ibpbi_Vbiei;
|
double Ibpbi, Ibpbi_Vbpbi, Ibpbi_Vbici, Ibpbi_Vbiei;
|
||||||
double Ibpsi, Ibpsi_Vbpci, Ibpsi_Vsici;
|
double Ibpsi, Ibpsi_Vbpci, Ibpsi_Vsici;
|
||||||
double Icic_Vcic;
|
double Icic_Vcic;
|
||||||
double Ibci, Ibci_Vbci;
|
// double Ibci, Ibci_Vbci;
|
||||||
double hjei_vbe_Vbiei, ibet_Vbpei=0.0, ibet_Vbiei=0.0, ibh_rec_Vbiei;
|
double hjei_vbe_Vbiei, ibet_Vbpei=0.0, ibet_Vbiei=0.0, ibh_rec_Vbiei;
|
||||||
double irei_Vbiei, irep_Vbpei, iavl_Vbici, rbi_Vbiei, rbi_Vbici;
|
double irei_Vbiei, irep_Vbpei, iavl_Vbici, rbi_Vbiei, rbi_Vbici;
|
||||||
double Q_0_Vbiei, Q_0_Vbici, b_q_Vbiei, b_q_Vbici;
|
double Q_0_Vbiei, Q_0_Vbici, b_q_Vbiei, b_q_Vbici;
|
||||||
|
|
@ -2209,13 +2209,13 @@ c Branch: ciei, Stamp element: It
|
||||||
/*
|
/*
|
||||||
c Branch: bci, Stamp element: Qbcx
|
c Branch: bci, Stamp element: Qbcx
|
||||||
*/
|
*/
|
||||||
rhs_current = model->HICUMtype * (Ibci - Ibci_Vbci*Vbci);
|
// rhs_current = model->HICUMtype * (Ibci - Ibci_Vbci*Vbci);
|
||||||
*(ckt->CKTrhs + here->HICUMbaseNode) += -rhs_current;
|
// *(ckt->CKTrhs + here->HICUMbaseNode) += -rhs_current;
|
||||||
*(here->HICUMbaseBasePtr) += Ibci_Vbci;
|
// *(here->HICUMbaseBasePtr) += Ibci_Vbci;
|
||||||
*(here->HICUMbaseCollCIPtr) += -Ibci_Vbci;
|
// *(here->HICUMbaseCollCIPtr) += -Ibci_Vbci;
|
||||||
*(ckt->CKTrhs + here->HICUMcollCINode) += rhs_current;
|
// *(ckt->CKTrhs + here->HICUMcollCINode) += rhs_current;
|
||||||
*(here->HICUMcollCIBasePtr) += -Ibci_Vbci;
|
// *(here->HICUMcollCIBasePtr) += -Ibci_Vbci;
|
||||||
*(here->HICUMcollCICollCIPtr) += Ibci_Vbci;
|
// *(here->HICUMcollCICollCIPtr) += Ibci_Vbci;
|
||||||
/*
|
/*
|
||||||
c Branch: bpci, Stamp element: Ijbcx
|
c Branch: bpci, Stamp element: Ijbcx
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -802,6 +802,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
|
|
||||||
std::function<duals::duald (duals::duald, duals::duald, duals::duald)> calc_iavl = [&](duals::duald Vbici, duals::duald Cjci, duals::duald itf){
|
std::function<duals::duald (duals::duald, duals::duald, duals::duald)> calc_iavl = [&](duals::duald Vbici, duals::duald Cjci, duals::duald itf){
|
||||||
//Avalanche current
|
//Avalanche current
|
||||||
|
duals::duald iavl;
|
||||||
iavl = 0;
|
iavl = 0;
|
||||||
if (use_aval == 1) {//begin : HICAVL
|
if (use_aval == 1) {//begin : HICAVL
|
||||||
duals::duald v_bord,v_q,U0,av,avl,iavl;
|
duals::duald v_bord,v_q,U0,av,avl,iavl;
|
||||||
|
|
@ -1632,6 +1633,8 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
// initial formulation for itf and so on
|
// initial formulation for itf and so on
|
||||||
//Initial formulation of forward and reverse component of transfer current
|
//Initial formulation of forward and reverse component of transfer current
|
||||||
|
|
||||||
|
Tr = model->HICUMtr;
|
||||||
|
|
||||||
//begin initial transfer current calculations -> itf, itr, Qf, Qr------------
|
//begin initial transfer current calculations -> itf, itr, Qf, Qr------------
|
||||||
calc_it_initial(here->HICUMtemp+1_e, Vbiei , Vbici , Q_0 , T_f0 , ick , &result_itf, &result_itr, &result_Qf, &result_Qr, &result_Q_bf, &result_a_h, &result_Q_p);
|
calc_it_initial(here->HICUMtemp+1_e, Vbiei , Vbici , Q_0 , T_f0 , ick , &result_itf, &result_itr, &result_Qf, &result_Qr, &result_Q_bf, &result_a_h, &result_Q_p);
|
||||||
itf = result_itf.rpart();
|
itf = result_itf.rpart();
|
||||||
|
|
@ -2134,6 +2137,12 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
|
|
||||||
// Load_sources
|
// Load_sources
|
||||||
|
|
||||||
|
//resistors
|
||||||
|
Ibbp_Vbbp = 1/here->HICUMrbx_t;
|
||||||
|
Icic_Vcic = 1/here->HICUMrcx_t;
|
||||||
|
Ieie_Veie = 1/here->HICUMre_t;
|
||||||
|
Isis_Vsis = 1/model->HICUMrsu;
|
||||||
|
|
||||||
Ibpei = model->HICUMtype*ibep;
|
Ibpei = model->HICUMtype*ibep;
|
||||||
Ibpei += model->HICUMtype*irep;
|
Ibpei += model->HICUMtype*irep;
|
||||||
Ibpei_Vbpei = model->HICUMtype*ibep_Vbpei;
|
Ibpei_Vbpei = model->HICUMtype*ibep_Vbpei;
|
||||||
|
|
@ -2258,10 +2267,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
Ibpbi_Vbiei = -Vbpbi * rbi_Vbiei / (rbi*rbi);
|
Ibpbi_Vbiei = -Vbpbi * rbi_Vbiei / (rbi*rbi);
|
||||||
Ibpbi_Vbici = -Vbpbi * rbi_Vbici / (rbi*rbi);
|
Ibpbi_Vbici = -Vbpbi * rbi_Vbici / (rbi*rbi);
|
||||||
|
|
||||||
Ibbp_Vbbp = 1/here->HICUMrbx_t;
|
|
||||||
Icic_Vcic = 1/here->HICUMrcx_t;
|
|
||||||
Ieie_Veie = 1/here->HICUMre_t;
|
|
||||||
Isis_Vsis = 1/model->HICUMrsu;
|
|
||||||
|
|
||||||
//@Dietmar: why is charge equal to capacitance, where is the j*omega or derivative operator?
|
//@Dietmar: why is charge equal to capacitance, where is the j*omega or derivative operator?
|
||||||
Qjcx_i_Vbci = Cjcx_i;
|
Qjcx_i_Vbci = Cjcx_i;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue