Created
December 5, 2025 18:57
-
-
Save BrianMartell/3c17411053006966d16bd78b83887159 to your computer and use it in GitHub Desktop.
PUH-BrianMartell PUH_v6_Density_Contrast_Sim.py- Updated New Py Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| M = np.logspace(50, 55, 500) # kg | |
| r_S = 2* G * M / c**2 | |
| delta = ell_P / r_S | |
| C_geom = 1e-5 / delta # amplification needed | |
| plt.figure(figsize=(8,5)) | |
| plt.loglog(M, delta, 'b-', label=r'$\delta$') | |
| plt.loglog(M, C_geom, 'r--', label=r'$C_{\rm geom}$') | |
| plt.axhline(1e-5, color='k', ls=':', label=r'$\Delta\rho/\rho_{\rm CMB}$') | |
| plt.xlabel('Collapsed mass M (kg)') | |
| plt.legend() | |
| plt.grid(True) | |
| plt.savefig('puh_density_contrast.png', dpi=300) | |
| plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment