Skip to content

Instantly share code, notes, and snippets.

@BrianMartell
Created December 28, 2025 03:23
Show Gist options
  • Select an option

  • Save BrianMartell/57b7b0f5b0315d05052bc6d066be8906 to your computer and use it in GitHub Desktop.

Select an option

Save BrianMartell/57b7b0f5b0315d05052bc6d066be8906 to your computer and use it in GitHub Desktop.
PUH-BrianMartell puh_spf_density_factor_simulation.py-Updated New Py Code
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