Code
using DrWatson
using Unitful: Mass, Length
include(srcdir("astr145/main.jl"))
escape_velocity (generic function with 1 method)

1 The GZK Cutoff

Assuming a head-on collision along the x-axis, the four-momenta of the proton (assumed to be ultra-relativistic) and CMB photon are Pp = (Ep/c, pp, 0, 0) and Pγ = (Eγ/c, −Eγ/c, 0, 0), where E2 p = m2 pc4 + p2 pc2 and Pp · Pp = −m2 pc2, with mpc2 = 938.3 MeV.

Code
uconvert(u"MeV", Unitful.k * T_CMB)
2.348636945931144e-10 MeV
Code
let M = 1u"Msun", R = 10u"km"
    breakup_velocity(M, R)
end
1.1520088541326408e8 m s⁻¹

2 How Common Are GRBs?

The observed rate of GRBs across the sky is roughly two per day. (a) If GRBs are two-sided jets with a typical half-opening angle of four degrees, what is the true rate of GRB events in the observable Universe? (b) GRBs are visible to distances of ∼ 10 Gpc. What is the space density of GRBs? If the star formation rate density in this same volume is ∼ \(1(M_⊙/yr) Mpc^{−3}\), how many GRBs occur per unit mass of stars formed? Compare this to the similar number for Type II supernovae, which is one supernova per 100 M formed. (c) The stellar mass of the Milky Way is ∼ \(10^{11} M_⊙\) . How many GRBs have occurred in the history of the Milky Way? How many have occurred within the last 10,000 years (i.e., may have been observed by humans, if they were pointed in the right direction)? Over this span, the star formation rate of the Milky Way was ∼ 1(M_⊙/yr).

3 The Hulse-Taylor Pulsar

Hulse and Taylor were awarded the Nobel Prize in Physics in 1993 for their analysis of the binary neutron star PSR B1913+16, in which they showed that its orbit was gradually shrinking as a result of gravitational wave emission, a key prediction of Einstein’s theory of General Relativity. Let us take μ = M1M2/(M1 + M2) is the reduced mass and M = M1 + M2 is the total mass. You may assume that both masses are the same, M1 = M2 = 1.4 M⊙, and remain constant as the orbit evolves. The total angular momentum of the system, assuming circular orbits, is is \(L = μ \sqrt{G M a}\), where a is the separation of the stars. General relativity predicts that the orbit will lose angular momentum due to gravitational waves at a rate: dL dt = − , (5) (You don’t need to derive this!) (a) Because the masses are constant, gravitational waves cause the orbital radius to decrease. By taking the derivative of L(t) for a binary in a circular orbit, show that dL / dt = √ ( G M_1^3 / 2) da / dt .

Code
function t_merge(M, a0)
    5 * (c^5 * a0^4) / (512 * G^3 * M^3) |> u"yr"
end


"""binary’s orbital period Pb"""
function P_b(M, a0)
    sqrt(4 * pi^2 * a0^3 / G / M) |> u"yr"
end

@show t_merge(1.4u"Msun", 1e7u"m")

a0 = 3e9u"m"

@show P_b(2.8u"Msun", a0) |> u"hr"
t_merge(1.4 * u"Msun", 1.0e7 * u"m") = 1.1683704968163275 yr
P_b(2.8 * u"Msun", a0) |> u"hr" = 14.87731015234723 hr
14.87731015234723 hr
Code
function dPbdt(M, Pb)
    -192 * pi / 2^(1 / 3) / 5 * (G * M / c^3)^(5 / 3) * (2 * pi / Pb)^(5 / 3) |> upreferred
end

let M = 1.4u"Msun", Pb = 8u"hr"
    @show dPbdt(M, Pb)
end
dPbdt(M, Pb) = -1.8912371970169034e-13 s⁻¹ᐟ⁴⁵⁰³⁵⁹⁹⁶²⁷³⁷⁰⁴⁹⁶
-1.8912371970169034e-13 s⁻¹ᐟ⁴⁵⁰³⁵⁹⁹⁶²⁷³⁷⁰⁴⁹⁶

4 Gamma-Ray Bursts

The traditional classification of gamma-ray bursts (GRBs) into short and long categories has been challenged by recent observations. Notably, GRB 230307A, a long-duration burst lasting approximately 200 seconds, was linked to the merger of two neutron stars—a phenomenon typically associated with short GRBs. This event, observed by NASA’s James Webb Space Telescope, also marked the first detection of the heavy element tellurium from such a merger, highlighting the role of these cosmic events in synthesizing heavy elements.