Difference between revisions of "OpenFOAM/C3/Importing-mesh-file-in-OpenFOAM/English-timed"
From Script | Spoken-Tutorial
Sandhya.np14 (Talk | contribs) |
|||
Line 5: | Line 5: | ||
|- | |- | ||
| 00:00 | | 00:00 | ||
− | | Hello and welcome to the spoken tutorial on '''Importing Mesh files in OpenFOAM''' | + | | Hello and welcome to the '''spoken tutorial''' on '''Importing Mesh files in OpenFOAM'''. |
|- | |- | ||
|00:07 | |00:07 | ||
| In this tutorial, you will learn to: | | In this tutorial, you will learn to: | ||
− | + | '''Import''' '''Mesh''' files from a meshing software in OpenFOAM. | |
− | + | ||
− | + | ||
|- | |- | ||
|00:14 | |00:14 | ||
− | | To record this tutorial I am using | + | | To record this tutorial, I am using: |
− | * '''Linux | + | * '''Linux Operating system Ubuntu''' version 12.04 |
* '''OpenFOAM''' version 2.1.1 | * '''OpenFOAM''' version 2.1.1 | ||
* '''ParaView''' version 3.12.0 | * '''ParaView''' version 3.12.0 | ||
Line 23: | Line 21: | ||
|- | |- | ||
|00:26 | |00:26 | ||
− | |As a | + | |As a prerequisite, the user should know how to generate a '''Mesh''' in softwares like - |
− | '''Gambit, Ansys ICEM , CFX, Salome | + | '''Gambit, Ansys ICEM , CFX, Salome''' etc. |
|- | |- | ||
|00:40 | |00:40 | ||
− | | | + | |Using '''blockMesh''', we can easily make simple geometries. For example- '''box, pipe''' etc. |
− | + | It is difficult to create complex geometries using '''blockMesh'''. | |
|- | |- | ||
|00:53 | |00:53 | ||
− | | | + | |But OpenFOAM supports importing '''mesh''' from third party meshing software. |
− | + | There are '''commands''' available in OpenFOAM to import these '''mesh''' files. | |
|- | |- | ||
Line 42: | Line 40: | ||
|- | |- | ||
|01:08 | |01:08 | ||
− | |Here is the geometry of our case. | + | |Here is the '''geometry''' of our case. |
− | We have a | + | We have a square cylinder: |
− | *length 1m and height 1m. | + | * length 1m and height 1m. |
− | *'''Inlet velocity''' is 1 m/s | + | * '''Inlet velocity''' is 1 m/s. |
|- | |- | ||
|01:22 | |01:22 | ||
− | | | + | |We are solving this for a '''Reynolds Number (Re)''' = 100. |
+ | The domain chosen is 40m by 60m. | ||
+ | The '''Boundary conditions''' are as shown in the diagram. | ||
|- | |- | ||
Line 57: | Line 57: | ||
|- | |- | ||
|01:40 | |01:40 | ||
− | |In your | + | |In your OpenFOAM working directory, go to the '''icoFoam solver''' and click on it. |
|- | |- | ||
|01:47 | |01:47 | ||
− | |Now | + | |Now, create a folder by the name '''cylinder'''. |
|- | |- | ||
| 01:52 | | 01:52 | ||
− | |Now go to the '''cavity case'''.Copy | + | |Now go to the '''cavity case'''. '''Copy''' the '0' (zero0 and '''system''' folders from the '''cavity''' case. |
|- | |- | ||
|01:59 | |01:59 | ||
− | |Paste this inside the '''cylinder''' folder.Note that | + | |'''Paste''' this inside the '''cylinder''' folder. Note that you do not need the '''constant''' folder. |
|- | |- | ||
|02:10 | |02:10 | ||
− | |On my | + | |On my desktop, I have a '''Fluent mesh''' file with a '''.(dot) msh''' extension. It is named as '''cylmesh.msh'''. |
|- | |- | ||
|02:23 | |02:23 | ||
− | |Copy-and-paste this file in the '''cylinder''' folder in '''icoFoam'''.Our setup is now ready. | + | |Copy-and-paste this file in the '''cylinder''' folder, in '''icoFoam'''. Our setup is now ready. |
|- | |- | ||
|02:32 | |02:32 | ||
− | |Open the '''command terminal'''.Type | + | |Open the '''command terminal'''. Type "run" and press '''Enter'''. |
|- | |- | ||
|02:37 | |02:37 | ||
− | |Type '''cd tutorials'''; press '''Enter'''. | + | |Type: '''cd space tutorials'''; press '''Enter'''. |
|- | |- | ||
|02:42 | |02:42 | ||
− | |Type '''cd incompressible''' | + | |Type: '''cd space incompressible''' and press '''Enter'''. Type '''cd space icoFoam'''; press '''Enter'''. Type '''cd space cylinder''' and press '''Enter'''. |
|- | |- | ||
|02:58 | |02:58 | ||
− | |For a '''Fluent mesh''' file, in the | + | |For a '''Fluent mesh''' file, in the command terminal, we need to type "fluentMeshToFoam" (Note that M, T, F are capital here) (space) "cylmesh.msh" and press '''Enter'''. |
|- | |- | ||
|03:20 | |03:20 | ||
− | |On the | + | |On the terminal you will see that the '''mesh file''' is converted to '''openfoam data file''' |
|- | |- |
Revision as of 13:16, 5 July 2016
Time | Narration |
00:00 | Hello and welcome to the spoken tutorial on Importing Mesh files in OpenFOAM. |
00:07 | In this tutorial, you will learn to:
Import Mesh files from a meshing software in OpenFOAM. |
00:14 | To record this tutorial, I am using:
|
00:26 | As a prerequisite, the user should know how to generate a Mesh in softwares like -
Gambit, Ansys ICEM , CFX, Salome etc. |
00:40 | Using blockMesh, we can easily make simple geometries. For example- box, pipe etc.
It is difficult to create complex geometries using blockMesh. |
00:53 | But OpenFOAM supports importing mesh from third party meshing software.
There are commands available in OpenFOAM to import these mesh files. |
01:05 | We will now learn to import these files. |
01:08 | Here is the geometry of our case.
We have a square cylinder:
|
01:22 | We are solving this for a Reynolds Number (Re) = 100.
The domain chosen is 40m by 60m. The Boundary conditions are as shown in the diagram. |
01:36 | This is the mesh file generated in a meshing software. |
01:40 | In your OpenFOAM working directory, go to the icoFoam solver and click on it. |
01:47 | Now, create a folder by the name cylinder. |
01:52 | Now go to the cavity case. Copy the '0' (zero0 and system folders from the cavity case. |
01:59 | Paste this inside the cylinder folder. Note that you do not need the constant folder. |
02:10 | On my desktop, I have a Fluent mesh file with a .(dot) msh extension. It is named as cylmesh.msh. |
02:23 | Copy-and-paste this file in the cylinder folder, in icoFoam. Our setup is now ready. |
02:32 | Open the command terminal. Type "run" and press Enter. |
02:37 | Type: cd space tutorials; press Enter. |
02:42 | Type: cd space incompressible and press Enter. Type cd space icoFoam; press Enter. Type cd space cylinder and press Enter. |
02:58 | For a Fluent mesh file, in the command terminal, we need to type "fluentMeshToFoam" (Note that M, T, F are capital here) (space) "cylmesh.msh" and press Enter. |
03:20 | On the terminal you will see that the mesh file is converted to openfoam data file |
03:28 | Now go back to the cylinder folder |
03:31 | The constant folder has been generated.Click on the constant folder to open it. |
03:38 | Transport Property file is missing from the constant folder |
03:42 | Go two levels back and copy the transport property from the constant folder of the cavity case. |
03:53 | Paste this inside the constant folder of cylinder which we created just now.We will keep the default viscosity. |
04:05 | Switch back to the terminal. |
04:08 | Note that we do not run blockMesh command here.To view the boundary conditions in the mesh file |
04:15 | Go to Constant > polyMesh.Type ls.You will see the boundary file. |
04:25 | Open it in any editor of your choice. |
04:30 | The boundary condition names are as seen in the geometry slide. |
04:36 | In case of any error with the boundary names, you can refer the boundary fileclose this. |
04:45 | In the terminal, go two levels back and go to the 0 folder. |
04:52 | Open the pressure file in the 0 folder. |
04:57 | Note that the boundary names should exactly match with the boundary file.Change them if needed.Close this file. |
05:08 | Go one level back and go to the system folder. |
05:15 | Open the controlDict file. |
05:18 | We will change the end time of controlDict file.Close this. |
05:25 | Go one level back.To start the iterations', type icoFoam and press EnterIterations running will be seen in the terminal. |
05:39 | To view the geometry, type paraFoam and press Enter.In the ParaView window, click on the Apply button in the object inspector menu. |
05:53 | You can see the geometry.In the Active variable control menu, change from solid color to U velocity |
06:03 | The initial velocity condition is seen here. |
06:08 | Click on the play button in the VCR menu on the top right-hand side. |
06:15 | We can see the velocity contours with the passage of time. |
06:20 | Close the paraview window. |
06:23 | Here is a list of command to import geometry from other meshing software.
This brings us to the end of the tutorial. |
06:54 | As an assignment
|
07:12 | In this tutorial we learnt :
|
07:18 | Watch the video available at this URL:http://spoken-tutorial.org/What_is_a_Spoken_Tutorial.It summarizes the Spoken Tutorial project.If you do not have good bandwidth, you can download and watch it |
07:30 | The Spoken Tutorial Project Team-Conducts workshops using spoken tutorials-Gives certificates to those who pass an online test-For more details, please write to contact@spoken-tutorial.org |
07:46 | Spoken Tutorials Project is a part of the Talk to a Teacher project,It is supported by the National Mission on Education through ICT, MHRD,Government of India.This project is coordinated by http://spoken-tutorialMore information on the same is available at the following URL linkhttp://spoken-tutorial.org/NMEICT-Intro |
08:03 | This is Rahul Joshi from IIT BOMBAY signing off.Thanks for joining |