36 using namespace qucs::device;
38 mstee::mstee () : circuit (3) {
39 lineA = lineB = line2 = NULL;
113 nr_double_t er = subst->getPropertyDouble (
"er");
114 nr_double_t
h = subst->getPropertyDouble (
"h");
115 nr_double_t
t = subst->getPropertyDouble (
"t");
120 nr_double_t Zla, Zlb, Zl2, Era, Erb, Er2;
123 nr_double_t ZlEff, ErEff, WEff;
135 nr_double_t Da, Db, D2, fpa, fpb, lda, ldb, da, db, d2,
r, q;
143 fpa = 0.4e6 * Zla /
h;
144 fpb = 0.4e6 * Zlb /
h;
151 da = 0.055 * D2 * Zla / Zl2 * (1 - 2 * Zla / Zl2 *
sqr (f / fpa));
152 db = 0.055 * D2 * Zlb / Zl2 * (1 - 2 * Zlb / Zl2 *
sqr (f / fpb));
160 q =
sqr (f) / fpa / fpb;
162 0.25 * r * q - 0.17 *
std::log (r)));
163 L2 = 0.5 *
MAX (Wa, Wb) - d2;
167 (
sqr (Zla / Zl2) / 12 +
sqr (0.5 - d2 / Da));
169 (
sqr (Zlb / Zl2) / 12 +
sqr (0.5 - d2 / Db));
171 Tb2 =
MAX (Tb2, NR_TINY);
174 Bt = 5.5 *
std::sqrt (Da * Db / lda / ldb) * (er + 2) / er /
177 20 *
sqr (Zl2 /
Z0));
191 const char *
c,
const char *
n,
int internal) {
194 char *
name = circuit::createInternal (c, base->getName ());
195 char *
node = circuit::createInternal (n, base->getName ());
196 line->setName (name);
197 line->setNode (0, base->getNode(
internal)->getName ());
198 line->setNode (1, node, 1);
199 subnet->insertCircuit (line);
203 base->setNode (
internal, line->getNode(1)->getName (), 1);
213 subnet->removeCircuit (line, 0);
214 base->setNode (
internal, line->getNode(1)->getName (), 0);
void setProperty(const char *, char *)
std::complex< nr_double_t > nr_complex_t
void allocMatrixN(int sources=0)
nr_double_t getPropertyDouble(const char *)
void setD(int, int, nr_complex_t)
int deviceEnabled(circuit *c)
substrate * getSubstrate(void)
void setInternalVoltageSource(bool i)
void setVoltageSources(int)
#define K
Absolute 0 in centigrade.
void setB(int, int, nr_complex_t)
static const nr_double_t z0
circuit * splitMicrostrip(circuit *base, circuit *line, net *subnet, const char *c, const char *n, int internal)
int getVoltageSources(void)
nr_complex_t sqr(const nr_complex_t z)
Square of complex number.
virtual void initNoiseAC(void)
virtual void initAC(void)
nr_complex_t sqrt(const nr_complex_t z)
Compute principal value of square root.
virtual void initSP(void)
placehoder for S-Parameter initialisation function
#define M_PI
Archimedes' constant ( )
virtual void calcAC(nr_double_t)
friend qucs::circuit * splitMicrostrip(qucs::circuit *, qucs::circuit *, qucs::net *, const char *, const char *, int)
friend void disableMicrostrip(qucs::circuit *, qucs::circuit *, qucs::net *, int)
void allocMatrixMNA(void)
void initSP(void)
placehoder for S-Parameter initialisation function
virtual void calcSP(nr_double_t)
virtual void initNoiseSP(void)
#define C0
speed of light in vacuum ( )
void voltageSource(int, int, int, nr_double_t value=0.0)
void disableMicrostrip(circuit *base, circuit *line, net *subnet, int internal)
static void analyseQuasiStatic(nr_double_t, nr_double_t, nr_double_t, nr_double_t, char *, nr_double_t &, nr_double_t &, nr_double_t &)
nr_complex_t exp(const nr_complex_t z)
Compute complex exponential.
void setS(int, int, nr_complex_t)
void setC(int, int, nr_complex_t)
static void analyseDispersion(nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t, char *, nr_double_t &, nr_double_t &)
void calcPropagation(nr_double_t)
char * getPropertyString(const char *)
nr_complex_t log(const nr_complex_t z)
Compute principal value of natural logarithm of z.
#define Z0
Wave impedance in vacuum ( )
void setSubstrate(substrate *)
#define MAX(x, y)
Maximum of x and y.