Hello everyone!
In this tutorial we will be seeing how to make a case from Openfoam tutorial.
So openfoam.
When it is installed, it comes with a set of tutorials.
As we are working with something which is open source, we don't have to build everything from scratch.
We will have some examples and we can make our own case with those examples as a base case.
So in Openfoam those examples are commonly known as tutorials.
So we will see how we can take tutorial folders or case files and modify it for our own purpose and
uh, run our own simulation.
So to locate your, uh, tutorials folder, all you have to do is first source your open form.
If you don't have multiple versions, you can skip till now.
So from now it will be very common.
So you can be in any directory okay.
So it doesn't matter.
Now you can type CD dollar form underscore tutorials okay.
If you type this you will go to the location where those tutorial cases are there.
Now you can type explorer dot x space dot hit enter.
Location will open.
If you see here there is a lot of tutorials, so the most common ones are like heat transfer, incompressible
and compressible and multiphase.
In most cases.
So if you see we have the incompressible folder.
If I go inside that you will be able to find all the solvers.
So these are case files will be separate for every solver.
If you see these many solvers are there for incompressible cases.
So the most popular ones are icofom, pimple foam and simple foam.
So if you go inside simple foam again you will find a lot of tutorials.
So these are the base tutorials through which you can build your own case.
Having this as a reference.
So we also have pimple foam where again it comes in terms of laminar large eddy simulation or Arias
model.
So if I go inside laminar we have these many tutorials.
And if I go into alias we have some tutorials.
And if I go into Arias which is Reynolds averaged Navier-Stokes, we have these many tutorials again.
Okay.
So if I go into Icofom again we have these many tutorials under cavity.
Also I have multiple different cavity tutorials.
Okay.
So if you see uh, let's take Icofom case.
If I go here I have zero constant system folder.
So under everything we will have the block mesh decomposed part if we skim a few solution everything.
So if you see uh a icofom it is always laminar.
So we won't have the, uh, turbulent properties files.
So all you can do is you can copy this and paste it wherever you want and go to your terminal, navigate
to that location.
Then you can run your simulation.
Okay.
But if you are using something like pimple foam, uh, let's take our case, okay.
Because in Icofom we saw the laminar.
So if you take this case in simple form, uh, let's take very simple thing like T junction.
Okay.
If you see here we have got zero constant and system.
We have block mesh scheme of solution and controlled it.
All necessary files are there.
It is a very simple case.
If you go under constant you will be able to find turbulence properties.
See we have these turbulence properties here.
It is saying it is using k epsilon.
So we will be seeing a video on how to model k omega SST.
But I will not touch upon k epsilon or spalart-allmaras turbulence models.
So instead what you can do is you can refer to tutorials like this.
Okay.
It uses k epsilon.
And if you go here in zero you can find uh there is epsilon folder k.
Is there new T is there.
Also you have new tilde which means you can also use spalart-allmaras in this case.
So these will be covered when we are seeing arrays turbulence models.
But as of now I'm just saying how to make use of those tutorials.
Okay, now let's say we have a simple form and as usual, we have pitched daily case.
Okay, now when you are trying to build upon a case, let's see what this turbulence model is.
Okay.
They have k epsilon by default.
So we are not going to change these tutorials.
Because if you are making any change to the tutorial at all, you can't use it again, right?
So what you will do is you will copy this folder to some location and then use it.
So we will see how to do that.
I'll go to some location okay.
Now let's say mostly we will do all the things in one directory so you can run and it will take you
to the run directory.
Now we will copy the pitch daily case.
So the command is CP hyphen r dollar form underscore tutorials.
So this will point to this folder.
Now under tutorials we have to go inside incompressible.
So I will go inside incompressible.
Under incompressible we have to go into simple form.
So simple form.
Then under that we have.
it's daily.
If I am not wrong, yes, we have pitched daily and we want to copy this entire folder with the name.
So just space and dot hit enter.
Okay, now we have copied the folder I will do ls.
Now you can see we have Pitch daily and the tutorials folder.
Now I will go inside pitch daily.
And if you see we have the zero constant and system which means we can't run the case.
So for example I can do block mesh.
Now I can run.
Let me drag this simple form.
And I can do touch dot form.
And what I can do is I will open this location.
And as you can see, we have all the case files here.
So this is the way which we will use to modify any tutorials.
Now let's say you want everything from the page daily like you want.
The boundary names all seem okay.
So you want the mesh like inlet outlet, upper wall wall and front and back only.
And you want the same in p uh k epsilon everything.
And even in constant you want the turbulence property to be the same or maybe different.
But if you want the same thing, and if you just want to make the mesh different, then you can copy
this case because it already has the method to implement k epsilon turbulence model and spalart-allmaras.
Spalart-allmaras.
So you can take this and modify as you want it.
Okay.
So if you want to change the mesh, you can do if you want to change the control dict, you can do.
If you want to change the boundary files, you can do.
So everything comes with the template right.
So if you open the velocity file you can see it comes with the template of these things with these headers.
And you don't want to type all of these from scratch.
So always copy from a tutorial which is as close as your, uh, case which are trying to set up, and
you can modify it.
I wouldn't copy a pimple from case to run a steady state case.
Right.
So I can copy something from pimple form if I, if I want to just, uh, run, uh, a transient case
and using terminal to copy using this command is just one method, Say I have a folder.
Okay, now let's say I have this folder, and I'm just making something called run.
Okay.
Now I want to run the case here.
So what I will do is I can go to incompressible.
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
the elbow.
Go here, paste it here.
Okay.
So you can use the Windows Explorer if you are in windows.
And then you can run it like for example I will go to that location.
Now I am in the location under which I have run okay.
So we have elbow here.
Okay.
Now I can run whatever is needed so you don't worry about the all run and all clean file here.
We will, uh, learn about that in later video.
For now, we can see that many things are there here.
So you just want to run this case, then you can load it.
Then from the terminal, you can run it.
Now I'm not going to run it.
So it was just for demonstration.
So this is what you can do Okay.
So always make a copy and then do it.
Don't change the tutorial folders.
That would be not a good idea to do so.
This tutorial is all about looking at the tutorials folder and copying a case and trying to simulate
it.
So I hope now you understand how to use the tutorial folder.
So if you see here we have a lot.
For example we have the multiphase uh under multiphase we have a lot of solvers.
Okay.
So all of these are solvers.
And if you go into compressible again we have a lot of solvers.
Under each solver we will have many tutorials.
So you can watch over these tutorials.
And once we understand what these uh, all run and all clean files are, then you will also know what
are the set of commands which you have to run to run the simulation.
All the tutorials won't have block mesh and then run a simple form.
So it all depends on a lot of things.
There are many things, uh, many manipulation of the case, like setting a, uh, setting a field in
a multiphase case, just setting one part of the entire mesh to one specific phase of the fluid.
So these things are there.
The for that we'll be using something called set fields.
And there is a set dict.
So there are a lot of things.
So when you are not sure about how to run a case that's where all run file will help you.
So we will look into that later in the course.
But for now, I just hope you understood how to use the tutorials folder and the resources Openfoam
offers you through it.
Thank you.
See you in the next class.