55 return std::pow( aM *
M_PI / a, 2.0 ) + std::pow( aN *
M_PI / b, 2.0 );
78 const double Rs = std::sqrt(
M_PI * f * murc *
TC::MU0 / sigma );
81 const int mmax =
static_cast<int>( std::floor( f /
Fc( 1, 0 ) ) );
82 const int nmax = mmax;
85 for(
int n = 0; n <= nmax; ++n )
87 for(
int m = 1; m <= mmax; ++m )
89 const double f_c =
Fc( m, n );
96 ac += ( Rs / ( b *
TC::ZF0 * std::sqrt( 1.0 - std::pow( f_c / f, 2.0 ) ) ) )
97 * ( 1.0 + ( ( 2.0 * b / a ) * std::pow( f_c / f, 2.0 ) ) );
101 ac += ( ( 2.0 * Rs ) / ( b *
TC::ZF0 * std::sqrt( 1.0 - std::pow( f_c / f, 2.0 ) ) ) )
102 * ( ( ( 1.0 + ( b / a ) ) * std::pow( f_c / f, 2.0 ) )
103 + ( ( 1.0 - std::pow( f_c / f, 2.0 ) )
104 * ( ( ( b / a ) * ( ( ( b / a ) * std::pow( m, 2.0 ) ) + std::pow( n, 2.0 ) ) )
105 / ( std::pow( b * m / a, 2.0 ) + std::pow( n, 2.0 ) ) ) ) );
111 for(
int n = 1; n <= nmax; ++n )
113 for(
int m = 1; m <= mmax; ++m )
115 const double f_c =
Fc( m, n );
120 ac += ( ( 2.0 * Rs ) / ( b *
TC::ZF0 * std::sqrt( 1.0 - std::pow( f_c / f, 2.0 ) ) ) )
121 * ( ( ( std::pow( m, 2.0 ) * std::pow( b / a, 3.0 ) ) + std::pow( n, 2.0 ) )
122 / ( std::pow( m * b / a, 2.0 ) + std::pow( n, 2.0 ) ) );
141 const double beta = std::sqrt( k_square -
KcSquare( 1, 0 ) );
155 constexpr int MAX_INDEX = 6;
156 constexpr std::size_t MAX_STR = 128;
165 if( freq >=
Fc( 1, 0 ) )
168 bool truncated =
false;
170 for(
int m = 0; m <= MAX_INDEX && !truncated; ++m )
172 for(
int n = 0; n <= MAX_INDEX && !truncated; ++n )
174 if( m == 0 && n == 0 )
177 if( freq >=
Fc( m, n ) )
179 std::snprintf( token,
sizeof( token ),
"H(%d,%d) ", m, n );
181 if( std::strlen( buf ) + std::strlen( token ) + 5 < MAX_STR )
183 std::strcat( buf, token );
187 std::strcat( buf,
"..." );
197 if( freq >=
Fc( 1, 1 ) )
200 bool truncated =
false;
202 for(
int m = 1; m <= MAX_INDEX && !truncated; ++m )
204 for(
int n = 1; n <= MAX_INDEX && !truncated; ++n )
206 if( freq >=
Fc( m, n ) )
208 std::snprintf( token,
sizeof( token ),
"E(%d,%d) ", m, n );
210 if( std::strlen( buf ) + std::strlen( token ) + 5 < MAX_STR )
212 std::strcat( buf, token );
216 std::strcat( buf,
"..." );
246 const double kc10_square =
KcSquare( 1, 0 );
248 if( kc10_square <= k_square )
253 const double fc10 =
Fc( 1, 0 );
256 / std::sqrt( 1.0 - std::pow( fc10 / freq, 2.0 ) ) );
258 const double lambda_g = 2.0 *
M_PI / std::sqrt( k_square - kc10_square );
301 const double eta =
TC::ZF0 * std::sqrt( mur / epsr );
304 TC::C0 / ( std::sqrt( mur * epsr ) * 2.0 * freq * std::sqrt( 1.0 - std::pow( eta /
Z0, 2.0 ) ) ) );
307 const double kc10_square =
KcSquare( 1, 0 );
308 const double beta = std::sqrt( k_square - kc10_square );
309 const double lambda_g = 2.0 *
M_PI / beta;
313 if( kc10_square <= k_square )
360 const bool Z0_invalid = !std::isfinite(
Z0 ) ||
Z0 < 0;
361 const bool angL_invalid = !std::isfinite( angL ) || angL < 0;
362 const bool len_invalid = !std::isfinite( len ) || len < 0;
363 const bool a_invalid = !std::isfinite( a ) || a <= 0.0;
364 const bool b_invalid = !std::isfinite( b ) || b <= 0.0;
388 const bool Z0_invalid = !std::isfinite(
Z0 ) ||
Z0 < 0;
389 const bool angL_invalid = !std::isfinite( angL ) || angL < 0;
390 const bool len_invalid = !std::isfinite( len ) || len < 0;
391 const bool a_invalid = !std::isfinite( a ) || a <= 0.0;
392 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.