vbic: first add reactive part into acload
This commit is contained in:
parent
fbcc1a8c7f
commit
fbd361cf34
|
|
@ -37,6 +37,7 @@ VBICacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
Ibcp_Vrth, Iccp_Vrth, Irs_Vrth, Irth_Vrth, Icth_Vrth, Ith_Vrth,
|
Ibcp_Vrth, Iccp_Vrth, Irs_Vrth, Irth_Vrth, Icth_Vrth, Ith_Vrth,
|
||||||
Ith_Vbei, Ith_Vbci, Ith_Vcei, Ith_Vbex, Ith_Vbep, Ith_Vbcp, Ith_Vcep,
|
Ith_Vbei, Ith_Vbci, Ith_Vcei, Ith_Vbex, Ith_Vbep, Ith_Vbcp, Ith_Vcep,
|
||||||
Ith_Vrci, Ith_Vbcx, Ith_Vrbi, Ith_Vrbp, Ith_Vrcx, Ith_Vrbx, Ith_Vre, Ith_Vrs;
|
Ith_Vrci, Ith_Vbcx, Ith_Vrbi, Ith_Vrbp, Ith_Vrcx, Ith_Vrbx, Ith_Vre, Ith_Vrs;
|
||||||
|
double XQcth_Vrth, XQbe_Vrth, XQbex_Vrth, XQbc_Vrth, XQbcx_Vrth, XQbep_Vrth, XQbcp_Vrth;
|
||||||
|
|
||||||
/* loop through all the models */
|
/* loop through all the models */
|
||||||
for( ; model != NULL; model = VBICnextModel(model)) {
|
for( ; model != NULL; model = VBICnextModel(model)) {
|
||||||
|
|
@ -459,14 +460,24 @@ c Stamp element: Qbco
|
||||||
*(here->VBICbaseCollPtr + 1) += -XQbco_Vbc;
|
*(here->VBICbaseCollPtr + 1) += -XQbco_Vbc;
|
||||||
*(here->VBICcollBasePtr + 1) += -XQbco_Vbc;
|
*(here->VBICcollBasePtr + 1) += -XQbco_Vbc;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (here->VBIC_selfheat) {
|
if (here->VBIC_selfheat) {
|
||||||
|
XQcth_Vrth = *(ckt->CKTstate0 + here->VBICcqcth) * ckt->CKTomega;
|
||||||
|
XQbe_Vrth = *(ckt->CKTstate0 + here->VBICcqbeth) * ckt->CKTomega;
|
||||||
|
XQbex_Vrth = *(ckt->CKTstate0 + here->VBICcqbexth) * ckt->CKTomega;
|
||||||
|
XQbc_Vrth = *(ckt->CKTstate0 + here->VBICcqbcth) * ckt->CKTomega;
|
||||||
|
XQbcx_Vrth = *(ckt->CKTstate0 + here->VBICcqbcxth) * ckt->CKTomega;
|
||||||
|
XQbep_Vrth = *(ckt->CKTstate0 + here->VBICcqbepth) * ckt->CKTomega;
|
||||||
|
XQbcp_Vrth = *(ckt->CKTstate0 + here->VBICcqbcpth) * ckt->CKTomega;
|
||||||
|
|
||||||
|
// *(here->VBICtempTempPtr + 1) += XQcth_Vrth;
|
||||||
|
//
|
||||||
|
// *(here->VBICbaseBIBaseBIPtr + 1) += XQbe_Vrth;
|
||||||
|
// *(here->VBICbaseBItempPtr + 1) += -XQbe_Vrth;
|
||||||
|
// *(here->VBICemitEIBaseBIPtr + 1) += -XQbe_Vrth;
|
||||||
|
// *(here->VBICemitEItempPtr + 1) += XQbe_Vrth;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(OK);
|
return(OK);
|
||||||
|
|
|
||||||
|
|
@ -466,7 +466,14 @@ typedef struct sVBICinstance {
|
||||||
#define VBICith_Vre VBICstate+100
|
#define VBICith_Vre VBICstate+100
|
||||||
#define VBICith_Vrs VBICstate+101
|
#define VBICith_Vrs VBICstate+101
|
||||||
|
|
||||||
#define VBICnumStates 102
|
#define VBICcqbeth VBICstate+102
|
||||||
|
#define VBICcqbexth VBICstate+103
|
||||||
|
#define VBICcqbcth VBICstate+104
|
||||||
|
#define VBICcqbcxth VBICstate+105
|
||||||
|
#define VBICcqbepth VBICstate+106
|
||||||
|
#define VBICcqbcpth VBICstate+107
|
||||||
|
|
||||||
|
#define VBICnumStates 108
|
||||||
|
|
||||||
/* per model data */
|
/* per model data */
|
||||||
typedef struct sVBICmodel { /* model structure for a vbic */
|
typedef struct sVBICmodel { /* model structure for a vbic */
|
||||||
|
|
|
||||||
|
|
@ -706,8 +706,9 @@ VBICload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
*(ckt->CKTstate0 + here->VBICqbeo) = Qbeo;
|
*(ckt->CKTstate0 + here->VBICqbeo) = Qbeo;
|
||||||
*(ckt->CKTstate0 + here->VBICqbco) = Qbco;
|
*(ckt->CKTstate0 + here->VBICqbco) = Qbco;
|
||||||
*(ckt->CKTstate0 + here->VBICqbcp) = Qbcp;
|
*(ckt->CKTstate0 + here->VBICqbcp) = Qbcp;
|
||||||
if (here->VBIC_selfheat)
|
if (here->VBIC_selfheat) {
|
||||||
*(ckt->CKTstate0 + here->VBICqcth) = Qcth;
|
*(ckt->CKTstate0 + here->VBICqcth) = Qcth;
|
||||||
|
}
|
||||||
|
|
||||||
here->VBICcapbe = Qbe_Vbei;
|
here->VBICcapbe = Qbe_Vbei;
|
||||||
here->VBICcapbex = Qbex_Vbex;
|
here->VBICcapbex = Qbex_Vbex;
|
||||||
|
|
@ -716,7 +717,7 @@ VBICload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
here->VBICcapbep = Qbep_Vbep;
|
here->VBICcapbep = Qbep_Vbep;
|
||||||
here->VBICcapbcp = Qbcp_Vbcp;
|
here->VBICcapbcp = Qbcp_Vbcp;
|
||||||
if (here->VBIC_selfheat)
|
if (here->VBIC_selfheat)
|
||||||
here->VBICcapcth = Qcth_Vrth;
|
here->VBICcapcth = Qcth_Vrth;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* store small-signal parameters
|
* store small-signal parameters
|
||||||
|
|
@ -734,8 +735,15 @@ VBICload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
*(ckt->CKTstate0 + here->VBICcqbeo) = Qbeo_Vbe;
|
*(ckt->CKTstate0 + here->VBICcqbeo) = Qbeo_Vbe;
|
||||||
*(ckt->CKTstate0 + here->VBICcqbco) = Qbco_Vbc;
|
*(ckt->CKTstate0 + here->VBICcqbco) = Qbco_Vbc;
|
||||||
*(ckt->CKTstate0 + here->VBICcqbcp) = Qbcp_Vbcp;
|
*(ckt->CKTstate0 + here->VBICcqbcp) = Qbcp_Vbcp;
|
||||||
if (here->VBIC_selfheat)
|
if (here->VBIC_selfheat) {
|
||||||
*(ckt->CKTstate0 + here->VBICcqcth) = Qcth_Vrth;
|
*(ckt->CKTstate0 + here->VBICcqcth) = Qcth_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICcqbeth) = Qbe_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICcqbexth) = Qbex_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICcqbcth) = Qbc_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICcqbcxth) = Qbcx_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICcqbepth) = Qbep_Vrth;
|
||||||
|
*(ckt->CKTstate0 + here->VBICcqbcpth) = Qbcp_Vrth;
|
||||||
|
}
|
||||||
continue; /* go to 1000 */
|
continue; /* go to 1000 */
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue