Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple TRAN models for mscorner, msmbend and bonwire #19

Merged
merged 3 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading