Skip to content

mikelunizar/AMB-PINNs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Physics-Enhanced Machine Learning.

Authors notebook

PhD student Lucas Tesan | LinkedIn link

ltesan@unizar.es

PhD student Mikel M. Iparraguirre | LinkedIn link

mikel.martinez@unizar.es

AMB, Aragón Institute of Engineering Research.


This material was created for the UKACM and SEMNI Autumn School 2024, focused on the intersection of physics and machine learning.

This repository contains two Jupyter notebooks that demonstrate how to solve Ordinary Differential Equations (ODEs) using both data-driven methods and Physics-Informed Neural Networks (PINNs). Each notebook walks through the problem setup and solution process, clearly highlighting the differences between these two approaches and providing the required basis to build a solid and comprehensive deep learning pipeline.

1. Notebook: An introduction to PINNs

This notebook provides a detailed walkthrough for solving a Sinusoidal Velocity ODE using both methods. It offers a clear comparison between the data-driven solver and the PINNs approach, covering model setup, training, and result analysis.

Problem statement for the example.

  • Let's look at the ODE:

$$\frac{du}{dt} = \cos2\pi t$$

  • Initial condition:

$$u(0) = 1$$

  • The exact solution:

$$u(t) = \frac{1}{2\pi}\sin2\pi t + 1$$

2. Notebook: Under damped harmonic oscillator

Focuses on the Underdamped Harmonic Oscillator problem, showcasing the differences between data-driven and PINNs solutions. It includes a detailed implementation and comparative results.

Problem statement for the example.

  • Let's look at the ODE:

$$m \dfrac{d^2 x}{d t^2} + \mu \dfrac{d x}{d t} + kx = 0~,$$

  • Initial conditions in position and velocity

$$x(0) = 1~~,~~\dfrac{d x}{d t}\bigg|_{t=0} = 0~.$$

  • Because under-damped state:

$$\delta < \omega_0~,~~~\mathrm{with}~~ \delta = \dfrac{\mu}{2m}~,~~~~~~\omega_0 = \sqrt{\dfrac{k}{m}},~~~~ \omega = \sqrt{\omega_0^2 - \delta^2}$$

This has the following exact solution:

$$x(t) = e^{-\delta t} \text{cos}(\omega t) + {\delta}\text{sin}(\omega t)$$

Visualizations of the model's performance and additional insights inside the notebook...

underdamped_oscillator_with_spring

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published