devices/res, bug fix, semantics of "short" and "narrow", aka "dlr" and "dw"

These need to be subtracted from both sides
This commit is contained in:
rlar 2017-10-01 19:04:16 +02:00
parent e0126a4947
commit 1c5e954b47
2 changed files with 4 additions and 4 deletions

View File

@ -58,8 +58,8 @@ RESsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit*ckt, int *state)
here->RESbv_max = model->RESbv_max;
if((here->RESwidthGiven)||(here->RESlengthGiven))
here->RESeffNoiseArea = pow((here->RESlength-model->RESshort),model->RESlf)
*pow((here->RESwidth-model->RESnarrow),model->RESwf);
here->RESeffNoiseArea = pow(here->RESlength - 2 * model->RESshort, model->RESlf)
*pow(here->RESwidth - 2 * model->RESnarrow, model->RESwf);
else
here->RESeffNoiseArea = 1.0;

View File

@ -36,8 +36,8 @@ REStemp(GENmodel *inModel, CKTcircuit *ckt)
if (!here->RESresGiven) {
if (here->RESlength * here->RESwidth * model->RESsheetRes > 0.0) {
here->RESresist =
(here->RESlength - model->RESshort) /
(here->RESwidth - model->RESnarrow) *
(here->RESlength - 2 * model->RESshort) /
(here->RESwidth - 2 * model->RESnarrow) *
model->RESsheetRes;
} else if (model->RESresGiven) {
here->RESresist = model->RESres;