geff.utility.boundary
This module facilitates computing boundary terms which appear when computing the evolution of gauge-field bilinears like $\langle \boldsymbol{E}^2 \rangle$ due to the time dependence of the UV-regulator scale $k_{\rm h}$.
All functions in this module return the same quantities, namely $$E_\lambda(\xi, s) = \frac{1}{r^2}\left| (i r - i \lambda \xi - s) W_{-i \lambda \xi, \frac{1}{2} + s}(-2 i r) + W_{1-i \lambda \xi, 1/2 + s}(-2 i r) \right|^2 \, , $$ $$B_\lambda(\xi, s) = \left| W_{-i \lambda \xi, \frac{1}{2} + s}(-2 i r) \right|^2 \, , $$ $$G_\lambda(\xi, s) = \frac{1}{r}\left[\operatorname{Re}\left[W_{1-i \lambda \xi, 1/2 + s}(-2 i r) W_{i \lambda \xi, \frac{1}{2} + s}(2 i r)\right] - s \left| W_{-i \lambda \xi, \frac{1}{2} + s}(-2 i r)\right|^2 \right]\, ,$$ with $r = |\xi| + \sqrt{\xi^2 + s^2 + s}$, the Whittaker-W function $W_{\kappa, \mu}(x)$,the instability parameter $\xi$ , and $s= \sigma_{\rm E}/(2H)$ an effective electric conductivity.
The functions in this module return an array of shape (3,2), with the first index corresponding to $E$, $B$, $G$ and the second index to helicity $\lambda=\pm 1$.
1r""" 2This module facilitates computing boundary terms which appear when computing the evolution of gauge-field bilinears like $\langle \boldsymbol{E}^2 \rangle$ 3due to the time dependence of the UV-regulator scale $k_{\rm h}$. 4 5All functions in this module return the same quantities, namely 6$$E_\lambda(\xi, s) = \frac{1}{r^2}\left| (i r - i \lambda \xi - s) W_{-i \lambda \xi, \frac{1}{2} + s}(-2 i r) + W_{1-i \lambda \xi, 1/2 + s}(-2 i r) \right|^2 \, , $$ 7$$B_\lambda(\xi, s) = \left| W_{-i \lambda \xi, \frac{1}{2} + s}(-2 i r) \right|^2 \, , $$ 8$$G_\lambda(\xi, s) = \frac{1}{r}\left[\operatorname{Re}\left[W_{1-i \lambda \xi, 1/2 + s}(-2 i r) W_{i \lambda \xi, \frac{1}{2} + s}(2 i r)\right] - s \left| W_{-i \lambda \xi, \frac{1}{2} + s}(-2 i r)\right|^2 \right]\, ,$$ 9with $r = |\xi| + \sqrt{\xi^2 + s^2 + s}$, the Whittaker-W function $W_{\kappa, \mu}(x)$,the instability parameter $\xi$ , and $s= \sigma_{\rm E}/(2H)$ an effective electric conductivity. 10 11The functions in this module return an array of shape (3,2), with the first index corresponding to $E$, $B$, $G$ and the second index to helicity $\lambda=\pm 1$. 12""" 13import numpy as np 14from scipy.special import gamma 15from mpmath import whitw, mp 16from functools import lru_cache 17 18#set accuracy of mpmath 19mp.dps = 8 20 21def boundary_pai(xi) -> np.ndarray: 22 """ 23 Compute boundary terms in the absence of Schwinger pair production. 24 """ 25 if abs(xi) >= 3: 26 return boundary_approx_pai(xi) 27 else: 28 return boundary_exact(xi, 0) 29 30def boundary_fai(xi, s) -> np.ndarray: 31 """ 32 Compute boundary terms including Schwinger pair production. 33 """ 34 if abs(xi) >= 4: 35 return boundary_approx_fai(xi, s) 36 else: 37 return boundary_exact(xi, s) 38 39 40 41@lru_cache(maxsize=int(1e6)) 42def whittaker_w(xi, s): 43 r = (abs(xi) + np.sqrt(xi**2 + s**2 + s)) 44 w = whitw(-xi*1j, 1/2 + s, -2j*r) 45 w1 = whitw(1-xi*1j, 1/2 + s, -2j*r) 46 return complex(w), complex(w1) 47 48 49def boundary_exact(xi : float, s : float) -> np.ndarray: 50 """ 51 Compute boundary terms using exact Whittaker functions. 52 53 Parameters 54 ---------- 55 xi : float 56 s : float 57 58 Returns 59 ------- 60 W : NDArray 61 """ 62 xi = float(xi) 63 wp, w1p = whittaker_w(xi, s) 64 wm, w1m = whittaker_w(-xi, s) 65 66 w = np.array([wp, wm]) 67 w1 = np.array([w1p, w1m]) 68 69 lam = np.array([1, -1]) 70 71 expterm = np.exp(np.pi*xi*lam) 72 73 r = (abs(xi) + np.sqrt(xi**2 + s**2 + s)) 74 75 Fterm = np.zeros((3, 2)) 76 77 Fterm[0,:] = expterm*abs((1j*r - 1j**lam*xi -s) * w + w1)**2/r**2 78 Fterm[1,:] = expterm*abs(w)**2 79 Fterm[2,:] = expterm*((w1*w.conjugate()).real - s*abs(w)**2)/r 80 81 return Fterm 82 83def boundary_approx_pai(xi : float) -> np.ndarray: 84 r""" 85 Use approximate formulas to compute boundary terms for $|\xi| > 3$ and $s=0$. 86 87 The approximations are taken from the Appendix B in [2109.01651](https://arxiv.org/abs/2109.01651). 88 89 Parameters 90 ---------- 91 xi : float 92 93 Returns 94 ------- 95 W : NDArray 96 """ 97 if (abs(xi) >= 3): 98 Fterm = np.zeros((3, 2)) 99 sgnsort = int((1-np.sign(xi))/2) 100 101 xi = abs(xi) 102 g1 = gamma(2/3)**2 103 g2 = gamma(1/3)**2 104 t1 = (3/2)**(1/3)*g1/(np.pi*xi**(1/3)) 105 t2 = -np.sqrt(3)/(15*xi) 106 t3 = (2/3)**(1/3)*g2/(100*np.pi*xi**(5/3)) 107 t4 = (3/2)**(1/3)*g1/(1575*np.pi*xi**(7/3)) 108 t5 = -27*np.sqrt(3)/(19250*xi**3) 109 t6 = 359*(2/3)**(1/3)*g2/(866250*np.pi*xi**(11/3)) 110 t7 = 8209*(3/2)**(1/3)*g1/(13162500*np.pi*xi**(13/3)) 111 t8 = -690978*np.sqrt(3)/(1861234375*xi**5) 112 t9 = 13943074*(2/3)**(1/3)*g2/(127566140625*np.pi*xi**(17/3)) 113 Fterm[0, sgnsort] = t1+t2+t3+t4+t5+t6+t7+t8+t9 114 115 t1 = 1 116 t2 = -9/(2**(10)*xi**2) 117 t3 = 2059/(2**(21)*xi**4) 118 t4 = -448157/(2**31*xi**6) 119 Fterm[0, 1-sgnsort] = np.sqrt(2)*(t1 + t2 + t3 + t4) 120 121 t1 = (2/3)**(1/3)*g2*xi**(1/3)/(np.pi) 122 t2 = 2*np.sqrt(3)/(35*xi) 123 t3 = -4*(2/3)**(1/3)*g2/(225*np.pi*xi**(5/3)) 124 t4 = 9*(3/2)**(1/3)*g1/(1225*np.pi*xi**(7/3)) 125 t5 = 132*np.sqrt(3)/(56875*xi**3) 126 t6 = -9511*(2/3)**(1/3)*g2/(5457375*np.pi*xi**(11/3)) 127 t7 = 1448*(3/2)**(1/3)*g1/(1990625*np.pi*xi**(13/3)) 128 t8 = 1187163*np.sqrt(3)/(1323765625*xi**5) 129 t9 = -22862986*(2/3)**(1/3)*g2/(28465171875*np.pi*xi**(17/3)) 130 Fterm[1, sgnsort] = t1+t2+t3+t4+t5+t6+t7+t8+t9 131 132 t1 = 1 133 t2 = 11/(2**(10)*xi**2) 134 t3 = -2397/(2**(21)*xi**4) 135 t4 = 508063/(2**31*xi**6) 136 Fterm[1, 1-sgnsort] = 1/np.sqrt(2)*(t1 + t2 + t3 + t4) 137 138 t1 = 1/np.sqrt(3) 139 t2 = -(2/3)**(1/3)*g2/(10*np.pi*xi**(2/3)) 140 t3 = 3*(3/2)**(1/3)*g1/(35*np.pi*xi**(4/3)) 141 t4 = -np.sqrt(3)/(175*xi**2) 142 t5 = -41*(2/3)**(1/3)*g2/(34650*np.pi*xi**(8/3)) 143 t6 = 10201*(3/2)**(1/3)*g1/(2388750*np.pi*xi**(10/3)) 144 t7 = -8787*np.sqrt(3)/(21896875*xi**4) 145 t8 = -1927529*(2/3)**(1/3)*g2/(4638768750*np.pi*xi**(14/3)) 146 t9 = 585443081*(3/2)**(1/3)*g1/(393158390625*np.pi*xi**(16/3)) 147 t10 = -65977497*np.sqrt(3)/(495088343750*xi**6) 148 Fterm[2, sgnsort] = t1+t2+t3+t4+t5+t6+t7+t8+t9+t10 149 150 t1 = 1 151 t2 = -67/(2**(10)*xi**2) 152 t3 = 21543/(2**(21)*xi**4) 153 t4 = -6003491/(2**31*xi**6) 154 Fterm[2, 1-sgnsort] = -np.sqrt(2)/(32*xi)*(t1 + t2 + t3 + t4) 155 return Fterm 156 else: 157 raise ValueError("abs(xi) needs to be larger than three for this approximation.") 158 159def boundary_approx_fai(xi :float, s : float) -> np.ndarray: 160 r""" 161 Use approximate formulas to compute boundary terms for $|\xi| > 4$ and arbitrary $s$. 162 163 The approximations are taken from the Appendix B in [2109.01651](https://arxiv.org/abs/2109.01651). 164 165 Parameters 166 ---------- 167 xi : float 168 169 Returns 170 ------- 171 W : NDArray 172 """ 173 if (abs(xi) >= 4): 174 Fterm = np.zeros((3, 2)) 175 sgnsort = int((1-np.sign(xi))/2) 176 177 xi = abs(xi) 178 r = xi + np.sqrt(xi**2 + s**2 + s) 179 psi = 2*np.sqrt(xi**2 + s**2 + s)/r 180 rpsi = (psi/r**2)**(1/3) 181 spsi = 5*s/psi**(2/3) 182 183 g1 = gamma(2/3)**2 184 g2 = gamma(1/3)**2 185 186 t1 = 3**(1/3)*g1/np.pi 187 t2 = -2/(5*np.sqrt(3))*(1+spsi) 188 t3 = g2/(3**(1/3)*25*np.pi)*(1+spsi)**2 189 t4 = 3**(1/3)*4*g1/(1575)*(1-27*spsi) 190 t5 = 4*np.sqrt(3)/(875)*(-27/11+2*spsi + spsi**2) 191 Fterm[0, sgnsort] = (psi/r)**(1/3)*(t1 + t2*rpsi + t3*rpsi**2 + t4*rpsi**3 + t5*rpsi**4) 192 193 t1 = 1 194 t2 = s/(16*xi**2)*(3*xi-r)/r 195 t3 = s**2/(4*xi*r) 196 Fterm[0, 1-sgnsort] = 2*np.sqrt(xi/r)*(t1 + t2 + t3) 197 198 t1 = g2/(3**(1/3)*np.pi) 199 t2 = 4*np.sqrt(3)/35 200 t3 = -16*g2/(3**(1/3)*225*np.pi) 201 Fterm[1, sgnsort] = (r/psi)**(1/3)*(t1 + t2*rpsi**2 + t3*rpsi**3) 202 203 Fterm[1, 1-sgnsort] = 0.5*(r/xi)**(1/2) 204 205 t1 = 1/np.sqrt(3) 206 t2 = -g2/(3**(1/3)*5*np.pi)*(1+spsi) 207 t3 = 3**(1/3)*6*g1/(35*np.pi) 208 t4 = -4*np.sqrt(3)/(175)*(1+spsi) 209 Fterm[2, sgnsort] = t1 + t2*rpsi + t3*rpsi**2 + t4*rpsi**3 210 211 Fterm[2, 1-sgnsort] = -((3*xi -r)/xi + 8*s)/(16*np.sqrt(xi*r)) 212 return Fterm 213 else: 214 raise ValueError("abs(xi) needs to be larger than four for this approximation.")
22def boundary_pai(xi) -> np.ndarray: 23 """ 24 Compute boundary terms in the absence of Schwinger pair production. 25 """ 26 if abs(xi) >= 3: 27 return boundary_approx_pai(xi) 28 else: 29 return boundary_exact(xi, 0)
Compute boundary terms in the absence of Schwinger pair production.
31def boundary_fai(xi, s) -> np.ndarray: 32 """ 33 Compute boundary terms including Schwinger pair production. 34 """ 35 if abs(xi) >= 4: 36 return boundary_approx_fai(xi, s) 37 else: 38 return boundary_exact(xi, s)
Compute boundary terms including Schwinger pair production.
50def boundary_exact(xi : float, s : float) -> np.ndarray: 51 """ 52 Compute boundary terms using exact Whittaker functions. 53 54 Parameters 55 ---------- 56 xi : float 57 s : float 58 59 Returns 60 ------- 61 W : NDArray 62 """ 63 xi = float(xi) 64 wp, w1p = whittaker_w(xi, s) 65 wm, w1m = whittaker_w(-xi, s) 66 67 w = np.array([wp, wm]) 68 w1 = np.array([w1p, w1m]) 69 70 lam = np.array([1, -1]) 71 72 expterm = np.exp(np.pi*xi*lam) 73 74 r = (abs(xi) + np.sqrt(xi**2 + s**2 + s)) 75 76 Fterm = np.zeros((3, 2)) 77 78 Fterm[0,:] = expterm*abs((1j*r - 1j**lam*xi -s) * w + w1)**2/r**2 79 Fterm[1,:] = expterm*abs(w)**2 80 Fterm[2,:] = expterm*((w1*w.conjugate()).real - s*abs(w)**2)/r 81 82 return Fterm
Compute boundary terms using exact Whittaker functions.
Parameters
xi (float):
s (float):
Returns
- W (NDArray):
84def boundary_approx_pai(xi : float) -> np.ndarray: 85 r""" 86 Use approximate formulas to compute boundary terms for $|\xi| > 3$ and $s=0$. 87 88 The approximations are taken from the Appendix B in [2109.01651](https://arxiv.org/abs/2109.01651). 89 90 Parameters 91 ---------- 92 xi : float 93 94 Returns 95 ------- 96 W : NDArray 97 """ 98 if (abs(xi) >= 3): 99 Fterm = np.zeros((3, 2)) 100 sgnsort = int((1-np.sign(xi))/2) 101 102 xi = abs(xi) 103 g1 = gamma(2/3)**2 104 g2 = gamma(1/3)**2 105 t1 = (3/2)**(1/3)*g1/(np.pi*xi**(1/3)) 106 t2 = -np.sqrt(3)/(15*xi) 107 t3 = (2/3)**(1/3)*g2/(100*np.pi*xi**(5/3)) 108 t4 = (3/2)**(1/3)*g1/(1575*np.pi*xi**(7/3)) 109 t5 = -27*np.sqrt(3)/(19250*xi**3) 110 t6 = 359*(2/3)**(1/3)*g2/(866250*np.pi*xi**(11/3)) 111 t7 = 8209*(3/2)**(1/3)*g1/(13162500*np.pi*xi**(13/3)) 112 t8 = -690978*np.sqrt(3)/(1861234375*xi**5) 113 t9 = 13943074*(2/3)**(1/3)*g2/(127566140625*np.pi*xi**(17/3)) 114 Fterm[0, sgnsort] = t1+t2+t3+t4+t5+t6+t7+t8+t9 115 116 t1 = 1 117 t2 = -9/(2**(10)*xi**2) 118 t3 = 2059/(2**(21)*xi**4) 119 t4 = -448157/(2**31*xi**6) 120 Fterm[0, 1-sgnsort] = np.sqrt(2)*(t1 + t2 + t3 + t4) 121 122 t1 = (2/3)**(1/3)*g2*xi**(1/3)/(np.pi) 123 t2 = 2*np.sqrt(3)/(35*xi) 124 t3 = -4*(2/3)**(1/3)*g2/(225*np.pi*xi**(5/3)) 125 t4 = 9*(3/2)**(1/3)*g1/(1225*np.pi*xi**(7/3)) 126 t5 = 132*np.sqrt(3)/(56875*xi**3) 127 t6 = -9511*(2/3)**(1/3)*g2/(5457375*np.pi*xi**(11/3)) 128 t7 = 1448*(3/2)**(1/3)*g1/(1990625*np.pi*xi**(13/3)) 129 t8 = 1187163*np.sqrt(3)/(1323765625*xi**5) 130 t9 = -22862986*(2/3)**(1/3)*g2/(28465171875*np.pi*xi**(17/3)) 131 Fterm[1, sgnsort] = t1+t2+t3+t4+t5+t6+t7+t8+t9 132 133 t1 = 1 134 t2 = 11/(2**(10)*xi**2) 135 t3 = -2397/(2**(21)*xi**4) 136 t4 = 508063/(2**31*xi**6) 137 Fterm[1, 1-sgnsort] = 1/np.sqrt(2)*(t1 + t2 + t3 + t4) 138 139 t1 = 1/np.sqrt(3) 140 t2 = -(2/3)**(1/3)*g2/(10*np.pi*xi**(2/3)) 141 t3 = 3*(3/2)**(1/3)*g1/(35*np.pi*xi**(4/3)) 142 t4 = -np.sqrt(3)/(175*xi**2) 143 t5 = -41*(2/3)**(1/3)*g2/(34650*np.pi*xi**(8/3)) 144 t6 = 10201*(3/2)**(1/3)*g1/(2388750*np.pi*xi**(10/3)) 145 t7 = -8787*np.sqrt(3)/(21896875*xi**4) 146 t8 = -1927529*(2/3)**(1/3)*g2/(4638768750*np.pi*xi**(14/3)) 147 t9 = 585443081*(3/2)**(1/3)*g1/(393158390625*np.pi*xi**(16/3)) 148 t10 = -65977497*np.sqrt(3)/(495088343750*xi**6) 149 Fterm[2, sgnsort] = t1+t2+t3+t4+t5+t6+t7+t8+t9+t10 150 151 t1 = 1 152 t2 = -67/(2**(10)*xi**2) 153 t3 = 21543/(2**(21)*xi**4) 154 t4 = -6003491/(2**31*xi**6) 155 Fterm[2, 1-sgnsort] = -np.sqrt(2)/(32*xi)*(t1 + t2 + t3 + t4) 156 return Fterm 157 else: 158 raise ValueError("abs(xi) needs to be larger than three for this approximation.")
Use approximate formulas to compute boundary terms for $|\xi| > 3$ and $s=0$.
The approximations are taken from the Appendix B in 2109.01651.
Parameters
- xi (float):
Returns
- W (NDArray):
160def boundary_approx_fai(xi :float, s : float) -> np.ndarray: 161 r""" 162 Use approximate formulas to compute boundary terms for $|\xi| > 4$ and arbitrary $s$. 163 164 The approximations are taken from the Appendix B in [2109.01651](https://arxiv.org/abs/2109.01651). 165 166 Parameters 167 ---------- 168 xi : float 169 170 Returns 171 ------- 172 W : NDArray 173 """ 174 if (abs(xi) >= 4): 175 Fterm = np.zeros((3, 2)) 176 sgnsort = int((1-np.sign(xi))/2) 177 178 xi = abs(xi) 179 r = xi + np.sqrt(xi**2 + s**2 + s) 180 psi = 2*np.sqrt(xi**2 + s**2 + s)/r 181 rpsi = (psi/r**2)**(1/3) 182 spsi = 5*s/psi**(2/3) 183 184 g1 = gamma(2/3)**2 185 g2 = gamma(1/3)**2 186 187 t1 = 3**(1/3)*g1/np.pi 188 t2 = -2/(5*np.sqrt(3))*(1+spsi) 189 t3 = g2/(3**(1/3)*25*np.pi)*(1+spsi)**2 190 t4 = 3**(1/3)*4*g1/(1575)*(1-27*spsi) 191 t5 = 4*np.sqrt(3)/(875)*(-27/11+2*spsi + spsi**2) 192 Fterm[0, sgnsort] = (psi/r)**(1/3)*(t1 + t2*rpsi + t3*rpsi**2 + t4*rpsi**3 + t5*rpsi**4) 193 194 t1 = 1 195 t2 = s/(16*xi**2)*(3*xi-r)/r 196 t3 = s**2/(4*xi*r) 197 Fterm[0, 1-sgnsort] = 2*np.sqrt(xi/r)*(t1 + t2 + t3) 198 199 t1 = g2/(3**(1/3)*np.pi) 200 t2 = 4*np.sqrt(3)/35 201 t3 = -16*g2/(3**(1/3)*225*np.pi) 202 Fterm[1, sgnsort] = (r/psi)**(1/3)*(t1 + t2*rpsi**2 + t3*rpsi**3) 203 204 Fterm[1, 1-sgnsort] = 0.5*(r/xi)**(1/2) 205 206 t1 = 1/np.sqrt(3) 207 t2 = -g2/(3**(1/3)*5*np.pi)*(1+spsi) 208 t3 = 3**(1/3)*6*g1/(35*np.pi) 209 t4 = -4*np.sqrt(3)/(175)*(1+spsi) 210 Fterm[2, sgnsort] = t1 + t2*rpsi + t3*rpsi**2 + t4*rpsi**3 211 212 Fterm[2, 1-sgnsort] = -((3*xi -r)/xi + 8*s)/(16*np.sqrt(xi*r)) 213 return Fterm 214 else: 215 raise ValueError("abs(xi) needs to be larger than four for this approximation.")
Use approximate formulas to compute boundary terms for $|\xi| > 4$ and arbitrary $s$.
The approximations are taken from the Appendix B in 2109.01651.
Parameters
- xi (float):
Returns
- W (NDArray):