def _R_alp(self, ch): cal1 = nw.sqrt(self.mats.A[ch][ch]) * self.r0 cal2 = nw.sqrt( nw.pow(self._rho_alp(ch),2) -\ self.mats.V[ch][ch]*nw.pow(self.r0,2.0) ) if equiv_tests: if not gu.complex_compare(cal1, cal2): raise RadWellException("_R_alp: " + str(cal1) + " " + str(cal2)) return cal2
def _e_n_Sq_alt(self, n): first = (nw.pow(self._R_alp(0), 2.0) + nw.pow(self._R_alp(1), 2.0)) / 2.0 a = nw.pow( nw.pow(self._R_alp(0), 2.0) - nw.pow(self._R_alp(1), 2.0), 2.0) b = 4.0 * nw.pow(self.mats.V[0][1], 2.0) * nw.pow(self.r0, 4.0) second = nw.sqrt(a + b) / 2.0 if n == 0: return first + second else: return first - second
def _e_n(self, n): if lin_algebra: cal1 = self.mats.a[n][n] * self.r0 cal2 = nw.sqrt(self._e_n_Sq_alt(n)) if equiv_tests: if not gu.complex_compare(cal1, cal2): raise RadWellException("_e_n: " + str(cal1) + " " + str(cal2)) if lin_algebra: return cal1 else: return cal2
def _S_12(self): ret = 2.0 * (self._zeta_1()-self._zeta_2()) *\ nw.sqrt(self._alp_1()*self._alp_2()*self._rho_1()*self._rho_2()) /\ self._denum() *\ self._exp(self._rho_1() + self._rho_2()) return self._cast_result(ret)
def fk(self, ene): #free k k = nw.sqrt(self.get_ene_conv()*ene) return nw.complex(k)
def _kpos(self, ch, ene): return nw.sqrt(self._get_value(ch, ene))