You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
3.9 KiB

  1. /*
  2. * c_microstrip.h - coupled microstrip class definition
  3. *
  4. * Copyright (C) 2002 Claudio Girardi <in3otd@qsl.net>
  5. * Copyright (C) 2005 Stefan Jahn <stefan@lkcc.org>
  6. * Modifications for Kicad: 2015 Jean-Pierre Charras
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * as published by the Free Software Foundation; either version 2
  11. * of the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this package; see the file COPYING. If not, write to
  20. * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  21. * Boston, MA 02110-1301, USA.
  22. */
  23. #ifndef _C_MICROSTRIP_H_
  24. #define _C_MICROSTRIP_H_
  25. class C_MICROSTRIP : public TRANSLINE
  26. {
  27. public: C_MICROSTRIP();
  28. ~C_MICROSTRIP();
  29. private:
  30. double h; // height of substrate
  31. double ht; // height to the top of box
  32. double t; // thickness of top metal
  33. double rough; // Roughness of top metal
  34. double w; // width of lines
  35. double w_t_e; // even-mode thickness-corrected line width
  36. double w_t_o; // odd-mode thickness-corrected line width
  37. double l; // length of lines
  38. double s; // spacing of lines
  39. double Z0_e_0; // static even-mode impedance
  40. double Z0_o_0; // static odd-mode impedance
  41. double Z0e; // even-mode impedance
  42. double Z0o; // odd-mode impedance
  43. double c_e; // even-mode capacitance
  44. double c_o; // odd-mode capacitance
  45. double ang_l_e; // even-mode electrical length in angle
  46. double ang_l_o; // odd-mode electrical length in angle
  47. double er_eff_e; // even-mode effective dielectric constant
  48. double er_eff_o; // odd-mode effective dielectric constant
  49. double er_eff_e_0; // static even-mode effective dielectric constant
  50. double er_eff_o_0; // static odd-mode effective dielectric constant
  51. double w_eff; // Effective width of line
  52. double atten_dielectric_e; // even-mode dielectric losses (dB)
  53. double atten_cond_e; // even-mode conductors losses (dB)
  54. double atten_dielectric_o; // odd-mode dielectric losses (dB)
  55. double atten_cond_o; // odd-mode conductors losses (dB)
  56. public:
  57. void analyze() override;
  58. void synthesize() override;
  59. private:
  60. double delta_u_thickness_single( double, double );
  61. void delta_u_thickness();
  62. void compute_single_line();
  63. double filling_factor_even( double, double, double );
  64. double filling_factor_odd( double, double, double );
  65. double delta_q_cover_even( double );
  66. double delta_q_cover_odd( double );
  67. void er_eff_static();
  68. double delta_Z0_even_cover( double, double, double );
  69. double delta_Z0_odd_cover( double, double, double );
  70. void Z0_even_odd();
  71. void er_eff_freq();
  72. void conductor_losses();
  73. void dielectric_losses();
  74. void attenuation();
  75. void line_angle();
  76. void syn_err_fun( double*, double*, double, double, double, double, double );
  77. void synth_width();
  78. void Z0_dispersion();
  79. void calc();
  80. void get_c_microstrip_sub();
  81. void get_c_microstrip_comp();
  82. void get_c_microstrip_elec();
  83. void get_c_microstrip_phys();
  84. void show_results();
  85. void syn_fun( double*, double*, double, double, double, double );
  86. private:
  87. MICROSTRIP* aux_ms;
  88. };
  89. #endif // _C_MICROSTRIP_H_