35std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>&
43std::unordered_map<TRANSLINE_PARAMETERS, std::pair<double, TRANSLINE_STATUS>>&
72 if( !std::isfinite( Z0_param ) )
78 if( ( !std::isfinite( var ) ) || ( var == 0 ) )
82 double Z0_dest = Z0_param;
85 double angl_l_dest = ANG_L_param;
92 double Z0_current = Z0_param;
94 double error = fabs( Z0_dest - Z0_current );
99 double increment = var / 100.0;
104 double Z0_result = Z0_param;
110 double slope = ( Z0_result - Z0_current ) / increment;
111 slope = ( Z0_dest - Z0_current ) / slope - increment;
120 Z0_current = Z0_param;
121 error = fabs( Z0_dest - Z0_current );
123 if( iteration > 250 )
129 ANG_L_param = angl_l_dest;
131 * ANG_L_param / 2.0 / M_PI );
136 ANG_L_param = angl_l_dest;
138 * ANG_L_param / 2.0 / M_PI );
155 return std::sqrt( aEpsilonEff ) * ( 1.0e10 / 2.99e8 );
161 static constexpr double NR_EPSI = 2.2204460492503131e-16;
164 double k = 0.0, e = 0.0;
171 else if( std::isinf( arg ) && arg < 0 )
178 double a, b, c, fr, s, fk = 1, fe = 1, t, da = arg;
183 fk = 1 / sqrt( 1 - arg );
184 fe = sqrt( 1 - arg );
185 da = -arg / ( 1 - arg );
194 for( i = 0; i < iMax; i++ )
215 e =
M_PI_2 * ( 1 - s ) / a;
std::unordered_map< TRANSLINE_PARAMETERS, std::pair< double, TRANSLINE_STATUS > > & GetSynthesisResults()
Gets the output parameters following synthesis.
virtual void SetAnalysisResults()=0
Sets values in the output analysis results structure.
virtual void SetSynthesisResults()=0
Sets values in the output synthesis results structure.
double GetParameter(const TRANSLINE_PARAMETERS aParam) const
Gets the given calculation property.
void InitProperties(const std::initializer_list< TRANSLINE_PARAMETERS > &aParams)
Initialises the properties used (as inputs or outputs) by the calculation.
static std::pair< double, double > EllipticIntegral(double arg)
Computes the complete elliptic integral of first kind K() and the second kind E() using the arithmeti...
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.
static constexpr double m_maxError
The maximum error for Z0 optimisations.
bool MinimiseZ0Error1D(TRANSLINE_PARAMETERS aOptimise, TRANSLINE_PARAMETERS aMeasure)
minimizeZ0Error1D
double SkinDepth() const
Calculate skin depth.
virtual void Analyse()=0
Analyses the transmission line using the current parameter set.
double & GetParameterRef(const TRANSLINE_PARAMETERS aParam)
Adds a constant to the given parameter.
std::unordered_map< TRANSLINE_PARAMETERS, double > m_parameters
All input and output properties used by the calculation.
void SetAnalysisResult(TRANSLINE_PARAMETERS aParam, const double aValue, const TRANSLINE_STATUS aStatus=TRANSLINE_STATUS::OK)
Sets an analysis result.
std::unordered_map< TRANSLINE_PARAMETERS, std::pair< double, TRANSLINE_STATUS > > m_synthesisStatus
Synthesis results.
static double UnitPropagationDelay(double aEpsilonEff)
Calculates the unit propagation delay (ps/cm) for the given effective permittivity.
std::unordered_map< TRANSLINE_PARAMETERS, std::pair< double, TRANSLINE_STATUS > > & GetAnalysisResults()
Gets the output parameters following analysis.
std::unordered_map< TRANSLINE_PARAMETERS, std::pair< double, TRANSLINE_STATUS > > m_analysisStatus
Analysis results.
TRANSLINE_STATUS
Parameter status values.
TRANSLINE_PARAMETERS
All possible parameters used (as inputs or outputs) by the transmission line calculations.