Allow global .temp in addition to instance parameter 'temp'.

Update to comments.
This commit is contained in:
Holger Vogt 2021-08-20 11:50:01 +02:00
parent cbb63215c4
commit 1084b4205c
1 changed files with 6 additions and 5 deletions

View File

@ -74,7 +74,7 @@ DIOsoaCheck(CKTcircuit *ckt, GENmodel *inModel)
*(ckt->CKTstate0 + here->DIOcurrent) * *(ckt->CKTstate0 + here->DIOcurrent) *
*(ckt->CKTstate0 + here->DIOcurrent) / here->DIOtConductance); *(ckt->CKTstate0 + here->DIOcurrent) / here->DIOtConductance);
/* calculate max power including derating: /* Calculate max power including derating:
up to tnom the derating is zero, up to tnom the derating is zero,
at maximum temp allowed the derating is 100%. at maximum temp allowed the derating is 100%.
Device temperature by self-heating or given externally. */ Device temperature by self-heating or given externally. */
@ -103,9 +103,10 @@ DIOsoaCheck(CKTcircuit *ckt, GENmodel *inModel)
} }
} }
/* derating without self-heating, external temp given */ /* Derating of max allowed power dissipation, without self-heating,
else if (!here->DIOthermal && here->DIOtempGiven && model->DIOrth0Given && model->DIOpd_maxGiven external temp given by .temp (global) or instance parameter 'temp',
&& model->DIOte_maxGiven && model->DIOnomTempGiven) { therefore no temperature limits are calculated */
else if (!here->DIOthermal && model->DIOrth0Given && model->DIOpd_maxGiven && model->DIOnomTempGiven) {
if (here->DIOtemp < model->DIOnomTemp) if (here->DIOtemp < model->DIOnomTemp)
pd_max = model->DIOpd_max; pd_max = model->DIOpd_max;
else { else {
@ -120,7 +121,7 @@ DIOsoaCheck(CKTcircuit *ckt, GENmodel *inModel)
warns_pd++; warns_pd++;
} }
} }
/* no derating */ /* No derating, max power is fixed by model parameter pd_max */
else { else {
pd_max = model->DIOpd_max; pd_max = model->DIOpd_max;
if (pd > pd_max) if (pd > pd_max)