Created
December 28, 2025 03:23
-
-
Save BrianMartell/57b7b0f5b0315d05052bc6d066be8906 to your computer and use it in GitHub Desktop.
PUH-BrianMartell puh_spf_density_factor_simulation.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 | |
| # PUH v25: SPF Density Factor Sim — Density vs Rebound Compression Factor | |
| f_rebound = np.linspace(1, 10, 500) # Rebound asymmetry factor arb. | |
| V_8 = np.pi**4 / 24 # Unit 8D volume | |
| rho_base = 240 / V_8 | |
| rho_spf = rho_base * f_rebound # Compressed density | |
| plt.figure(figsize=(10,6)) | |
| plt.plot(f_rebound, rho_spf, label='SPF Density vs Rebound Factor', color='cyan', lw=2) | |
| plt.axvline(5, color='gold', ls='--', label='Typical Rebound Asymmetry ~5') | |
| plt.xlabel('Rebound Compression Factor f_{rebound}'); plt.ylabel('SPF Density \rho_{SPF} (arb.)') | |
| plt.title('PUH v25: SPF Density Factor Sim') | |
| plt.legend(); plt.grid(alpha=0.3) | |
| plt.tight_layout() | |
| plt.savefig('puh_spf_density_factor_simulation.png', dpi=300) | |
| plt.show() | |
| print("Linear compression — rebound density grain.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment