devices/res, #4/6, RESacConduct, include RESm
Henceforward RESacConduct (renamed to RESacConductX) shall include factor RESm. That's a mere rewrite and doesn't change functionality.
This commit is contained in:
parent
6941c43673
commit
afd5147f98
|
|
@ -43,7 +43,7 @@ RESask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value,
|
|||
value->rValue = fast->RESresist;
|
||||
return(OK);
|
||||
case RES_ACCONDUCT:
|
||||
value->rValue = fast->RESm * fast->RESacConduct;
|
||||
value->rValue = fast->RESacConductX;
|
||||
return (OK);
|
||||
case RES_ACRESIST:
|
||||
value->rValue = fast->RESacResist;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ typedef struct sRESinstance {
|
|||
double REScurrentX; /* The dc current in the resistor */
|
||||
/* serban */
|
||||
double RESacResist; /* AC resistance, useful for fancy .ac analyses */
|
||||
double RESacConduct; /* AC conductance */
|
||||
double RESacConductX; /* AC conductance */
|
||||
double RESwidth; /* width of the resistor */
|
||||
double RESlength; /* length of the resistor */
|
||||
double RESscale; /* Scale factor */
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ RESacload(GENmodel *inModel, CKTcircuit *ckt)
|
|||
here = here->RESnextInstance) {
|
||||
|
||||
if (here->RESacresGiven)
|
||||
g = here->RESm * here->RESacConduct;
|
||||
g = here->RESacConductX;
|
||||
else
|
||||
g = here->RESm * here->RESconduct;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ RESpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
here=here->RESnextInstance) {
|
||||
|
||||
if (here->RESacresGiven)
|
||||
g = here->RESm * here->RESacConduct;
|
||||
g = here->RESacConductX;
|
||||
else
|
||||
g = here->RESm * here->RESconduct;
|
||||
|
||||
|
|
|
|||
|
|
@ -36,10 +36,10 @@ RESsAcLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
*(ckt->CKTrhsOld+here->RESnegNode);
|
||||
ivalue = *(ckt->CKTirhsOld+here->RESposNode) -
|
||||
*(ckt->CKTirhsOld+here->RESnegNode);
|
||||
value *= here->RESm * here->RESacConduct;
|
||||
value *= here->RESm * here->RESacConduct;
|
||||
ivalue *= here->RESm * here->RESacConduct;
|
||||
ivalue *= here->RESm * here->RESacConduct;
|
||||
value *= here->RESacConductX;
|
||||
value *= here->RESacConductX;
|
||||
ivalue *= here->RESacConductX;
|
||||
ivalue *= here->RESacConductX;
|
||||
|
||||
/* load the RHS matrix */
|
||||
*(ckt->CKTsenInfo->SEN_RHS[here->RESposNode] +
|
||||
|
|
|
|||
|
|
@ -102,9 +102,9 @@ RESupdate_conduct(RESinstance *here, bool spill_warnings)
|
|||
|
||||
/* Paolo Nenzi: AC value */
|
||||
if (here->RESacresGiven) {
|
||||
here->RESacConduct = (1.0/(here->RESacResist * factor * here->RESscale));
|
||||
here->RESacConductX = here->RESm / (here->RESacResist * factor * here->RESscale);
|
||||
} else {
|
||||
here->RESacConduct = here->RESconduct;
|
||||
here->RESacConductX = here->RESm * here->RESconduct;
|
||||
here->RESacResist = here->RESresist;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue