34 circulator::circulator () : circuit (3) {
35 type = CIR_CIRCULATOR;
36 setVoltageSources (3);
43 nr_double_t r1 = (
z0 - z1) / (
z0 + z1);
44 nr_double_t r2 = (
z0 - z2) / (
z0 + z2);
45 nr_double_t r3 = (
z0 - z3) / (
z0 + z3);
46 nr_double_t
d = 1 - r1 * r2 * r3;
51 (z2 +
z0) * r3 * (1 - r1 * r1) / d);
53 (z3 +
z0) * r1 * (1 - r2 * r2) / d);
55 (z1 +
z0) * r2 * (1 - r3 * r3) / d);
57 (z1 +
z0) * (1 - r2 * r2) / d);
59 (z3 +
z0) * (1 - r1 * r1) / d);
61 (z2 +
z0) * (1 - r3 * r3) / d);
68 nr_double_t r1 = (
z0 - z1) / (
z0 + z1);
69 nr_double_t r2 = (
z0 - z2) / (
z0 + z2);
70 nr_double_t r3 = (
z0 - z3) / (
z0 + z3);
71 nr_double_t
d = 1 - r1 * r2 * r3;
73 nr_double_t s11 = (r2 * r3 - r1) / d;
74 nr_double_t s22 = (r1 * r3 - r2) / d;
75 nr_double_t s33 = (r1 * r2 - r3) / d;
76 nr_double_t s12 =
std::sqrt (z2/z1) * (z1+
z0) / (z2+
z0) * r3 * (1-r1*r1) / d;
77 nr_double_t s23 =
std::sqrt (z3/z2) * (z2+
z0) / (z3+
z0) * r1 * (1-r2*r2) / d;
78 nr_double_t s31 =
std::sqrt (z1/z3) * (z3+
z0) / (z1+
z0) * r2 * (1-r3*r3) / d;
79 nr_double_t s21 =
std::sqrt (z1/z2) * (z2+
z0) / (z1+
z0) * (1-r2*r2) / d;
80 nr_double_t s13 =
std::sqrt (z3/z1) * (z1+
z0) / (z3+
z0) * (1-r1*r1) / d;
81 nr_double_t s32 =
std::sqrt (z2/z3) * (z3+
z0) / (z2+
z0) * (1-r3*r3) / d;
nr_double_t getPropertyDouble(const char *)
void setD(int, int, nr_complex_t)
void setB(int, int, nr_complex_t)
static const nr_double_t z0
nr_complex_t sqrt(const nr_complex_t z)
Compute principal value of square root.
void setE(int, nr_complex_t)
void allocMatrixMNA(void)
void setS(int, int, nr_complex_t)
void setC(int, int, nr_complex_t)