Skip to main content

Recursive Division Tree (RDT) Kernel — physics-inspired diffusion and entropy simulation using PyTorch (CPU & GPU)

Project description

RDT Kernel

RDT Kernel is a physics-inspired numerical simulator implementing a nonlinear partial differential equation (PDE) for a scalar field L(x, y, t). It combines a logarithmic damping term with a Laplacian diffusion term, forming a compact PyTorch-based solver for recursive field dynamics, entropy stabilization, and nonlinear diffusion behavior.

This implementation uses PyTorch tensor operations, automatically runs on CPU or GPU (and TPU if available), and can function as a standalone simulator or a physics-based component within other systems.

Mathematical Model

The kernel evolves the field according to: ∂L/∂t = -α·ln(L) + D·∇²L

where:

  • L(x, y, t): scalar field
  • α: nonlinear damping coefficient
  • D: diffusion constant
  • ∇²L: discrete Laplacian

The equation models a nonlinear parabolic PDE coupling the field’s magnitude to its potential energy, creating self-stabilizing diffusion and entropy-bounded evolution.

Core Functions

  • get_device(): Detects CPU, GPU, or TPU
  • rdt_kernel(): Computes ∂L/∂t
  • step(): Advances one Euler step with clamping
  • run_demo(): Runs a full test simulation with timing and mean-field output

Installation

From PyPI: pip install rdt-kernel

From source: git clone https://github.com/RRG314/rdt-kernel.git cd rdt-kernel pip install .

Example

from rdt_kernel import run_demo run_demo(n=128, steps=100, alpha=0.5, D=0.1, dx=1.0, dt=0.01)

Example output: Running 100 steps on GPU... Done in 0.029s, mean=1.003536

Applications

  • Nonlinear entropy and diffusion modeling
  • Energy field evolution in dissipative media
  • Recursive geometric and entropic systems
  • Physics-inspired machine learning research

Author

Developed by Steven Reid (Independent Researcher) Repository: https://github.com/RRG314/rdt-kernel

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

rdt_kernel-1.0.5.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

rdt_kernel-1.0.5-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file rdt_kernel-1.0.5.tar.gz.

File metadata

  • Download URL: rdt_kernel-1.0.5.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for rdt_kernel-1.0.5.tar.gz
Algorithm Hash digest
SHA256 f354bed16f9545851950009d843f80ace4a788003321f935580380a2b55e9fa1
MD5 4b529d01f5c6e724a31f084e4d9eb03a
BLAKE2b-256 10c886c3ec79ebb445c68282fff809400a4810d6b593420daa4d13ce9de3e357

See more details on using hashes here.

File details

Details for the file rdt_kernel-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: rdt_kernel-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for rdt_kernel-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 29745a680a5f8aa493d06158135984d32a75a56e76fc3c9b5399758c5152b5a9
MD5 8588d77db7f44562fa1d2a1514b0be85
BLAKE2b-256 1ba346b2ace7f7e11922edbc014fa6efb5da011f64b9667d3aff79ab58e31b31

See more details on using hashes here.

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