import numpy as npfrom astropy.constants import c, G, M_sun, m_pimport astropy.units as udef bondi_gamma_factor(gamma):""" Calculate the factor involving gamma in the Bondi accretion rate. """ factor = (2/ (5-3* gamma)) ** ((5-3* gamma) / (2* (gamma -1)))return factordef bondi_accretion_rate(M_star, rho_inf, c_inf, gamma=1.4):""" Calculate the Bondi accretion rate. Parameters: - M_star: Mass of the star in grams - rho_inf: Density of ISM in g/cm^3 - c_inf: Sound speed in ISM in cm/s - gamma: Adiabatic index (default is 1.4 for ISM) Returns: - accretion rate in g/s """# First part of the equation factor1 = np.pi * (G**2) * (M_star**2) * rho_inf / (c_inf**3)# Second part: The factor involving gamma factor2 = bondi_gamma_factor(gamma)print(f"Factor 1: {factor1}")print(f"Factor 2: {factor2}")# Bondi accretion rate in grams per second accretion_rate = factor1 * factor2return accretion_ratedef time_to_double_mass(M_star, rho_inf, c_inf, gamma=1.4):""" Estimate the time for a star to double its mass via accretion. Parameters: - M_star: Initial mass of the star in grams - rho_inf: Density of ISM in g/cm^3 - c_inf: Sound speed in ISM in cm/s - gamma: Adiabatic index (default is 1.4 for ISM) Returns: - Time to double the mass in seconds """ accretion_rate = bondi_accretion_rate(M_star, rho_inf, c_inf, gamma)print(f"Bondi accretion rate: {accretion_rate.to(u.M_sun/u.yr)}")# Time to double the mass (in seconds) time_double = M_star / accretion_ratereturn time_double
Code
# Example: Solar mass star in typical ISM conditionsM_star = M_sun # Solar mass in gramsrho_inf =1e-24* u.g / u.cm**3# ISM densityc_inf =10* u.km / u.s # Sound speed# Calculate time to double masstime_double = time_to_double_mass(M_star, rho_inf, c_inf).to(u.yr)# Print resultprint(f"Time to double the mass of a solar-mass star: {time_double:.2e}")
Factor 1: 55331588792011.84 m6 g / (s cm3 km3)
Factor 2: 2.5000000000000004
Bondi accretion rate: 2.1953875961320245e-15 solMass / yr
Time to double the mass of a solar-mass star: 4.56e+14 yr
1 The Eddington Luminosity
Code
print(G, c, m_p, M_sun)
Name = Gravitational constant
Value = 6.6743e-11
Uncertainty = 1.5e-15
Unit = m3 / (kg s2)
Reference = CODATA 2018 Name = Speed of light in vacuum
Value = 299792458.0
Uncertainty = 0.0
Unit = m / s
Reference = CODATA 2018 Name = Proton mass
Value = 1.67262192369e-27
Uncertainty = 5.1e-37
Unit = kg
Reference = CODATA 2018 Name = Solar mass
Value = 1.988409870698051e+30
Uncertainty = 4.468805426856864e+25
Unit = kg
Reference = IAU 2015 Resolution B 3 + CODATA 2018
# import package related to the current problemfrom astr145 import schwarzschild_radiusdef sonic_radius(M_bh, c_inf, gamma): factor = (5-3* gamma) /4 r_s = G * M_bh / (c_inf**2) * factorreturn r_s# Calculate the sonic radiusr_s = sonic_radius(M_bh, c_inf, gamma).to(u.km)accretion_rate = bondi_accretion_rate(M_bh, rho_inf, c_inf, gamma).to(u.M_sun/u.yr)R_sch = schwarzschild_radius(M_bh).to(u.km)# Output the resultsprint(f"Sonic radius: {r_s:.2e}")print(f"Schwarzschild radius: {R_sch:.2e}")print(f"Sonic radius in Schwarzschild units: {r_s/R_sch:.2e}")print(f"Bondi accretion rate: {accretion_rate:.2e}")
Factor 1: 1.1550469160332473e+22 m6 g / (s cm3 km3)
Factor 2: 2.828427124746191
Sonic radius: 8.29e+11 km
Schwarzschild radius: 2.95e+06 km
Sonic radius in Schwarzschild units: 2.81e+05
Bondi accretion rate: 5.18e-07 solMass / yr
Code
epsilon =0.1# Efficiency factor# Function to calculate Eddington luminositydef eddington_luminosity(M): L_edd =4* np.pi * G * M_bh * creturn L_edddef eddington_luminosity(M_bh): L_edd =1.25e38* (M_bh / M_sun) * u.erg / u.s # Eddington luminosity in erg/sreturn L_edd# Function to calculate Eddington accretion ratedef eddington_accretion_rate(M_bh, epsilon=epsilon): L_edd = eddington_luminosity(M_bh) Mdot_edd = L_edd / (epsilon * c**2) # Eddington accretion ratereturn Mdot_edd.to(u.M_sun/u.yr)
Code
# Example: For a SMBH with 1e6 solar massesM_bh =1e6* M_sun# Calculate the Eddington accretion rateedd_accretion_rate = eddington_accretion_rate(M_bh)# Output the resultprint(f"Eddington accretion rate: {edd_accretion_rate:.2e}")print(f"Bondi accretion rate in Eddington units: {accretion_rate/edd_accretion_rate:.2e}")
Eddington accretion rate: 2.21e-02 solMass / yr
Bondi accretion rate in Eddington units: 2.35e-05
Stationary black holes have a point singularity while rotating black holes possess a ring-shaped singularity. This distinction leads to the intriguing concept of naked singularities that could theoretically be observed. The concept of naked singularities presents a paradox in physics since they lack an event horizon, allowing for potential observation, although none have been detected so far.
---title: Problem Set 2number-sections: true---```{python}import numpy as npfrom astropy.constants import c, G, M_sun, m_pimport astropy.units as udef bondi_gamma_factor(gamma):""" Calculate the factor involving gamma in the Bondi accretion rate. """ factor = (2/ (5-3* gamma)) ** ((5-3* gamma) / (2* (gamma -1)))return factordef bondi_accretion_rate(M_star, rho_inf, c_inf, gamma=1.4):""" Calculate the Bondi accretion rate. Parameters: - M_star: Mass of the star in grams - rho_inf: Density of ISM in g/cm^3 - c_inf: Sound speed in ISM in cm/s - gamma: Adiabatic index (default is 1.4 for ISM) Returns: - accretion rate in g/s """# First part of the equation factor1 = np.pi * (G**2) * (M_star**2) * rho_inf / (c_inf**3)# Second part: The factor involving gamma factor2 = bondi_gamma_factor(gamma)print(f"Factor 1: {factor1}")print(f"Factor 2: {factor2}")# Bondi accretion rate in grams per second accretion_rate = factor1 * factor2return accretion_ratedef time_to_double_mass(M_star, rho_inf, c_inf, gamma=1.4):""" Estimate the time for a star to double its mass via accretion. Parameters: - M_star: Initial mass of the star in grams - rho_inf: Density of ISM in g/cm^3 - c_inf: Sound speed in ISM in cm/s - gamma: Adiabatic index (default is 1.4 for ISM) Returns: - Time to double the mass in seconds """ accretion_rate = bondi_accretion_rate(M_star, rho_inf, c_inf, gamma)print(f"Bondi accretion rate: {accretion_rate.to(u.M_sun/u.yr)}")# Time to double the mass (in seconds) time_double = M_star / accretion_ratereturn time_double``````{python}# Example: Solar mass star in typical ISM conditionsM_star = M_sun # Solar mass in gramsrho_inf =1e-24* u.g / u.cm**3# ISM densityc_inf =10* u.km / u.s # Sound speed# Calculate time to double masstime_double = time_to_double_mass(M_star, rho_inf, c_inf).to(u.yr)# Print resultprint(f"Time to double the mass of a solar-mass star: {time_double:.2e}")```## The Eddington Luminosity```{python}print(G, c, m_p, M_sun)```## Bondi Accretion onto Black Holes?```{python}M_bh =1e6* M_sun # SMBH massrho_inf =1.67e-24* u.g / u.cm**3# galactic medium densityc_inf =200* u.km / u.s # sound speedgamma =4/3# adiabatic index```### Estimate the sonic radius```{python}# import package related to the current problemfrom astr145 import schwarzschild_radiusdef sonic_radius(M_bh, c_inf, gamma): factor = (5-3* gamma) /4 r_s = G * M_bh / (c_inf**2) * factorreturn r_s# Calculate the sonic radiusr_s = sonic_radius(M_bh, c_inf, gamma).to(u.km)accretion_rate = bondi_accretion_rate(M_bh, rho_inf, c_inf, gamma).to(u.M_sun/u.yr)R_sch = schwarzschild_radius(M_bh).to(u.km)# Output the resultsprint(f"Sonic radius: {r_s:.2e}")print(f"Schwarzschild radius: {R_sch:.2e}")print(f"Sonic radius in Schwarzschild units: {r_s/R_sch:.2e}")print(f"Bondi accretion rate: {accretion_rate:.2e}")``````{python}epsilon =0.1# Efficiency factor# Function to calculate Eddington luminositydef eddington_luminosity(M): L_edd =4* np.pi * G * M_bh * creturn L_edddef eddington_luminosity(M_bh): L_edd =1.25e38* (M_bh / M_sun) * u.erg / u.s # Eddington luminosity in erg/sreturn L_edd# Function to calculate Eddington accretion ratedef eddington_accretion_rate(M_bh, epsilon=epsilon): L_edd = eddington_luminosity(M_bh) Mdot_edd = L_edd / (epsilon * c**2) # Eddington accretion ratereturn Mdot_edd.to(u.M_sun/u.yr)``````{python}# Example: For a SMBH with 1e6 solar massesM_bh =1e6* M_sun# Calculate the Eddington accretion rateedd_accretion_rate = eddington_accretion_rate(M_bh)# Output the resultprint(f"Eddington accretion rate: {edd_accretion_rate:.2e}")print(f"Bondi accretion rate in Eddington units: {accretion_rate/edd_accretion_rate:.2e}")``````{python}σT =6.65e-25* u.cm**2# Thomson cross-sectionf1 =4* m_p * c_inf**3/ (epsilon * c * σT * M_sun * G * rho_inf)f1 = f1.to(u.dimensionless_unscaled)f2 = bondi_gamma_factor(gamma) **(-1)print(f"Factor: {f1 * f2}")```{{< pagebreak >}}## Rotating Black Holes<!-- The video explores the properties of spinning black holes, focusing on the Kerr metric and its implications in general relativity. It discusses the unique event horizons, frame dragging, and the ergosphere surrounding rotating black holes. The concept of naked singularities and their theoretical existence is also introduced, emphasizing the complexities of black hole physics.Highlights:00:04 Spinning black holes differ significantly from stationary ones, primarily in the structure of their event horizons. Understanding these differences is crucial for grasping the nature of black holes in our universe. -The Kerr metric provides a mathematical framework for understanding rotating black holes, illustrating their unique properties compared to stationary black holes. It's essential for describing their event horizons. -Einstein's field equations are fundamental in describing the universe's structure, with various metrics explaining different cosmic scenarios, including stationary and rotating black holes. -The event horizon of a rotating black hole is not spherical, which introduces complexities in its properties and behavior, further distinguishing it from non-rotating black holes.02:18 The structure of a rotating black hole differs from a stationary one, showcasing an event horizon that resembles a squished sphere. Additionally, there exists an inner horizon that is more of a mathematical concept than a physical entity. -The event horizon of a rotating black hole, described by the kermetric, illustrates how its shape varies based on rotation. This highlights the complexities involved in understanding black hole geometries. -The existence of an inner horizon presents challenges in comprehending black holes, as this area is unreachable and lacks observational evidence. This reinforces the limitations of current black hole theories. -Frame dragging is a phenomenon occurring beyond the outer stationary limit surface of a rotating black hole, influencing the movement of particles and even light. This effect complicates our understanding of gravitational interactions.04:35 The concept of frame dragging explains how the rotation of a black hole influences the movement of objects and light around it. As photons adapt to the black hole's rotation, massive objects are similarly affected, illustrating the nature of space-time distortion. -The stationary limit surface is crucial in understanding how light behaves near a black hole. Photons must align with the black hole's rotation when crossing this boundary. -The ergosphere is the region between the event horizon and the stationary limit surface. Here, particles are compelled to rotate with the black hole but can still escape its gravitational pull. -Energy extraction from a black hole is possible through the Penrose process. This offers intriguing implications for theoretical physics regarding energy resources in extreme environments.06:53 The nature of black holes reveals complex singularities, with stationary black holes having a point singularity while rotating black holes possess a ring-shaped singularity. This distinction leads to the intriguing concept of naked singularities that could theoretically be observed. -The event horizon is critical for defining black holes, as it marks the boundary beyond which nothing, not even light, can escape. Its existence diminishes for rapidly spinning black holes. -The concept of naked singularities presents a paradox in physics since they lack an event horizon, allowing for potential observation, although none have been detected so far. -Roger Penrose's cosmic censorship hypothesis suggests that naked singularities may never be observed, emphasizing the mystery surrounding black hole physics and their implications in the universe. -->Stationary black holes have a point singularity while rotating black holes possess a ring-shaped singularity. This distinction leads to the intriguing concept of naked singularities that could theoretically be observed. The concept of naked singularities presents a paradox in physics since they lack an event horizon, allowing for potential observation, although none have been detected so far.