Beispiel #1
0
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);
}
Beispiel #2
0
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);
}
Beispiel #3
0
// 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 ();
  }
}
Beispiel #4
0
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 ();
  }
}
Beispiel #5
0
void resistor::calcTR (nr_double_t) {
  calcDC ();
}
Beispiel #6
0
void opamp::calcTR (nr_double_t) {
  calcDC ();
}