From 476af5cafca668ef50e17d64914e2bb7d13fada6 Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Tue, 3 Sep 2024 16:03:40 +0300 Subject: [PATCH 1/3] Add simple TR model for mscorner --- src/components/microstrip/mscorner.cpp | 5 +++++ src/components/microstrip/mscorner.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/components/microstrip/mscorner.cpp b/src/components/microstrip/mscorner.cpp index 8361815d..7980972b 100644 --- a/src/components/microstrip/mscorner.cpp +++ b/src/components/microstrip/mscorner.cpp @@ -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))); } diff --git a/src/components/microstrip/mscorner.h b/src/components/microstrip/mscorner.h index bcacc87d..06c87761 100644 --- a/src/components/microstrip/mscorner.h +++ b/src/components/microstrip/mscorner.h @@ -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: From c52e031bcc69afc8248f6453ec981294df2ef84e Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Tue, 3 Sep 2024 16:20:25 +0300 Subject: [PATCH 2/3] Add simple TR model for bondwire --- src/components/microstrip/bondwire.cpp | 19 +++++++++++++++++++ src/components/microstrip/bondwire.h | 3 +++ 2 files changed, 22 insertions(+) diff --git a/src/components/microstrip/bondwire.cpp b/src/components/microstrip/bondwire.cpp index 246457a9..4140d0c5 100644 --- a/src/components/microstrip/bondwire.cpp +++ b/src/components/microstrip/bondwire.cpp @@ -386,6 +386,11 @@ void bondwire::initDC (void) { } } +void bondwire::initTR (void) +{ + initDC(); +} + /*! Initialize AC simulation. */ void bondwire::initAC (void) { getProperties (); @@ -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"); diff --git a/src/components/microstrip/bondwire.h b/src/components/microstrip/bondwire.h index 9bb25bf9..944ba7e0 100644 --- a/src/components/microstrip/bondwire.h +++ b/src/components/microstrip/bondwire.h @@ -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); From b17780c9362835e68bf2c92a5f4e70e47a18840d Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Wed, 4 Sep 2024 15:34:15 +0300 Subject: [PATCH 3/3] Add simple TR model for msmbend --- src/components/microstrip/msmbend.cpp | 5 +++++ src/components/microstrip/msmbend.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/components/microstrip/msmbend.cpp b/src/components/microstrip/msmbend.cpp index 8106de0d..9b5fbf1c 100644 --- a/src/components/microstrip/msmbend.cpp +++ b/src/components/microstrip/msmbend.cpp @@ -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))); } diff --git a/src/components/microstrip/msmbend.h b/src/components/microstrip/msmbend.h index e1b9142a..0962223c 100644 --- a/src/components/microstrip/msmbend.h +++ b/src/components/microstrip/msmbend.h @@ -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); };