NeuralPDE

Physics-Informed Neural Networks (PINN) Solvers of (Partial) Differential Equations for Scientific Machine Learning (SciML) accelerated simulation

https://github.com/sciml/neuralpde.jl

Science Score: 64.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
    8 of 64 committers (12.5%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.1%) to scientific vocabulary

Keywords

differential-equations differentialequations machine-learning neural-differential-equations neural-network neural-networks ode ordinary-differential-equations partial-differential-equations pde pinn scientific-ai scientific-machine-learning scientific-ml sciml

Keywords from Contributors

sde dae numerical dde stochastic-differential-equations julialang delay-differential-equations neural-ode computer-algebra matrix-exponential
Last synced: 6 months ago · JSON representation ·

Repository

Physics-Informed Neural Networks (PINN) Solvers of (Partial) Differential Equations for Scientific Machine Learning (SciML) accelerated simulation

Basic Info
Statistics
  • Stars: 1,110
  • Watchers: 35
  • Forks: 221
  • Open Issues: 133
  • Releases: 81
Topics
differential-equations differentialequations machine-learning neural-differential-equations neural-network neural-networks ode ordinary-differential-equations partial-differential-equations pde pinn scientific-ai scientific-machine-learning scientific-ml sciml
Created almost 9 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

NeuralPDE

Join the chat at https://julialang.zulipchat.com #sciml-bridged Global Docs

codecov Build Status Build status

ColPrac: Contributor's Guide on Collaborative Practices for Community Packages SciML Code Style

NeuralPDE.jl is a solver package which consists of neural network solvers for partial differential equations using physics-informed neural networks (PINNs). This package utilizes neural stochastic differential equations to solve PDEs at a greatly increased generality compared with classical methods.

Installation

Assuming that you already have Julia correctly installed, it suffices to install NeuralPDE.jl in the standard way, that is, by typing ] add NeuralPDE. Note: to exit the Pkg REPL-mode, just press Backspace or Ctrl + C.

Tutorials and Documentation

For information on using the package, see the stable documentation. Use the in-development documentation for the version of the documentation, which contains the unreleased features.

Features

  • Physics-Informed Neural Networks for ODE, SDE, RODE, and PDE solving
  • Ability to define extra loss functions to mix xDE solving with data fitting (scientific machine learning)
  • Automated construction of Physics-Informed loss functions from a high level symbolic interface
  • Sophisticated techniques like quadrature training strategies, adaptive loss functions, and neural adapters to accelerate training
  • Integrated logging suite for handling connections to TensorBoard
  • Handling of (partial) integro-differential equations and various stochastic equations
  • Specialized forms for solving ODEProblems with neural networks
  • Compatibility with Flux.jl and Lux.jl for all of the GPU-powered machine learning layers available from those libraries.
  • Compatibility with NeuralOperators.jl for mixing DeepONets and other neural operators (Fourier Neural Operators, Graph Neural Operators, etc.) with physics-informed loss functions

Example: Solving 2D Poisson Equation via Physics-Informed Neural Networks

```julia using NeuralPDE, Lux, ModelingToolkit, Optimization, OptimizationOptimisers import DomainSets: Interval, infimum, supremum

@parameters x y @variables u(..) Dxx = Differential(x)^2 Dyy = Differential(y)^2

2D PDE

eq = Dxx(u(x, y)) + Dyy(u(x, y)) ~ -sin(pi * x) * sin(pi * y)

Boundary conditions

bcs = [u(0, y) ~ 0.0, u(1, y) ~ 0, u(x, 0) ~ 0.0, u(x, 1) ~ 0]

Space and time domains

domains = [x ∈ Interval(0.0, 1.0), y ∈ Interval(0.0, 1.0)]

Discretization

dx = 0.1

Neural network

dim = 2 # number of dimensions chain = Lux.Chain(Dense(dim, 16, Lux.σ), Dense(16, 16, Lux.σ), Dense(16, 1))

discretization = PhysicsInformedNN(chain, QuadratureTraining())

@named pdesystem = PDESystem(eq, bcs, domains, [x, y], [u(x, y)]) prob = discretize(pdesystem, discretization)

callback = function (p, l) println("Current loss is: $l") return false end

res = Optimization.solve(prob, ADAM(0.1); callback = callback, maxiters = 4000) prob = remake(prob, u0 = res.minimizer) res = Optimization.solve(prob, ADAM(0.01); callback = callback, maxiters = 2000) phi = discretization.phi ```

And some analysis:

```julia xs, ys = [infimum(d.domain):(dx / 10):supremum(d.domain) for d in domains] analyticsolfunc(x, y) = (sin(pi * x) * sin(pi * y)) / (2pi^2)

upredict = reshape([first(phi([x, y], res.minimizer)) for x in xs for y in ys], (length(xs), length(ys))) ureal = reshape([analyticsolfunc(x, y) for x in xs for y in ys], (length(xs), length(ys))) diffu = abs.(upredict .- u_real)

using Plots p1 = plot(xs, ys, ureal, linetype = :contourf, title = "analytic"); p2 = plot(xs, ys, upredict, linetype = :contourf, title = "predict"); p3 = plot(xs, ys, diff_u, linetype = :contourf, title = "error"); plot(p1, p2, p3) ```

image

Citation

If you use NeuralPDE.jl in your research, please cite this paper:

bib @article{zubov2021neuralpde, title={NeuralPDE: Automating Physics-Informed Neural Networks (PINNs) with Error Approximations}, author={Zubov, Kirill and McCarthy, Zoe and Ma, Yingbo and Calisto, Francesco and Pagliarino, Valerio and Azeglio, Simone and Bottero, Luca and Luj{\'a}n, Emmanuel and Sulzer, Valentin and Bharambe, Ashutosh and others}, journal={arXiv preprint arXiv:2107.09443}, year={2021} }

Owner

  • Name: SciML Open Source Scientific Machine Learning
  • Login: SciML
  • Kind: organization
  • Email: contact@chrisrackauckas.com

Open source software for scientific machine learning

Citation (CITATION.bib)

@misc{https://doi.org/10.48550/arxiv.2107.09443,
  doi = {10.48550/ARXIV.2107.09443},
  url = {https://arxiv.org/abs/2107.09443},
  author = {Zubov, Kirill and McCarthy, Zoe and Ma, Yingbo and Calisto, Francesco and Pagliarino, Valerio and Azeglio, Simone and Bottero, Luca and Luján, Emmanuel and Sulzer, Valentin and Bharambe, Ashutosh and Vinchhi, Nand and Balakrishnan, Kaushik and Upadhyay, Devesh and Rackauckas, Chris},
  keywords = {Mathematical Software (cs.MS), Symbolic Computation (cs.SC), FOS: Computer and information sciences, FOS: Computer and information sciences},  
  title = {NeuralPDE: Automating Physics-Informed Neural Networks (PINNs) with Error Approximations},
  publisher = {arXiv},
  year = {2021},
  copyright = {Creative Commons Attribution Non Commercial Share Alike 4.0 International}
}

GitHub Events

Total
  • Create event: 37
  • Commit comment event: 2
  • Release event: 6
  • Issues event: 16
  • Watch event: 128
  • Delete event: 33
  • Issue comment event: 109
  • Push event: 145
  • Pull request event: 98
  • Pull request review event: 81
  • Pull request review comment event: 88
  • Fork event: 22
Last Year
  • Create event: 37
  • Commit comment event: 2
  • Release event: 6
  • Issues event: 16
  • Watch event: 128
  • Delete event: 33
  • Issue comment event: 109
  • Push event: 145
  • Pull request event: 98
  • Pull request review event: 81
  • Pull request review comment event: 88
  • Fork event: 22

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 2,278
  • Total Committers: 64
  • Avg Commits per committer: 35.594
  • Development Distribution Score (DDS): 0.711
Past Year
  • Commits: 247
  • Committers: 10
  • Avg Commits per committer: 24.7
  • Development Distribution Score (DDS): 0.543
Top Committers
Name Email Commits
KirillZubov k****3@g****m 658
Chris Rackauckas a****s@c****m 464
Astitva Aggarwal a****t@g****m 373
ashutosh-b-b a****3@g****m 159
Sathvik Bhagavan s****n@j****m 119
Gabriel Birnbaum g****m@g****m 86
CompatHelper Julia c****y@j****g 55
MilkshakeForReal y****u@u****a 48
github-actions[bot] 4****] 39
dependabot[bot] 4****] 29
Zoe McCarthy z****2@g****m 29
Samedh Desai s****i@S****l 24
ayushinav a****t@g****m 21
Zing z****2@g****m 19
ashutosh-b-b a****3@g****m 17
Samedh Desai s****i@s****m 14
akaysh k****1@g****m 14
ArnoStrouwen a****n@t****e 13
xtalax a****y@g****m 11
Anant Thazhemadam a****m@g****m 8
Kirill k****l@K****l 7
Rohit Singh Rathaur 4****N 4
Chris de Graaf me@c****v 4
Kanav Gupta 3****9 4
Hendrik Ranocha r****a 3
abhro 5****o 3
Vaibhav Kumar Dixit v****t@g****m 3
maja.k.gwozdz@gmail.com m****z@g****m 3
Léo de Souza l****a@m****u 3
Léo de Souza 4****a 3
and 34 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 117
  • Total pull requests: 402
  • Average time to close issues: 6 months
  • Average time to close pull requests: about 2 months
  • Total issue authors: 64
  • Total pull request authors: 42
  • Average comments per issue: 5.16
  • Average comments per pull request: 1.57
  • Merged pull requests: 235
  • Bot issues: 1
  • Bot pull requests: 158
Past Year
  • Issues: 16
  • Pull requests: 110
  • Average time to close issues: 17 days
  • Average time to close pull requests: 12 days
  • Issue authors: 10
  • Pull request authors: 14
  • Average comments per issue: 0.88
  • Average comments per pull request: 0.65
  • Merged pull requests: 69
  • Bot issues: 1
  • Bot pull requests: 60
Top Authors
Issue Authors
  • ChrisRackauckas (12)
  • nicholaskl97 (6)
  • AstitvaAggarwal (6)
  • YichengDWu (5)
  • KirillZubov (4)
  • xtalax (4)
  • geriatricvibes (3)
  • Runfa-Zhang (3)
  • sathvikbhagavan (3)
  • zoemcc (3)
  • marcofrancis (3)
  • avik-pal (3)
  • michaeljehan (2)
  • finmod (2)
  • affans (2)
Pull Request Authors
  • github-actions[bot] (103)
  • sathvikbhagavan (63)
  • dependabot[bot] (55)
  • ChrisRackauckas (36)
  • AstitvaAggarwal (29)
  • ArnoStrouwen (10)
  • KirillZubov (9)
  • hippyhippohops (8)
  • ayushinav (8)
  • xtalax (7)
  • sdesai1287 (6)
  • abhro (6)
  • thazhemadam (6)
  • avik-pal (6)
  • YichengDWu (5)
Top Labels
Issue Labels
bug (21) new_algorithm (9) question (9) good first issue (3) enhancement (2) help wanted (2) documentation (1)
Pull Request Labels
dependencies (55) github_actions (6)

Packages

  • Total packages: 2
  • Total downloads:
    • julia 184 total
  • Total dependent packages: 3
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 71
juliahub.com: NeuralPDE

Physics-Informed Neural Networks (PINN) Solvers of (Partial) Differential Equations for Scientific Machine Learning (SciML) accelerated simulation

  • Versions: 70
  • Dependent Packages: 3
  • Dependent Repositories: 0
  • Downloads: 184 Total
Rankings
Forks count: 0.4%
Stargazers count: 0.5%
Average: 6.0%
Dependent repos count: 9.9%
Dependent packages count: 13.2%
Last synced: 6 months ago
juliahub.com: NeuralPDELogging

Physics-Informed Neural Networks (PINN) Solvers of (Partial) Differential Equations for Scientific Machine Learning (SciML) accelerated simulation

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 0.4%
Stargazers count: 0.5%
Dependent repos count: 9.9%
Average: 12.4%
Dependent packages count: 38.9%
Last synced: 6 months ago

Dependencies

.github/workflows/CI.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • codecov/codecov-action v3 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/CompatHelper.yml actions
  • julia-actions/setup-julia latest composite
.github/workflows/FormatCheck.yml actions
  • actions/checkout v1 composite
  • julia-actions/setup-julia latest composite
.github/workflows/Invalidations.yml actions
  • actions/checkout v3 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-invalidations v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/Downstream.yml actions
  • actions/checkout v3 composite
  • codecov/codecov-action v3 composite
  • julia-actions/julia-buildpkg latest composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/setup-julia v1 composite