1
00:00:01,300 --> 00:00:02,500
In this course.

2
00:00:02,500 --> 00:00:05,530
We will learn, of course, about pens.

3
00:00:06,370 --> 00:00:13,450
And the structure of this course is going to be first start with the finite difference methods, the

4
00:00:13,450 --> 00:00:20,710
usual way of solving pdes or partial differential equations to basically model a system.

5
00:00:20,890 --> 00:00:24,700
And later, what we are going to do is to actually go to pens.

6
00:00:25,030 --> 00:00:33,220
We will start with a little bit hard part of pens, which is well, basically solving, solving them

7
00:00:33,220 --> 00:00:37,090
using PyTorch, a little bit more programming needed in here.

8
00:00:37,450 --> 00:00:45,880
And after that, the course will become much easier as we are going to use deep library to solve pens.

9
00:00:45,910 --> 00:00:49,330
It will make us it will make our life much easier.

10
00:00:49,330 --> 00:00:54,640
And actually we can model a complex systems in a very short time.

11
00:00:56,450 --> 00:01:03,680
So finite difference methods are usually used for solving partial differential equations.

12
00:01:03,710 --> 00:01:06,980
Of course, it's what we call usually a numerical solution.

13
00:01:06,980 --> 00:01:11,360
A numerical is just a way to solve equations.

14
00:01:11,720 --> 00:01:17,180
Not, of course, analytical, not using well math laws by our hand.

15
00:01:17,210 --> 00:01:26,630
What we try to use is numerical solutions that give us a more flexibility in solving these partial differential

16
00:01:26,630 --> 00:01:27,410
equations.

17
00:01:27,440 --> 00:01:34,010
So the first part of this course, we are going to first understand how to solve partial differential

18
00:01:34,010 --> 00:01:34,850
equations.

19
00:01:35,240 --> 00:01:41,120
Numerically, the old way of doing it, let's say using finite difference method.

20
00:01:41,120 --> 00:01:49,130
And to get this to do this, we will just take the heat equation that describes how the heat or the

21
00:01:49,130 --> 00:01:57,980
temperature or basically the heat propagates and change the temperature into in our in a system.

22
00:01:58,510 --> 00:02:07,000
So we will have the rod and we will have two heat sources and we will see how this this rod will increase

23
00:02:07,000 --> 00:02:07,900
in temperature.

24
00:02:08,140 --> 00:02:15,220
So it's it's it's quite interesting and we will see the how we will code it all by ourselves from zero

25
00:02:15,250 --> 00:02:17,950
using of course Python.

26
00:02:18,880 --> 00:02:23,950
Now after that we will step our game a little bit.

27
00:02:23,950 --> 00:02:31,240
The heat equation is kind of diffusion equation and it is more or less always like it's much more robust

28
00:02:31,240 --> 00:02:32,500
as it's going to.

29
00:02:32,530 --> 00:02:42,580
It has this diffusion well factor that kind of will make it kind of converge most of the time or many

30
00:02:42,580 --> 00:02:49,300
times much easier than the convection equation or the conviction that doesn't have convection term like

31
00:02:49,630 --> 00:02:50,610
over D y.

32
00:02:50,710 --> 00:02:52,480
So we have this.

33
00:02:52,960 --> 00:02:53,860
We will.

34
00:02:53,860 --> 00:02:56,200
Well, now we want to step it a little bit.

35
00:02:56,230 --> 00:03:05,120
We have this diffusion term and we have this convection term and in which we will try to solve an equation

36
00:03:05,120 --> 00:03:07,850
that has both, which is the burgers equations.

37
00:03:07,850 --> 00:03:13,340
And these burgers equations are well, more complicated than one D heat equation.

38
00:03:13,340 --> 00:03:19,250
We are going to solve it using also a finite difference method.

39
00:03:19,280 --> 00:03:25,430
We'll go step by step and we will this time solve these two beautiful equations and get hopefully the

40
00:03:25,430 --> 00:03:26,150
answer.

41
00:03:27,470 --> 00:03:34,160
Now we become a familiar with finite difference methods and how to solve the problems with that.

42
00:03:34,190 --> 00:03:37,070
We step it now.

43
00:03:37,070 --> 00:03:39,290
Well, now we have to work with pens.

44
00:03:39,290 --> 00:03:44,200
But of course we have to work kind of cautiously.

45
00:03:44,210 --> 00:03:49,880
So we will start by solving 1D burgers equations because why?

46
00:03:49,880 --> 00:03:51,170
Why burgers?

47
00:03:51,410 --> 00:03:58,570
Well, first 1d is of course is easier and 1d burgers has has many things we need to learn.

48
00:03:58,580 --> 00:04:05,840
The first one is, as you can see this the second derivative of u over the first derivative of u over

49
00:04:05,840 --> 00:04:13,970
the x and derivative of u over time, which is interesting to see how the solution will progress also

50
00:04:13,970 --> 00:04:14,750
in time.

51
00:04:14,750 --> 00:04:21,560
So this is going to be actually our solution and this is going to be solved using pens.

52
00:04:21,560 --> 00:04:23,690
This is going to be the first pens.

53
00:04:24,350 --> 00:04:34,880
Well, problem we we solve now, after that, what we need to do is how about go to solve a 2D problem?

54
00:04:35,510 --> 00:04:42,830
The the the first problem we solved is 1D problem and now we need to go and solve a 2D problem.

55
00:04:42,860 --> 00:04:53,390
To do that, we took the 2D heat equation and we well write our code to to solve it with of course pens.

56
00:04:55,000 --> 00:04:58,930
Now, solving with PyTorch is, of course, important.

57
00:04:58,930 --> 00:05:06,370
And and most likely, if you are most likely if you want to write your own software, it's better to

58
00:05:06,370 --> 00:05:06,670
write.

59
00:05:06,670 --> 00:05:07,330
With Python.

60
00:05:07,330 --> 00:05:14,170
You have a control on everything, more or less, much more higher control than if you use a library.

61
00:05:14,170 --> 00:05:19,510
However, there are libraries that actually make pens solutions easier.

62
00:05:19,510 --> 00:05:27,970
For example, the NXT is one of them and this library we are going to use it to first solve a 1D heat

63
00:05:27,970 --> 00:05:30,040
equation just to know the library.

64
00:05:30,070 --> 00:05:31,780
How can we achieve it?

65
00:05:31,810 --> 00:05:39,640
Achieve a solution using this library and we get a little bit familiar and we will see how our coding

66
00:05:39,640 --> 00:05:48,040
will become easier and our solution will we can get to a solution faster compared with, you know,

67
00:05:48,040 --> 00:05:50,110
writing our torch problem.

68
00:05:51,750 --> 00:05:56,430
Now we get familiar and we get stronger with pens.

69
00:05:56,460 --> 00:05:58,550
Why don't we solve Navier-Stokes equations?

70
00:05:58,560 --> 00:06:00,290
I'm sure many of you like.

71
00:06:00,340 --> 00:06:06,120
Navier-Stokes equations, which is equations that is used to model fluid dynamics.

72
00:06:06,300 --> 00:06:12,060
We take these equations which are, in our case, what we are going to solve is a steady state.

73
00:06:12,090 --> 00:06:13,350
Navier-Stokes equations.

74
00:06:13,350 --> 00:06:18,600
However, in these equations I'm putting on this slide, we have time.

75
00:06:18,600 --> 00:06:24,000
Just you put it zero because du over t is going to be zero in our case.

76
00:06:24,360 --> 00:06:29,070
And as you can see, there are or as you know, there are many forms of Navier-Stokes equations.

77
00:06:29,070 --> 00:06:36,660
This one we are going to solve two momentum equations, one in your direction.

78
00:06:36,660 --> 00:06:41,400
One is in the direction in the horizontal axis and the vertical axis.

79
00:06:41,400 --> 00:06:45,030
And the third one is the continuity equation, which is this one.

80
00:06:45,270 --> 00:06:50,970
Of course Navier-Stokes equations might have other equations, for example, the energy equation and

81
00:06:51,340 --> 00:07:00,490
in Navier-Stokes you can even expand through other things like reactions and even electrohydrodynamics.

82
00:07:00,490 --> 00:07:03,400
It's it can get quite complicated.

83
00:07:03,400 --> 00:07:14,170
However, let's take the simple 2D steady state equation and or we model it into a steady state using

84
00:07:14,170 --> 00:07:17,890
these equations and solve a 2D problem.

85
00:07:18,100 --> 00:07:24,910
And with that, hopefully we get already familiar enough with solving.

86
00:07:25,820 --> 00:07:28,040
Well equations using pens.

87
00:07:28,040 --> 00:07:38,300
And by that our course is over and hopefully it will be a very important step and try to reduce your

88
00:07:38,300 --> 00:07:43,400
time learning pens or physics informed neural networks.
