When NGSPICE performs a transient simulation with initial conditions, it
prints out an "Initial Transient Solution" and plots the first timestep. This is despite the fact that the first timestep is not meaningful when initial conditions are applied. The first "real" output is available only after the second transient timestep. This patch suppresses "Initial Transient Solution" output and plotting for the first timestep.
This commit is contained in:
parent
da71726765
commit
797f08893a
|
|
@ -59,15 +59,24 @@ INDload(GENmodel *inModel, CKTcircuit *ckt)
|
|||
muthere=MUTnextInstance(muthere)) {
|
||||
|
||||
if(!(ckt->CKTmode& (MODEDC|MODEINITPRED))) {
|
||||
*(ckt->CKTstate0 + muthere->MUTind1->INDflux) +=
|
||||
muthere->MUTfactor * *(ckt->CKTrhsOld +
|
||||
muthere->MUTind2->INDbrEq);
|
||||
/* set initial conditions for mutual inductance here, if uic is set */
|
||||
if (ckt->CKTmode & MODEUIC && ckt->CKTmode & MODEINITTRAN) {
|
||||
*(ckt->CKTstate0 + muthere->MUTind1->INDflux) +=
|
||||
muthere->MUTfactor * muthere->MUTind2->INDinitCond;
|
||||
|
||||
*(ckt->CKTstate0 + muthere->MUTind2->INDflux) +=
|
||||
muthere->MUTfactor * *(ckt->CKTrhsOld +
|
||||
muthere->MUTind1->INDbrEq);
|
||||
*(ckt->CKTstate0 + muthere->MUTind2->INDflux) +=
|
||||
muthere->MUTfactor * muthere->MUTind1->INDinitCond;
|
||||
}
|
||||
else {
|
||||
*(ckt->CKTstate0 + muthere->MUTind1->INDflux) +=
|
||||
muthere->MUTfactor * *(ckt->CKTrhsOld +
|
||||
muthere->MUTind2->INDbrEq);
|
||||
|
||||
*(ckt->CKTstate0 + muthere->MUTind2->INDflux) +=
|
||||
muthere->MUTfactor * *(ckt->CKTrhsOld +
|
||||
muthere->MUTind1->INDbrEq);
|
||||
}
|
||||
}
|
||||
|
||||
*(muthere->MUTbr1br2Ptr) -= muthere->MUTfactor*ckt->CKTag[0];
|
||||
*(muthere->MUTbr2br1Ptr) -= muthere->MUTfactor*ckt->CKTag[0];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue