Advanced Tutorials: PINNs

Dear all,

I am quite new to Julia so I maybe missed the proper documentation.

May anyone suggest advanced Julia tutorials for Physics-Informed NN (a GitHub repository or something else) ? For instance, problems with complex geometry (i.e. no-rectangular domain) etc ? I have already explored the examples in the NeuralPDE doc.

Thanks in advance :slight_smile:

Hi Leo,

take a look at the SciML book, especially in lecture 3, there’s a great explanation about PINNs there.

The tutorials in NeuralPDE.jl: Scientific Machine Learning (SciML) for Partial Differential Equations · NeuralPDE.jl cover what is currently supported. The library does not do complex geometries at this time, but it’s something that’s being worked towards.

Thanks @RosalRicardo, I’ll have a look!

@ChrisRackauckas super cool thanks! Keep on the good work, NeuralPDE is so nice!

@ChrisRackauckas if you’re in need of support for moving to comolex geometries I’m open to help contribute. Ive been working on non linear solid mechanics pinns the last year or so where our goal is always complex geoemtry.

Ive been wanting to move some stuff over to julia from python but i have the feeling the ecosystem is not quite mature enough for my needs unfortunately, but would love to help push it there.

Indeed we’d be very happy to have someone help out here. We’d need to pick a mesh representation to use in the ModelingToolkit format. It would probably be good for that to be compatible with Gridap.jl as well, so that in the future the same symbolic code works for NeuralPDE.jl and Gridap.jl. We’d need some way to describe the weak form as well.

Which Python PINN package does arbitrary geometries? I know DeepXDE is a bit limited as well on the geometry choices.

Hi @ChrisRackauckas

There is also IDRLnet (GitHub - idrl-lab/idrlnet: IDRLnet, a Python toolbox for modeling and solving problems through Physics-Informed Neural Network (PINN) systematically.), that is mainly based on NVIDIA’s Modulus (Modulus | NVIDIA Developer). Both made their codes available.
Good point is that Modulus enables to import .stl files for a complicated geometry!

1 Like

@ChrisRackauckas great points about compatability with other packages in the ecosystem.

For arbitrary mesh geometries for my work, i made a home baked jax pinn solver using the weak form that was built on top of exodusII python interfaces for reading a mesh as well as postprocessing. I moved some of those tools over to Julia in Exodus.jl to directly call the C library. That format scales to obscene amounts of cores so there should never be any limitations there. It’s old, but held to very high standards and just works.

Oh interesting, that’s good to know. Yeah, getting something together usually isn’t too hard, it’s fitting it to the symbolics that may be difficult, but that’s the step that’s essential for getting it to non-mathematical folks!

Great points on the symbolics.

I think fundamentally that may have to be handled differently depending upon strong form vs. weak form. For the strong form I think it’s maybe a little bit easier as long as you have a sufficiently sampled set of collocation points for your irregular geometry (that’s probably the challenging part).

For the weak form I think at the end of the day we would need some interface from symbolics down to say an “element level residual (or energy etc.)” that will map a given operator or set of operators to how that element should be calculated and then a general assembly interface or AD tricks could be used. For general operators that’s easier said then done though. Perhaps a kernel system like that in INL’s MOOSE library might be something to consider so that we have building blocks of PDE operators.