Add model parameter selft, to switch on self-heating, default: off (selft=0)

This commit is contained in:
Holger Vogt 2023-03-22 17:40:49 +01:00
parent 5197200fb3
commit ff77c583d7
5 changed files with 17 additions and 2 deletions

View File

@ -184,7 +184,8 @@ IFparm VBICmPTable[] = { /* model parameters */
IOP("vbc_max", VBIC_MOD_VBC_MAX, IF_REAL, "maximum voltage B-C junction"),
IOPR("bvbc", VBIC_MOD_VBC_MAX, IF_REAL, "maximum voltage B-C junction"),
IOP("vce_max", VBIC_MOD_VCE_MAX, IF_REAL, "maximum voltage C-E branch"),
IOPR("bvce", VBIC_MOD_VCE_MAX, IF_REAL, "maximum voltage C-E branch")
IOPR("bvce", VBIC_MOD_VCE_MAX, IF_REAL, "maximum voltage C-E branch"),
IOP("selft", VBIC_MOD_SELFT, IF_INTEGER, "0: self-heating off, 1: self-heating on")
};
char *VBICnames[] = {

View File

@ -457,6 +457,7 @@ typedef struct sVBICmodel { /* model structure for a vbic */
double VBICtempExpAVC;
double VBICthermalResist;
double VBICthermalCapacitance;
int VBICselft;
double VBICpunchThroughVoltageBC;
double VBICdeplCapCoeff1;
double VBICfixedCapacitanceCS;
@ -571,6 +572,7 @@ typedef struct sVBICmodel { /* model structure for a vbic */
unsigned VBICtempExpNFGiven : 1;
unsigned VBICtempExpAVCGiven : 1;
unsigned VBICthermalResistGiven : 1;
unsigned VBICselftGiven : 1;
unsigned VBICthermalCapacitanceGiven : 1;
unsigned VBICpunchThroughVoltageBCGiven : 1;
unsigned VBICdeplCapCoeff1Given : 1;
@ -734,6 +736,7 @@ enum {
VBIC_MOD_VBE_MAX,
VBIC_MOD_VBC_MAX,
VBIC_MOD_VCE_MAX,
VBIC_MOD_SELFT,
};
/* device questions */

View File

@ -369,6 +369,9 @@ VBICmAsk(CKTcircuit *ckt, GENmodel *instPtr, int which, IFvalue *value)
else
value->sValue = "pnp";
return(OK);
case VBIC_MOD_SELFT:
value->iValue = here->VBICselft;
return(OK);
default:
return(E_BADPARM);
}

View File

@ -509,6 +509,10 @@ VBICmParam(int param, IFvalue *value, GENmodel *inModel)
mods->VBICvceMax = value->rValue;
mods->VBICvceMaxGiven = TRUE;
break;
case VBIC_MOD_SELFT:
mods->VBICselft = value->iValue;
mods->VBICselftGiven = TRUE;
break;
default:
return(E_BADPARM);
}

View File

@ -391,6 +391,9 @@ VBICsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
if(!model->VBICvceMaxGiven) {
model->VBICvceMax = 1e99;
}
if(!model->VBICselftGiven) {
model->VBICselft = 0;
}
/* loop through all the instances of the model */
for (here = VBICinstances(model); here != NULL ;
@ -472,7 +475,8 @@ VBICsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
}
}
if((model->VBICthermalResistGiven) && (model->VBICthermalResist > 0.0))
if((model->VBICthermalResistGiven) && (model->VBICthermalResist > 0.0)
&& model->VBICselftGiven && model->VBICselft == 1)
here->VBIC_selfheat = 1;
else
here->VBIC_selfheat = 0;