In this course.
We will learn, of course, about pens.
And the structure of this course is going to be first start with the finite difference methods, the
usual way of solving pdes or partial differential equations to basically model a system.
And later, what we are going to do is to actually go to pens.
We will start with a little bit hard part of pens, which is well, basically solving, solving them
using PyTorch, a little bit more programming needed in here.
And after that, the course will become much easier as we are going to use deep library to solve pens.
It will make us it will make our life much easier.
And actually we can model a complex systems in a very short time.
So finite difference methods are usually used for solving partial differential equations.
Of course, it's what we call usually a numerical solution.
A numerical is just a way to solve equations.
Not, of course, analytical, not using well math laws by our hand.
What we try to use is numerical solutions that give us a more flexibility in solving these partial differential
equations.
So the first part of this course, we are going to first understand how to solve partial differential
equations.
Numerically, the old way of doing it, let's say using finite difference method.
And to get this to do this, we will just take the heat equation that describes how the heat or the
temperature or basically the heat propagates and change the temperature into in our in a system.
So we will have the rod and we will have two heat sources and we will see how this this rod will increase
in temperature.
So it's it's it's quite interesting and we will see the how we will code it all by ourselves from zero
using of course Python.
Now after that we will step our game a little bit.
The heat equation is kind of diffusion equation and it is more or less always like it's much more robust
as it's going to.
It has this diffusion well factor that kind of will make it kind of converge most of the time or many
times much easier than the convection equation or the conviction that doesn't have convection term like
over D y.
So we have this.
We will.
Well, now we want to step it a little bit.
We have this diffusion term and we have this convection term and in which we will try to solve an equation
that has both, which is the burgers equations.
And these burgers equations are well, more complicated than one D heat equation.
We are going to solve it using also a finite difference method.
We'll go step by step and we will this time solve these two beautiful equations and get hopefully the
answer.
Now we become a familiar with finite difference methods and how to solve the problems with that.
We step it now.
Well, now we have to work with pens.
But of course we have to work kind of cautiously.
So we will start by solving 1D burgers equations because why?
Why burgers?
Well, first 1d is of course is easier and 1d burgers has has many things we need to learn.
The first one is, as you can see this the second derivative of u over the first derivative of u over
the x and derivative of u over time, which is interesting to see how the solution will progress also
in time.
So this is going to be actually our solution and this is going to be solved using pens.
This is going to be the first pens.
Well, problem we we solve now, after that, what we need to do is how about go to solve a 2D problem?
The the the first problem we solved is 1D problem and now we need to go and solve a 2D problem.
To do that, we took the 2D heat equation and we well write our code to to solve it with of course pens.
Now, solving with PyTorch is, of course, important.
And and most likely, if you are most likely if you want to write your own software, it's better to
write.
With Python.
You have a control on everything, more or less, much more higher control than if you use a library.
However, there are libraries that actually make pens solutions easier.
For example, the NXT is one of them and this library we are going to use it to first solve a 1D heat
equation just to know the library.
How can we achieve it?
Achieve a solution using this library and we get a little bit familiar and we will see how our coding
will become easier and our solution will we can get to a solution faster compared with, you know,
writing our torch problem.
Now we get familiar and we get stronger with pens.
Why don't we solve Navier-Stokes equations?
I'm sure many of you like.
Navier-Stokes equations, which is equations that is used to model fluid dynamics.
We take these equations which are, in our case, what we are going to solve is a steady state.
Navier-Stokes equations.
However, in these equations I'm putting on this slide, we have time.
Just you put it zero because du over t is going to be zero in our case.
And as you can see, there are or as you know, there are many forms of Navier-Stokes equations.
This one we are going to solve two momentum equations, one in your direction.
One is in the direction in the horizontal axis and the vertical axis.
And the third one is the continuity equation, which is this one.
Of course Navier-Stokes equations might have other equations, for example, the energy equation and
in Navier-Stokes you can even expand through other things like reactions and even electrohydrodynamics.
It's it can get quite complicated.
However, let's take the simple 2D steady state equation and or we model it into a steady state using
these equations and solve a 2D problem.
And with that, hopefully we get already familiar enough with solving.
Well equations using pens.
And by that our course is over and hopefully it will be a very important step and try to reduce your
time learning pens or physics informed neural networks.