devices/res, #1/6, REScurrent, include RESm
Henceforward REScurrent (renamed to REScurrentX) shall include factor RESm. That's a mere rewrite and doesn't change functionality.
This commit is contained in:
parent
f73a353d6b
commit
5b23f0c684
|
|
@ -32,7 +32,7 @@ typedef struct sRESinstance {
|
|||
double RESdtemp; /* delta-temperature of a particular instance */
|
||||
double RESconduct; /* conductance at current analysis temperature */
|
||||
double RESresist; /* resistance at temperature Tnom */
|
||||
double REScurrent; /* The dc current in the resistor */
|
||||
double REScurrentX; /* The dc current in the resistor */
|
||||
/* serban */
|
||||
double RESacResist; /* AC resistance, useful for fancy .ac analyses */
|
||||
double RESacConduct; /* AC conductance */
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ RESload(GENmodel *inModel, CKTcircuit *ckt)
|
|||
for (here = model->RESinstances; here != NULL ;
|
||||
here = here->RESnextInstance) {
|
||||
|
||||
here->REScurrent = (*(ckt->CKTrhsOld+here->RESposNode) -
|
||||
*(ckt->CKTrhsOld+here->RESnegNode)) * here->RESconduct;
|
||||
here->REScurrentX = (*(ckt->CKTrhsOld+here->RESposNode) -
|
||||
*(ckt->CKTrhsOld+here->RESnegNode)) * here->RESm * here->RESconduct;
|
||||
|
||||
m = (here->RESm);
|
||||
|
||||
|
|
|
|||
|
|
@ -100,11 +100,11 @@ RESnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt,
|
|||
(double)0.0, (double)0.0);
|
||||
|
||||
#if 0
|
||||
printf("DC current in resistor %s: %e\n",inst->RESname, inst->REScurrent);
|
||||
printf("DC current in resistor %s: %e\n",inst->RESname, inst->REScurrentX);
|
||||
#endif
|
||||
|
||||
noizDens[RESFLNOIZ] *= inst->RESm * model->RESfNcoef *
|
||||
pow(fabs(inst->REScurrent), model->RESfNexp)
|
||||
pow(fabs(inst->REScurrentX / inst->RESm), model->RESfNexp)
|
||||
/ (inst->RESeffNoiseArea * pow(data->freq, model->RESef));
|
||||
lnNdens[RESFLNOIZ] = log(MAX(noizDens[RESFLNOIZ],N_MINLOG));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue