Skip to content

Commit

Permalink
Merge pull request #19 from ra3xdh/simple_tr
Browse files Browse the repository at this point in the history
Simple TRAN models for mscorner, msmbend and bonwire
  • Loading branch information
ra3xdh authored Sep 4, 2024
2 parents 3ecb782 + b17780c commit 975059b
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/components/microstrip/bondwire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,11 @@ void bondwire::initDC (void) {
}
}

void bondwire::initTR (void)
{
initDC();
}

/*! Initialize AC simulation. */
void bondwire::initAC (void) {
getProperties ();
Expand All @@ -400,6 +405,20 @@ void bondwire::calcAC (const nr_double_t frequency) {
setMatrixY (calcMatrixY (frequency));
}

void bondwire::calcDC(void)
{
if (rho != 0.0) {
nr_double_t g = 1.0 / resistance (0);
setY (NODE_1, NODE_1, +g); setY (NODE_2, NODE_2, +g);
setY (NODE_1, NODE_2, -g); setY (NODE_2, NODE_1, -g);
}
}

void bondwire::calcTR(nr_double_t t)
{
calcDC();
}

void bondwire::calcNoiseSP (nr_double_t) {
// calculate noise correlation matrix
nr_double_t T = getPropertyDouble ("Temp");
Expand Down
3 changes: 3 additions & 0 deletions src/components/microstrip/bondwire.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ class bondwire : public qucs::circuit
void calcNoiseSP (nr_double_t);
void initDC (void);
void initAC (void);
void initTR (void);
void calcDC (void);
void calcAC (nr_double_t);
void calcTR (nr_double_t);
void calcNoiseAC (nr_double_t);
qucs::matrix calcMatrixY (nr_double_t);
void saveCharacteristics (nr_double_t);
Expand Down
5 changes: 5 additions & 0 deletions src/components/microstrip/mscorner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ void mscorner::initAC (void) {
initCheck ();
}

void mscorner::initTR(void)
{
initDC();
}

void mscorner::calcAC (nr_double_t frequency) {
setMatrixY (ztoy (calcMatrixZ (frequency)));
}
Expand Down
1 change: 1 addition & 0 deletions src/components/microstrip/mscorner.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class mscorner : public qucs::circuit
void initSP (void);
void initDC (void);
void initAC (void);
void initTR (void);
void calcAC (nr_double_t);

private:
Expand Down
5 changes: 5 additions & 0 deletions src/components/microstrip/msmbend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ void msmbend::initAC (void) {
allocMatrixMNA ();
}

void msmbend::initTR (void)
{
initDC();
}

void msmbend::calcAC (nr_double_t frequency) {
setMatrixY (ztoy (calcMatrixZ (frequency)));
}
Expand Down
1 change: 1 addition & 0 deletions src/components/microstrip/msmbend.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class msmbend : public qucs::circuit
void calcSP (nr_double_t);
void initDC (void);
void initAC (void);
void initTR (void);
void calcAC (nr_double_t);
qucs::matrix calcMatrixZ (nr_double_t);
};
Expand Down

0 comments on commit 975059b

Please sign in to comment.