Metadata-Version: 2.4
Name: rippl
Version: 0.86.2
Summary: Industrial Physics Compiler, Zero-Meshing CAD Ingestion, Microsecond ROMs, and Continuous Digital Twins.
Author-email: Esranow <engineering@rippl.ai>
Maintainer-email: Rippl Core Architecture Team <core@rippl.ai>
License-Expression: Apache-2.0
Project-URL: Homepage, https://rippl.ai
Project-URL: Documentation, https://docs.rippl.ai
Project-URL: Repository, https://github.com/esranow/rippl
Project-URL: Issues, https://github.com/esranow/rippl/issues
Project-URL: Changelog, https://github.com/esranow/rippl/blob/main/CHANGELOG.md
Keywords: physics,pinn,sciml,cad,zero-meshing,digital-twins,reduced-order-models,surge,neural-operators,fno,deeponet,robotics,spatial-computing,embodied-ai,mcp,vibecoding,ai-agents,cursor,claude-code
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Manufacturing
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Compilers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Rust
Classifier: Programming Language :: C++
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Requires-Python: <3.14,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=2.0.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: scipy>=1.10.0
Requires-Dist: sympy>=1.12
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pyyaml>=6.0.0
Requires-Dist: pandas>=1.5.0
Requires-Dist: matplotlib>=3.7.0
Requires-Dist: httpx>=0.24.0
Requires-Dist: click>=8.0.0
Provides-Extra: vibe
Requires-Dist: rich>=13.7.0; extra == "vibe"
Requires-Dist: typer>=0.12.0; extra == "vibe"
Requires-Dist: ipykernel>=6.29.0; extra == "vibe"
Requires-Dist: marimo>=0.9.0; extra == "vibe"
Requires-Dist: mcp>=1.0.0; extra == "vibe"
Requires-Dist: ruff>=0.8.0; extra == "vibe"
Requires-Dist: poethepoet>=0.29.0; extra == "vibe"
Provides-Extra: cad
Requires-Dist: trimesh>=4.0.0; extra == "cad"
Requires-Dist: scikit-image>=0.20.0; extra == "cad"
Requires-Dist: rtree>=1.0.0; extra == "cad"
Provides-Extra: twins
Requires-Dist: paho-mqtt>=2.0.0; extra == "twins"
Requires-Dist: websockets>=12.0; extra == "twins"
Requires-Dist: aiomqtt>=2.0.0; extra == "twins"
Provides-Extra: hpc
Requires-Dist: accelerate>=0.27.0; extra == "hpc"
Requires-Dist: deepspeed>=0.13.0; platform_system != "Windows" and extra == "hpc"
Provides-Extra: distributed
Requires-Dist: accelerate>=0.27.0; extra == "distributed"
Provides-Extra: dynamics
Requires-Dist: torchdiffeq>=0.2.3; extra == "dynamics"
Provides-Extra: climate
Requires-Dist: xarray>=2023.1.0; extra == "climate"
Requires-Dist: netcdf4>=1.6.0; extra == "climate"
Provides-Extra: viz
Requires-Dist: pyvista>=0.42.0; extra == "viz"
Requires-Dist: matplotlib>=3.7.0; extra == "viz"
Provides-Extra: export
Requires-Dist: onnx>=1.15.0; extra == "export"
Requires-Dist: onnxruntime>=1.17.0; extra == "export"
Requires-Dist: safetensors>=0.4.0; extra == "export"
Provides-Extra: adk
Requires-Dist: rippl-adk>=0.5.0; extra == "adk"
Provides-Extra: test
Requires-Dist: pytest>=8.0.0; extra == "test"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "test"
Requires-Dist: pytest-timeout>=2.3.0; extra == "test"
Requires-Dist: pytest-cov>=4.1.0; extra == "test"
Requires-Dist: safetensors>=0.4.0; extra == "test"
Provides-Extra: all
Requires-Dist: rippl[adk,cad,climate,dynamics,export,hpc,test,twins,vibe,viz]; extra == "all"
Dynamic: license-file

# Rippl: The Industrial Physics Compiler & Digital Twin Substrate

[![PyPI version](https://img.shields.io/pypi/v/rippl.svg?color=blue)](https://pypi.org/project/rippl/)
[![Python Versions](https://img.shields.io/pypi/pyversions/rippl.svg)](https://pypi.org/project/rippl/)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![CUDA Acceleration](https://img.shields.io/badge/Hardware-NVIDIA_CUDA_%2B_Triton-green.svg)](https://rippl.ai)
[![Backend Engine](https://img.shields.io/badge/Engine-Rust_%7C_C%2B%2B_%7C_Python-orange.svg)](https://rippl.ai)

**Rippl** is a high-performance, tri-lingual (Python / Rust / C++ / Triton) physics compiler and Scientific Machine Learning (SciML) framework. Engineered for industrial simulation, robotics, and cyber-physical systems, Rippl eliminates manual finite-element meshing, automates boundary physics, and enables real-time Digital Twins at microsecond latency.

---

## ⚡ Key Highlights

* **Zero-Meshing CAD Ingestion:** Ingest raw CAD geometries (`.stl`, `.step`, `.obj`) directly into GPU memory via continuous Signed Distance Fields (SDFs) and fused Marching Cubes kernels.
* **The 7-Line Standard API:** Formulate and train complete Physics-Informed Neural Networks (PINNs) in 7 lines of clean, declarative Python.
* **Hard Distance Boundary Enforcement:** Analytical boundary distance fields computed natively in Rust enforce boundary conditions *by construction* with strictly zero boundary loss.
* **Sub-Millisecond Neural Surrogates (ROMs):** High-speed Proper Orthogonal Decomposition (POD-ROM), Radial Basis Functions (RBF-ROM), and Fourier Neural Operators (FNO) for real-time control sweeps.
* **Continuous IoT Digital Twins:** Ingest live streaming sensor data (`MQTT` / `WebSocket`) with Online LoRA parameter adaptation and physics-guided anomaly localization.
* **PEP 562 Lazy Architecture:** Instant (<50ms) startup time. Core components run independently without triggering cascade failures from optional submodules.

---

## 📦 Installation

Install the base package via `pip` or `uv`:

```bash
pip install rippl
```

### Modular Capability Extras

```bash
# CAD ingestion & surface geometry processing
pip install "rippl[cad]"

# IoT streaming telemetry & continuous digital twins
pip install "rippl[twins]"

# Neural operator surge, GNNs & fast ROM surrogates
pip install "rippl[surge]"

# Full battery: CAD, Twins, Surge, HPC, and AI Agent DevKit
pip install "rippl[all]"
```

---

## 🚀 Quick Start: The 7-Line PINN

Train a continuous 2D Heat Conduction / Laplacian PINN in 7 lines:

```python
import torch
import rippl
import rippl.nn as rnn

# 1. Continuous Spatial Domain [0, 1] x [0, 1]
domain = rippl.Domain(spatial_dims=2, bounds=[(0.0, 1.0), (0.0, 1.0)])

# 2. Neural Surrogate Model (MLP)
model = rnn.MLP(in_dim=2, out_dim=1, hidden=64, layers=3, activation="tanh")

# 3. Governing PDE Residual (Laplacian: d2u/dx2 + d2u/dy2 = 0)
def heat_pde(fields, coords):
    u = fields['u']
    grad = torch.autograd.grad(u, coords, torch.ones_like(u), create_graph=True)[0]
    return grad[:, 0:1] + grad[:, 1:2]

# 4. Initialize & Solve with Unified C++/Rust Orchestrator
solver = rippl.Solver(domain, heat_pde, model)
result = solver.solve(epochs=100)

# 5. Continuous Query / Inference
prediction = result['model'](torch.tensor([[0.5, 0.5]]))
print("Field value at center (0.5, 0.5):", prediction.item())
```

---

## 🛠️ Advanced Workflows

### 1. Zero-Meshing CAD Ingestion
Bypass mesh generators (Gmsh, ANSYS mesher) and evaluate physics on raw geometry:

```python
import rippl as rp
from rippl.cad import CADSolver

# Ingest raw STL CAD file and bind physical equation
solver = rp.CADSolver("heat_sink.stl", equation="Laplacian(T) = 0", field_name="T")

# Solve directly in VRAM with exact surface boundary temperatures
result = solver.solve(boundary_temp=100.0, epochs=200)
```

### 2. Universal Neural Operator Surge (ROM)
Learn entire families of PDE solutions for sub-10ms parameter sweeps:

```python
import rippl as rp
from rippl.surge import UniversalSurge

surge = UniversalSurge(
    equation_factory=lambda alpha: MyParametricPDE(alpha=alpha),
    parameter_space={"alpha": (0.01, 1.0)},
    domain=rp.Domain(bounds=[(0, 1), (0, 1)])
)

# Train operator once
surge.train(n_samples=500, pinn_epochs=1000)

# Query any parameter in milliseconds without retraining
solution = surge.infer({"alpha": 0.35})
```

### 3. Continuous Digital Twin with Sensor Telemetry
Keep physical state synchronized with live factory or field sensors:

```python
import rippl as rp
from rippl.twins import ContinuousDigitalTwin

twin = ContinuousDigitalTwin(
    equation=rp.physics.HeatEquation(),
    domain=rp.Domain(bounds=[(0, 10), (0, 10)]),
    model=pretrained_model
)

# Continuously assimilate incoming IoT sensor telemetry
twin.assimilate(sensor_coords=[[2.5, 4.0]], sensor_values=[82.4])

# Query anomaly localization: where did unexpected heat originate?
anomaly = twin.localize_anomaly(threshold=5.0)
print("Detected anomaly source at coordinates:", anomaly.location)
```

---

## ⚖️ Comparative Benchmark: Rippl vs. Legacy SciML

| Dimension | **Rippl** | **DeepXDE** | **NVIDIA Modulus** |
| :--- | :--- | :--- | :--- |
| **Architecture** | **Tri-lingual: Python / Rust / C++ / Triton** | Pure Python (PyTorch/JAX/TF) | Python / PyTorch / CUDA |
| **Boundary Enforcement** | **Hard exact distance fields (Zero penalty loss)** | Soft loss penalty terms ($\lambda_{BC}$ hyperparameter) | Soft loss penalties / SDF weighting |
| **CAD Ingestion** | **Native `.stl` / `.step` / `.obj` via GPU SDF** | Primitives only (box, disk, sphere) | STL point clouds, OpenFOAM meshes |
| **Higher-Order Gradients** | **Dedicated Triton / C++ residual kernels** | Naive Python autograd graph (High VRAM bloat) | PyTorch autograd / Graph operators |
| **Inference Latency** | **Sub-millisecond ROMs (POD / RBF / FNO)** | Standard forward pass (No built-in ROM engine) | Omniverse TensorRT surrogates |
| **Cold Startup Time** | **< 50ms (PEP 562 Lazy Loading)** | 1.5s - 3.5s | 3.0s - 8.0s (heavy imports) |
| **Digital Twin Streaming** | **Native IoT MQTT/WS + Online LoRA** | None (offline training only) | NVIDIA Omniverse connector |

---

## 🔬 The Physics PDE Catalog

Rippl provides built-in residual kernels and support for arbitrary custom equations:

* **Fluid Dynamics:** Incompressible Navier-Stokes (`IncompressibleNavierStokes`), Compressible Navier-Stokes, Stokes Flow, Burgers Equation.
* **Solid Mechanics:** Linear Elasticity, Neo-Hookean Hyperelasticity, Mooney-Rivlin Rubber Mechanics.
* **Thermodynamics & Acoustics:** Heat Conduction Equation, Wave Equation.
* **Electromagnetics & Quantum:** Maxwell Equations, Poisson Equation, Schrödinger Equation.
* **Custom Equations:** Subclass `rippl.Equation` or pass a direct callable `lambda fields, coords: ...`.

---

## 📋 What's New in v0.86.1

* **PEP 562 Lazy Loading Architecture:** Completely eliminated aggressive top-level imports in `rippl/__init__.py`. Boot time decreased to <50ms.
* **Restored Complete Source Distribution:** Bundled all 73 previously omitted source modules (`deploy.deployment`, `twins.continuous`, `cad.solver`, `surge.universal`, etc.), ensuring full portability across Linux, macOS, and Windows.
* **Fault-Isolated Execution:** Decoupled foundational PINN solvers from optional third-party extras (`trimesh`, `pydpf`), eliminating cascade import crashes.
* **Enhanced Multi-Backend Support:** Seamless fallbacks between compiled Rust acceleration and native PyTorch execution.
* **Full PyPI Documentation Package:** Added comprehensive API encyclopedia, architectural breakdown, and operational quickstarts.

---

## 📜 License

Rippl is released under the **Apache 2.0 License**. See [LICENSE](LICENSE) for details.
