Re: [Help-gnucap] Possibly a bug?
al davis <[email protected]> Wed, 22 May 2013 12:24:04 -0400
| Newsgroups | gmane.comp.gnu.gnucap.devel,gmane.comp.gnu.gnucap.general |
|---|---|
| Message-ID | <[email protected]> |
On Wednesday 22 May 2013, Orestes Mas wrote:
> I'm obtaining unexpected results (NaN) when simulating a
> simple circuit:
Try adding a line .....
/*---------------------------------------------------- */
void DEV_RESISTANCE::precalc_last()
{
ELEMENT::precalc_last();
_y[0].f1 = (value() != 0.) ? value() : OPT::shortckt;
set_constant(!has_tr_eval());
set_converged(!has_tr_eval());
}
/*-----------------------------------------------------*/
As Felix said .. it's a divide by zero problem converting
resistance (zero) to admittance.
Problem started associated with plugin conversion, or explicit
"precalc_last".