32 twistedpair::twistedpair () :
circuit (4) {
42 calcPropagation (frequency);
45 nr_double_t p = 2 *
z0 + zl;
46 nr_double_t
n = 2 *
z0 - zl;
78 if (d != 0.0 && rho != 0.0 && len != 0.0) {
80 nr_double_t g1 =
M_PI *
sqr (d / 2) / rho / len;
111 nr_double_t twistedpair::calcLoss (nr_double_t frequency) {
117 nr_double_t delta, rout, rin, ad, ac, l0;
120 if (frequency > 0.0) {
121 delta =
sqrt (rho / (
M_PI * frequency *
MU0 * mur));
123 if (rin < 0.0) rin = 0.0;
126 ac = (rho *
M_1_PI) / (rout * rout - rin * rin) / zl;
130 ad =
M_PI * tand *
sqrt (ereff) / l0;
136 nr_double_t twistedpair::calcLength (
void) {
144 void twistedpair::calcPropagation (nr_double_t frequency) {
152 q = 0.25 + 0.001 * p * p;
153 q = 0.25 + 0.0004 * p * p;
154 ereff = 1.0 + q * (er - 1.0);
156 beta = 2 *
M_PI * frequency /
C0 *
sqrt (ereff);
158 alpha = calcLoss (frequency);
170 calcPropagation (frequency);