KiCad PCB EDA Suite
Loading...
Searching...
No Matches
common/transline_calculations/rectwaveguide.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2001 Gopal Narayanan <[email protected]>
3 * Copyright (C) 2005, 2006 Stefan Jahn <[email protected]>
4 * Modified for Kicad: 2015 jean-pierre.charras
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this package; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 */
22
23#ifndef TRANSLINE_CALCULATIONS_RECTWAVEGUIDE_H
24#define TRANSLINE_CALCULATIONS_RECTWAVEGUIDE_H
25
26
27#include <string>
28
30
31
49{
51
52public:
62
64 void Analyse() override;
65
67 bool Synthesize( SYNTHESIZE_OPTS aOpts ) override;
68
76 {
77 if( aTarget == TCP::PHYS_WIDTH )
78 m_synthesizeTarget = aTarget;
79 }
80
82 std::string GetTEModes() const { return m_teModes; }
83
85 std::string GetTMModes() const { return m_tmModes; }
86
87private:
89 void SetAnalysisResults() override;
90
92 void SetSynthesisResults() override;
93
95 double KvalSquare() const;
96
98 double KcSquare( int aM, int aN ) const;
99
101 double Fc( int aM, int aN ) const;
102
104 double AlphaC() const;
105
107 double AlphaCCutoff() const;
108
110 double AlphaD() const;
111
113 void UpdateModeStrings();
114
116 std::string m_teModes;
117
119 std::string m_tmModes;
120};
121
122
123#endif // TRANSLINE_CALCULATIONS_RECTWAVEGUIDE_H
double AlphaC() const
Conductor loss summed over all propagating TE_mn and TM_mn modes, in dB/m.
void SetSynthesisResults() override
Sets the output values and status following synthesis.
std::string m_tmModes
Cached TM_mn propagating-modes string produced by UpdateModeStrings.
std::string GetTEModes() const
Returns a UI-friendly string enumerating propagating TE_mn modes at the current frequency.
void UpdateModeStrings()
Populates m_teModes and m_tmModes with all propagating modes at the current frequency.
void SetAnalysisResults() override
Sets the output values and status following analysis.
bool Synthesize(SYNTHESIZE_OPTS aOpts) override
Synthesize the broad dimension a from a target Z0. Only PHYS_WIDTH is a valid target.
double Fc(int aM, int aN) const
Cutoff frequency for mode (m, n), in Hz.
std::string GetTMModes() const
Returns a UI-friendly string enumerating propagating TM_mn modes at the current frequency.
double AlphaCCutoff() const
Evanescent attenuation below TE10 cutoff, in dB/m.
double KvalSquare() const
Square of the free-space wavenumber k = omega * sqrt(mu * eps)
void Analyse() override
Analyse waveguide geometry to produce Z0, electrical length, loss, and mode cutoffs.
double KcSquare(int aM, int aN) const
Square of the transverse cutoff wavenumber kc for mode (m, n)
double AlphaD() const
Dielectric loss of the dominant TE10 mode, in dB/m.
std::string m_teModes
Cached TE_mn propagating-modes string produced by UpdateModeStrings.
void SetSynthesizeTarget(TRANSLINE_PARAMETERS aTarget) override
Choose which geometry parameter will be solved for during synthesis.
TRANSLINE_PARAMETERS m_synthesizeTarget
Which geometry parameter is the unknown during synthesis (set by the UI)
TRANSLINE_CALCULATION_BASE(std::initializer_list< TRANSLINE_PARAMETERS > aParameters)
Constructs the transmission line calculation object.
SYNTHESIZE_OPTS
Options for specifying synthesis inputs, targets, or strategies.
TRANSLINE_PARAMETERS
All possible parameters used (as inputs or outputs) by the transmission line calculations.