removed rbi fallback, removed rth_de
This commit is contained in:
parent
162b174acd
commit
d735f445e5
|
|
@ -273,7 +273,6 @@ IFparm HICUMmPTable[] = { /* model parameters */
|
||||||
|
|
||||||
//Self-Heating
|
//Self-Heating
|
||||||
IOP("flsh", HICUM_MOD_FLSH , IF_INTEGER, "Flag for turning on and off self-heating effect"),
|
IOP("flsh", HICUM_MOD_FLSH , IF_INTEGER, "Flag for turning on and off self-heating effect"),
|
||||||
IOP("rth_de", HICUM_MOD_RTH_DE , IF_INTEGER, "Experimental flag for turning on and off self-heating using direct evaluation"),
|
|
||||||
IOP("rth", HICUM_MOD_RTH , IF_REAL, "Thermal resistance"),
|
IOP("rth", HICUM_MOD_RTH , IF_REAL, "Thermal resistance"),
|
||||||
IOP("zetarth", HICUM_MOD_ZETARTH, IF_REAL, "Temperature coefficient for Rth"),
|
IOP("zetarth", HICUM_MOD_ZETARTH, IF_REAL, "Temperature coefficient for Rth"),
|
||||||
IOP("alrth", HICUM_MOD_ALRTH , IF_REAL, "First order relative TC of parameter Rth"),
|
IOP("alrth", HICUM_MOD_ALRTH , IF_REAL, "First order relative TC of parameter Rth"),
|
||||||
|
|
|
||||||
|
|
@ -83,15 +83,9 @@ HICUMconvTest(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
*(ckt->CKTrhsOld+here->HICUMemitEINode));
|
*(ckt->CKTrhsOld+here->HICUMemitEINode));
|
||||||
|
|
||||||
Vciei = Vbiei - Vbici;
|
Vciei = Vbiei - Vbici;
|
||||||
//model->HICUMrth_de
|
Vrth = model->HICUMtype*(*(ckt->CKTrhsOld+here->HICUMtempNode));
|
||||||
if (model->HICUMrth_de==1) {
|
|
||||||
Vrth = *(ckt->CKTstate0 + here->HICUMith)*here->HICUMrth_t.rpart;
|
|
||||||
delvrth = 0;
|
|
||||||
} else {
|
|
||||||
Vrth = model->HICUMtype*(*(ckt->CKTrhsOld+here->HICUMtempNode));
|
|
||||||
delvrth = Vrth - *(ckt->CKTstate0 + here->HICUMvrth);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
delvrth = Vrth - *(ckt->CKTstate0 + here->HICUMvrth);
|
||||||
delvbiei = Vbiei - *(ckt->CKTstate0 + here->HICUMvbiei);
|
delvbiei = Vbiei - *(ckt->CKTstate0 + here->HICUMvbiei);
|
||||||
delvbici = Vbici - *(ckt->CKTstate0 + here->HICUMvbici);
|
delvbici = Vbici - *(ckt->CKTstate0 + here->HICUMvbici);
|
||||||
delvbpei = Vbpei - *(ckt->CKTstate0 + here->HICUMvbpei);
|
delvbpei = Vbpei - *(ckt->CKTstate0 + here->HICUMvbpei);
|
||||||
|
|
|
||||||
|
|
@ -703,7 +703,6 @@ typedef struct sHICUMmodel { /* model structure for a hicum */
|
||||||
|
|
||||||
//Self-Heating
|
//Self-Heating
|
||||||
int HICUMflsh;
|
int HICUMflsh;
|
||||||
int HICUMrth_de;
|
|
||||||
double HICUMrth;
|
double HICUMrth;
|
||||||
double HICUMzetarth;
|
double HICUMzetarth;
|
||||||
double HICUMalrth;
|
double HICUMalrth;
|
||||||
|
|
@ -1084,7 +1083,6 @@ enum {
|
||||||
|
|
||||||
//Self-Heating
|
//Self-Heating
|
||||||
HICUM_MOD_FLSH,
|
HICUM_MOD_FLSH,
|
||||||
HICUM_MOD_RTH_DE,
|
|
||||||
HICUM_MOD_RTH,
|
HICUM_MOD_RTH,
|
||||||
HICUM_MOD_ZETARTH,
|
HICUM_MOD_ZETARTH,
|
||||||
HICUM_MOD_ALRTH,
|
HICUM_MOD_ALRTH,
|
||||||
|
|
|
||||||
|
|
@ -461,9 +461,6 @@ HICUMmAsk(CKTcircuit *ckt, GENmodel *instPtr, int which, IFvalue *value)
|
||||||
case HICUM_MOD_FLSH:
|
case HICUM_MOD_FLSH:
|
||||||
value->iValue = model->HICUMflsh;
|
value->iValue = model->HICUMflsh;
|
||||||
return(OK);
|
return(OK);
|
||||||
case HICUM_MOD_RTH_DE:
|
|
||||||
value->iValue = model->HICUMrth_de;
|
|
||||||
return(OK);
|
|
||||||
case HICUM_MOD_RTH:
|
case HICUM_MOD_RTH:
|
||||||
value->rValue = model->HICUMrth;
|
value->rValue = model->HICUMrth;
|
||||||
return(OK);
|
return(OK);
|
||||||
|
|
|
||||||
|
|
@ -590,10 +590,6 @@ HICUMmParam(int param, IFvalue *value, GENmodel *inModel)
|
||||||
model->HICUMflsh = value->iValue;
|
model->HICUMflsh = value->iValue;
|
||||||
model->HICUMflshGiven = TRUE;
|
model->HICUMflshGiven = TRUE;
|
||||||
break;
|
break;
|
||||||
case HICUM_MOD_RTH_DE:
|
|
||||||
model->HICUMrth_de = value->iValue;
|
|
||||||
model->HICUMrth_deGiven = TRUE;
|
|
||||||
break;
|
|
||||||
case HICUM_MOD_RTH:
|
case HICUM_MOD_RTH:
|
||||||
model->HICUMrth = value->rValue;
|
model->HICUMrth = value->rValue;
|
||||||
model->HICUMrthGiven = TRUE;
|
model->HICUMrthGiven = TRUE;
|
||||||
|
|
|
||||||
|
|
@ -445,8 +445,6 @@ HICUMsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
||||||
//Self-Heating
|
//Self-Heating
|
||||||
if(!model->HICUMflshGiven)
|
if(!model->HICUMflshGiven)
|
||||||
model->HICUMflsh = 0;
|
model->HICUMflsh = 0;
|
||||||
if(!model->HICUMrth_deGiven)
|
|
||||||
model->HICUMrth_de = 0;
|
|
||||||
|
|
||||||
if(!model->HICUMrthGiven)
|
if(!model->HICUMrthGiven)
|
||||||
model->HICUMrth = 0.0;
|
model->HICUMrth = 0.0;
|
||||||
|
|
|
||||||
|
|
@ -1219,11 +1219,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
Vxf1 = *(ckt->CKTrhsOld + here->HICUMxf1Node);
|
Vxf1 = *(ckt->CKTrhsOld + here->HICUMxf1Node);
|
||||||
Vxf2 = *(ckt->CKTrhsOld + here->HICUMxf2Node);
|
Vxf2 = *(ckt->CKTrhsOld + here->HICUMxf2Node);
|
||||||
if (selfheat) {
|
if (selfheat) {
|
||||||
if (model->HICUMrth_de == 1) {
|
Vrth = *(ckt->CKTstate0 + here->HICUMvrth);
|
||||||
Vrth = *(ckt->CKTstate0 + here->HICUMith)*here->HICUMrth_t.rpart;
|
|
||||||
} else {
|
|
||||||
Vrth = *(ckt->CKTstate0 + here->HICUMvrth);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if(ckt->CKTmode & MODEINITTRAN) {
|
} else if(ckt->CKTmode & MODEINITTRAN) {
|
||||||
Vbiei = *(ckt->CKTstate1 + here->HICUMvbiei);
|
Vbiei = *(ckt->CKTstate1 + here->HICUMvbiei);
|
||||||
|
|
@ -1262,11 +1258,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
Vxf1 = *(ckt->CKTrhsOld + here->HICUMxf1Node);
|
Vxf1 = *(ckt->CKTrhsOld + here->HICUMxf1Node);
|
||||||
Vxf2 = *(ckt->CKTrhsOld + here->HICUMxf2Node);
|
Vxf2 = *(ckt->CKTrhsOld + here->HICUMxf2Node);
|
||||||
if (selfheat) {
|
if (selfheat) {
|
||||||
if (model->HICUMrth_de == 1) {
|
Vrth = *(ckt->CKTstate1 + here->HICUMvrth);
|
||||||
Vrth = *(ckt->CKTstate1 + here->HICUMith)*here->HICUMrth_t.rpart;
|
|
||||||
} else {
|
|
||||||
Vrth = *(ckt->CKTstate1 + here->HICUMvrth);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if((ckt->CKTmode & MODEINITJCT) &&
|
} else if((ckt->CKTmode & MODEINITJCT) &&
|
||||||
(ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)){
|
(ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)){
|
||||||
|
|
@ -1510,11 +1502,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
Vxf2 = *(ckt->CKTrhsOld + here->HICUMxf2Node);
|
Vxf2 = *(ckt->CKTrhsOld + here->HICUMxf2Node);
|
||||||
Vciei = Vbiei - Vbici;
|
Vciei = Vbiei - Vbici;
|
||||||
if (selfheat) {
|
if (selfheat) {
|
||||||
if (model->HICUMrth_de==1) {
|
Vrth = *(ckt->CKTrhsOld + here->HICUMtempNode);
|
||||||
Vrth = *(ckt->CKTstate0 + here->HICUMith)*here->HICUMrth_t.rpart;
|
|
||||||
} else {
|
|
||||||
Vrth = *(ckt->CKTrhsOld + here->HICUMtempNode);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef PREDICTOR
|
#ifndef PREDICTOR
|
||||||
|
|
@ -1567,11 +1555,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
Vxf1 = *(ckt->CKTrhsOld + here->HICUMxf1Node);
|
Vxf1 = *(ckt->CKTrhsOld + here->HICUMxf1Node);
|
||||||
Vxf2 = *(ckt->CKTrhsOld + here->HICUMxf2Node);
|
Vxf2 = *(ckt->CKTrhsOld + here->HICUMxf2Node);
|
||||||
if (selfheat) {
|
if (selfheat) {
|
||||||
if (model->HICUMrth_de==1) {
|
Vrth = *(ckt->CKTrhsOld + here->HICUMtempNode);
|
||||||
Vrth = *(ckt->CKTstate0 + here->HICUMith)*here->HICUMrth_t.rpart;
|
|
||||||
} else {
|
|
||||||
Vrth = *(ckt->CKTrhsOld + here->HICUMtempNode);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ibieihat = *(ckt->CKTstate0 + here->HICUMibiei) +
|
ibieihat = *(ckt->CKTstate0 + here->HICUMibiei) +
|
||||||
*(ckt->CKTstate0 + here->HICUMibiei_Vbiei)*delvbiei+
|
*(ckt->CKTstate0 + here->HICUMibiei_Vbiei)*delvbiei+
|
||||||
|
|
@ -1778,20 +1762,20 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
Vbiei = DEVpnjlim(Vbiei,*(ckt->CKTstate0 + here->HICUMvbiei),here->HICUMvt.rpart,
|
Vbiei = DEVpnjlim(Vbiei,*(ckt->CKTstate0 + here->HICUMvbiei),here->HICUMvt.rpart,
|
||||||
here->HICUMtVcrit,&icheck);
|
here->HICUMtVcrit,&icheck);
|
||||||
Vaval = 3 * here->HICUMvdci_t.rpart;//limit step around 3*vdci_t -> somehow this brings convergence
|
Vaval = 3 * here->HICUMvdci_t.rpart;//limit step around 3*vdci_t -> somehow this brings convergence
|
||||||
if ((model->HICUMkavlGiven) && (Vbici < MIN(0, -Vaval))) {
|
// if ((model->HICUMkavlGiven) && (Vbici < MIN(0, -Vaval))) {
|
||||||
Vbici_temp = -(Vbici + Vaval);
|
// Vbici_temp = -(Vbici + Vaval);
|
||||||
Vbici_temp = DEVpnjlim(
|
// Vbici_temp = DEVpnjlim(
|
||||||
Vbici_temp,
|
// Vbici_temp,
|
||||||
-(*(ckt->CKTstate0 + here->HICUMvbici) + Vaval),
|
// -(*(ckt->CKTstate0 + here->HICUMvbici) + Vaval),
|
||||||
here->HICUMvt.rpart,
|
// here->HICUMvt.rpart,
|
||||||
here->HICUMtVcrit,
|
// here->HICUMtVcrit,
|
||||||
&ichk1
|
// &ichk1
|
||||||
);
|
// );
|
||||||
Vbici = -(Vbici_temp + Vaval);
|
// Vbici = -(Vbici_temp + Vaval);
|
||||||
} else {
|
// } else {
|
||||||
Vbici = DEVpnjlim(Vbici,*(ckt->CKTstate0 + here->HICUMvbici),here->HICUMvt.rpart,
|
Vbici = DEVpnjlim(Vbici,*(ckt->CKTstate0 + here->HICUMvbici),here->HICUMvt.rpart,
|
||||||
here->HICUMtVcrit,&ichk1);
|
here->HICUMtVcrit,&ichk1);
|
||||||
}
|
//}
|
||||||
Vbpei = DEVpnjlim(Vbpei,*(ckt->CKTstate0 + here->HICUMvbpei),here->HICUMvt.rpart,
|
Vbpei = DEVpnjlim(Vbpei,*(ckt->CKTstate0 + here->HICUMvbpei),here->HICUMvt.rpart,
|
||||||
here->HICUMtVcrit,&ichk2);
|
here->HICUMtVcrit,&ichk2);
|
||||||
Vbpci = DEVpnjlim(Vbpci,*(ckt->CKTstate0 + here->HICUMvbpci),here->HICUMvt.rpart,
|
Vbpci = DEVpnjlim(Vbpci,*(ckt->CKTstate0 + here->HICUMvbpci),here->HICUMvt.rpart,
|
||||||
|
|
@ -1982,10 +1966,6 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
it_Vbici = itf_Vbici - itr_Vbici;
|
it_Vbici = itf_Vbici - itr_Vbici;
|
||||||
it_dT = itf_dT - itr_dT;
|
it_dT = itf_dT - itr_dT;
|
||||||
|
|
||||||
if (isnan(it)) {
|
|
||||||
it=0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//end final calculations --------------------------------------------------
|
//end final calculations --------------------------------------------------
|
||||||
|
|
||||||
here->HICUMtf = Tf;
|
here->HICUMtf = Tf;
|
||||||
|
|
@ -2355,23 +2335,14 @@ 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);
|
||||||
Ibpbi_Vrth = -Vbpbi * rbi_dT / (rbi*rbi);
|
Ibpbi_Vrth = -Vbpbi * rbi_dT / (rbi*rbi);
|
||||||
} else if(rbi >0.0 ) {
|
} else {
|
||||||
// fallback in case rbi is low
|
// fallback in case rbi is low
|
||||||
Ibpbi = Vbpbi / MIN_R;
|
Ibpbi = Vbpbi / MIN_R;
|
||||||
Ibpbi_Vbpbi = 1 / MIN_R;
|
Ibpbi_Vbpbi = 1 / MIN_R;
|
||||||
Ibpbi_Vbiei = 0;
|
Ibpbi_Vbiei = 0;
|
||||||
Ibpbi_Vbici = 0;
|
Ibpbi_Vbici = 0;
|
||||||
Ibpbi_Vrth = 0;
|
Ibpbi_Vrth = 0;
|
||||||
}
|
};
|
||||||
else {
|
|
||||||
// fallback in case rbi is not zero, but smaller than MIN_R
|
|
||||||
Ibpbi = 0;
|
|
||||||
Ibpbi_Vbpbi = 0;
|
|
||||||
Ibpbi_Vbiei = 0;
|
|
||||||
Ibpbi_Vbici = 0;
|
|
||||||
Ibpbi_Vrth = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ********************************************
|
// ********************************************
|
||||||
// For simulators having no problem with Vrth) <+ 0.0
|
// For simulators having no problem with Vrth) <+ 0.0
|
||||||
|
|
@ -2392,8 +2363,6 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
Ith_Vrth = 0.0;
|
Ith_Vrth = 0.0;
|
||||||
if(!selfheat) {
|
if(!selfheat) {
|
||||||
Ith = 0;
|
Ith = 0;
|
||||||
} else if (model->HICUMrth_de==1) {
|
|
||||||
Ith = -Vrth/here->HICUMrth_t.rpart+pterm; //Current from gnd to T
|
|
||||||
} else {
|
} else {
|
||||||
Ith = -Vrth/here->HICUMrth_t.rpart+pterm; //Current from gnd to T
|
Ith = -Vrth/here->HICUMrth_t.rpart+pterm; //Current from gnd to T
|
||||||
|
|
||||||
|
|
@ -3212,10 +3181,6 @@ load:
|
||||||
|
|
||||||
if (selfheat) {
|
if (selfheat) {
|
||||||
|
|
||||||
if (model->HICUMrth_de == 1) {
|
|
||||||
*(here->HICUMtempTempPtr) += 1;
|
|
||||||
*(ckt->CKTrhs + here->HICUMtempNode) += Vrth;
|
|
||||||
} else {
|
|
||||||
// #############################################################
|
// #############################################################
|
||||||
// ############### STAMP WITH SH ADDITIONS #####################
|
// ############### STAMP WITH SH ADDITIONS #####################
|
||||||
// #############################################################
|
// #############################################################
|
||||||
|
|
@ -3387,7 +3352,6 @@ load:
|
||||||
*(here->HICUMtempEmitEIPtr) += -Ith_Veie;
|
*(here->HICUMtempEmitEIPtr) += -Ith_Veie;
|
||||||
*(here->HICUMtempEmitPtr) += +Ith_Veie;
|
*(here->HICUMtempEmitPtr) += +Ith_Veie;
|
||||||
// finish
|
// finish
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue