void pac::calcAC (nr_double_t) { nr_double_t p = getPropertyDouble ("P"); nr_double_t r = getPropertyDouble ("Z"); nr_double_t i = sqrt (8 * p / r); calcDC (); setI (NODE_1, +i); setI (NODE_2, -i); }
void pac::calcTR (nr_double_t t) { nr_double_t p = getPropertyDouble ("P"); nr_double_t r = getPropertyDouble ("Z"); nr_double_t f = getPropertyDouble ("f"); nr_double_t i = sqrt (8 * p / r) * sin (2 * M_PI * f * t); calcDC (); setI (NODE_1, +i); setI (NODE_2, -i); }
// Computes MNA entries during transient analysis. void digital::calcTR (nr_double_t t) { if (delay) { Tdelay = t - getPropertyDouble ("t"); calcOutput (); setE (VSRC_1, Vout); } else { calcDC (); } }
void inductor::initAC (void) { nr_double_t l = getPropertyDouble ("L"); // for non-zero inductance usual MNA entries if (l != 0.0) { setVoltageSources (0); allocMatrixMNA (); } // for zero inductance create a zero voltage source else { initDC (); calcDC (); } }
void resistor::calcTR (nr_double_t) { calcDC (); }
void opamp::calcTR (nr_double_t) { calcDC (); }