vbic: selfheating switch selft has priority, but keep compatibility

This commit is contained in:
dwarning 2023-04-02 17:22:52 +02:00
parent 4a95de5cd7
commit a3bc6ae744
1 changed files with 9 additions and 4 deletions

View File

@ -487,11 +487,16 @@ VBICsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
}
}
if((model->VBICthermalResistGiven) && (model->VBICthermalResist > 0.0)
&& model->VBICselftGiven && model->VBICselft == 1)
here->VBIC_selfheat = 1;
if(model->VBICselftGiven)
if(model->VBICselft == 1)
here->VBIC_selfheat = 1;
else
here->VBIC_selfheat = 0;
else
here->VBIC_selfheat = 0;
if((model->VBICthermalResistGiven) && (model->VBICthermalResist > 0.0))
here->VBIC_selfheat = 1;
else
here->VBIC_selfheat = 0;
if((model->VBICthermalResistGiven) && (model->VBICthermalCapacitance < 1e-12))
model->VBICthermalCapacitance = 1e-12;