Friday, March 14, 2025

Using sympy python library to show the framework working.

I just learned that there is a symbolic manipulation library for python that works with formulas.  Used it with the formulas in my framework.





Original Thermal de Broglie Wavelength:

h/(sqrt(T)*sqrt(m)*sqrt(2*pi*k))

Simplified Thermal de Broglie Wavelength:

c/(sqrt(2*pi)*sqrt(f_T)*sqrt(f_m))


Original Stephan-Boltzmann Formula:

2*pi**5*k**4/(15*c**2*h**3)


Simplified Stephan-Boltzmann Formula:

2*pi**5*Hz_kg*K_Hz**4/15


Original Planck law Formula:

2*f**3*h/(c**2*(e**(f*h/(T*k)) - 1))


Simplified Planck law Formula:

2*Hz_kg*f**3/(e**(f/(K_Hz*T)) - 1)





from sympy import symbols, sqrt, pi, simplify,Mul


# Define symbols

m, f_m, f_T, T, c, f, e = symbols("m f_m f_T T c f e", positive=True)

h, k = symbols("h k")  # Planck's constant and Boltzmann's constant


# Define modular unit scaling factors

Hz_kg, kg_J = symbols("Hz_kg kg_J", positive=True)

K_Hz = symbols("K_Hz", positive=True)

two_pi = symbols("2*pi")


#two_pi = Mul(2,pi,evaluate=False)

# Define original thermal de Broglie wavelength formula

λ_th = h / sqrt(two_pi * m * T * k)


# Substitute h and k with modular scaling factors

λ_th_simplified = λ_th.subs({h: Hz_kg * kg_J, k: K_Hz * Hz_kg * kg_J, m:f_m * Hz_kg, T:f_T/K_Hz, kg_J: c**2 })


# Further simplification

λ_th_simplified = simplify(λ_th_simplified)

λ_th_simplified = simplify(λ_th_simplified)


# Print result

print()

print("Original Thermal de Broglie Wavelength:")

print(λ_th)

print("Simplified Thermal de Broglie Wavelength:")

print(λ_th_simplified)

print()


σ = 2 * pi**5 * k**4 / (15 * h**3 * c**2)

σ_simplified = σ.subs({h: Hz_kg * c**2, k: K_Hz * Hz_kg * c**2 })

σ_simplified = simplify(σ_simplified)


print("Original Stephan-Boltzmann Formula:")

print(σ)

print("Simplified Stephan-Boltzmann Formula:")

print(σ_simplified)

print()


planck_law = ((2 * h * f**3)/c**2)*(1/(e**((h*f)/(k * T))-1))

planck_law_simplified = planck_law.subs({h: Hz_kg * c**2, k: K_Hz * Hz_kg * c**2 })

planck_law_simplified = simplify(planck_law_simplified)


print("Original Planck law Formula:")

print(planck_law)

print("Simplified Planck law Formula:")

print(planck_law_simplified)

print()


No comments:

Post a Comment

S_u, conservation, measurement problem, hidden variables as axis of measurement and interactions we are not aware of.

  Core Concepts of the  S_u  Framework:  as the Fundamental Conserved "Stuff": The central idea is that there exists a single, dim...