KiCad PCB EDA Suite
COAX Class Reference

#include <coax.h>

Inheritance diagram for COAX:
TRANSLINE

Public Member Functions

 COAX ()
 
void setProperty (enum PRMS_ID aPrmId, double aValue)
 
double getProperty (enum PRMS_ID aPrmId)
 
void getProperties ()
 @function getProperties More...
 
void checkProperties ()
 @function checkProperties More...
 
void setResult (int, const wxString &)
 
void setResult (int, double, const wxString &)
 
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

double m_parameters [EXTRA_PRMS_COUNT]
 
double len
 
double er_eff
 
double ang_l
 

Private Member Functions

void calcAnalyze () override
 $ Z_0 = \frac{Z_{0_{\mathrm{vacuum}}}}{\sqrt{\epsilon_r}}\log_{10}\left( \frac{D_{\mathrm{out}}}{D_{\mathrm{in}}}\right) $ More...
 
void calcSynthesize () override
 $ D_{\mathrm{in}} = D_{\mathrm{out}} \cdot e^{-\frac{Z_0*\sqrt{\epsilon_r}}{2\pi \cdot Z_{0_{\mathrm{vacuum}}}}} $ More...
 
void showAnalyze () override
 Shows synthesis results and checks for errors / warnings. More...
 
void showSynthesize () override
 Shows analysis results and checks for errors / warnings. More...
 
double alphad_coax ()
 
double alphac_coax ()
 
void show_results () override
 Shows results. More...
 

Detailed Description

Definition at line 30 of file coax.h.

Constructor & Destructor Documentation

◆ COAX()

COAX::COAX ( )

Definition at line 37 of file coax.cpp.

37  : TRANSLINE()
38 {
39  m_Name = "Coax";
40  Init();
41 }
void Init()
Definition: transline.cpp:98
const char * m_Name
Definition: transline.h:84

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

Member Function Documentation

◆ alphac_coax()

double COAX::alphac_coax ( )
private

Definition at line 54 of file coax.cpp.

55 {
56  double ac, Rs;
57 
58  Rs = sqrt( M_PI * m_parameters[FREQUENCY_PRM] * m_parameters[MURC_PRM] * MU0
60  ac = sqrt( m_parameters[EPSILONR_PRM] )
63  * ( Rs / ZF0 );
64  ac = ac * 20.0 / log( 10.0 );
65  return ac;
66 }
#define MU0
Definition: units.h:60
#define ZF0
Definition: units.h:62
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:131

References EPSILONR_PRM, FREQUENCY_PRM, TRANSLINE::m_parameters, MU0, MURC_PRM, PHYS_DIAM_IN_PRM, PHYS_DIAM_OUT_PRM, SIGMA_PRM, and ZF0.

Referenced by show_results().

◆ alphad_coax()

double COAX::alphad_coax ( )
private

Definition at line 43 of file coax.cpp.

44 {
45  double ad;
46 
47  ad = ( M_PI / C0 ) * m_parameters[FREQUENCY_PRM] * sqrt( m_parameters[EPSILONR_PRM] )
49  ad = ad * 20.0 / log( 10.0 );
50  return ad;
51 }
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:131
#define C0
Definition: units.h:61

References C0, EPSILONR_PRM, FREQUENCY_PRM, TRANSLINE::m_parameters, and TAND_PRM.

Referenced by show_results().

◆ analyze()

void TRANSLINE::analyze ( )
inherited

Definition at line 219 of file transline.cpp.

220 {
221  getProperties();
222  checkProperties();
223  calcAnalyze();
224  showAnalyze();
225  show_results();
226 }
virtual void calcAnalyze()
Computation for analysis.
Definition: transline.h:102
virtual void show_results()
Shows results.
Definition: transline.h:122
void checkProperties()
@function checkProperties
Definition: transline.cpp:177
void getProperties()
@function getProperties
Definition: transline.cpp:158
virtual void showAnalyze()
Shows synthesis results and checks for errors / warnings.
Definition: transline.h:112

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

Referenced by PANEL_TRANSLINE::OnTranslineAnalyse().

◆ calc()

virtual void TRANSLINE::calc ( )
inlinevirtualinherited

Definition at line 97 of file transline.h.

97 {}

◆ calcAnalyze()

void COAX::calcAnalyze ( )
overrideprivatevirtual

$ Z_0 = \frac{Z_{0_{\mathrm{vacuum}}}}{\sqrt{\epsilon_r}}\log_{10}\left( \frac{D_{\mathrm{out}}}{D_{\mathrm{in}}}\right) $

$ \lambda_g = \frac{c}{f \cdot \sqrt{ \epsilon_r \cdot \mu_r}} $

$ L_{[\mathrm{rad}]} = \frac{ 2\pi\cdot L_{[\mathrm{m}]}}{\lambda_g} $

Reimplemented from TRANSLINE.

Definition at line 76 of file coax.cpp.

77 {
78  double lambda_g;
79 
80 
82  ( ZF0 / 2 / M_PI / sqrt( m_parameters[EPSILONR_PRM] ) )
84 
85  lambda_g = ( C0 / ( m_parameters[FREQUENCY_PRM] ) )
87  /* calculate electrical angle */
89  ( 2.0 * M_PI * m_parameters[PHYS_LEN_PRM] ) / lambda_g; /* in radians */
90 }
#define ZF0
Definition: units.h:62
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:131
#define C0
Definition: units.h:61

References ANG_L_PRM, C0, EPSILONR_PRM, FREQUENCY_PRM, TRANSLINE::m_parameters, MUR_PRM, PHYS_DIAM_IN_PRM, PHYS_DIAM_OUT_PRM, PHYS_LEN_PRM, Z0_PRM, and ZF0.

◆ calcSynthesize()

void COAX::calcSynthesize ( )
overrideprivatevirtual

$ D_{\mathrm{in}} = D_{\mathrm{out}} \cdot e^{-\frac{Z_0*\sqrt{\epsilon_r}}{2\pi \cdot Z_{0_{\mathrm{vacuum}}}}} $

$ D_{\mathrm{out}} = D_{\mathrm{in}} \cdot e^{ \frac{Z_0*\sqrt{\epsilon_r}}{2\pi \cdot Z_{0_{\mathrm{vacuum}}}}} $

$ \lambda_g = \frac{c}{f \cdot \sqrt{ \epsilon_r \cdot \mu_r}} $

$ L_{[\mathrm{m}]} = \frac{ \lambda_g cdot L_{[\mathrm{m}]}}{2\pi} $

Reimplemented from TRANSLINE.

Definition at line 102 of file coax.cpp.

103 {
104  double lambda_g;
105 
107  {
108  /* solve for din */
111  / exp( m_parameters[Z0_PRM] * sqrt( m_parameters[EPSILONR_PRM] ) / ZF0 * 2 * M_PI );
112  }
113  else if( isSelected( PHYS_DIAM_OUT_PRM ) )
114  {
115  /* solve for dout */
118  * exp( m_parameters[Z0_PRM] * sqrt( m_parameters[EPSILONR_PRM] ) / ZF0 * 2 * M_PI );
119  }
120 
121  lambda_g = ( C0 / ( m_parameters[FREQUENCY_PRM] ) )
123  /* calculate physical length */
124  m_parameters[PHYS_LEN_PRM] = ( lambda_g * m_parameters[ANG_L_PRM] ) / ( 2.0 * M_PI ); /* in m */
125 }
bool isSelected(enum PRMS_ID aPrmId)
Definition: transline.cpp:127
#define ZF0
Definition: units.h:62
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:131
#define C0
Definition: units.h:61

References ANG_L_PRM, C0, EPSILONR_PRM, FREQUENCY_PRM, TRANSLINE::isSelected(), TRANSLINE::m_parameters, MUR_PRM, PHYS_DIAM_IN_PRM, PHYS_DIAM_OUT_PRM, PHYS_LEN_PRM, Z0_PRM, and ZF0.

◆ checkProperties()

void TRANSLINE::checkProperties ( )
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 177 of file transline.cpp.

178 {
179  // Do not check for values that are results of analyzing / synthesizing
180  // Do not check for transline specific incompatibilities ( like " conductor height should be lesser than dielectric height")
181  if( !std::isfinite( m_parameters[EPSILONR_PRM] ) || m_parameters[EPSILONR_PRM] <= 0 )
183 
184  if( !std::isfinite( m_parameters[TAND_PRM] ) || m_parameters[TAND_PRM] < 0 )
186 
187  if( !std::isfinite( m_parameters[RHO_PRM] ) || m_parameters[RHO_PRM] < 0 )
189 
190  if( !std::isfinite( m_parameters[H_PRM] ) || m_parameters[H_PRM] < 0 )
192 
193  if( !std::isfinite( m_parameters[TWISTEDPAIR_TWIST_PRM] )
196 
197  if( !std::isfinite( m_parameters[STRIPLINE_A_PRM] ) || m_parameters[STRIPLINE_A_PRM] <= 0 )
199 
200  if( !std::isfinite( m_parameters[H_T_PRM] ) || m_parameters[H_T_PRM] <= 0 )
202 
203  // How can we check ROUGH_PRM ?
204 
205  if( !std::isfinite( m_parameters[MUR_PRM] ) || m_parameters[MUR_PRM] < 0 )
207 
208  if( !std::isfinite( m_parameters[TWISTEDPAIR_EPSILONR_ENV_PRM] )
211 
212  if( !std::isfinite( m_parameters[MURC_PRM] ) || m_parameters[MURC_PRM] < 0 )
214 
215  if( !std::isfinite( m_parameters[FREQUENCY_PRM] ) || m_parameters[FREQUENCY_PRM] <= 0 )
217 }
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:131
#define TRANSLINE_WARNING
Definition: transline.h:30
void setErrorLevel(PRMS_ID, char)
@function setErrorLevel
Definition: transline.cpp:443

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 332 of file transline.cpp.

333 {
334  double r, lost;
335 
336  ellipke( k, r, lost );
337  return r;
338 }
E_SERIE r
Definition: eserie.cpp:41
void ellipke(double, double &, double &)
Definition: transline.cpp:267

References TRANSLINE::ellipke(), and r.

Referenced by COPLANAR::calcAnalyze().

◆ ellipke()

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

Definition at line 267 of file transline.cpp.

268 {
269  int iMax = 16;
270 
271  if( arg == 1.0 )
272  {
273  k = INFINITY; // infinite
274  e = 0;
275  }
276  else if( std::isinf( arg ) && arg < 0 )
277  {
278  k = 0;
279  e = INFINITY; // infinite
280  }
281  else
282  {
283  double a, b, c, fr, s, fk = 1, fe = 1, t, da = arg;
284  int i;
285 
286  if( arg < 0 )
287  {
288  fk = 1 / sqrt( 1 - arg );
289  fe = sqrt( 1 - arg );
290  da = -arg / ( 1 - arg );
291  }
292 
293  a = 1;
294  b = sqrt( 1 - da );
295  c = sqrt( da );
296  fr = 0.5;
297  s = fr * c * c;
298 
299  for( i = 0; i < iMax; i++ )
300  {
301  t = ( a + b ) / 2;
302  c = ( a - b ) / 2;
303  b = sqrt( a * b );
304  a = t;
305  fr *= 2;
306  s += fr * c * c;
307 
308  if( c / a < NR_EPSI )
309  break;
310  }
311 
312  if( i >= iMax )
313  {
314  k = 0;
315  e = 0;
316  }
317  else
318  {
319  k = M_PI_2 / a;
320  e = M_PI_2 * ( 1 - s ) / a;
321  if( arg < 0 )
322  {
323  k *= fk;
324  e *= fe;
325  }
326  }
327  }
328 }
#define M_PI_2
Definition: transline.cpp:40
#define NR_EPSI
Definition: transline.cpp:261
#define INFINITY
Definition: transline.cpp:35

References INFINITY, M_PI_2, and NR_EPSI.

Referenced by TRANSLINE::ellipk().

◆ getProperties()

void TRANSLINE::getProperties ( )
inherited

@function getProperties

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

Definition at line 158 of file transline.cpp.

159 {
160  for( int i = 0; i < DUMMY_PRM; ++i )
161  {
162  m_parameters[i] = getProperty( (PRMS_ID) i );
164  }
165 
169 }
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:131
PRMS_ID
Definition: transline.h:36
double getProperty(enum PRMS_ID aPrmId)
Definition: transline.cpp:148
#define TRANSLINE_OK
Definition: transline.h:29
double skin_depth()
@function skin_depth calculate skin depth
Definition: transline.cpp:245
void setErrorLevel(PRMS_ID, char)
@function setErrorLevel
Definition: transline.cpp:443

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 ( )
inherited

Definition at line 98 of file transline.cpp.

99 {
100  wxColour wxcol = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW );
101  okCol = KIGFX::COLOR4D( wxcol );
102  okCol.r = wxcol.Red() / 255.0;
103  okCol.g = wxcol.Green() / 255.0;
104  okCol.b = wxcol.Blue() / 255.0;
105  int i;
106  // Initialize these variables mainly to avoid warnings from a static analyzer
107  for( i = 0; i < EXTRA_PRMS_COUNT; ++i )
108  {
109  m_parameters[i] = 0;
110  }
111 }
double g
Green component.
Definition: color4d.h:385
double b
Blue component.
Definition: color4d.h:386
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:131
KIGFX::COLOR4D okCol
Definition: transline.h:128
double r
Red component.
Definition: color4d.h:384
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:103

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(), COPLANAR::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 357 of file transline.cpp.

358 {
359  double Z0_dest, Z0_current, Z0_result, angl_l_dest, increment, slope, error;
360  int iteration;
361 
362  if( !std::isfinite( m_parameters[Z0_PRM] ) )
363  {
364  *aVar = NAN;
365  return false;
366  }
367 
368  if( ( !std::isfinite( *aVar ) ) || ( *aVar == 0 ) )
369  *aVar = 0.001;
370 
371  /* required value of Z0 */
372  Z0_dest = m_parameters[Z0_PRM];
373 
374  /* required value of angl_l */
375  angl_l_dest = m_parameters[ANG_L_PRM];
376 
377  /* Newton's method */
378  iteration = 0;
379 
380  /* compute parameters */
381  calcAnalyze();
382  Z0_current = m_parameters[Z0_PRM];
383 
384  error = fabs( Z0_dest - Z0_current );
385 
386  while( error > MAX_ERROR )
387  {
388  iteration++;
389  increment = *aVar / 100.0;
390  *aVar += increment;
391  /* compute parameters */
392  calcAnalyze();
393  Z0_result = m_parameters[Z0_PRM];
394  /* f(w(n)) = Z0 - Z0(w(n)) */
395  /* f'(w(n)) = -f'(Z0(w(n))) */
396  /* f'(Z0(w(n))) = (Z0(w(n)) - Z0(w(n+delw))/delw */
397  /* w(n+1) = w(n) - f(w(n))/f'(w(n)) */
398  slope = ( Z0_result - Z0_current ) / increment;
399  slope = ( Z0_dest - Z0_current ) / slope - increment;
400  *aVar += slope;
401 
402  if( *aVar <= 0.0 )
403  *aVar = increment;
404 
405  /* find new error */
406  /* compute parameters */
407  calcAnalyze();
408  Z0_current = m_parameters[Z0_PRM];
409  error = fabs( Z0_dest - Z0_current );
410 
411  if( iteration > 100 )
412  break;
413  }
414 
415  /* Compute one last time, but with correct length */
416  m_parameters[Z0_PRM] = Z0_dest;
417  m_parameters[ANG_L_PRM] = angl_l_dest;
420  / 2.0 / M_PI; /* in m */
421  calcAnalyze();
422 
423  /* Restore parameters */
424  m_parameters[Z0_PRM] = Z0_dest;
425  m_parameters[ANG_L_PRM] = angl_l_dest;
428  / 2.0 / M_PI; /* in m */
429  return error <= MAX_ERROR;
430 }
virtual void calcAnalyze()
Computation for analysis.
Definition: transline.h:102
#define MAX_ERROR
Definition: transline.cpp:340
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:131
#define C0
Definition: units.h:61

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 COPLANAR::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 443 of file transline.cpp.

444 {
445  switch( aErrorLevel )
446  {
449  default: SetPropertyBgColorInDialog( aP, &okCol ); break;
450  }
451 }
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:128
KIGFX::COLOR4D errCol
Definition: transline.h:126
#define TRANSLINE_ERROR
Definition: transline.h:31
KIGFX::COLOR4D warnCol
Definition: transline.h:127
#define TRANSLINE_WARNING
Definition: transline.h:30

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

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

◆ setProperty()

◆ setResult() [1/2]

void TRANSLINE::setResult ( int  line,
const wxString &  text 
)
inherited

◆ setResult() [2/2]

void TRANSLINE::setResult ( int  line,
double  value,
const wxString &  text 
)
inherited

Definition at line 141 of file transline.cpp.

142 {
143  SetResultInDialog( line, value, text );
144 }
void SetResultInDialog(int line, const char *text)

References SetResultInDialog(), and text.

◆ show_results()

void COAX::show_results ( )
overrideprivatevirtual

Shows results.

Reimplemented from TRANSLINE.

Definition at line 208 of file coax.cpp.

209 {
210  int m, n;
211  wxString text;
212 
215 
217  setResult( 1, m_parameters[LOSS_CONDUCTOR_PRM], wxT( "dB" ) );
218  setResult( 2, m_parameters[LOSS_DIELECTRIC_PRM], wxT( "dB" ) );
219 
220  n = 1;
222  C0
223  / ( M_PI * ( m_parameters[PHYS_DIAM_OUT_PRM] + m_parameters[MUR_PRM] ) / (double) n );
224 
226  {
227  text = wxT( "none" );
228  }
229  else
230  {
231  text = wxT( " H(1,1) " );
232  m = 2;
234  C0
236  / ( m - 1 ) );
237 
238  while( ( m_parameters[CUTOFF_FREQUENCY_PRM] <= m_parameters[FREQUENCY_PRM] ) && ( m < 10 ) )
239  {
240  text << wxString::Format( wxT( "H(n,%d) " ), m );
241  m++;
243  C0
245  / (double) ( m - 1 ) );
246  }
247  }
248  setResult( 3, text );
249 
250  m = 1;
252  C0 / ( 2 * ( m_parameters[PHYS_DIAM_OUT_PRM] - m_parameters[MUR_PRM] ) / (double) m );
254  {
255  text = wxT( "none" );
256  }
257  else
258  {
259  text.Clear();
260 
261  while( ( m_parameters[CUTOFF_FREQUENCY_PRM] <= m_parameters[FREQUENCY_PRM] ) && ( m < 10 ) )
262  {
263  text << wxString::Format( wxT( "E(n,%d) " ), m );
264  m++;
266  C0
268  / (double) m );
269  }
270  }
271  setResult( 4, text );
272 }
double alphad_coax()
Definition: coax.cpp:43
void setResult(int, const wxString &)
Definition: transline.cpp:135
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:131
double alphac_coax()
Definition: coax.cpp:54
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
#define C0
Definition: units.h:61

References alphac_coax(), alphad_coax(), C0, CUTOFF_FREQUENCY_PRM, EPSILONR_PRM, Format(), FREQUENCY_PRM, LOSS_CONDUCTOR_PRM, LOSS_DIELECTRIC_PRM, TRANSLINE::m_parameters, MUR_PRM, PHYS_DIAM_OUT_PRM, PHYS_LEN_PRM, TRANSLINE::setResult(), and text.

◆ showAnalyze()

void COAX::showAnalyze ( )
overrideprivatevirtual

Shows synthesis results and checks for errors / warnings.

Reimplemented from TRANSLINE.

Definition at line 128 of file coax.cpp.

129 {
132 
133  // Check for errors
134  if( !std::isfinite( m_parameters[Z0_PRM] ) || m_parameters[Z0_PRM] < 0 )
136 
137  if( !std::isfinite( m_parameters[ANG_L_PRM] ) || m_parameters[ANG_L_PRM] < 0 )
139 
140  // Find warnings to display - physical parameters
141  if( !std::isfinite( m_parameters[PHYS_DIAM_IN_PRM] ) || m_parameters[PHYS_DIAM_IN_PRM] <= 0.0 )
143 
144  if( !std::isfinite( m_parameters[PHYS_DIAM_OUT_PRM] )
145  || m_parameters[PHYS_DIAM_OUT_PRM] <= 0.0 )
146  {
148  }
149 
151  {
154  }
155 
156  if( !std::isfinite( m_parameters[PHYS_LEN_PRM] ) || m_parameters[PHYS_LEN_PRM] < 0.0 )
158 }
void setProperty(enum PRMS_ID aPrmId, double aValue)
Definition: transline.cpp:117
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:131
#define TRANSLINE_ERROR
Definition: transline.h:31
#define TRANSLINE_WARNING
Definition: transline.h:30
void setErrorLevel(PRMS_ID, char)
@function setErrorLevel
Definition: transline.cpp:443

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

◆ showSynthesize()

void COAX::showSynthesize ( )
overrideprivatevirtual

Shows analysis results and checks for errors / warnings.

Reimplemented from TRANSLINE.

Definition at line 160 of file coax.cpp.

161 {
164  else if( isSelected( PHYS_DIAM_OUT_PRM ) )
166 
168 
169  // Check for errors
170  if( !std::isfinite( m_parameters[PHYS_DIAM_IN_PRM] ) || m_parameters[PHYS_DIAM_IN_PRM] <= 0.0 )
171  {
174  else
176  }
177 
178  if( !std::isfinite( m_parameters[PHYS_DIAM_OUT_PRM] )
179  || m_parameters[PHYS_DIAM_OUT_PRM] <= 0.0 )
180  {
183  else
185  }
186 
188  {
191  else if( isSelected( PHYS_DIAM_OUT_PRM ) )
193  }
194 
195  if( !std::isfinite( m_parameters[PHYS_LEN_PRM] ) || m_parameters[PHYS_LEN_PRM] < 0.0 )
197 
198  // Check for warnings
199  if( !std::isfinite( m_parameters[Z0_PRM] ) || m_parameters[Z0_PRM] < 0 )
201 
202  if( !std::isfinite( m_parameters[ANG_L_PRM] ) || m_parameters[ANG_L_PRM] < 0 )
204 }
bool isSelected(enum PRMS_ID aPrmId)
Definition: transline.cpp:127
void setProperty(enum PRMS_ID aPrmId, double aValue)
Definition: transline.cpp:117
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:131
#define TRANSLINE_ERROR
Definition: transline.h:31
#define TRANSLINE_WARNING
Definition: transline.h:30
void setErrorLevel(PRMS_ID, char)
@function setErrorLevel
Definition: transline.cpp:443

References ANG_L_PRM, TRANSLINE::isSelected(), TRANSLINE::m_parameters, PHYS_DIAM_IN_PRM, PHYS_DIAM_OUT_PRM, PHYS_LEN_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 245 of file transline.cpp.

246 {
247  double depth;
248  depth = 1.0
249  / sqrt( M_PI * m_parameters[FREQUENCY_PRM] * m_parameters[MURC_PRM] * MU0
250  * m_parameters[SIGMA_PRM] );
251  return depth;
252 }
#define MU0
Definition: units.h:60
double m_parameters[EXTRA_PRMS_COUNT]
Definition: transline.h:131

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

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

◆ synthesize()

void TRANSLINE::synthesize ( )
virtualinherited

Definition at line 228 of file transline.cpp.

229 {
230  getProperties();
231  checkProperties();
232  calcSynthesize();
233  showSynthesize();
234  show_results();
235 }
virtual void calcSynthesize()
Computation for synthesis.
Definition: transline.h:107
virtual void showSynthesize()
Shows analysis results and checks for errors / warnings.
Definition: transline.h:117
virtual void show_results()
Shows results.
Definition: transline.h:122
void checkProperties()
@function checkProperties
Definition: transline.cpp:177
void getProperties()
@function getProperties
Definition: transline.cpp:158

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

Referenced by PANEL_TRANSLINE::OnTranslineSynthetize().

Member Data Documentation

◆ ang_l

double TRANSLINE::ang_l
protectedinherited

Definition at line 134 of file transline.h.

Referenced by TRANSLINE::TRANSLINE().

◆ er_eff

◆ errCol

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

Definition at line 126 of file transline.h.

Referenced by TRANSLINE::setErrorLevel().

◆ len

double TRANSLINE::len
protectedinherited

Definition at line 132 of file transline.h.

Referenced by TRANSLINE::TRANSLINE().

◆ m_Name

◆ m_parameters

double TRANSLINE::m_parameters[EXTRA_PRMS_COUNT]
protectedinherited

Definition at line 131 of file transline.h.

Referenced by RECTWAVEGUIDE::alphac(), alphac_coax(), RECTWAVEGUIDE::alphad(), alphad_coax(), MICROSTRIP::attenuation(), C_MICROSTRIP::attenuation(), TWISTEDPAIR::calcAnalyze(), calcAnalyze(), STRIPLINE::calcAnalyze(), COPLANAR::calcAnalyze(), RECTWAVEGUIDE::calcAnalyze(), TWISTEDPAIR::calcSynthesize(), COPLANAR::calcSynthesize(), calcSynthesize(), STRIPLINE::calcSynthesize(), RECTWAVEGUIDE::calcSynthesize(), MICROSTRIP::calcSynthesize(), C_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(), MICROSTRIP::line_angle(), C_MICROSTRIP::line_angle(), STRIPLINE::lineImpedance(), MICROSTRIP::microstrip_Z0(), TRANSLINE::minimizeZ0Error1D(), MICROSTRIP::mur_eff_ms(), TWISTEDPAIR::show_results(), STRIPLINE::show_results(), show_results(), COPLANAR::show_results(), RECTWAVEGUIDE::show_results(), MICROSTRIP::show_results(), C_MICROSTRIP::show_results(), TWISTEDPAIR::showAnalyze(), showAnalyze(), STRIPLINE::showAnalyze(), COPLANAR::showAnalyze(), RECTWAVEGUIDE::showAnalyze(), MICROSTRIP::showAnalyze(), C_MICROSTRIP::showAnalyze(), STRIPLINE::showSynthesize(), TWISTEDPAIR::showSynthesize(), showSynthesize(), COPLANAR::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 128 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 127 of file transline.h.

Referenced by TRANSLINE::setErrorLevel().


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