Difference between revisions of "OpenFOAM/C3/Importing-mesh-file-in-OpenFOAM/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with "{|border=1 | '''Time''' | '''Narration''' |- | 00:00 | Hello and welcome to the spoken tutorial on '''Importing Mesh files in OpenFOAM''' |- |00:07 | In this tutorial, you w...")
 
 
(3 intermediate revisions by 2 users not shown)
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'''
+
'''Import''' '''Mesh''' files from a meshing software in OpenFOAM.
* 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''' Operating system '''Ubuntu''' version 12.04.
+
'''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
  
 
|-
 
|-
 
|00:26
 
|00:26
|As a pre-requisite, the user should know how to generate a Mesh in software like -
+
|As a prerequisite, the user should know how to generate a '''Mesh''' in softwares like -
'''Gambit, Ansys ICEM , CFX, Salome etc'''.
+
'''Gambit, Ansys ICEM , CFX, Salome''' etc.
  
 
|-
 
|-
 
|00:40
 
|00:40
|*Using '''blockMesh''', we can easily make '''simple''' geometries.*For example- '''box, pipe''' etc.
+
|Using '''blockMesh''', we can easily make simple geometries. For example- '''box, pipe''' etc.
*It is difficult to create complex geometries using '''blockMesh'''.
+
It is difficult to create complex geometries using '''blockMesh'''.
  
 
|-
 
|-
 
|00:53
 
|00:53
|*But '''OpenFOAM''' supports importing '''mesh''' from third party '''meshing''' software.
+
|But OpenFOAM supports importing '''mesh''' from third party meshing software.
*There are '''commands''' available in '''OpenFOAM''', to import these '''mesh''' files.
+
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 '''square cylinder'''
+
We have a square cylinder:length 1m and height 1m.'''Inlet velocity''' is 1 m/s.
*length 1m and height 1m.
+
*'''Inlet velocity''' is 1 m/s
+
  
 
|-
 
|-
 
|01:22
 
|01:22
|*We are solving this for a '''Reynolds Number (Re)''' = 100 *The '''domain''' chosen is '''40'''m by '''60'''m *The '''Boundary conditions are as shown in the diagram'''
+
|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 55:
 
|-
 
|-
 
|01:40
 
|01:40
|In your '''OpenFOAM working directory''', go to the '''icoFoam solver''' and click on it.
+
|In your OpenFOAM working directory, go to the '''icoFoam solver''' and click on it.
  
 
|-
 
|-
 
|01:47
 
|01:47
|Now Create a folder by the name '''cylinder'''
+
|Now, create a folder by the name '''cylinder'''.
  
 
|-
 
|-
 
| 01:52
 
| 01:52
|Now go to the '''cavity case'''.Copy the '''0 and system''' folders from the '''cavity''' case.
+
|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, you do not need the '''constant''' folder.
+
|'''Paste''' this inside the '''cylinder''' folder. Note that you do not need the '''constant''' folder.
  
 
|-
 
|-
 
|02:10
 
|02:10
|On my '''desktop''', I have a '''Fluent mesh file''' with a '''.(dot) msh''' extension.It is named as '''cylmesh.msh'''
+
|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 '''run''' and press '''Enter'''.
+
|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'''; press '''Enter'''.Type '''cd icoFoam'''; press '''Enter'''Type '''cd cylinder''' and press '''Enter'''.
+
|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 '''command terminal''' we need to type'''fluentMeshToFoam note that (MTF) are capital here (space) cylmesh.msh'''and press '''Enter'''
+
|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 '''terminal''' you will see that the '''mesh file''' is converted to '''openfoam data file'''
+
|On the terminal, you will see that the '''mesh''' file is now converted to '''openFoam data file'''.
  
 
|-
 
|-
 
|03:28
 
|03:28
|Now go back to the '''cylinder''' folder
+
|Now, go back to the '''cylinder''' folder.
  
 
|-
 
|-
 
|03:31
 
|03:31
|The '''constant''' folder has been generated.Click on the '''constant''' folder to open it.
+
|The '''constant''' folder has been generated. Click on the '''constant''' folder to open it.
  
 
|-
 
|-
 
|03:38
 
|03:38
|'''Transport Property''' file is missing from the '''constant''' folder
+
|'''transport Property''' file is missing from the '''constant''' folder.
  
 
|-
 
|-
 
|03:42
 
|03:42
|Go two levels back and copy the '''transport property''' from the '''constant folder''' of the '''cavity case'''.
+
|Go two levels back and copy the '''transport property''' from the '''constant''' folder of the '''cavity case'''.
  
 
|-
 
|-
 
|03:53
 
|03:53
|Paste this inside the '''constant''' folder of '''cylinder''' which we created just now.We will keep the default '''viscosity'''.
+
|'''Paste''' this inside the '''constant''' folder of '''cylinder''' which we created just now. We will keep the default '''viscosity'''.
  
 
|-
 
|-
Line 125: Line 123:
 
|-
 
|-
 
|04:08
 
|04:08
|'''Note that''' we do not run '''blockMesh''' command here.To view the '''boundary conditions''' in the '''mesh''' file
+
|Note that we do not run '''blockMesh''' command here. To view the '''boundary conditions''' in the '''mesh''' file,
  
 
|-
 
|-
 
|04:15
 
|04:15
|Go to '''Constant > polyMesh'''.Type '''ls'''.You will see the '''boundary''' file.
+
|go to '''Constant > polyMesh'''. Type "ls". You will see the '''boundary''' file.
  
 
|-
 
|-
Line 141: Line 139:
 
|-
 
|-
 
|04:36
 
|04:36
|In case of any error with the '''boundary names''', you can refer the '''boundary file'''close this.
+
|In case of any error with the '''boundary names''', you can refer the '''boundary file'''. Close this.
  
 
|-
 
|-
 
|04:45
 
|04:45
|In the '''terminal''', go two levels back and go to the '''0''' folder.
+
|In the terminal, go two levels back and go to the '0' (zero) folder.
  
 
|-
 
|-
 
|04:52
 
|04:52
|Open the '''pressure file''' in the '''0 folder'''.
+
|Open the '''pressure''' file in the '0' (zero) folder.
  
 
|-
 
|-
 
|04:57
 
|04:57
|Note that the '''boundary''' names should exactly match with the '''boundary file'''.Change them if needed.Close this file.
+
|Note that the '''boundary''' names should exactly match with the '''boundary''' file. Change them if needed. Close this file.
  
 
|-
 
|-
Line 165: Line 163:
 
|-
 
|-
 
|05:18
 
|05:18
|We will change the end time of '''controlDict''' file.Close this.
+
|We will change the end time of the '''controlDict''' file. Close this.
  
 
|-
 
|-
 
|05:25
 
|05:25
|Go one level back.To start the '''iterations''', type '''icoFoam''' and press '''Enter'''''Iterations''' running will be seen in the '''terminal'''.
+
|Go one level back. To start the '''iterations''', type "icoFoam" and press '''Enter'''. Iterations running will be seen in the terminal.
  
 
|-
 
|-
 
|05:39
 
|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.
+
|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
 
|05:53
|You can see the '''geometry'''.In the '''Active variable control''' menu, change from '''solid color''' to '''U velocity'''
+
|You can see the '''geometry'''. In the '''Active variable control''' menu, change from '''solid color''' to ''''U' velocity'''.
  
 
|-
 
|-
Line 185: Line 183:
 
|-
 
|-
 
|06:08
 
|06:08
|Click on the '''play''' button in the '''VCR menu''' on the top right-hand side.
+
|Click on the '''play''' button in the '''VCR menu''', on the top right-hand side.
  
 
|-
 
|-
Line 197: Line 195:
 
|-
 
|-
 
|06:23
 
|06:23
|Here is a list of command to''' import geometry''' from other '''meshing software'''.
+
|Here is a list of commands to''' import geometry''' from other '''meshing software'''.
* '''ANSYS : ansysMeshToFoam space <filename>'''
+
'''ANSYS : ansysToFoam space <filename>'''
*'''IDEAS : ideasTofoam space <filename>'''
+
'''IDEAS : ideasTofoam space <filename>'''
*'''CFX : cfxToFoam space <filename>'''
+
'''CFX : cfxToFoam space <filename>'''
*'''SALOME : ideasUnvToFoam space <filename>'''
+
'''SALOME : ideasUnvToFoam space <filename>'''
  
 
This brings us to the end of the tutorial.
 
This brings us to the end of the tutorial.
Line 207: Line 205:
 
|-
 
|-
 
|06:54
 
|06:54
|As an '''assignment'''
+
|As an assignment-
* Try importing the '''mesh''' file of circular cylinder.
+
Try importing the '''mesh''' file of a circular cylinder.
* '''Mesh''' file by the name '''circcyl.msh'''is provided with this tutorial.
+
'''Mesh''' file by the name '''circcyl.msh'''is provided with this tutorial.
* Solve it using the '''icoFoam solver'''.
+
Solve it using the ''''icoFoam' solver'''.
  
 
|-
 
|-
 
|07:12
 
|07:12
|In this tutorial we learnt :
+
|In this tutorial, we learnt importing geometry from other '''meshing''' softwares.
*Importing geometry from other '''meshing''' software.
+
  
 
|-
 
|-
 
|07:18
 
|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
+
|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
 
|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
+
|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
 
|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
+
|'''Spoken Tutorial''' 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. More information on this mission is available at the following URL:
 +
http://spoken-tutorial.org/NMEICT-Intro
  
 
|-
 
|-
 
|08:03
 
|08:03
|This is Rahul Joshi from IIT BOMBAY signing off.Thanks for joining
+
|This is Rahul Joshi from '''IIT Bombay''', signing off. Thanks for joining.
  
 
|-
 
|-
 
|}
 
|}

Latest revision as of 18:38, 20 February 2017

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:

Linux Operating system Ubuntu version 12.04 OpenFOAM version 2.1.1 ParaView version 3.12.0

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:length 1m and height 1m.Inlet velocity is 1 m/s.

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 now 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 file. Close this.
04:45 In the terminal, go two levels back and go to the '0' (zero) folder.
04:52 Open the pressure file in the '0' (zero) 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 the controlDict file. Close this.
05:25 Go one level back. To start the iterations, type "icoFoam" and press Enter. Iterations 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 commands to import geometry from other meshing software.

ANSYS : ansysToFoam space <filename> IDEAS : ideasTofoam space <filename> CFX : cfxToFoam space <filename> SALOME : ideasUnvToFoam space <filename>

This brings us to the end of the tutorial.

06:54 As an assignment-

Try importing the mesh file of a circular cylinder. Mesh file by the name circcyl.mshis provided with this tutorial. Solve it using the 'icoFoam' solver.

07:12 In this tutorial, we learnt importing geometry from other meshing softwares.
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 Tutorial 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. More information on this mission is available at the following URL:

http://spoken-tutorial.org/NMEICT-Intro

08:03 This is Rahul Joshi from IIT Bombay, signing off. Thanks for joining.

Contributors and Content Editors

PoojaMoolya, Pratik kamble, Sandhya.np14