test of supply ramping
This commit is contained in:
parent
89f78bfc6c
commit
b07a54b8e1
|
|
@ -236,6 +236,19 @@ OPtran(CKTcircuit *ckt)
|
||||||
// int type = ckt->CKTcurJob->JOBtype;
|
// int type = ckt->CKTcurJob->JOBtype;
|
||||||
|
|
||||||
SPfrontEnd->IFerrorf(ERR_INFO, "Transient op started");
|
SPfrontEnd->IFerrorf(ERR_INFO, "Transient op started");
|
||||||
|
if (opramptime > 0) {
|
||||||
|
CKTnode* n;
|
||||||
|
ckt->CKTsrcFact = 0.;
|
||||||
|
SPfrontEnd->IFerrorf(ERR_INFO, "Ramptime enabled");
|
||||||
|
for (n = ckt->CKTnodes; n; n = n->next)
|
||||||
|
ckt->CKTrhsOld[n->number] = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < ckt->CKTnumStates; i++)
|
||||||
|
ckt->CKTstate0[i] = 0;
|
||||||
|
|
||||||
|
/* First, try a straight solution with all sources at zero */
|
||||||
|
converged = NIiter(ckt, ckt->CKTdcTrcvMaxIter);
|
||||||
|
}
|
||||||
#if 0
|
#if 0
|
||||||
/* Set the final time */
|
/* Set the final time */
|
||||||
/* If we are in transient simulation */
|
/* If we are in transient simulation */
|
||||||
|
|
@ -554,7 +567,6 @@ resume:
|
||||||
}
|
}
|
||||||
ckt->CKTstates[0] = temp;
|
ckt->CKTstates[0] = temp;
|
||||||
|
|
||||||
/* 600 */
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
#if defined SHARED_MODULE
|
#if defined SHARED_MODULE
|
||||||
redostep = 1;
|
redostep = 1;
|
||||||
|
|
@ -564,6 +576,10 @@ resume:
|
||||||
/* time abort? */
|
/* time abort? */
|
||||||
optime += ckt->CKTdelta;
|
optime += ckt->CKTdelta;
|
||||||
|
|
||||||
|
/* supply ramping, when opramptime > 0 */
|
||||||
|
if (opramptime > 0)
|
||||||
|
ckt->CKTsrcFact = MIN(1., optime / opramptime);
|
||||||
|
|
||||||
ckt->CKTdeltaOld[0]=ckt->CKTdelta;
|
ckt->CKTdeltaOld[0]=ckt->CKTdelta;
|
||||||
NIcomCof(ckt);
|
NIcomCof(ckt);
|
||||||
save_mode = ckt->CKTmode;
|
save_mode = ckt->CKTmode;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue