Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 1.19 KB

README.md

File metadata and controls

27 lines (16 loc) · 1.19 KB

PINN - coffee example

A simple implementation of a Physics-Informed Neural Network (PINN) to predict the temperature of a cooling cup of coffee, based on [1].

Premise

We consider a cooling coffee cup and try to predict the temperature of the coffee after 10-15 mins. We make 10 measurements in the first 5 mins and we don't want to wait any longer, so we train a neural network (NN) to predict the temperature for us.

We assume the coffee cools following a simple Newton's cooling law:

$$ \frac{dT(t)}{dt} = r(T_{env}-T(t)) $$

where $T(t)$ is the temperature of the coffee, $T_{env}$ is the temperature of the environment, $r$ is the cooling rate and $t$ is time.

Physics-Informed Neural Network (PINN)

We include the PDE, the equation presented above, in the loss function of the NN. This works as a regularizer for the network and helps it follow the physics where data is missing as visualized below.

Demo PINN Animation

References

[1] Physics-informed Neural Networks: a simple tutorial with PyTorch