Program for "Covariance of Larmor-Lienard, Point Charge Going in a Circle in Motional Rest Frame K"
Private Sub cmdCircularLL_Click()
Const c As Double = 299792458
Const pi As Double = 3.14159265
Const q As Double = 1
Const Radius As Double = 0.000001
Const eps0 As Double = 0.00000000000885
Const u As Double = 0.0001 * c
Const a As Double = u ^ 2 / Radius
Const omega As Double = u / Radius
Const tau As Double = 2 * pi / omega
Const N As Double = 10000
Const dt As Double = tau / N
Const K As Double = q ^ 2 / (6 * pi * eps0 * c ^ 3)
Const v As Double = 0.95 * c
Const Term As Double = a ^ 2 - (u * a / c) ^ 2
Dim t(N), tp(N) As Double
Dim x(N), y(N) As Double
Dim ux(N), uxp, uy(N), uyp, up As Double
Dim ax(N), axp, ay(N), ayp, ap As Double
Dim PLL(N), PLLp(N) As Double
Dim index As Long
Dim gamma, gammap As Double
Dim IntLL, IntLLp As Double
Dim dtp As Double
Dim uXasq As Double
Dim AvPLLp As Double
gamma = 1 / Sqr(1 - v ^ 2 / c ^ 2)
gammap = 1 / Sqr(1 - u ^ 2 / c ^ 2)
'Compute P(t).
For index = 0 To N - 1
t(index) = index * dt
x(index) = Radius * Cos(omega * t(index))
y(index) = Radius * Sin(omega * t(index))
ux(index) = -omega * Radius * Sin(omega * t(index))
uy(index) = omega * Radius * Cos(omega * t(index))
ax(index) = -omega ^ 2 * Radius * Cos(omega * t(index))
ay(index) = -omega ^ 2 * Radius * Sin(omega * t(index))
PLL(index) = K * gammap ^ 6 * Term
Next index
'Integrate P(t) to find the energy radiated per cycle.
IntLL = 0
For index = 0 To N - 1
IntLL = IntLL + PLL(index) * dt
Next index
MsgBox ("IntLL = " & IntLL)
'Then transform the values to frame Kprime and compute the power in Kprime.
For index = 0 To N - 1
tp(index) = gamma * (t(index) - v * x(index) / c ^ 2)
uxp = (ux(index) - v) / (1 - v * ux(index) / c ^ 2)
uyp = uy(index) / gamma / (1 - v * ux(index) / c ^ 2)
up = Sqr(uxp ^ 2 + uyp ^ 2)
axp = ax(index) / gamma ^ 3 / (1 - v * ux(index) / c ^ 2) ^ 3
ayp = ay(index) / gamma ^ 2 / (1 - v * ux(index) / c ^ 2) ^ 2 + v * uy(index) * ax(index) / (c ^ 2 * gamma ^ 2 * (1 - v * ux(index) / c ^ 2) ^ 3)
ap = Sqr(axp ^ 2 + ayp ^ 2)
uXasq = (uxp / c * ayp - uyp / c * axp) ^ 2
gammap = 1 / Sqr(1 - up ^ 2 / c ^ 2)
PLLp(index) = K * gammap ^ 6 * (ap ^ 2 - uXasq)
Next index
AvPLLp = 0
For index = 0 To N - 1
AvPLLp = AvPLLp + PLLp(index)
Next index
AvPLLp = AvPLLp / N
MsgBox ("Average PLLp = " & AvPLLp)
'Integrate to find the energy radiated per cycle in Kprime.
IntLLp = 0
For index = 0 To N - 1
If index < (N - 1) Then dtp = tp(index + 1) - tp(index)
IntLLp = IntLLp + PLLp(index) * dtp
Next index
MsgBox ("IntLLp = " & IntLLp & ", gamma*IntLL/Intllp = " & gamma * IntLL / IntLLp)
'Output the powers for plotting.
Open "c:\WINMCAD\Physics\ALLL.PRN" For Output As #1
For index = 0 To N - 1
Write #1, t(index), PLL(index), tp(index), AvPLLp
Next index
Close
MsgBox ("Ready for plotting")
End Sub