New
Apps 6,419Makers 6,403This week 7
Promote your app−30%
PINNeAPPle screenshot 1 1 / 6
3views in
the last 30 days

PINNeAPPle

Pinneaple is an open-source Physics AI toolkit for Physics-Informed Neural Networks

Built with Claude/Claude Code/Ollama

by pinneapple-labs · Unclaimed · added Nov 3, 2026
no ratings0 comments

PINNeAPPle 🍍

Physics AI that tells you when to trust it

Solve, simulate, forecast and design with physics-informed AI — and know, for every prediction, whether it still holds.

Highlights: global weather forecast, OpenFOAM airliner and Ahmed body, physics ensembles, MeshGraphNet, LBM, qualitative preview, PINNs for electrodynamics and heat, design apps

Start here

→ START_HERE.md picks the door for you: an engineer with a problem and no Python, someone learning physics-AI, a researcher who wants pipelines and papers, or a team putting this behind a product. Two minutes, then one command.

pip install pinneapple
pinneapple doctor start			# what this machine still needs, with the fix per line
pinneapple recommend "heat sink cooled by a fan"	# which preset, method and model, and why
pinneapple new my_study			# a project of your own: edit case.yaml, run run.py

The same four are Python: pp.doctor(...), pp.recommend(...), pp.card(...), pp.new(...). Then GETTING_STARTED.md has thirteen recipes, each with the output it actually prints: install, solve and compare a problem, decide whether a field can be trusted, describe your own PDE and generate its training data, recover an unknown parameter from measurements, benchmark architectures, and put a model live as a digital twin.

Statement of need

Physics-informed neural networks, neural operators (DeepONet, FNO), graph networks on meshes and classical solvers each live in their own library, with their own problem description, and they are usually judged by their error against a reference solution that does not exist once a model is used on new cases. PINNeAPPle is for researchers and engineers in computational science who train or compare physics-based surrogate models and need to know when those models stop being valid. It gives every method one problem description, a comparison interface and a record of each run, and it checks each prediction against the physics (equation residuals, conservation, bounds and each model's declared assumptions) without needing a reference. It works next to DeepXDE and PhysicsNeMo instead of replacing them: pinneapple_physics.deepxde_bridge trains a problem description with DeepXDE, and for PhysicsNeMo there are adapters for models trained there, but no path from a pp.PhysicalProblem to the PhysicsNeMo-Sym solver (what is and is not integrated, and a CPU benchmark against both: examples/vs_physicsnemo, benchmarks/vs_frameworks/REPORT.md). See paper/paper.md for how it relates to other libraries.

The whole Physics-AI workflow, not only PINNs

Physics-informed neural networks are one tool among several. PINNeAPPle covers the workflow industrial Physics-AI runs on:

Step In the library
Geometry CAD and parametric shapes, fit-for-purpose meshes and their quality report (pinneapple_design, pinneapple_data.cae)
Simulation campaigns OpenFOAM, CalculiX, lattice Boltzmann and spectral solvers, run many times over a design space (pp.cfd, the OpenFOAM campaign runner)
Surrogates neural operators (FNO, DeepONet), graph networks (MeshGraphNet), MLPs and reduced-order models trained on those campaigns
Physics-informed models PINNs from symbolic equations (PINNFactory), inverse problems, hard constraints
Optimisation design search on top of a surrogate, verified back in the solver
Verification grid convergence, physics audit, applicability domains, evidence records, equal-budget benchmarks (pp.benchmark, pinneapple benchmark run)

Which learned method fits which problem is a question of evidence, not of taste: see Choosing a method and the equal-budget benchmark behind it.

What makes it different

Most Physics AI libraries stop at the prediction. PINNeAPPle adds a trust layer, so a model can say how good it is right now:

  • "This model just left its domain." Every model's PDE residual on the current case, compared with its level in its own domain, switches the ensemble on the first case of a new regime instead of after errors pile up.
  • "Why did it fail?" Each model declares its physical assumptions (laminar, incompressible, smooth wall...); the physics audit checks them on every case, routes to a model whose physics fits, and attributes failures to a regime change, extrapolation, a numerical problem or missing physics, even when the residual looks fine. See docs/core_concepts/physics_audit.md.
  • "That was the sensor, not the process." A physics check of the reading itself keeps sensor noise from switching models or teaching them anything.
  • "Trust this forecast for 3.8 days." Skill by lead time and a useful horizon for every forecast, next to the operational models.
  • "Here is the evidence." Conservation and boundary-condition checks, uncertainty, provenance and a decision layer that only learns from verified results.
Regime change or sensor noise? Five model families (FNO, GNN, DeepONet, PINN, CNN); with the physics check of the reading (right), noisy readings never switch the model. OpenFOAM in the loop. An airliner designed and optimised in the library, verified with 3D RANS; streamlines coloured by speed.
Adaptive physics ensembles. The model chosen on each case against the exact field, as the regime drifts. External aerodynamics from any STL. The Ahmed body, meshed and solved automatically.
Neural operators and graph networks. A MeshGraphNet rollout of the flow past a cylinder against the solver. Qualitative preview before any solver. Which design change should help, by which mechanism, and how sure it is.
A Formula car in OpenFOAM. A parametric open-wheel car with wings, floor and diffuser, solved at 70 m/s with a moving road; skin pressure coefficient. Forces by component. Opening the DRS flap cuts the rear-wing drag by 56 %; the wheels give part of it back. A pipeline demonstration, not a validated F1 model.

Physics checks in CI

pinneapple check is a linter for physics: it fails a pull request when a simulation result or a Physics-AI model breaks conservation, its PDE, its boundary or initial conditions, bounds, units, its training range, a stored reference or the integrity of its files. Zero configuration to start, rule ids with fixes (PC101...), exit codes, SARIF and JUnit; the GitHub Action annotates the line that caused the violation.

# .github/workflows/physics-check.yml, in a job with `permissions: security-events: write`
- uses: actions/checkout@v4
- uses: PINNeAPPle-Labs/PINNeAPPle@main    # pin a tag or a commit SHA
pinneapple check cases/ models/            # locally: same rules, readable output, exit code 1 on a violation
A pull request blocked because the lid boundary condition of an OpenFOAM cavity changed

Rules, configuration and the Action: docs/guides/physics_checks_in_ci.md.

Discovering physical laws from data

The same library that solves equations also finds them. Each discovery is an experiment in the PINNeAPPle Lab, with its data, code, checks and figures in the database:

Law from video, video from the law. The angle is measured from the frames (left). Weak-form sparse regression finds θ'' = −0.152 θ' − 12.23 sin θ, so g = 9.787 m/s² (0.24 % off). The discovered law is re-rendered (right) and keeps predicting after the camera stops. Kepler's third law from real orbits. Nineteen bodies around the Sun, Jupiter and Saturn (NASA fact sheets) give P ∝ a^1.4999 and the masses of the three centres within 0.1 %. All of them collapse onto P = 2π√(a³/GM).
Chaos, AI-Lorenz style. From noisy, subsampled data, extreme-learning-machine smoothing (the free function of X-TFC) plus sparse selection recovers σ, ρ, β within 2 %. Black-hole weather. A U-Net forecast of the gas around a black hole (Duarte, Nemmen & Navarro 2022), ray-traced through curved spacetime, with the mass check that flags drift without the truth.
python -m pinneapple_lab run pendulum_video          # or kepler_law, lorenz_discovery, ...
python -m pinneapple_lab report --html               # lab/index.html: every run, its checks, its code, its data
python -m pinneapple_lab examples --run              # every example and use case, into the same database
python -m pinneapple_lab serve                       # the catalogue as a web app: files, JSON API, dataset downloads

Experiment gallery

Every picture below is a lab run with its checks against a reference. The whole set, with tiers and trust cards, is in the experiment catalogue (python -m pinneapple_lab site).

Stirred tank: 12 000 DEM particles suspended as the impeller speeds up Cantilever under load, von Mises in post-processor bands
Solids suspension in a stirred tank (MP4): 90 % off the bottom at 288 rpm, inside Zwietering's 237-474 rpm (particle_suspension) 3-D FEA, C3D8I hexahedra: tip deflection within 0.6 % of Timoshenko, CalculiX on the same mesh within 3e-6 (solid_fem)
L bracket in CalculiX, von Mises Bar in torsion, von Mises
CalculiX from Python (pp.fea): gmsh C3D10 bracket, bending stress vs M c / I, fillet peak converged (calculix_case) Square bar in torsion: twist rate and shear within 1 % of Saint-Venant
Turbulent flow through a 90 degree bend Kenics static mixer, concentration on cross-sections
90° pipe bend, k-omega SST: friction within 3.6 % of Colebrook, Dean vortices (pipe_flow) Kenics static mixer: striations double at each element, 6x better mixing than the empty pipe
Worn bar end coloured by wear depth Running-in of a crowned bar end
Sliding wear of eight materials: worn volume = K F s exactly, steady rate vs flat punch (bar_wear) Running-in: contact pressure from a Hertz-like peak to a flat punch
Road car in OpenFOAM Black-hole accretion forecast, Interstellar style
Road car, OpenFOAM 3-D: CD 0.288 (vehicle_cfd) Black-hole weather: forecast vs simulation (repo_results)
Parametric ROM errors on unseen designs Kenics mixer streamlines
Reduced-order models: POD-GPR of a 3-D FEM beam, 0.4 % median error on unseen designs, 16 000x faster (rom_study) Static mixer streamlines through six Kenics elements

Install

pip install pinneapple
pip install "pinneapple[all]"     # every optional backend (solvers, geometry, FEniCS, ONNX, ...)

Or start in the browser, on a free Colab GPU (each notebook installs PINNeAPPle in its first cell):

Notebook
First PINN: heat in a plate, with its physics checks Open In Colab
Airfoil: geometry, surrogate prediction, validation against stored CFD Open In Colab
Equal-budget benchmark of methods Open In Colab
Lunar rover terramechanics and its animated dashboard Open In Colab
Verify a model: the trust card catching bad predictions Open In Colab

Working with a coding agent (Gemini CLI, Antigravity, Claude Code, Codex, Cursor)? AGENTS.md is the guide it should read, and pip install "pinneapple[mcp]" adds an MCP server, pinneapple-mcp, with tools to solve, benchmark and validate (how to plug it in).

Five things to try

1. Solve a PDE and compare against the exact solution
import pinneapple as pp

prob = pp.PhysicalProblem.from_preset("burgers_1d", nu=0.01 / 3.141592653589793)
exact = pp.solve(prob, "analytic")                      # Cole-Hopf closed form
pinn = pp.solve(prob, "pinn", epochs=4000)            # physics-informed network
print(pp.compare(prob, ["pinn"], reference="analytic", options={"pinn": {"epochs": 4000}}))

pp.Experiment(...).run() records the result with the problem's fingerprint; add your own method with @pp.register_method("name").

2. An ensemble that notices a regime change on its first case
import numpy as np
from pinneapple_physics.advection_diffusion_1d import AdvectionDiffusion1D
from pinneapple_physics.ensemble import PhysicsEnsemble, from_callable

ad = AdvectionDiffusion1D()                             # u_t + c u_x = nu u_xx, exact solutions
experts = [from_callable("surrogate A (built for nu=0.01)", lambda q: ad.exact({**q, "nu": 0.01})),
           from_callable("surrogate B (built for nu=0.2)", lambda q: ad.exact({**q, "nu": 0.2})),
           from_callable("upwind scheme", lambda q: ad.finite_difference(q, "upwind"))]

rng = np.random.default_rng(0)                          # the diffusivity jumps half way: a regime change
cases = [ad.random_case(rng, nu) for nu in [0.01] * 30 + [0.2] * 30]

def implausible(q):                                     # physics on the reading itself: energy a real state lacks
    e = np.abs(np.fft.rfft(q["u0"])) ** 2
    return e[8:].sum() / e.sum() > 1e-4

ens = PhysicsEnsemble(experts, mode="select",
                      residual_fn=ad.residual, residual_lookahead=2.0,   # switch on the first new case
                      measurement_check=implausible)                     # sensor noise never switches it
run = ens.run(cases, [ad.exact(q) for q in cases])
print(run.switches(), run.summary()["ensemble"])

Output: [(0, 'surrogate A (built for nu=0.01)'), (30, 'surrogate B (built for nu=0.2)')] 0.0. The switch is at case 30, the first case of the new regime. Without residual_lookahead it takes five cases, and the error is 0.0103. See docs/core_concepts/physics_ensembles.md.

3. Know which design change should help, before simulating
from pinneapple_design.geometry.bodies import box
from pinneapple_design.qualitative import Assembly, preview

def heat_sink(n_fins):                                  # base + fins along the flow (x), metres
    parts = {"base": box((0.08, 0.06, 0.004), (0.04, 0, 0.002))}
    for i in range(n_fins):
        y = -0.03 + 0.00075 + i * (0.06 - 0.0015) / (n_fins - 1)
        parts[f"fin{i}"] = box((0.08, 0.0015, 0.03), (0.04, y, 0.019))
    return Assembly(parts)

p = preview({"8 fins": heat_sink(8), "20 fins": heat_sink(20)}, "maximize heat rejection",
            conditions={"U": 2.0, "dT": 40.0, "base_part": "base"}, lang="en")
print(p.text())                                         # direction, mechanisms, confidence, before any solver

Then p.quantify(...) runs the accurat

Description taken from the repository README.

Ratings

–
0 ratings
5 0
4 0
3 0
2 0
1 0

Rate this app

Sign in to rate

Comments 0

Sign in to comment

No comments yet.

Related apps

#physics · #machine-learning · #science