KiCad PCB EDA Suite
COPLANAR Class Reference

#include <coplanar.h>

Inheritance diagram for COPLANAR:
TRANSLINE GROUNDEDCOPLANAR

Public Member Functions

 COPLANAR ()
 
void calcSynthesize () override
 Computation for synthesis. More...
 
void setProperty (enum PRMS_ID aPrmId, double aValue)
 
double getProperty (enum PRMS_ID aPrmId)
 
void getProperties (void)
 @function getProperties More...
 
void checkProperties (void)
 @function checkProperties More...
 
void setResult (int, double, const char *)
 
void setResult (int, const char *)
 
bool isSelected (enum PRMS_ID aPrmId)
 
void Init ()
 
virtual void synthesize ()
 
virtual void calc ()
 
void analyze ()
 

Public Attributes

const char * m_Name
 
KIGFX::COLOR4D errCol = KIGFX::COLOR4D( 1, 0.63, 0.63, 1 )
 
KIGFX::COLOR4D warnCol = KIGFX::COLOR4D( 1, 1, 0.57, 1 )
 
KIGFX::COLOR4D okCol = KIGFX::COLOR4D( 1, 1, 1, 1 )
 

Protected Member Functions

bool minimizeZ0Error1D (double *)
 @function minimizeZ0Error1D More...
 
double skin_depth ()
 @function skin_depth calculate skin depth More...
 
void ellipke (double, double &, double &)
 
double ellipk (double)
 
void setErrorLevel (PRMS_ID, char)
 @function setErrorLevel More...
 

Protected Attributes

bool backMetal
 
double m_parameters [EXTRA_PRMS_COUNT]
 
double len
 
double er_eff
 
double ang_l
 

Private Member Functions

void calcAnalyze () override
 Computation for analysis. More...
 
void showSynthesize () override
 Shows analysis results and checks for errors / warnings. More...
 
void showAnalyze () override
 Shows synthesis results and checks for errors / warnings. More...
 
void show_results () override
 Shows results. More...
 

Detailed Description

Definition at line 30 of file coplanar.h.

Constructor & Destructor Documentation

◆ COPLANAR()

COPLANAR::COPLANAR ( )

Definition at line 34 of file coplanar.cpp.

34  : TRANSLINE()
35 {
36  m_Name = "CoPlanar";
37  backMetal = false;
38  Init();
39 }
void Init()
Definition: transline.cpp:87
bool backMetal
Definition: coplanar.h:39
const char * m_Name
Definition: transline.h:85

References backMetal, TRANSLINE::Init(), and TRANSLINE::m_Name.

Member Function Documentation

◆ analyze()

void TRANSLINE::analyze ( )
inherited

Definition at line 203 of file transline.cpp.

204 {
205  getProperties();
206  checkProperties();
207  calcAnalyze();
208  showAnalyze();
209  show_results();
210 }
virtual void calcAnalyze()
Computation for analysis.
Definition: transline.h:101
void checkProperties(void)
@function checkProperties
Definition: transline.cpp:161
virtual void show_results()
Shows results.
Definition: transline.h:113
virtual void showAnalyze()
Shows synthesis results and checks for errors / warnings.
Definition: transline.h:107
void getProperties(void)
@function getProperties
Definition: transline.cpp:144

References TRANSLINE::calcAnalyze(), TRANSLINE::checkProperties(), TRANSLINE::getProperties(), TRANSLINE::show_results(), and TRANSLINE::showAnalyze().

Referenced by PCB_CALCULATOR_FRAME::OnTranslineAnalyse().

◆ calc()

virtual void TRANSLINE::calc ( )
inlinevirtualinherited

Definition at line 98 of file transline.h.

98 {};

◆ calcAnalyze()

void COPLANAR::calcAnalyze ( )
overrideprivatevirtual

Computation for analysis.

Reimplemented from TRANSLINE.

Definition at line 50 of file coplanar.cpp.

51 {
53 
54  // other local variables (quasi-static constants)
55  double k1, kk1, kpk1, k2, k3, q1, q2, q3 = 0, qz, er0 = 0;
56  double zl_factor;
57 
58  // compute the necessary quasi-static approx. (K1, K3, er(0) and Z(0))
61  kk1 = ellipk( k1 );
62  kpk1 = ellipk( sqrt( 1 - k1 * k1 ) );
63  q1 = kk1 / kpk1;
64 
65 
66  // backside is metal
67  if( backMetal )
68  {
69  k3 = tanh( ( M_PI / 4 ) * ( m_parameters[PHYS_WIDTH_PRM] / m_parameters[H_PRM] ) )
70  / tanh( ( M_PI / 4 )
73  / m_parameters[H_PRM] );
74  q3 = ellipk( k3 ) / ellipk( sqrt( 1 - k3 * k3 ) );
75  qz = 1 / ( q1 + q3 );
76  er0 = 1 + q3 * qz * ( m_parameters[EPSILONR_PRM] - 1 );
77  zl_factor = ZF0 / 2 * qz;
78  }
79  // backside is air
80  else
81  {
82  k2 = sinh( ( M_PI / 4 ) * ( m_parameters[PHYS_WIDTH_PRM] / m_parameters[H_PRM] ) )
83  / sinh( ( M_PI / 4 )
86  / m_parameters[H_PRM] );
87  q2 = ellipk( k2 ) / ellipk( sqrt( 1 - k2 * k2 ) );
88  er0 = 1 + ( m_parameters[EPSILONR_PRM] - 1 ) / 2 * q2 / q1;
89  zl_factor = ZF0 / 4 / q1;
90  }
91 
92 
93  // adds effect of strip thickness
94  if( m_parameters[T_PRM] > 0 )
95  {
96  double d, se, We, ke, qe;
97  d = ( m_parameters[T_PRM] * 1.25 / M_PI )
98  * ( 1 + log( 4 * M_PI * m_parameters[PHYS_WIDTH_PRM] / m_parameters[T_PRM] ) );
99  se = m_parameters[PHYS_S_PRM] - d;
100  We = m_parameters[PHYS_WIDTH_PRM] + d;
101 
102  // modifies k1 accordingly (k1 = ke)
103  ke = We / ( We + se + se ); // ke = k1 + (1 - k1 * k1) * d / 2 / s;
104  qe = ellipk( ke ) / ellipk( sqrt( 1 - ke * ke ) );
105 
106  // backside is metal
107  if( backMetal )
108  {
109  qz = 1 / ( qe + q3 );
110  er0 = 1 + q3 * qz * ( m_parameters[EPSILONR_PRM] - 1 );
111  zl_factor = ZF0 / 2 * qz;
112  }
113  // backside is air
114  else
115  {
116  zl_factor = ZF0 / 4 / qe;
117  }
118 
119  // modifies er0 as well
120  er0 = er0
121  - ( 0.7 * ( er0 - 1 ) * m_parameters[T_PRM] / m_parameters[PHYS_S_PRM] )
122  / ( q1 + ( 0.7 * m_parameters[T_PRM] / m_parameters[PHYS_S_PRM] ) );
123  }
124 
125  // pre-compute square roots
126  double sr_er = sqrt( m_parameters[EPSILONR_PRM] );
127  double sr_er0 = sqrt( er0 );
128 
129  // cut-off frequency of the TE0 mode
130  double fte = ( C0 / 4 ) / ( m_parameters[H_PRM] * sqrt( m_parameters[EPSILONR_PRM] - 1 ) );
131 
132  // dispersion factor G
133  double p = log( m_parameters[PHYS_WIDTH_PRM] / m_parameters[H_PRM] );
134  double u = 0.54 - ( 0.64 - 0.015 * p ) * p;
135  double v = 0.43 - ( 0.86 - 0.54 * p ) * p;
136  double G = exp( u * log( m_parameters[PHYS_WIDTH_PRM] / m_parameters[PHYS_S_PRM] ) + v );
137 
138  // loss constant factors (computed only once for efficiency's sake)
139  double ac = 0;
140  if( m_parameters[T_PRM] > 0 )
141  {
142  // equations by GHIONE
143  double n = ( 1 - k1 ) * 8 * M_PI / ( m_parameters[T_PRM] * ( 1 + k1 ) );
144  double a = m_parameters[PHYS_WIDTH_PRM] / 2;
145  double b = a + m_parameters[PHYS_S_PRM];
146  ac = ( M_PI + log( n * a ) ) / a + ( M_PI + log( n * b ) ) / b;
147  }
148  double ac_factor = ac / ( 4 * ZF0 * kk1 * kpk1 * ( 1 - k1 * k1 ) );
149  double ad_factor = ( m_parameters[EPSILONR_PRM] / ( m_parameters[EPSILONR_PRM] - 1 ) )
150  * m_parameters[TAND_PRM] * M_PI / C0;
151 
152 
153  // ....................................................
154  double sr_er_f = sr_er0;
155 
156  // add the dispersive effects to er0
157  sr_er_f += ( sr_er - sr_er0 ) / ( 1 + G * pow( m_parameters[FREQUENCY_PRM] / fte, -1.8 ) );
158 
159  // for now, the loss are limited to strip losses (no radiation
160  // losses yet) losses in neper/length
162  20.0 / log( 10.0 ) * m_parameters[PHYS_LEN_PRM] * ac_factor * sr_er0
163  * sqrt( M_PI * MU0 * m_parameters[FREQUENCY_PRM] / m_parameters[SIGMA_PRM] );
164  m_parameters[LOSS_DIELECTRIC_PRM] = 20.0 / log( 10.0 ) * m_parameters[PHYS_LEN_PRM] * ad_factor
165  * m_parameters[FREQUENCY_PRM] * ( sr_er_f * sr_er_f - 1 )
166  / sr_er_f;
167 
168  m_parameters[ANG_L_PRM] = 2.0 * M_PI * m_parameters[PHYS_LEN_PRM] * sr_er_f
169  * m_parameters[FREQUENCY_PRM] / C0; /* in radians */
170 
171  m_parameters[EPSILON_EFF_PRM] = sr_er_f * sr_er_f;
172  m_parameters[Z0_PRM] = zl_factor / sr_er_f;
173 }
bool backMetal
Definition: coplanar.h:39
#define MU0
Definition: units.h:61
#define G(x, y, z)
Definition: md5_hash.cpp:16
double ellipk(double)
Definition: transline.cpp:312
#define ZF0
Definition: units.h:63
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:120
#define C0
Definition: units.h:62
double skin_depth()
@function skin_depth calculate skin depth
Definition: transline.cpp:229

References ANG_L_PRM, backMetal, C0, TRANSLINE::ellipk(), EPSILON_EFF_PRM, EPSILONR_PRM, FREQUENCY_PRM, G, H_PRM, LOSS_CONDUCTOR_PRM, LOSS_DIELECTRIC_PRM, TRANSLINE::m_parameters, MU0, PHYS_LEN_PRM, PHYS_S_PRM, PHYS_WIDTH_PRM, SIGMA_PRM, TRANSLINE::skin_depth(), SKIN_DEPTH_PRM, T_PRM, TAND_PRM, Z0_PRM, and ZF0.

◆ calcSynthesize()

void COPLANAR::calcSynthesize ( )
overridevirtual

Computation for synthesis.

Reimplemented from TRANSLINE.

Definition at line 196 of file coplanar.cpp.

197 {
198  if( isSelected( PHYS_WIDTH_PRM ) )
199  {
201  }
202  else
203  {
205  }
206 }
bool isSelected(enum PRMS_ID aPrmId)
Definition: transline.cpp:116
bool minimizeZ0Error1D(double *)
@function minimizeZ0Error1D
Definition: transline.cpp:337
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:120

References TRANSLINE::isSelected(), TRANSLINE::m_parameters, TRANSLINE::minimizeZ0Error1D(), PHYS_S_PRM, and PHYS_WIDTH_PRM.

◆ checkProperties()

void TRANSLINE::checkProperties ( void  )
inherited

@function checkProperties

Checks the input parameters (ie: negative length). Does not check for incompatibility between values as this depends on the line shape.

Definition at line 161 of file transline.cpp.

162 {
163  // Do not check for values that are results of anylzing / synthesizing
164  // Do not check for transline specific incompatibilities ( like " conductor height sould be lesser than dielectric height")
165  if( !std::isfinite( m_parameters[EPSILONR_PRM] ) || m_parameters[EPSILONR_PRM] <= 0 )
167 
168  if( !std::isfinite( m_parameters[TAND_PRM] ) || m_parameters[TAND_PRM] < 0 )
170 
171  if( !std::isfinite( m_parameters[RHO_PRM] ) || m_parameters[RHO_PRM] < 0 )
173 
174  if( !std::isfinite( m_parameters[H_PRM] ) || m_parameters[H_PRM] < 0 )
176 
177  if( !std::isfinite( m_parameters[TWISTEDPAIR_TWIST_PRM] )
180 
181  if( !std::isfinite( m_parameters[STRIPLINE_A_PRM] ) || m_parameters[STRIPLINE_A_PRM] <= 0 )
183 
184  if( !std::isfinite( m_parameters[H_T_PRM] ) || m_parameters[H_T_PRM] <= 0 )
186 
187  // How can we check ROUGH_PRM ?
188 
189  if( !std::isfinite( m_parameters[MUR_PRM] ) || m_parameters[MUR_PRM] < 0 )
191 
192  if( !std::isfinite( m_parameters[TWISTEDPAIR_EPSILONR_ENV_PRM] )
195 
196  if( !std::isfinite( m_parameters[MURC_PRM] ) || m_parameters[MURC_PRM] < 0 )
198 
199  if( !std::isfinite( m_parameters[FREQUENCY_PRM] ) || m_parameters[FREQUENCY_PRM] <= 0 )
201 }
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:120
#define TRANSLINE_WARNING
Definition: transline.h:31
void setErrorLevel(PRMS_ID, char)
@function setErrorLevel
Definition: transline.cpp:423

References EPSILONR_PRM, FREQUENCY_PRM, H_PRM, H_T_PRM, TRANSLINE::m_parameters, MUR_PRM, MURC_PRM, RHO_PRM, TRANSLINE::setErrorLevel(), STRIPLINE_A_PRM, TAND_PRM, TRANSLINE_WARNING, TWISTEDPAIR_EPSILONR_ENV_PRM, and TWISTEDPAIR_TWIST_PRM.

Referenced by TRANSLINE::analyze(), and TRANSLINE::synthesize().

◆ ellipk()

double TRANSLINE::ellipk ( double  k)
protectedinherited

Definition at line 312 of file transline.cpp.

313 {
314  double r, lost;
315 
316  ellipke( k, r, lost );
317  return r;
318 }
void ellipke(double, double &, double &)
Definition: transline.cpp:251

References TRANSLINE::ellipke().

Referenced by calcAnalyze().

◆ ellipke()

void TRANSLINE::ellipke ( double  arg,
double &  k,
double &  e 
)
protectedinherited

Definition at line 251 of file transline.cpp.

252 {
253  int iMax = 16;
254 
255  if( arg == 1.0 )
256  {
257  k = INFINITY; // infinite
258  e = 0;
259  }
260  else if( std::isinf( arg ) && arg < 0 )
261  {
262  k = 0;
263  e = INFINITY; // infinite
264  }
265  else
266  {
267  double a, b, c, fr, s, fk = 1, fe = 1, t, da = arg;
268  int i;
269  if( arg < 0 )
270  {
271  fk = 1 / sqrt( 1 - arg );
272  fe = sqrt( 1 - arg );
273  da = -arg / ( 1 - arg );
274  }
275  a = 1;
276  b = sqrt( 1 - da );
277  c = sqrt( da );
278  fr = 0.5;
279  s = fr * c * c;
280  for( i = 0; i < iMax; i++ )
281  {
282  t = ( a + b ) / 2;
283  c = ( a - b ) / 2;
284  b = sqrt( a * b );
285  a = t;
286  fr *= 2;
287  s += fr * c * c;
288  if( c / a < NR_EPSI )
289  break;
290  }
291 
292  if( i >= iMax )
293  {
294  k = 0;
295  e = 0;
296  }
297  else
298  {
299  k = M_PI_2 / a;
300  e = M_PI_2 * ( 1 - s ) / a;
301  if( arg < 0 )
302  {
303  k *= fk;
304  e *= fe;
305  }
306  }
307  }
308 }
#define M_PI_2
Definition: transline.cpp:37
#define NR_EPSI
Definition: transline.cpp:245
#define INFINITY
Definition: transline.cpp:32

References INFINITY, M_PI_2, and NR_EPSI.

Referenced by TRANSLINE::ellipk().

◆ getProperties()

void TRANSLINE::getProperties ( void  )
inherited

@function getProperties

Get all properties from the UI. Computes some extra ones.

Definition at line 144 of file transline.cpp.

145 {
146  int i;
147  for( i = 0; i < DUMMY_PRM; ++i )
148  {
149  m_parameters[i] = getProperty( (PRMS_ID) i );
151  }
155 }
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:120
PRMS_ID
Definition: transline.h:37
double getProperty(enum PRMS_ID aPrmId)
Definition: transline.cpp:135
#define TRANSLINE_OK
Definition: transline.h:30
double skin_depth()
@function skin_depth calculate skin depth
Definition: transline.cpp:229
void setErrorLevel(PRMS_ID, char)
@function setErrorLevel
Definition: transline.cpp:423

References DUMMY_PRM, EPSILON_EFF_PRM, TRANSLINE::getProperty(), TRANSLINE::m_parameters, RHO_PRM, TRANSLINE::setErrorLevel(), SIGMA_PRM, TRANSLINE::skin_depth(), SKIN_DEPTH_PRM, and TRANSLINE_OK.

Referenced by TRANSLINE::analyze(), and TRANSLINE::synthesize().

◆ getProperty()

double TRANSLINE::getProperty ( enum PRMS_ID  aPrmId)
inherited

◆ Init()

void TRANSLINE::Init ( void  )
inherited

Definition at line 87 of file transline.cpp.

88 {
89  wxColour wxcol = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW );
90  okCol = KIGFX::COLOR4D( wxcol );
91  okCol.r = wxcol.Red() / 255.0;
92  okCol.g = wxcol.Green() / 255.0;
93  okCol.b = wxcol.Blue() / 255.0;
94  int i;
95  // Initialize these variables mainly to avoid warnings from a static analyzer
96  for( i = 0; i < EXTRA_PRMS_COUNT; ++i )
97  {
98  m_parameters[i] = 0;
99  }
100 }
double g
Green component.
Definition: color4d.h:367
double b
Blue component.
Definition: color4d.h:368
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:120
KIGFX::COLOR4D okCol
Definition: transline.h:117
double r
Red component.
Definition: color4d.h:366
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:99

References KIGFX::COLOR4D::b, EXTRA_PRMS_COUNT, KIGFX::COLOR4D::g, TRANSLINE::m_parameters, TRANSLINE::okCol, and KIGFX::COLOR4D::r.

Referenced by C_MICROSTRIP::C_MICROSTRIP(), COAX::COAX(), COPLANAR(), MICROSTRIP::MICROSTRIP(), RECTWAVEGUIDE::RECTWAVEGUIDE(), STRIPLINE::STRIPLINE(), TRANSLINE::TRANSLINE(), and TWISTEDPAIR::TWISTEDPAIR().

◆ isSelected()

bool TRANSLINE::isSelected ( enum PRMS_ID  aPrmId)
inherited

◆ minimizeZ0Error1D()

bool TRANSLINE::minimizeZ0Error1D ( double *  aVar)
protectedinherited

@function minimizeZ0Error1D

Tries to find a parameter that minimizes the error ( on Z0 ). This function only works with a single parameter. Calls calcAnalyze several times until the error is acceptable. While the error is unnacceptable, changes slightly the parameter.

This function does not change Z0 / Angl_L.

Parameters
avarParameter to synthesize
Returns
'true' if error < MAX_ERROR, else 'false'

Definition at line 337 of file transline.cpp.

338 {
339  double Z0_dest, Z0_current, Z0_result, angl_l_dest, increment, slope, error;
340  int iteration;
341 
342  if( !std::isfinite( m_parameters[Z0_PRM] ) )
343  {
344  *aVar = NAN;
345  return false;
346  }
347 
348  if( ( !std::isfinite( *aVar ) ) || ( *aVar == 0 ) )
349  {
350  *aVar = 0.001;
351  }
352 
353  /* required value of Z0 */
354  Z0_dest = m_parameters[Z0_PRM];
355 
356  /* required value of angl_l */
357  angl_l_dest = m_parameters[ANG_L_PRM];
358 
359  /* Newton's method */
360  iteration = 0;
361 
362  /* compute parameters */
363  calcAnalyze();
364  Z0_current = m_parameters[Z0_PRM];
365 
366  error = fabs( Z0_dest - Z0_current );
367 
368  while( error > MAX_ERROR )
369  {
370  iteration++;
371  increment = *aVar / 100.0;
372  *aVar += increment;
373  /* compute parameters */
374  calcAnalyze();
375  Z0_result = m_parameters[Z0_PRM];
376  /* f(w(n)) = Z0 - Z0(w(n)) */
377  /* f'(w(n)) = -f'(Z0(w(n))) */
378  /* f'(Z0(w(n))) = (Z0(w(n)) - Z0(w(n+delw))/delw */
379  /* w(n+1) = w(n) - f(w(n))/f'(w(n)) */
380  slope = ( Z0_result - Z0_current ) / increment;
381  slope = ( Z0_dest - Z0_current ) / slope - increment;
382  *aVar += slope;
383  if( *aVar <= 0.0 )
384  *aVar = increment;
385  /* find new error */
386  /* compute parameters */
387  calcAnalyze();
388  Z0_current = m_parameters[Z0_PRM];
389  error = fabs( Z0_dest - Z0_current );
390 
391  if( iteration > 100 )
392  break;
393  }
394 
395  /* Compute one last time, but with correct length */
396  m_parameters[Z0_PRM] = Z0_dest;
397  m_parameters[ANG_L_PRM] = angl_l_dest;
400  / 2.0 / M_PI; /* in m */
401  calcAnalyze();
402 
403  /* Restore parameters */
404  m_parameters[Z0_PRM] = Z0_dest;
405  m_parameters[ANG_L_PRM] = angl_l_dest;
408  / 2.0 / M_PI; /* in m */
409  return error <= MAX_ERROR;
410 }
virtual void calcAnalyze()
Computation for analysis.
Definition: transline.h:101
#define MAX_ERROR
Definition: transline.cpp:320
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:120
#define C0
Definition: units.h:62

References ANG_L_PRM, C0, TRANSLINE::calcAnalyze(), EPSILON_EFF_PRM, FREQUENCY_PRM, TRANSLINE::m_parameters, MAX_ERROR, PHYS_LEN_PRM, and Z0_PRM.

Referenced by calcSynthesize(), TWISTEDPAIR::calcSynthesize(), STRIPLINE::calcSynthesize(), and MICROSTRIP::calcSynthesize().

◆ setErrorLevel()

void TRANSLINE::setErrorLevel ( PRMS_ID  aP,
char  aErrorLevel 
)
protectedinherited

@function setErrorLevel

set an error / warning level for a given parameter.

See also
TRANSLINE_OK
TRANSLINE_WARNING
TRANSLINE_ERROR
Parameters
aPparameter
aErrorLevelError level

Definition at line 423 of file transline.cpp.

424 {
425  switch( aErrorLevel )
426  {
427  case( TRANSLINE_WARNING ):
429  break;
430  case( TRANSLINE_ERROR ):
432  break;
433  default:
435  break;
436  }
437 }
void SetPropertyBgColorInDialog(enum PRMS_ID aPrmId, const KIGFX::COLOR4D *aCol)
Function SetPropertyBgColorInDialog Set the background color of a parameter.
KIGFX::COLOR4D okCol
Definition: transline.h:117
KIGFX::COLOR4D errCol
Definition: transline.h:115
#define TRANSLINE_ERROR
Definition: transline.h:32
KIGFX::COLOR4D warnCol
Definition: transline.h:116
#define TRANSLINE_WARNING
Definition: transline.h:31

References TRANSLINE::errCol, TRANSLINE::okCol, SetPropertyBgColorInDialog(), TRANSLINE_ERROR, TRANSLINE_WARNING, and TRANSLINE::warnCol.

Referenced by TRANSLINE::checkProperties(), TRANSLINE::getProperties(), TWISTEDPAIR::showAnalyze(), COAX::showAnalyze(), STRIPLINE::showAnalyze(), showAnalyze(), RECTWAVEGUIDE::showAnalyze(), MICROSTRIP::showAnalyze(), C_MICROSTRIP::showAnalyze(), TWISTEDPAIR::showSynthesize(), STRIPLINE::showSynthesize(), COAX::showSynthesize(), showSynthesize(), RECTWAVEGUIDE::showSynthesize(), MICROSTRIP::showSynthesize(), and C_MICROSTRIP::showSynthesize().

◆ setProperty()

◆ setResult() [1/2]

void TRANSLINE::setResult ( int  line,
double  value,
const char *  text 
)
inherited

Definition at line 128 of file transline.cpp.

129 {
130  SetResultInDialog( line, value, text );
131 }
void SetResultInDialog(int line, const char *text)

References SetResultInDialog().

Referenced by TWISTEDPAIR::show_results(), STRIPLINE::show_results(), COAX::show_results(), show_results(), RECTWAVEGUIDE::show_results(), MICROSTRIP::show_results(), and C_MICROSTRIP::show_results().

◆ setResult() [2/2]

void TRANSLINE::setResult ( int  line,
const char *  text 
)
inherited

Definition at line 124 of file transline.cpp.

125 {
126  SetResultInDialog( line, text );
127 }
void SetResultInDialog(int line, const char *text)

References SetResultInDialog().

◆ show_results()

void COPLANAR::show_results ( )
overrideprivatevirtual

Shows results.

Reimplemented from TRANSLINE.

Definition at line 177 of file coplanar.cpp.

178 {
179 
183 
185 }
void setResult(int, double, const char *)
Definition: transline.cpp:128
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:120
#define UNIT_MICRON
Definition: units_scales.h:33

References EPSILON_EFF_PRM, LOSS_CONDUCTOR_PRM, LOSS_DIELECTRIC_PRM, TRANSLINE::m_parameters, TRANSLINE::setResult(), SKIN_DEPTH_PRM, and UNIT_MICRON.

◆ showAnalyze()

void COPLANAR::showAnalyze ( )
overrideprivatevirtual

Shows synthesis results and checks for errors / warnings.

Reimplemented from TRANSLINE.

Definition at line 244 of file coplanar.cpp.

245 {
248 
249  if( !std::isfinite( m_parameters[PHYS_S_PRM] ) || m_parameters[PHYS_S_PRM] <= 0 )
251 
252  if( !std::isfinite( m_parameters[PHYS_WIDTH_PRM] ) || m_parameters[PHYS_WIDTH_PRM] <= 0 )
254 
255  if( !std::isfinite( m_parameters[PHYS_LEN_PRM] ) || m_parameters[PHYS_LEN_PRM] < 0 )
257 
258  if( !std::isfinite( m_parameters[Z0_PRM] ) || m_parameters[Z0_PRM] < 0 )
260 
261  if( !std::isfinite( m_parameters[ANG_L_PRM] ) || m_parameters[ANG_L_PRM] < 0 )
263 }
void setProperty(enum PRMS_ID aPrmId, double aValue)
Definition: transline.cpp:106
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:120
#define TRANSLINE_ERROR
Definition: transline.h:32
#define TRANSLINE_WARNING
Definition: transline.h:31
void setErrorLevel(PRMS_ID, char)
@function setErrorLevel
Definition: transline.cpp:423

References ANG_L_PRM, TRANSLINE::m_parameters, PHYS_LEN_PRM, PHYS_S_PRM, PHYS_WIDTH_PRM, TRANSLINE::setErrorLevel(), TRANSLINE::setProperty(), TRANSLINE_ERROR, TRANSLINE_WARNING, and Z0_PRM.

◆ showSynthesize()

void COPLANAR::showSynthesize ( )
overrideprivatevirtual

Shows analysis results and checks for errors / warnings.

Reimplemented from TRANSLINE.

Definition at line 209 of file coplanar.cpp.

210 {
211  if( isSelected( PHYS_WIDTH_PRM ) )
213 
214  if( isSelected( PHYS_S_PRM ) )
216 
218 
219  if( !std::isfinite( m_parameters[PHYS_S_PRM] ) || m_parameters[PHYS_S_PRM] <= 0 )
220  {
221  if( isSelected( PHYS_S_PRM ) )
223  else
225  }
226  if( !std::isfinite( m_parameters[PHYS_WIDTH_PRM] ) || m_parameters[PHYS_WIDTH_PRM] <= 0 )
227  {
228  if( isSelected( PHYS_WIDTH_PRM ) )
230  else
232  }
233  if( !std::isfinite( m_parameters[PHYS_LEN_PRM] ) || m_parameters[PHYS_LEN_PRM] < 0 )
235 
236  if( !std::isfinite( m_parameters[Z0_PRM] ) || m_parameters[Z0_PRM] < 0 )
238 
239  if( !std::isfinite( m_parameters[ANG_L_PRM] ) || m_parameters[ANG_L_PRM] < 0 )
241 }
bool isSelected(enum PRMS_ID aPrmId)
Definition: transline.cpp:116
void setProperty(enum PRMS_ID aPrmId, double aValue)
Definition: transline.cpp:106
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:120
#define TRANSLINE_ERROR
Definition: transline.h:32
#define TRANSLINE_WARNING
Definition: transline.h:31
void setErrorLevel(PRMS_ID, char)
@function setErrorLevel
Definition: transline.cpp:423

References ANG_L_PRM, TRANSLINE::isSelected(), TRANSLINE::m_parameters, PHYS_LEN_PRM, PHYS_S_PRM, PHYS_WIDTH_PRM, TRANSLINE::setErrorLevel(), TRANSLINE::setProperty(), TRANSLINE_ERROR, TRANSLINE_WARNING, and Z0_PRM.

◆ skin_depth()

double TRANSLINE::skin_depth ( )
protectedinherited

@function skin_depth calculate skin depth

$ \frac{1}{\sqrt{ \pi \cdot f \cdot \mu \cdot \sigma }} $

Definition at line 229 of file transline.cpp.

230 {
231  double depth;
232  depth = 1.0
233  / sqrt( M_PI * m_parameters[FREQUENCY_PRM] * m_parameters[MURC_PRM] * MU0
234  * m_parameters[SIGMA_PRM] );
235  return depth;
236 }
#define MU0
Definition: units.h:61
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:120

References FREQUENCY_PRM, TRANSLINE::m_parameters, MU0, MURC_PRM, and SIGMA_PRM.

Referenced by C_MICROSTRIP::attenuation(), MICROSTRIP::attenuation(), STRIPLINE::calcAnalyze(), calcAnalyze(), and TRANSLINE::getProperties().

◆ synthesize()

void TRANSLINE::synthesize ( )
virtualinherited

Definition at line 212 of file transline.cpp.

213 {
214  getProperties();
215  checkProperties();
216  calcSynthesize();
217  showSynthesize();
218  show_results();
219 }
virtual void calcSynthesize()
Computation for synthesis.
Definition: transline.h:104
void checkProperties(void)
@function checkProperties
Definition: transline.cpp:161
virtual void showSynthesize()
Shows analysis results and checks for errors / warnings.
Definition: transline.h:110
virtual void show_results()
Shows results.
Definition: transline.h:113
void getProperties(void)
@function getProperties
Definition: transline.cpp:144

References TRANSLINE::calcSynthesize(), TRANSLINE::checkProperties(), TRANSLINE::getProperties(), TRANSLINE::show_results(), and TRANSLINE::showSynthesize().

Referenced by PCB_CALCULATOR_FRAME::OnTranslineSynthetize().

Member Data Documentation

◆ ang_l

double TRANSLINE::ang_l
protectedinherited

Definition at line 123 of file transline.h.

Referenced by TRANSLINE::TRANSLINE().

◆ backMetal

bool COPLANAR::backMetal
protected

Definition at line 39 of file coplanar.h.

Referenced by calcAnalyze(), COPLANAR(), and GROUNDEDCOPLANAR::GROUNDEDCOPLANAR().

◆ er_eff

double TRANSLINE::er_eff
protectedinherited

◆ errCol

KIGFX::COLOR4D TRANSLINE::errCol = KIGFX::COLOR4D( 1, 0.63, 0.63, 1 )
inherited

Definition at line 115 of file transline.h.

Referenced by TRANSLINE::setErrorLevel().

◆ len

double TRANSLINE::len
protectedinherited

Definition at line 121 of file transline.h.

Referenced by TRANSLINE::TRANSLINE().

◆ m_Name

◆ m_parameters

double TRANSLINE::m_parameters[EXTRA_PRMS_COUNT]
protectedinherited

Definition at line 120 of file transline.h.

Referenced by RECTWAVEGUIDE::alphac(), COAX::alphac_coax(), RECTWAVEGUIDE::alphad(), COAX::alphad_coax(), C_MICROSTRIP::attenuation(), MICROSTRIP::attenuation(), TWISTEDPAIR::calcAnalyze(), COAX::calcAnalyze(), STRIPLINE::calcAnalyze(), calcAnalyze(), RECTWAVEGUIDE::calcAnalyze(), TWISTEDPAIR::calcSynthesize(), calcSynthesize(), COAX::calcSynthesize(), STRIPLINE::calcSynthesize(), RECTWAVEGUIDE::calcSynthesize(), C_MICROSTRIP::calcSynthesize(), MICROSTRIP::calcSynthesize(), TRANSLINE::checkProperties(), C_MICROSTRIP::compute_single_line(), MICROSTRIP::conductor_losses(), C_MICROSTRIP::conductor_losses(), C_MICROSTRIP::delta_u_thickness(), MICROSTRIP::dielectric_losses(), C_MICROSTRIP::dielectric_losses(), MICROSTRIP::dispersion(), C_MICROSTRIP::er_eff_freq(), C_MICROSTRIP::er_eff_static(), RECTWAVEGUIDE::fc(), RECTWAVEGUIDE::get_rectwaveguide_comp(), RECTWAVEGUIDE::get_rectwaveguide_elec(), RECTWAVEGUIDE::get_rectwaveguide_phys(), RECTWAVEGUIDE::get_rectwaveguide_sub(), TRANSLINE::getProperties(), TRANSLINE::Init(), RECTWAVEGUIDE::kc_square(), RECTWAVEGUIDE::kval_square(), C_MICROSTRIP::line_angle(), MICROSTRIP::line_angle(), STRIPLINE::lineImpedance(), MICROSTRIP::microstrip_Z0(), TRANSLINE::minimizeZ0Error1D(), MICROSTRIP::mur_eff_ms(), TWISTEDPAIR::show_results(), STRIPLINE::show_results(), COAX::show_results(), show_results(), RECTWAVEGUIDE::show_results(), MICROSTRIP::show_results(), C_MICROSTRIP::show_results(), TWISTEDPAIR::showAnalyze(), COAX::showAnalyze(), STRIPLINE::showAnalyze(), showAnalyze(), RECTWAVEGUIDE::showAnalyze(), MICROSTRIP::showAnalyze(), C_MICROSTRIP::showAnalyze(), STRIPLINE::showSynthesize(), TWISTEDPAIR::showSynthesize(), COAX::showSynthesize(), showSynthesize(), RECTWAVEGUIDE::showSynthesize(), MICROSTRIP::showSynthesize(), C_MICROSTRIP::showSynthesize(), TRANSLINE::skin_depth(), C_MICROSTRIP::syn_fun(), MICROSTRIP::synth_width(), C_MICROSTRIP::synth_width(), TRANSLINE::TRANSLINE(), C_MICROSTRIP::Z0_dispersion(), and C_MICROSTRIP::Z0_even_odd().

◆ okCol

KIGFX::COLOR4D TRANSLINE::okCol = KIGFX::COLOR4D( 1, 1, 1, 1 )
inherited

Definition at line 117 of file transline.h.

Referenced by TRANSLINE::Init(), and TRANSLINE::setErrorLevel().

◆ warnCol

KIGFX::COLOR4D TRANSLINE::warnCol = KIGFX::COLOR4D( 1, 1, 0.57, 1 )
inherited

Definition at line 116 of file transline.h.

Referenced by TRANSLINE::setErrorLevel().


The documentation for this class was generated from the following files: