57 return std::pow( aM *
M_PI / a, 2.0 ) + std::pow( aN *
M_PI / b, 2.0 );
80 const double Rs = std::sqrt(
M_PI * f * murc *
TC::MU0 / sigma );
83 const int mmax =
static_cast<int>( std::floor( f /
Fc( 1, 0 ) ) );
84 const int nmax = mmax;
87 for(
int n = 0; n <= nmax; ++n )
89 for(
int m = 1; m <= mmax; ++m )
91 const double f_c =
Fc( m, n );
98 ac += ( Rs / ( b *
TC::ZF0 * std::sqrt( 1.0 - std::pow( f_c / f, 2.0 ) ) ) )
99 * ( 1.0 + ( ( 2.0 * b / a ) * std::pow( f_c / f, 2.0 ) ) );
103 ac += ( ( 2.0 * Rs ) / ( b *
TC::ZF0 * std::sqrt( 1.0 - std::pow( f_c / f, 2.0 ) ) ) )
104 * ( ( ( 1.0 + ( b / a ) ) * std::pow( f_c / f, 2.0 ) )
105 + ( ( 1.0 - std::pow( f_c / f, 2.0 ) )
106 * ( ( ( b / a ) * ( ( ( b / a ) * std::pow( m, 2.0 ) ) + std::pow( n, 2.0 ) ) )
107 / ( std::pow( b * m / a, 2.0 ) + std::pow( n, 2.0 ) ) ) ) );
113 for(
int n = 1; n <= nmax; ++n )
115 for(
int m = 1; m <= mmax; ++m )
117 const double f_c =
Fc( m, n );
122 ac += ( ( 2.0 * Rs ) / ( b *
TC::ZF0 * std::sqrt( 1.0 - std::pow( f_c / f, 2.0 ) ) ) )
123 * ( ( ( std::pow( m, 2.0 ) * std::pow( b / a, 3.0 ) ) + std::pow( n, 2.0 ) )
124 / ( std::pow( m * b / a, 2.0 ) + std::pow( n, 2.0 ) ) );
143 const double beta = std::sqrt( k_square -
KcSquare( 1, 0 ) );
157 constexpr int MAX_INDEX = 6;
158 constexpr std::size_t MAX_STR = 128;
167 if( freq >=
Fc( 1, 0 ) )
170 bool truncated =
false;
172 for(
int m = 0; m <= MAX_INDEX && !truncated; ++m )
174 for(
int n = 0; n <= MAX_INDEX && !truncated; ++n )
176 if( m == 0 && n == 0 )
179 if( freq >=
Fc( m, n ) )
181 std::snprintf( token,
sizeof( token ),
"H(%d,%d) ", m, n );
183 if( std::strlen( buf ) + std::strlen( token ) + 5 < MAX_STR )
185 std::strcat( buf, token );
189 std::strcat( buf,
"..." );
199 if( freq >=
Fc( 1, 1 ) )
202 bool truncated =
false;
204 for(
int m = 1; m <= MAX_INDEX && !truncated; ++m )
206 for(
int n = 1; n <= MAX_INDEX && !truncated; ++n )
208 if( freq >=
Fc( m, n ) )
210 std::snprintf( token,
sizeof( token ),
"E(%d,%d) ", m, n );
212 if( std::strlen( buf ) + std::strlen( token ) + 5 < MAX_STR )
214 std::strcat( buf, token );
218 std::strcat( buf,
"..." );
248 const double kc10_square =
KcSquare( 1, 0 );
250 if( kc10_square <= k_square )
255 const double fc10 =
Fc( 1, 0 );
258 / std::sqrt( 1.0 - std::pow( fc10 / freq, 2.0 ) ) );
260 const double lambda_g = 2.0 *
M_PI / std::sqrt( k_square - kc10_square );
303 const double eta =
TC::ZF0 * std::sqrt( mur / epsr );
306 TC::C0 / ( std::sqrt( mur * epsr ) * 2.0 * freq * std::sqrt( 1.0 - std::pow( eta /
Z0, 2.0 ) ) ) );
309 const double kc10_square =
KcSquare( 1, 0 );
310 const double beta = std::sqrt( k_square - kc10_square );
311 const double lambda_g = 2.0 *
M_PI / beta;
315 if( kc10_square <= k_square )
362 const bool Z0_invalid = !std::isfinite(
Z0 ) ||
Z0 < 0;
363 const bool angL_invalid = !std::isfinite( angL ) || angL < 0;
364 const bool len_invalid = !std::isfinite( len ) || len < 0;
365 const bool a_invalid = !std::isfinite( a ) || a <= 0.0;
366 const bool b_invalid = !std::isfinite( b ) || b <= 0.0;
390 const bool Z0_invalid = !std::isfinite(
Z0 ) ||
Z0 < 0;
391 const bool angL_invalid = !std::isfinite( angL ) || angL < 0;
392 const bool len_invalid = !std::isfinite( len ) || len < 0;
393 const bool a_invalid = !std::isfinite( a ) || a <= 0.0;
394 const bool b_invalid = !std::isfinite( b ) || b <= 0.0;
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.
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.
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.
double GetDispersedEpsilonR(double aF) const
Dispersed permittivity at aF. Returns raw EPSILONR when the model is inactive.
TRANSLINE_PARAMETERS m_synthesizeTarget
Which geometry parameter is the unknown during synthesis (set by the UI)
double GetDispersedTanDelta(double aF) const
Dispersed loss tangent at aF. Returns raw TAND when the model is inactive.
double GetParameter(const TRANSLINE_PARAMETERS aParam) const
Gets the given calculation property.
void SetParameter(const TRANSLINE_PARAMETERS aParam, const double aValue)
Sets the given calculation property.
void SetSynthesisResult(TRANSLINE_PARAMETERS aParam, const double aValue, const TRANSLINE_STATUS aStatus=TRANSLINE_STATUS::OK)
Sets a synthesis result.
void UpdateDielectricModel()
Refit the Djordjevic-Sarkar model from the current parameter map.
double SkinDepth() const
Calculate skin depth.
void SetAnalysisResult(TRANSLINE_PARAMETERS aParam, const double aValue, const TRANSLINE_STATUS aStatus=TRANSLINE_STATUS::OK)
Sets an analysis result.
SYNTHESIZE_OPTS
Options for specifying synthesis inputs, targets, or strategies.
TRANSLINE_STATUS
Parameter status values.
TRANSLINE_PARAMETERS
All possible parameters used (as inputs or outputs) by the transmission line calculations.