Skip to main content

PINNStudio

A no-code desktop GUI for building, training, and visualizing Physics-Informed Neural Networks (PINNs) — built on DeepXDE.

PyPI version PyPI downloads Python versions License: MIT GitHub stars Commit activity

Animated PINN solution — time evolution predicted by a restored PINNStudio model

Set up a PDE, click Solve, and watch the solution evolve — reconstructed here from a saved checkpoint via Model Restore.

Website  ·  Quick Start  ·  Templates  ·  Discussions  ·  Citation

Table of contents

Quick Install

The fastest way to try PINNStudio (any OS, no GPU-driver matching):

pip install pinnstudio
pinnstudio

Have an NVIDIA GPU? Use the full install script instead - it detects your GPU and automatically installs a matching PyTorch build for you, which the plain pip install above does not do. See Quick Start below.

Command not found after pip install?
  • pip: command not found? Use pip3 instead - many systems (macOS especially) only ship pip3, not a plain pip.
  • pinnstudio: command not found even though the install said it succeeded? pip installed it into a per-user folder that is not on your shell's PATH yet. The install output actually tells you the exact folder, in a line like WARNING: The script pinnstudio is installed in '.../bin' which is not on PATH. Add that folder to your PATH:
echo 'export PATH="<folder from the warning above>:$PATH"' >> ~/.zshrc
source ~/.zshrc

(Use /.bashrc instead of /.zshrc if your shell is bash.) Then pinnstudio should launch directly. This never comes up with install.sh/install.bat, since those use a virtual environment where the command is always found automatically.

  • The suggested GPU fix command itself fails with a flit_core or "Could not find a version that satisfies" error? Your pip is too old to resolve PyTorch's package index correctly. Upgrade it first, then retry:
python -m pip install --upgrade pip
pip install torch --index-url https://download.pytorch.org/whl/cu121 --force-reinstall

Overview

Setting up a Physics-Informed Neural Network usually means writing a new DeepXDE script for every problem: defining the PDE residual, wiring up boundary and initial conditions, picking collocation points, choosing an optimizer schedule, and writing your own plotting/error-analysis code afterward.

PINNStudio replaces that boilerplate with a form. You describe the problem — the PDE, the domain, the boundary and initial conditions, the network architecture, the training schedule — through the interface, and PINNStudio generates a standalone DeepXDE/PyTorch script, runs it, and streams the training log, loss curves, and solution plots back into the GUI.

It supports both forward problems (solve a known PDE) and inverse problems (estimate unknown PDE parameters from observation data), in 1D (x, t) and 2D (x, y, t), including coupled, multi-output PDE systems.

The goal is to make physics-informed machine learning accessible to researchers who need it but don't want to become deep learning engineers first. Setting up a PINN by hand touches autograd-based residuals, collocation sampling, loss weighting, and optimizer scheduling all at once — details that are easy to get subtly wrong and can cost hours of debugging before a single result can be trusted. PINNStudio lets researchers across science and engineering — materials science, mechanics, chemistry, biology, and beyond — set up and run both forward and inverse PINN problems for their own equations without building that infrastructure from scratch, on a framework that has been thoroughly tested so results are trustworthy from the first run.

Demo Video

PINNStudio demo - setting up a PDE

Click to watch a full walkthrough of the PDE setup panel on YouTube.

Screenshots

PINNStudio — PDE, domain, and collocation point setup

Problem setup: PDE residual, domain, and collocation points.

PINNStudio — network, training schedule, and adaptive training controls

Network architecture, multi-phase optimizer schedule, loss weights, and adaptive training.

Example Solutions

PINNStudio — 1D Heat PINN solution

1D Heat: PINN-predicted solution against the bundled FEM reference data.

PINNStudio — 1D Allen-Cahn PINN solution

1D Allen-Cahn: PINN-predicted solution against the bundled FEM reference data.

PINNStudio — 1D Allen-Cahn Inverse parameter estimation result

1D Allen-Cahn (Inverse): the unknown diffusion parameter recovered from observation data, converging to its true value during training.

Features

Problem setup

  • 1D (x, t) and 2D (x, y, t) problem definitions
  • Forward problems and inverse (parameter-estimation) problems
  • Free-form PDE residual editor — supports multi-output, coupled PDE systems, not just single equations
  • Boundary conditions per side, per output (Dirichlet, Neumann, Periodic), and initial conditions from an expression or a data file
  • Collocation point controls (domain / boundary / initial / test point counts, point distribution) with a 2D domain preview
  • For inverse problems, the built-in templates auto-load their end-time reference file as the observed-data source and default the observed-data loss weight to 100, so estimating a parameter needs no manual file browsing to get started (still overridable)

Training

  • Configurable network architecture (hidden layers, neurons per layer, activation)
  • Two-stage optimization (Adam + L-BFGS) with detailed L-BFGS settings and configurable float precision
  • Multi-phase optimizer scheduling and optional IC-guided pre-training
  • Residual-based adaptive refinement (RAR)
  • Time-adaptive stepping with transfer learning between time windows
  • Mini-batch training
  • Live parameter convergence during inverse training — the estimated parameter's value prints and saves periodically throughout training, including during L-BFGS phases, not just at the end

Templates

  • Five built-in Quick Example templates covering common phase-field and diffusion problems (see Built-in Templates)

Analysis & output

  • Live training log streaming, with a Stop control
  • Error analysis against reference/ground-truth data (L2, MSE, max error; line and surface comparison plots)
  • Configurable result plotting (colormap, resolution, DPI, colorbar, snapshot count)
  • Solution data export
  • Model restore — reload a saved checkpoint to regenerate plots and re-run error analysis without retraining

Repository Structure

pinnstudio/
├── pinnstudio/
│   ├── main.py            # Entry point
│   ├── ui/
│   │   └── main_window.py # PyQt6 interface — every tab, dialog, and control
│   └── core/
│       ├── config.py      # PINNConfig — the full problem definition
│       ├── codegen.py     # PINNConfig -> standalone DeepXDE/PyTorch script
│       └── runner.py      # Runs the generated script, streams output to the GUI
├── assets/
│   ├── screenshots/        # README screenshots
│   └── results/             # Example output (restored_animation.gif, solution images)
├── reference_data/          # Bundled FEM ground truth for the built-in templates
│   ├── 1D/
│   └── 2D/
├── requirements.txt
├── setup.py
├── install.sh              # One-command setup (macOS/Linux)
├── install.bat              # One-command setup (Windows)
└── README.md

Quick Start

Step 1: Open a terminal

  • Windows: click the Start menu, type PowerShell, and open Windows PowerShell.
  • macOS: press Cmd + Space to open Spotlight, type Terminal, and press Enter (or find it under Applications -> Utilities -> Terminal).
  • Linux: open your terminal application (commonly Ctrl + Alt + T, or search "Terminal" in your application menu).

Step 2: Check you have git and Python 3.9+

Paste these one at a time:

git --version
python3 --version

(On Windows, use python --version instead of python3 --version.)

If either command isn't recognized:

  • git missing? Install it from git-scm.com/downloads. Default options are fine. On macOS, running git --version for the first time may itself prompt you to install Apple's Command Line Tools — accept and let it finish, then try again.
  • Python missing, or older than 3.9? Install it from python.org/downloads. On Windows, check "Add python.exe to PATH" on the installer's first screen — this is the single most common thing people miss.

After installing either one, close your terminal window completely and open a new one before continuing, so the change takes effect.

Step 3: Clone and install

git clone https://github.com/AsfandyarKhan72/PINNStudio.git
cd PINNStudio

macOS / Linux:

bash install.sh
./venv/bin/pinnstudio

Windows:

install.bat
.\venv\Scripts\pinnstudio.exe

The install script creates an isolated virtual environment inside the PINNStudio folder and installs PINNStudio and its dependencies into it — nothing is installed system-wide, and deleting the folder removes it completely. If it detects an NVIDIA GPU that the default PyTorch build can't use (an older driver, most commonly), it automatically installs a more compatible PyTorch build instead, so GPU support works out of the box on more machines. This step needs an internet connection and can take a few minutes.

Already have a working PyTorch + CUDA setup, or no GPU at all? You can also install with pip install pinnstudio - just be aware it skips the GPU compatibility check above, so if you hit a GPU-related error afterward, re-run install.sh / install.bat instead.

Step 4: Take the 60-second tour

Maximize the window for the best view — PINNStudio packs a lot of controls into the left panel. With the app open, leave the dimension on 1D, pick 1D Heat from the Quick Examples dropdown, and click Solve. The Training Log panel will stream progress, and the loss/solution plots will populate once the run finishes.

Something not working?

Open an issue on GitHub with the exact command you ran and the full error message — see Contributing.

Running PINNStudio Again

You only need to run the install steps above once. After that, launch PINNStudio again anytime with:

macOS / Linux, from inside the PINNStudio folder:

./venv/bin/pinnstudio

Windows, from inside the PINNStudio folder:

.\venv\Scripts\pinnstudio.exe

That's it - no need to reinstall or recreate the virtual environment.

What Gets Installed

install.sh / install.bat (used in Quick Start above) set up an isolated Python virtual environment and install:

  • DeepXDE (PyTorch backend)
  • PyTorch
  • PyQt6
  • NumPy
  • Matplotlib
  • Pandas

A CUDA-capable GPU is optional but recommended for larger 2D problems and inverse runs.

Built-in Templates

Each template preconfigures the PDE, domain, boundary/initial conditions, network size, and training schedule — pick one from Quick Examples, then adjust as needed.

All five templates ship with bundled FEM reference data (see reference_data/), generated independently of the PINN, so Error Analysis auto-configures against real ground truth the moment you load them — no setup, no external download.

Template Dimension System Problem Type Reference Reference data
1D Heat 1D Single PDE Forward + Inverse ✅ bundled
1D Allen-Cahn 1D Single PDE Forward + Inverse Wight & Zhao (2021) ✅ bundled
2D Heat 2D Single PDE Forward + Inverse ✅ bundled
2D Allen-Cahn 2D Single PDE Forward + Inverse Wight & Zhao (2021) ✅ bundled
2D Allen-Cahn 2D Single PDE Forward + Inverse Mattey & Ghosh (2022) ✅ bundled

1D Heat

$$\frac{\partial u}{\partial t} = 0.4\frac{\partial^2 u}{\partial x^2}, \qquad x \in [0, 1],\ t \in [0, 1]$$

Initial condition: $u(x, 0) = \sin(\pi x)$. Dirichlet boundaries.

1D Allen-Cahn

Benchmark problem after Wight & Zhao (2021) — see References.

$$\frac{\partial u}{\partial t} = 0.0001\frac{\partial^2 u}{\partial x^2} - 5u^3 + 5u, \qquad x \in [-1, 1],\ t \in [0, 1]$$

Initial condition: $u(x, 0) = x^2\cos(\pi x)$. Periodic boundaries.


The remaining templates are 2D (x, y, t) problems.

2D Heat

$$\frac{\partial u}{\partial t} = 0.4\left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2}\right), \qquad (x, y) \in [0, 1]^2,\ t \in [0, 1]$$

Initial condition: $u(x, y, 0) = 0$. Mixed Dirichlet/Neumann boundaries.

2D Allen-Cahn

Benchmark problem after Wight & Zhao (2021) — see References.

$$\frac{\partial u}{\partial t} = 0.00625\left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2}\right) - 10(u^3 - u), \qquad (x, y) \in [0, 1]^2,\ t \in [0, 10]$$

Initial condition: a smooth circular interface, $u(x, y, 0) = \tanh\left(\dfrac{0.35 - \sqrt{(x-0.5)^2 + (y-0.5)^2}}{0.05}\right)$. Periodic boundaries.

Note: $t \in [0, 10]$ is a wide time window for a single PINN pass, so this template loads with Time Adaptive training on by default — split into steps of 1 (0→1, 1→2, ..., 9→10) with transfer learning enabled, so each step warm-starts from the last. Adjust or disable this in the Adaptive Training panel if you'd rather train the full range in one pass.

2D Allen-Cahn

Benchmark problem after Mattey & Ghosh (2022) — see References.

$$\frac{\partial u}{\partial t} = 0.0001\left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2}\right) - (u^3 - u), \qquad (x, y) \in [0, 1]^2,\ t \in [0, 1]$$

Initial condition: $u(x, y, 0) = \sin(4\pi x)\cos(4\pi y)$. Periodic boundaries.

Note: This template also loads with Time Adaptive training on by default — $t \in [0, 1]$ split into steps of 0.25 (0→0.25, 0.25→0.5, 0.5→0.75, 0.75→1) with transfer learning enabled. Adjust or disable this in the Adaptive Training panel if you'd rather train the full range in one pass.

Tip: Accuracy can generally be improved by refining the time discretization — use more, smaller Time Adaptive step groups (a finer time step per phase) rather than one large training pass, or increase collocation points for finer spatial/adaptive refinement of the residual. The two 2D Allen-Cahn templates above already default to Time Adaptive for this reason; add or adjust step groups for any template in the Adaptive Training panel if you want more accuracy on your own problem.

How It Works

PINNStudio doesn't wrap DeepXDE at runtime — it generates code. Every setting in the GUI maps to a field on a PINNConfig dataclass (pinnstudio/core/config.py); clicking Solve passes that config to codegen.py, which writes out a complete, standalone DeepXDE/PyTorch script, and runner.py executes it as a subprocess, streaming stdout back into the Training Log panel in real time.

Because the output of every run is an ordinary Python script, you can take it and run it outside the GUI, hand it to a cluster job, or use it as a starting point for a hand-written DeepXDE project.

Citation

If PINNStudio is useful in your work, please cite it — see CITATION.cff:

@software{khan2026pinnstudio,
  author  = {Khan, Asfandyar and Mamivand, Mahmood},
  title   = {PINNStudio: A No-Code GUI for Physics-Informed Neural Networks},
  year    = {2026},
  url     = {https://github.com/AsfandyarKhan72/PINNStudio}
}

References

  • Lu, L., Meng, X., Mao, Z., & Karniadakis, G. E. (2021). DeepXDE: A deep learning library for solving differential equations. SIAM Review, 63(1), 208–228. https://doi.org/10.1137/19M1274067
  • Mattey, R., & Ghosh, S. (2022). A novel sequential method to train physics informed neural networks for Allen-Cahn and Cahn-Hilliard equations. Computer Methods in Applied Mechanics and Engineering, 390, 114474. https://doi.org/10.1016/j.cma.2021.114474
  • Wight, C. L., & Zhao, J. (2021). Solving Allen-Cahn and Cahn-Hilliard equations using the adaptive physics informed neural networks. Communications in Computational Physics, 29(3), 930–954. https://doi.org/10.4208/cicp.OA-2020-0086

Acknowledgment

PINNStudio is built on DeepXDE (Lu et al., 2021) and PyQt6. The 2D Allen-Cahn Quick Example templates follow the problem setups described in Mattey & Ghosh (2022) and Wight & Zhao (2021) — see References.

Developed under the supervision of Prof. Mahmood Mamivand, Computational Materials Design Lab, Boise State University.

The authors appreciate the support of the National Science Foundation grant DMR-2142935. We would like to acknowledge the high-performance computing support of the Borah compute cluster (DOI: 10.18122/oit/3/boisestate) provided by Boise State University's Research Computing Department.

Contributing

Bug reports, feature requests, and pull requests are welcome — see CONTRIBUTING.md.

Contact

Asfandyar Khan PhD Candidate, Materials Science and Engineering Boise State University Email: asfandyarkhan@u.boisestate.edu

License

Released under the MIT License. See LICENSE for details.

Release files for pinnstudio 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pinnstudio 1.2.0
File Size Uploaded
pinnstudio-1.2.0.tar.gz 1.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pinnstudio 1.2.0
File Interpreter ABI Platform
pinnstudio-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.3 MB

Release files / pinnstudio-1.2.0.tar.gz

Download URL pinnstudio-1.2.0.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
d96e185078631140a723ec6ee3347b494b823dce69f38f925271cc19f169c4cc
BLAKE2b-256 checksum
How to use checksums
8a7099e92fc2d9cea38780fb435ddef40eccd84f2a29840ca7f8ffeb387b0c3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.5

Release files / pinnstudio-1.2.0-py3-none-any.whl

Download URL pinnstudio-1.2.0-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7000769f1e0e1f25734c5606f4661d4fa8f578947fbecc3e3041effe6c120646
BLAKE2b-256 checksum
How to use checksums
9c1d330b6057cf22b00b54be13355b183dca1ca31a2e1612acefdc7083999a12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.5

Release history Release notifications | RSS feed

1.2.2

2 release files

1.2.1

2 release files

This release

1.2.0 This release

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page