WEBVTT

00:00.200 --> 00:01.280
Hello everyone!

00:01.280 --> 00:07.490
In this tutorial we will be seeing how to make a case from Openfoam tutorial.

00:07.490 --> 00:08.810
So openfoam.

00:08.810 --> 00:12.620
When it is installed, it comes with a set of tutorials.

00:12.740 --> 00:19.070
As we are working with something which is open source, we don't have to build everything from scratch.

00:19.070 --> 00:27.110
We will have some examples and we can make our own case with those examples as a base case.

00:27.110 --> 00:31.360
So in Openfoam those examples are commonly known as tutorials.

00:32.080 --> 00:40.660
So we will see how we can take tutorial folders or case files and modify it for our own purpose and

00:40.660 --> 00:42.580
uh, run our own simulation.

00:42.580 --> 00:48.520
So to locate your, uh, tutorials folder, all you have to do is first source your open form.

00:48.520 --> 00:52.510
If you don't have multiple versions, you can skip till now.

00:52.510 --> 00:55.170
So from now it will be very common.

00:55.170 --> 00:58.560
So you can be in any directory okay.

00:58.560 --> 00:59.880
So it doesn't matter.

01:00.570 --> 01:06.060
Now you can type CD dollar form underscore tutorials okay.

01:06.060 --> 01:11.610
If you type this you will go to the location where those tutorial cases are there.

01:11.610 --> 01:16.350
Now you can type explorer dot x space dot hit enter.

01:17.250 --> 01:18.890
Location will open.

01:19.220 --> 01:26.090
If you see here there is a lot of tutorials, so the most common ones are like heat transfer, incompressible

01:26.090 --> 01:28.340
and compressible and multiphase.

01:28.460 --> 01:29.330
In most cases.

01:29.930 --> 01:32.750
So if you see we have the incompressible folder.

01:32.750 --> 01:37.070
If I go inside that you will be able to find all the solvers.

01:37.070 --> 01:41.930
So these are case files will be separate for every solver.

01:41.930 --> 01:46.500
If you see these many solvers are there for incompressible cases.

01:46.650 --> 01:52.200
So the most popular ones are icofom, pimple foam and simple foam.

01:52.260 --> 01:56.940
So if you go inside simple foam again you will find a lot of tutorials.

01:57.630 --> 02:02.640
So these are the base tutorials through which you can build your own case.

02:02.730 --> 02:04.860
Having this as a reference.

02:04.950 --> 02:13.400
So we also have pimple foam where again it comes in terms of laminar large eddy simulation or Arias

02:13.400 --> 02:13.970
model.

02:14.030 --> 02:17.630
So if I go inside laminar we have these many tutorials.

02:17.750 --> 02:21.050
And if I go into alias we have some tutorials.

02:21.410 --> 02:27.140
And if I go into Arias which is Reynolds averaged Navier-Stokes, we have these many tutorials again.

02:28.040 --> 02:28.370
Okay.

02:28.370 --> 02:35.860
So if I go into Icofom again we have these many tutorials under cavity.

02:35.860 --> 02:39.610
Also I have multiple different cavity tutorials.

02:39.790 --> 02:40.210
Okay.

02:40.210 --> 02:43.900
So if you see uh, let's take Icofom case.

02:43.900 --> 02:47.350
If I go here I have zero constant system folder.

02:47.350 --> 02:54.460
So under everything we will have the block mesh decomposed part if we skim a few solution everything.

02:54.460 --> 02:58.920
So if you see uh a icofom it is always laminar.

02:59.070 --> 03:02.820
So we won't have the, uh, turbulent properties files.

03:02.820 --> 03:10.410
So all you can do is you can copy this and paste it wherever you want and go to your terminal, navigate

03:10.410 --> 03:11.220
to that location.

03:11.220 --> 03:12.840
Then you can run your simulation.

03:12.840 --> 03:13.380
Okay.

03:14.280 --> 03:20.940
But if you are using something like pimple foam, uh, let's take our case, okay.

03:20.940 --> 03:22.910
Because in Icofom we saw the laminar.

03:22.910 --> 03:29.990
So if you take this case in simple form, uh, let's take very simple thing like T junction.

03:29.990 --> 03:30.530
Okay.

03:30.710 --> 03:35.930
If you see here we have got zero constant and system.

03:35.930 --> 03:38.900
We have block mesh scheme of solution and controlled it.

03:38.900 --> 03:40.490
All necessary files are there.

03:40.640 --> 03:42.050
It is a very simple case.

03:42.050 --> 03:46.100
If you go under constant you will be able to find turbulence properties.

03:51.160 --> 03:54.130
See we have these turbulence properties here.

03:54.130 --> 03:56.170
It is saying it is using k epsilon.

03:56.680 --> 04:00.430
So we will be seeing a video on how to model k omega SST.

04:00.640 --> 04:05.440
But I will not touch upon k epsilon or spalart-allmaras turbulence models.

04:06.160 --> 04:11.010
So instead what you can do is you can refer to tutorials like this.

04:11.040 --> 04:11.370
Okay.

04:11.370 --> 04:12.690
It uses k epsilon.

04:12.870 --> 04:19.230
And if you go here in zero you can find uh there is epsilon folder k.

04:19.230 --> 04:20.940
Is there new T is there.

04:20.940 --> 04:26.220
Also you have new tilde which means you can also use spalart-allmaras in this case.

04:26.220 --> 04:31.410
So these will be covered when we are seeing arrays turbulence models.

04:31.590 --> 04:35.460
But as of now I'm just saying how to make use of those tutorials.

04:35.660 --> 04:42.080
Okay, now let's say we have a simple form and as usual, we have pitched daily case.

04:42.080 --> 04:50.000
Okay, now when you are trying to build upon a case, let's see what this turbulence model is.

04:51.530 --> 04:52.010
Okay.

04:52.010 --> 04:54.080
They have k epsilon by default.

04:54.080 --> 04:57.500
So we are not going to change these tutorials.

04:57.500 --> 05:02.370
Because if you are making any change to the tutorial at all, you can't use it again, right?

05:02.370 --> 05:08.820
So what you will do is you will copy this folder to some location and then use it.

05:09.300 --> 05:11.010
So we will see how to do that.

05:11.010 --> 05:13.950
I'll go to some location okay.

05:13.950 --> 05:19.890
Now let's say mostly we will do all the things in one directory so you can run and it will take you

05:19.890 --> 05:21.390
to the run directory.

05:21.390 --> 05:23.430
Now we will copy the pitch daily case.

05:23.430 --> 05:29.630
So the command is CP hyphen r dollar form underscore tutorials.

05:29.630 --> 05:33.350
So this will point to this folder.

05:33.350 --> 05:37.310
Now under tutorials we have to go inside incompressible.

05:38.600 --> 05:41.270
So I will go inside incompressible.

05:41.270 --> 05:44.300
Under incompressible we have to go into simple form.

05:44.300 --> 05:46.190
So simple form.

05:46.190 --> 05:48.380
Then under that we have.

05:49.180 --> 05:50.650
it's daily.

05:50.650 --> 05:58.960
If I am not wrong, yes, we have pitched daily and we want to copy this entire folder with the name.

05:58.960 --> 06:01.360
So just space and dot hit enter.

06:02.170 --> 06:06.520
Okay, now we have copied the folder I will do ls.

06:06.520 --> 06:11.920
Now you can see we have Pitch daily and the tutorials folder.

06:11.920 --> 06:14.340
Now I will go inside pitch daily.

06:14.340 --> 06:19.110
And if you see we have the zero constant and system which means we can't run the case.

06:19.110 --> 06:22.470
So for example I can do block mesh.

06:22.470 --> 06:24.090
Now I can run.

06:24.810 --> 06:27.030
Let me drag this simple form.

06:30.390 --> 06:33.540
And I can do touch dot form.

06:34.050 --> 06:37.230
And what I can do is I will open this location.

06:40.220 --> 06:43.070
And as you can see, we have all the case files here.

06:43.070 --> 06:48.740
So this is the way which we will use to modify any tutorials.

06:48.740 --> 06:53.450
Now let's say you want everything from the page daily like you want.

06:53.450 --> 06:56.660
The boundary names all seem okay.

06:57.860 --> 07:03.660
So you want the mesh like inlet outlet, upper wall wall and front and back only.

07:03.930 --> 07:08.370
And you want the same in p uh k epsilon everything.

07:08.370 --> 07:13.410
And even in constant you want the turbulence property to be the same or maybe different.

07:13.410 --> 07:19.740
But if you want the same thing, and if you just want to make the mesh different, then you can copy

07:19.740 --> 07:27.210
this case because it already has the method to implement k epsilon turbulence model and spalart-allmaras.

07:27.210 --> 07:27.230
Spalart-allmaras.

07:27.230 --> 07:30.680
So you can take this and modify as you want it.

07:30.890 --> 07:31.310
Okay.

07:31.310 --> 07:35.720
So if you want to change the mesh, you can do if you want to change the control dict, you can do.

07:35.720 --> 07:38.720
If you want to change the boundary files, you can do.

07:38.720 --> 07:41.060
So everything comes with the template right.

07:41.060 --> 07:47.210
So if you open the velocity file you can see it comes with the template of these things with these headers.

07:47.210 --> 07:50.000
And you don't want to type all of these from scratch.

07:50.690 --> 07:57.130
So always copy from a tutorial which is as close as your, uh, case which are trying to set up, and

07:57.130 --> 07:58.120
you can modify it.

07:58.120 --> 08:01.480
I wouldn't copy a pimple from case to run a steady state case.

08:01.480 --> 08:01.630
Right.

08:01.630 --> 08:08.920
So I can copy something from pimple form if I, if I want to just, uh, run, uh, a transient case

08:08.920 --> 08:20.520
and using terminal to copy using this command is just one method, Say I have a folder.

08:20.550 --> 08:27.720
Okay, now let's say I have this folder, and I'm just making something called run.

08:27.720 --> 08:28.110
Okay.

08:28.110 --> 08:30.420
Now I want to run the case here.

08:30.420 --> 08:33.540
So what I will do is I can go to incompressible.

08:33.540 --> 08:40.710
Now let's say I want to run the cavity case I'll go to or better I will take the elbow case I'll copy

08:40.710 --> 08:41.390
the elbow.

08:41.690 --> 08:43.910
Go here, paste it here.

08:43.910 --> 08:44.180
Okay.

08:44.180 --> 08:47.690
So you can use the Windows Explorer if you are in windows.

08:47.690 --> 08:53.120
And then you can run it like for example I will go to that location.

08:53.720 --> 08:58.340
Now I am in the location under which I have run okay.

09:01.220 --> 09:03.140
So we have elbow here.

09:05.270 --> 09:05.630
Okay.

09:05.630 --> 09:11.080
Now I can run whatever is needed so you don't worry about the all run and all clean file here.

09:11.080 --> 09:14.290
We will, uh, learn about that in later video.

09:14.290 --> 09:17.680
For now, we can see that many things are there here.

09:17.680 --> 09:22.240
So you just want to run this case, then you can load it.

09:22.510 --> 09:24.490
Then from the terminal, you can run it.

09:24.490 --> 09:26.230
Now I'm not going to run it.

09:26.470 --> 09:28.240
So it was just for demonstration.

09:28.240 --> 09:30.600
So this is what you can do Okay.

09:30.600 --> 09:33.240
So always make a copy and then do it.

09:33.270 --> 09:36.030
Don't change the tutorial folders.

09:36.060 --> 09:39.240
That would be not a good idea to do so.

09:39.240 --> 09:46.770
This tutorial is all about looking at the tutorials folder and copying a case and trying to simulate

09:46.770 --> 09:47.010
it.

09:47.010 --> 09:51.630
So I hope now you understand how to use the tutorial folder.

09:51.630 --> 09:54.180
So if you see here we have a lot.

09:54.180 --> 09:59.560
For example we have the multiphase uh under multiphase we have a lot of solvers.

09:59.560 --> 09:59.830
Okay.

09:59.830 --> 10:01.420
So all of these are solvers.

10:01.570 --> 10:05.260
And if you go into compressible again we have a lot of solvers.

10:05.260 --> 10:07.810
Under each solver we will have many tutorials.

10:07.810 --> 10:10.600
So you can watch over these tutorials.

10:10.600 --> 10:18.700
And once we understand what these uh, all run and all clean files are, then you will also know what

10:18.700 --> 10:23.430
are the set of commands which you have to run to run the simulation.

10:23.430 --> 10:28.170
All the tutorials won't have block mesh and then run a simple form.

10:28.170 --> 10:30.000
So it all depends on a lot of things.

10:30.000 --> 10:37.500
There are many things, uh, many manipulation of the case, like setting a, uh, setting a field in

10:37.500 --> 10:43.620
a multiphase case, just setting one part of the entire mesh to one specific phase of the fluid.

10:43.620 --> 10:44.930
So these things are there.

10:44.930 --> 10:47.540
The for that we'll be using something called set fields.

10:47.990 --> 10:49.430
And there is a set dict.

10:49.430 --> 10:50.810
So there are a lot of things.

10:50.810 --> 10:56.300
So when you are not sure about how to run a case that's where all run file will help you.

10:56.300 --> 11:00.500
So we will look into that later in the course.

11:00.920 --> 11:06.200
But for now, I just hope you understood how to use the tutorials folder and the resources Openfoam

11:06.200 --> 11:07.340
offers you through it.

11:07.610 --> 11:08.300
Thank you.

11:08.300 --> 11:09.440
See you in the next class.
