Skip to main content

Lattice Field Medium physics simulation library

Project description

lfm-physics

Tests Python 3.10+ License: MIT

Lattice Field Medium — a physics simulation library implementing the LFM framework.

Two governing equations. One integer (χ₀ = 19). All of physics.

Install

pip install lfm-physics

For GPU acceleration (NVIDIA):

pip install lfm-physics[gpu]

Quick Start

import lfm

# Fundamental constants derived from χ₀ = 19
print(f"χ₀ = {lfm.CHI0}")       # 19.0
print(f"κ  = {lfm.KAPPA}")      # 0.015873...
print(f"α  = {lfm.ALPHA_EM}")   # 0.007299... ≈ 1/137.088

# Create and run a simulation
config = lfm.SimulationConfig(grid_size=64, report_interval=500)
sim = lfm.Simulation(config)
sim.place_soliton((32, 32, 32), amplitude=6.0, sigma=5.0)
sim.equilibrate()
sim.run(steps=1000)

# Analyze
m = sim.metrics()
print(f"χ_min = {m['chi_min']:.2f}")
print(f"Wells = {m['well_fraction']*100:.1f}%")

# 41+ predictions from one integer
catalog = lfm.predict_all()
for name, entry in list(catalog.items())[:5]:
    print(f"  {name}: predicted={entry['predicted']:.6f}, "
          f"measured={entry['measured']:.6f}, error={entry['error_pct']:.2f}%")

Examples

See examples/ for full working scripts:

  • cosmic_structure_formation.py — 256³ universe simulation showing spontaneous gravitational structure (wells + voids) from GOV-01 + GOV-02 alone. Includes cosmic time conversion, periodic snapshots, and milestone tracking. Set GRID_SIZE = 64 for a quick CPU test.

What is LFM?

The Lattice Field Medium framework derives all physics from two coupled wave equations on a discrete 3D cubic lattice:

  • GOV-01 (Wave Equation): ∂²Ψ/∂t² = c²∇²Ψ − χ²Ψ
  • GOV-02 (Field Equation): ∂²χ/∂t² = c²∇²χ − κ(|Ψ|² − E₀²) − 4λ_H·χ(χ² − χ₀²)

From these two equations and χ₀ = 19 (derived from 3D lattice geometry: 1+6+12=19), the framework predicts 41+ fundamental constants within 2% of measured values.

Documentation

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lfm_physics-0.1.0.tar.gz (54.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lfm_physics-0.1.0-py3-none-any.whl (45.0 kB view details)

Uploaded Python 3

File details

Details for the file lfm_physics-0.1.0.tar.gz.

File metadata

  • Download URL: lfm_physics-0.1.0.tar.gz
  • Upload date:
  • Size: 54.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lfm_physics-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6ab3596520241a4349a7052719601ee3bc0426ed0f08e917542978ba71228ef7
MD5 b809e6af086c9600b3782083bb6fe08a
BLAKE2b-256 b14dbe47e3d3008e4ad2e1bcc99bd0e10d584754363fb447d58e75b7666bebbc

See more details on using hashes here.

Provenance

The following attestation bundles were made for lfm_physics-0.1.0.tar.gz:

Publisher: publish.yml on gpartin/lfm-physics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lfm_physics-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lfm_physics-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 45.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lfm_physics-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 553ebace883912e10e80529e78395200b9f780e1452f473d060935a73aedebbd
MD5 e457e76bbee2dad7dc930bcb0602e887
BLAKE2b-256 0a9343ca470c091abd7822ca53c5dc0fcee22d3d10ac0f465ede81dfe7aa3e96

See more details on using hashes here.

Provenance

The following attestation bundles were made for lfm_physics-0.1.0-py3-none-any.whl:

Publisher: publish.yml on gpartin/lfm-physics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page