1
00:00:00,050 --> 00:00:00,550
Do much.

2
00:00:00,560 --> 00:00:05,870
We just need to plot and see how the solution changes with time.

3
00:00:06,260 --> 00:00:09,020
We already plot the first solution.

4
00:00:09,080 --> 00:00:09,440
Let's.

5
00:00:09,440 --> 00:00:12,650
Let's plot it again so we have it here.

6
00:00:13,620 --> 00:00:18,600
A plot it here and shift enter we can see at.

7
00:00:19,690 --> 00:00:25,600
Well, basically time equals well, the first time step, it equals zero.

8
00:00:25,600 --> 00:00:31,750
And as we know, the shape of you, you shape.

9
00:00:33,210 --> 00:00:41,220
You or let's say length of you is that time it we have 100,000 time steps.

10
00:00:41,220 --> 00:00:44,370
So what we need to do is we simply take this.

11
00:00:44,670 --> 00:00:50,490
Of course, there are more sophisticated way to show the answer to actually make a simulation, but

12
00:00:50,490 --> 00:00:53,280
I want to keep things as simple as possible.

13
00:00:53,280 --> 00:01:00,630
And what we care about to this is already the X and we just need to change the time step.

14
00:01:00,630 --> 00:01:05,940
So the first 500 steps we can see this is what we started.

15
00:01:05,940 --> 00:01:17,250
And then after 500 steps of time, we have this much, let's say after 1000 steps we can see more diffusion

16
00:01:17,250 --> 00:01:19,380
happening after.

17
00:01:20,390 --> 00:01:22,010
10,000 steps.

18
00:01:22,160 --> 00:01:26,390
We can see more diffusion happening towards the center.

19
00:01:26,480 --> 00:01:37,910
After 50,000 step, now it looks like a quite beautiful start from 100 and then it will go all the way

20
00:01:37,910 --> 00:01:38,780
to ten.

21
00:01:40,170 --> 00:01:41,010
And.

22
00:01:42,450 --> 00:01:43,320
After.

23
00:01:44,850 --> 00:01:49,260
A like basically the last one 100,000 steps.

24
00:01:49,710 --> 00:01:51,300
We cannot have 100.

25
00:01:51,300 --> 00:01:56,460
So we need nine, 9999 and we remove this one.

26
00:01:56,460 --> 00:01:57,450
So.

27
00:01:58,980 --> 00:02:00,110
Hundred thousand.

28
00:02:00,140 --> 00:02:01,850
We need to just.

29
00:02:02,840 --> 00:02:10,460
Divide like minus one one unit because we as we said the temperature that in Python from zero to the

30
00:02:10,460 --> 00:02:11,060
length.

31
00:02:11,150 --> 00:02:14,180
So we can see the diffusion happening this way.

32
00:02:14,180 --> 00:02:18,620
So we start from 100 and we get to the last one, which is 200.

33
00:02:18,650 --> 00:02:20,390
Just one thing I didn't mention.

34
00:02:20,390 --> 00:02:29,000
I would say in this thing we didn't update the boundary condition, so this is why we didn't update

35
00:02:29,000 --> 00:02:29,090
it.

36
00:02:29,120 --> 00:02:32,300
We put from one, we start the counting from one.

37
00:02:32,300 --> 00:02:38,210
If we count from zero, we will have a problem because or we will basically the boundary condition will

38
00:02:38,210 --> 00:02:47,060
change and it will be a problem because the boundary condition, um, will you need the t need to start

39
00:02:47,060 --> 00:02:48,020
from initial condition.

40
00:02:48,020 --> 00:02:54,290
So we cannot here but let's say here, sorry, the X, if we put it zero here, it will be zero minus

41
00:02:54,290 --> 00:02:54,860
one.

42
00:02:54,860 --> 00:02:56,390
It will have minus one.

43
00:02:56,390 --> 00:03:02,990
There is nothing minus before the this point so it will cause us trouble.

44
00:03:02,990 --> 00:03:04,370
And of course.

45
00:03:05,170 --> 00:03:06,520
It's physically wrong.

46
00:03:06,520 --> 00:03:14,110
So this is why we put it starting from one and we the length minus one.

47
00:03:14,140 --> 00:03:16,300
The reason is also the same thing.

48
00:03:16,300 --> 00:03:20,260
What we will do is we will not calculate the last point.

49
00:03:20,800 --> 00:03:22,660
We should not calculate the last point.

50
00:03:22,660 --> 00:03:31,330
And actually this is, of course, that we don't have a point of 100,000 or like in the X, we will

51
00:03:31,330 --> 00:03:33,040
not have the point of 100.

52
00:03:33,040 --> 00:03:33,940
But.

53
00:03:35,440 --> 00:03:37,000
In this the range thing.

54
00:03:37,000 --> 00:03:39,760
The final point, he will not he will exclude it.

55
00:03:39,760 --> 00:03:47,020
It it will not it will like if it's from 0 to 100, it will start from zero until 99.

56
00:03:47,350 --> 00:03:48,910
This is what's going to happen.

57
00:03:48,910 --> 00:03:52,840
If we put here 100, 100, they will not calculate it.

58
00:03:52,840 --> 00:03:58,510
So this is what this is why these boundary condition didn't affected by this update.

59
00:03:59,050 --> 00:04:07,270
Now, it might be confusing, but please do it yourself and I hope you already coded with with me what

60
00:04:07,270 --> 00:04:08,020
we can see.

61
00:04:08,050 --> 00:04:12,490
It's always a problem to deal with the boundary condition.

62
00:04:12,490 --> 00:04:16,990
And this one point here, one point there, it might cause a trouble.

63
00:04:16,990 --> 00:04:23,860
So this is why I emphasized it now, because I didn't emphasize this point before.

64
00:04:23,980 --> 00:04:32,950
Anyway, this way how we solve the well, our heat equation one, the heat equation using our code from

65
00:04:32,950 --> 00:04:37,390
from zero and next, let's see other equations how we can solve it.

66
00:04:37,420 --> 00:04:46,300
We go from 1D, we have to go to 2D and then in the numerical of course methods and later we will continue

67
00:04:46,300 --> 00:04:52,210
to the actual solving these equations using neural networks.
