long __Call_cosech( CDSR_VMEval& /*vm*/, MMD_Address& addr, UniWord *arg ) { #if _DEBUG if( addr.param2 < 0 ) throw _T("__Call_(fun) : internal error, out of range"); #endif if( addr.param2 == 0 ) // DSRDATA_TYPE_REAL *(arg - 1) = CDSRReal( cosech( (arg - 1)->getReal() ) ); else // DSRDATA_TYPE_COMPLEX *(arg - 1) = CDSRComplex( cosech( (arg - 1)->getComplex() ) ); return 1 - addr.param3; }
void coaxline::calcAC (nr_double_t frequency) { nr_double_t l = getPropertyDouble ("L"); // calculate propagation constants calcPropagation (frequency); // calculate Y-parameters nr_complex_t g = rect (alpha, beta); nr_complex_t y11 = coth (g * l) / zl; nr_complex_t y21 = -cosech (g * l) / zl; setY (NODE_1, NODE_1, y11); setY (NODE_2, NODE_2, y11); setY (NODE_1, NODE_2, y21); setY (NODE_2, NODE_1, y21); }
void twistedpair::calcAC (nr_double_t frequency) { if (len != 0.0) { calcPropagation (frequency); nr_complex_t g = rect (alpha, beta); nr_complex_t y11 = coth (g * len) / zl; nr_complex_t y21 = -cosech (g * len) / zl; setY (NODE_1, NODE_1, +y11); setY (NODE_2, NODE_2, +y11); setY (NODE_3, NODE_3, +y11); setY (NODE_4, NODE_4, +y11); setY (NODE_1, NODE_4, -y11); setY (NODE_4, NODE_1, -y11); setY (NODE_2, NODE_3, -y11); setY (NODE_3, NODE_2, -y11); setY (NODE_1, NODE_2, +y21); setY (NODE_2, NODE_1, +y21); setY (NODE_3, NODE_4, +y21); setY (NODE_4, NODE_3, +y21); setY (NODE_1, NODE_3, -y21); setY (NODE_3, NODE_1, -y21); setY (NODE_2, NODE_4, -y21); setY (NODE_4, NODE_2, -y21); } }
void tline4p::calcAC (nr_double_t frequency) { nr_double_t l = getPropertyDouble ("L"); nr_double_t z = getPropertyDouble ("Z"); nr_double_t a = getPropertyDouble ("Alpha"); nr_double_t b = 2 * M_PI * frequency / C0; a = log (a) / 2; if (l != 0.0) { nr_complex_t g = rect (a, b); nr_complex_t y11 = coth (g * l) / z; nr_complex_t y21 = -cosech (g * l) / z; setY (NODE_1, NODE_1, +y11); setY (NODE_2, NODE_2, +y11); setY (NODE_3, NODE_3, +y11); setY (NODE_4, NODE_4, +y11); setY (NODE_1, NODE_4, -y11); setY (NODE_4, NODE_1, -y11); setY (NODE_2, NODE_3, -y11); setY (NODE_3, NODE_2, -y11); setY (NODE_1, NODE_2, +y21); setY (NODE_2, NODE_1, +y21); setY (NODE_3, NODE_4, +y21); setY (NODE_4, NODE_3, +y21); setY (NODE_1, NODE_3, -y21); setY (NODE_3, NODE_1, -y21); setY (NODE_2, NODE_4, -y21); setY (NODE_4, NODE_2, -y21); } }