1
00:00:00,020 --> 00:00:01,070
Boundary condition.

2
00:00:02,920 --> 00:00:12,050
Of all we need to keep this one is a little bit open because we will specify different boundary condition.

3
00:00:12,070 --> 00:00:14,470
The initial condition, we will not specify it.

4
00:00:14,470 --> 00:00:21,670
Let it be whatever, like let it be initialized randomly based on just initialize randomly.

5
00:00:23,590 --> 00:00:27,030
Now, in our case, the wall.

6
00:00:27,040 --> 00:00:31,750
We need to boundary condition for wall, boundary condition for inlet, boundary condition for outlet.

7
00:00:32,410 --> 00:00:35,290
And we have, of course, you, we have V and we have pressure.

8
00:00:35,290 --> 00:00:39,970
So we have three components and three types of boundary conditions.

9
00:00:39,970 --> 00:00:47,440
And we now we need to tell the program where this boundary condition points are located.

10
00:00:48,560 --> 00:00:50,920
So to do that, we have a different way.

11
00:00:50,930 --> 00:00:53,480
A little bit different than before.

12
00:00:54,740 --> 00:00:57,170
Dot direc.

13
00:00:58,330 --> 00:01:00,580
Rich lit boundary.

14
00:01:01,380 --> 00:01:05,730
Condition and we add in the geometry.

15
00:01:07,610 --> 00:01:08,420
And.

16
00:01:09,440 --> 00:01:10,340
Lambda.

17
00:01:13,620 --> 00:01:14,640
Lambda.

18
00:01:16,100 --> 00:01:17,510
We have X.

19
00:01:18,630 --> 00:01:20,340
And it's going to be zero.

20
00:01:20,490 --> 00:01:21,120
Why?

21
00:01:21,120 --> 00:01:24,900
It's zero because its boundary, if it's wall, its non-slip condition.

22
00:01:25,170 --> 00:01:27,500
And this is the U.

23
00:01:27,810 --> 00:01:31,950
And then we want to define the boundary.

24
00:01:33,210 --> 00:01:42,150
The wall, which this is going to be a function that defines where is this zero going to be applied?

25
00:01:43,440 --> 00:01:44,700
A component.

26
00:01:46,030 --> 00:01:48,690
And is going to be equal zero.

27
00:01:48,700 --> 00:01:51,700
So what we have done here is we said the.

28
00:01:51,730 --> 00:01:56,590
Boundary condition and it will take boundary condition method.

29
00:01:56,950 --> 00:02:01,960
It will have this geometry x lambda, it will be zero, the value of it.

30
00:02:01,960 --> 00:02:07,840
And this is going to be the U and boundary wall is going to be the boundary wall.

31
00:02:07,840 --> 00:02:09,040
We will define it later.

32
00:02:09,040 --> 00:02:15,190
So here it we will have a function called boundary one.

33
00:02:18,190 --> 00:02:19,420
And it will take some.

34
00:02:20,280 --> 00:02:20,910
Thinks.

35
00:02:21,450 --> 00:02:22,860
And we have other functions.

36
00:02:22,860 --> 00:02:23,460
Let's see.

37
00:02:24,910 --> 00:02:26,590
So this is the boundary wall.

38
00:02:27,300 --> 00:02:30,390
And of course, we will define all of this boundary condition.

39
00:02:30,390 --> 00:02:32,550
We will define it the.

40
00:02:33,640 --> 00:02:39,730
We do the same geometry, everything boundary one, it will be the same thing and it will be component

41
00:02:39,730 --> 00:02:40,210
one.

42
00:02:41,140 --> 00:02:48,520
So this is basically how we're going to work U and V, and then we will have inlet again, U and V,

43
00:02:48,520 --> 00:02:51,550
and we will have outlet P and V this time.

44
00:02:53,130 --> 00:02:54,930
And because it should be zero.

45
00:02:56,190 --> 00:03:00,900
Now the boundary wall, which is this one that we need, define it.

46
00:03:00,930 --> 00:03:07,920
How can we tell the program that we have the location is the boundary?

47
00:03:07,950 --> 00:03:13,710
Well, at this point or in this format, he will pass to type the computer program.

48
00:03:13,720 --> 00:03:19,230
The DVD is going to pass two values.

49
00:03:19,230 --> 00:03:24,510
The first one is X, which is the location of the boundary.

50
00:03:26,040 --> 00:03:31,200
And if the point is on boundary.

51
00:03:33,060 --> 00:03:33,570
Daddy.

52
00:03:35,020 --> 00:03:35,470
Bone.

53
00:03:36,820 --> 00:03:37,180
De.

54
00:03:38,100 --> 00:03:45,180
He will tell us if this point that he will pass exists on the boundary or and he will tell us the location

55
00:03:45,180 --> 00:03:46,110
of this point.

56
00:03:47,040 --> 00:03:51,540
Let's let's see how it is like this is this is for future.

57
00:03:51,540 --> 00:03:55,170
This is what we want to see.

58
00:03:55,200 --> 00:03:57,180
What is the program is giving.

59
00:03:57,390 --> 00:04:08,700
And here we can just write this is the X, which is the location of points and here is on boundary and

60
00:04:08,700 --> 00:04:10,680
we pass on the on boundary.

61
00:04:11,400 --> 00:04:14,190
It's a little bit strange way of programming, but.

62
00:04:15,010 --> 00:04:18,880
This is we have to always go with the rules of deepest.

63
00:04:21,960 --> 00:04:28,860
Okay, So this is how can we say the point is on boundary or not?

64
00:04:28,890 --> 00:04:30,540
We need a logical thing.

65
00:04:30,540 --> 00:04:34,200
This is this is going to be true or false.

66
00:04:34,200 --> 00:04:40,680
If it's true, the point is considered on boundary and not just on boundary in the wall boundary.

67
00:04:40,680 --> 00:04:43,110
And it will have the value of zero.

68
00:04:43,290 --> 00:04:46,740
If it's not, then it's not so.

69
00:04:47,700 --> 00:04:50,580
What do we need to do is we need to return.

70
00:04:51,610 --> 00:04:52,620
On wall.

71
00:04:52,630 --> 00:04:56,850
If the point is on wall or the point is not.

72
00:04:56,860 --> 00:04:58,360
Not on the wall.

73
00:05:00,300 --> 00:05:01,650
That's just what we need to do.

74
00:05:02,670 --> 00:05:08,460
And in order to do that, what we need to do is we need to define this function.

75
00:05:09,550 --> 00:05:12,130
Which will be a logical function.

76
00:05:12,130 --> 00:05:15,340
NP dot logical.

77
00:05:15,730 --> 00:05:16,840
Logical.

78
00:05:17,870 --> 00:05:18,770
And.

79
00:05:20,020 --> 00:05:22,300
Y means and like it should be.

80
00:05:22,300 --> 00:05:28,870
The component of this function should be well accepted by both.

81
00:05:28,870 --> 00:05:33,940
And now this will be will have the first component here.

82
00:05:34,750 --> 00:05:36,910
And a second component here.

83
00:05:37,270 --> 00:05:40,780
So how can we define it?

84
00:05:40,780 --> 00:05:45,400
The first one is we want to make sure that this point is on boundary.

85
00:05:45,400 --> 00:05:51,370
And the other one is, well, where is the the the actual wall?

86
00:05:51,580 --> 00:05:55,300
So here the first thing is we just pass this point.

87
00:05:55,510 --> 00:06:00,280
If it's on boundary or it's not on boundary, it will be a little bit complicated.

88
00:06:00,280 --> 00:06:03,460
But let's write it step by step.

89
00:06:05,200 --> 00:06:12,400
The second thing is we need an function of logical well component.

90
00:06:12,400 --> 00:06:17,110
This is going to be the hardest boundary to define, but later it will be easier.

91
00:06:18,130 --> 00:06:22,990
So in order to do that, we have to say the first thing is.

92
00:06:23,730 --> 00:06:27,150
N.p dot or n.p.

93
00:06:27,390 --> 00:06:28,080
Whereas.

94
00:06:28,260 --> 00:06:28,710
N.p.

95
00:06:29,710 --> 00:06:32,080
Dot again logical.

96
00:06:32,320 --> 00:06:33,520
Logical.

97
00:06:33,880 --> 00:06:35,860
And this time is or.

98
00:06:36,600 --> 00:06:47,580
Why is or because we want to say that if the point located on the upper wall or the lower war is going

99
00:06:47,580 --> 00:06:49,590
to be true, it is on the bond.

100
00:06:50,190 --> 00:06:52,500
If it's not, well, it's false.

101
00:06:52,920 --> 00:06:57,060
So this is the first component is.

102
00:06:58,950 --> 00:06:59,400
In.

103
00:07:03,690 --> 00:07:04,590
Dot.

104
00:07:05,540 --> 00:07:07,460
Is close.

105
00:07:07,940 --> 00:07:09,320
Close to what?

106
00:07:09,890 --> 00:07:11,990
This x one.

107
00:07:13,020 --> 00:07:17,250
Is close to minus D over two.

108
00:07:20,530 --> 00:07:31,240
Minus D over two means what means it is on the lower part of the well of the the the wall.

109
00:07:31,660 --> 00:07:32,980
Why we put one?

110
00:07:32,980 --> 00:07:36,070
Because x going to have two values X and y.

111
00:07:36,100 --> 00:07:40,240
The first value is going to x zero is x, which we are not interested.

112
00:07:40,240 --> 00:07:43,030
And the second value is one which is we are interested.

113
00:07:43,030 --> 00:07:47,770
The Y should be minus D over two and.

114
00:07:48,440 --> 00:07:52,370
The R's are tolerance.

115
00:07:52,670 --> 00:07:54,380
What does it mean?

116
00:07:54,380 --> 00:07:55,840
It's a clause.

117
00:07:55,850 --> 00:07:58,760
We have to define these variables.

118
00:07:58,910 --> 00:08:00,980
E to the power minus five.

119
00:08:01,010 --> 00:08:02,120
This is the.

120
00:08:02,990 --> 00:08:04,790
The relative tolerance.

121
00:08:04,790 --> 00:08:06,860
And we have another.

122
00:08:08,050 --> 00:08:09,880
A tolerance with it.

123
00:08:09,890 --> 00:08:11,290
I think it's total tolerance.

124
00:08:11,290 --> 00:08:12,340
I'm not sure.

125
00:08:12,340 --> 00:08:14,620
But it's I think it's the value tolerance.

126
00:08:14,650 --> 00:08:17,560
It has to be this much.

127
00:08:18,550 --> 00:08:27,280
So this is basically we tell the program that we need the point to be on the lower surface of this thing.

128
00:08:28,610 --> 00:08:30,860
But we have another thing.

129
00:08:30,860 --> 00:08:33,130
We have not just the lower surface.

130
00:08:33,140 --> 00:08:34,700
We have also the upper surface.

131
00:08:34,700 --> 00:08:37,550
So is close to this.

132
00:08:38,650 --> 00:08:44,350
And or the point is close to.

133
00:08:46,550 --> 00:08:48,350
A well.

134
00:08:50,430 --> 00:08:54,660
Well, it's close one to minus D over two.

135
00:08:55,790 --> 00:08:56,390
This way.

136
00:08:57,090 --> 00:09:02,130
So basically here what we did is we made.

137
00:09:02,960 --> 00:09:05,210
The computer or we made deep.

138
00:09:05,900 --> 00:09:11,000
If it's close, if this one is close to this, it will give us true.

139
00:09:11,330 --> 00:09:18,620
Or if this point is close to the over two, it will give us true and on boundary.

140
00:09:18,620 --> 00:09:19,940
If we.

141
00:09:20,680 --> 00:09:23,850
We got the value on boundary, all of this.

142
00:09:23,860 --> 00:09:32,230
And so if it's in the on the boundary and it's on the upper surface or lower surface, it is true.

143
00:09:32,410 --> 00:09:42,430
And by that we already finished defining our wall boundary a little bit complicated, but it's kind

144
00:09:42,430 --> 00:09:43,990
of logical this way.

145
00:09:44,020 --> 00:09:49,960
Of course there's another way to compute it, but the same we did in the heat equation, which all the

146
00:09:49,960 --> 00:09:56,800
points in the boundary we can define, we define the past equation, but you can actually make if statements,

147
00:09:56,800 --> 00:10:01,960
if it's if the value is this much and this much you put this value, but it will become a little bit

148
00:10:01,960 --> 00:10:04,420
more complicated, the coding of it.

149
00:10:04,420 --> 00:10:11,020
So here is a little bit cleaner way of defining it for a little bit complex problems.

150
00:10:13,130 --> 00:10:15,710
Okay, now we understand how to do it.

151
00:10:15,710 --> 00:10:17,840
Let's continue now.

152
00:10:17,870 --> 00:10:18,620
PC.

153
00:10:19,460 --> 00:10:26,540
So if it's on the boundary on the wall and a component zero, which is you, component one is V, we

154
00:10:26,540 --> 00:10:29,060
always put them as zero.

155
00:10:29,270 --> 00:10:30,050
PC.

156
00:10:31,250 --> 00:10:32,180
Inlet.

157
00:10:32,210 --> 00:10:34,130
Inlet.

158
00:10:34,460 --> 00:10:36,380
U equals.

159
00:10:37,810 --> 00:10:38,950
Same thing.

160
00:10:40,990 --> 00:10:42,340
Geometry inlet.

161
00:10:42,340 --> 00:10:43,240
But here.

162
00:10:43,240 --> 00:10:44,230
What do we need?

163
00:10:44,300 --> 00:10:45,970
We need you and.

164
00:10:47,760 --> 00:10:48,920
You and.

165
00:10:50,130 --> 00:10:53,580
Now the boundary has to be inlet boundary.

166
00:10:54,390 --> 00:10:55,740
So boundary.

167
00:10:56,990 --> 00:11:01,660
And let we do the same for boundary condition.

168
00:11:01,670 --> 00:11:06,920
However, this time for V and the component is one.

169
00:11:07,070 --> 00:11:14,360
But the inlet should have a V equals this place.

170
00:11:14,360 --> 00:11:15,380
It will have.

171
00:11:15,410 --> 00:11:18,590
It should have a V equals a zero.

172
00:11:18,590 --> 00:11:21,110
So the flow is completely horizontal.

173
00:11:23,240 --> 00:11:24,830
And of course you can change it if you want.

174
00:11:24,830 --> 00:11:28,880
But the idea of this problem, we want to see the growth of the boundary layer.

175
00:11:29,890 --> 00:11:34,000
So you inlet here and V is zero.

176
00:11:34,030 --> 00:11:35,350
This is component one.

177
00:11:35,350 --> 00:11:38,920
It seems everything seems reasonable.

178
00:11:39,460 --> 00:11:40,660
We can see.

179
00:11:40,690 --> 00:11:48,310
Okay, we are ready to write the boundary well condition or the boundary function.

180
00:11:48,310 --> 00:11:52,810
So we take this one boundary inlet and x.

181
00:11:53,540 --> 00:11:56,240
And it will pass also on boundary.

182
00:11:58,930 --> 00:12:02,350
And here what we need to do is.

183
00:12:04,900 --> 00:12:06,220
Will return.

184
00:12:09,090 --> 00:12:11,340
We can put it like on.

185
00:12:11,980 --> 00:12:13,990
And let equals.

186
00:12:16,180 --> 00:12:17,560
NP dot.

187
00:12:18,820 --> 00:12:19,900
Logical.

188
00:12:25,780 --> 00:12:26,710
Logical.

189
00:12:28,280 --> 00:12:29,240
And.

190
00:12:30,530 --> 00:12:32,480
Same thing here.

191
00:12:37,410 --> 00:12:40,050
But we need to remove.

192
00:12:43,330 --> 00:12:44,800
This one.

193
00:12:45,100 --> 00:12:45,790
This one.

194
00:12:47,130 --> 00:12:50,310
So here we just care about the inlet.

195
00:12:50,310 --> 00:12:53,640
And an inlet is only one part.

196
00:12:53,640 --> 00:13:01,950
So we don't have to we don't have to put logical is close to x one.

197
00:13:02,220 --> 00:13:03,190
Just a little.

198
00:13:03,210 --> 00:13:04,320
We will change it a little bit.

199
00:13:04,350 --> 00:13:12,450
Now here logical is basically is close to this and on boundary.

200
00:13:21,210 --> 00:13:25,140
And this is is close and.

201
00:13:30,450 --> 00:13:31,290
Think this one.

202
00:13:31,290 --> 00:13:32,340
No need for it.

203
00:13:32,770 --> 00:13:33,120
Yeah.

204
00:13:33,150 --> 00:13:33,750
This way.

205
00:13:36,210 --> 00:13:42,930
So we need logical it has to be on boundary and it has to be close to.

206
00:13:44,570 --> 00:13:53,600
The thing to close to now, Inlet means X has to be X has to be close to minus.

207
00:13:54,790 --> 00:13:56,500
L over two.

208
00:13:56,500 --> 00:13:58,210
And we have the tolerances.

209
00:13:59,580 --> 00:14:00,520
That's it.

210
00:14:00,540 --> 00:14:01,200
Return.

211
00:14:01,200 --> 00:14:01,680
What?

212
00:14:01,710 --> 00:14:03,060
On inlet.

213
00:14:04,760 --> 00:14:05,630
Interesting.

214
00:14:06,410 --> 00:14:07,970
It's it's very simple.

215
00:14:07,970 --> 00:14:10,790
Like, we have a logical end.

216
00:14:10,820 --> 00:14:12,280
It has to be close.

217
00:14:12,290 --> 00:14:18,650
Is it close to X0 is close to minus L over two if it's correct.

218
00:14:20,040 --> 00:14:24,960
And it is a boundary point, then you return True.

219
00:14:25,790 --> 00:14:27,010
If not, it will return.

220
00:14:27,050 --> 00:14:27,350
Of course.

221
00:14:27,350 --> 00:14:27,640
False.

222
00:14:29,190 --> 00:14:29,640
Okay.

223
00:14:29,640 --> 00:14:36,960
So the last thing is will we have is boundary condition for out.

224
00:14:38,000 --> 00:14:41,390
For outlet pressure.

225
00:14:42,560 --> 00:14:49,190
And of course, boundary condition for the dot is the same thing.

226
00:14:53,840 --> 00:14:55,010
Now here.

227
00:14:55,160 --> 00:14:57,800
What is the pressure at the outlet?

228
00:14:58,190 --> 00:14:59,390
Make it simple.

229
00:14:59,420 --> 00:15:00,260
Put it.

230
00:15:01,070 --> 00:15:01,700
Zero.

231
00:15:02,000 --> 00:15:05,000
But of course it's not very logical.

232
00:15:05,020 --> 00:15:07,850
It means vacuum, but who cares?

233
00:15:07,850 --> 00:15:10,400
Like we just it's just a numerical thing.

234
00:15:10,550 --> 00:15:19,720
Now, here too, is pressure is two, is here is pressure and PC.

235
00:15:21,820 --> 00:15:22,810
Outlet.

236
00:15:24,700 --> 00:15:28,750
V equals we take the whole thing.

237
00:15:29,550 --> 00:15:33,480
And this is going to be the first component.

238
00:15:34,440 --> 00:15:36,110
This is not going to be inlet.

239
00:15:36,120 --> 00:15:37,770
It's going to be outlet.

240
00:15:40,160 --> 00:15:42,890
Outlet and the function is outlet.

241
00:15:46,820 --> 00:15:47,600
Geometry.

242
00:15:47,960 --> 00:15:52,550
X is zero zero You and it's very nice now.

243
00:15:52,610 --> 00:15:53,750
Think so?

244
00:15:53,850 --> 00:15:56,120
000101.

245
00:15:56,120 --> 00:16:00,760
And this is two because it's pressure and one is the V.

246
00:16:01,390 --> 00:16:03,860
V seems good outlet.

247
00:16:03,890 --> 00:16:06,140
We just need to define the function.

248
00:16:06,140 --> 00:16:10,670
And we take this one and we just modify a little bit on.

249
00:16:12,480 --> 00:16:13,440
Outlet.

250
00:16:15,040 --> 00:16:21,040
Keep it on outlet and the tolerances on boundary.

251
00:16:21,370 --> 00:16:23,650
Now zero has to be.

252
00:16:24,720 --> 00:16:26,630
Plus L over two.

253
00:16:28,080 --> 00:16:32,340
If it's on the L over two, we have to apply this boundary condition.

254
00:16:33,130 --> 00:16:34,000
And.

255
00:16:34,820 --> 00:16:36,890
While everything else is the same.

256
00:16:36,890 --> 00:16:41,450
So now we are ready to run this thing.

257
00:16:41,450 --> 00:16:43,580
We just shift, enter.

258
00:16:44,270 --> 00:16:45,560
And shift.

259
00:16:45,560 --> 00:16:46,400
Enter.

260
00:16:46,670 --> 00:16:48,530
We have a problem.

261
00:16:49,440 --> 00:16:52,590
And you n no need for this.

262
00:16:54,060 --> 00:16:54,810
Shift into.

263
00:16:54,810 --> 00:17:00,360
And now we defined our boundary condition.

264
00:17:00,630 --> 00:17:11,010
So the next step, what we are going to do is we need to define the A and of course, the data.

265
00:17:11,220 --> 00:17:17,010
And at that point, well, what we will get is something that looks like this.

266
00:17:17,810 --> 00:17:22,820
This is going to be the printout of X and bound on boundary.

267
00:17:22,850 --> 00:17:23,630
True.

268
00:17:23,660 --> 00:17:30,110
This is going to be the well, the print out of this x going to be looks like this.

269
00:17:30,140 --> 00:17:34,910
It's a numpy array of x and y.

270
00:17:35,060 --> 00:17:37,760
And on boundary it will give us true or false.

271
00:17:37,760 --> 00:17:40,430
So this is what we are going to see.

272
00:17:40,460 --> 00:17:43,430
However, I just want to show you because.

273
00:17:43,790 --> 00:17:45,200
Because it's a library.

274
00:17:45,200 --> 00:17:51,320
The problem is we cannot we don't have really control like to to to see how things are.

275
00:17:51,350 --> 00:17:58,730
So at least unless, you know, the whole thing is a little bit completed, but we will see these print

276
00:17:58,730 --> 00:17:59,720
out statements.
